@reltio/remotes 1.4.1076 → 1.4.1077

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/4589.js CHANGED
@@ -1 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4589],{25601:(e,t,n)=>{n.d(t,{K:()=>f,N:()=>m});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(77277),s=n(12231),c=n(90436);const d=(0,n(79692).Z)((e=>({button:{padding:"9px 16px 9px 12px","& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},label:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));var p=n(79573),u=n(83088),g=n(39475);function h(){return h=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},h.apply(this,arguments)}let m;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(m||(m={}));const f=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=m.iconButton,label:o,disabled:f,icon:b,onClick:y=p.ZT,onMenuClose:x=p.ZT}=e,v=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const E=d();return(()=>{switch(r){case"iconButton":return a().createElement(g.k,h({disabled:f,className:l()(E.iconButton,n),size:"S",tooltipTitle:o,onClick:y,icon:b},v));case"button":return a().createElement(i.Z,h({className:l()(E.button,n),disabled:f,startIcon:a().createElement(b,null),onClick:y,color:"primary",classes:{startIcon:E.startIcon,label:E.label}},v),a().createElement(u.C,{value:o},a().createElement("div",{className:E.overflowStyle},o)));case"menuItem":{const e=()=>{x(),y()};return a().createElement(s.Z,h({classes:{root:E.menuItem},onClick:e,disabled:f,ref:t},v),a().createElement(a().Fragment,null,a().createElement(b,{className:E.menuIcon}),a().createElement(c.Z,{classes:{root:E.menuText}},o)))}}})()}));f.displayName="ActionButton"},33903:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(87918),s=n.n(i),c=n(61837),d=n(87685),p=n(80030);function u(){return u=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},u.apply(this,arguments)}const g=e=>a().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),h=(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=h();return a().createElement(p.ZP,{title:t?s().text("Clear all filters"):s().text("Filter")},a().createElement(c.Z,{onClick:n,classes:{root:r.button}},t?a().createElement(a().Fragment,null,a().createElement(g,{className:r["filterIcon--enabled"]}),a().createElement(d.default,{color:"primary",className:r.closeIcon})):a().createElement(g,null)))};m.propTypes={enabled:l().bool,onClick:l().func};const f=m},75975:(e,t,n)=>{n.d(t,{ZP:()=>m});var r=n(17440),a=n(79573);function o(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",d="TOGGLE_SORT",p="CHANGE_PAGE",u="CHANGE_ROWS_PER_PAGE",g={changeColumns:(0,a.zD)(i),toggleFilters:(0,a.zD)(s),changeFilter:(0,a.zD)(c),toggleSort:(0,a.zD)(d),changePage:(0,a.zD)(p),changeRowsPerPage:(0,a.zD)(u)},h=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),a=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 a(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>a(t)?(0,r.dissoc)(t,e):e),e)},e)},m={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return h(e,n)}case s:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:a}=t.payload;return(0,r.evolve)({filters:a?(0,r.assoc)(n,a):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case d:{const n=t.payload,l=(0,r.path)(["sorting","field"],e),i=(0,r.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,a.Dh)(n===l?i:null)},page:0})}case p:return o({},e,{page:t.payload});case u:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:g,changeVisibleColumns:h}},1730:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(27556),a=n(13980),o=n.n(a),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 d=(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 u=(0,l.forwardRef)(((e,t)=>{let{children:n,className:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const l=d();return i().createElement(r.Z,p({ref:t,className:a,classes:{root:l["basic-view__paper"]}},o),n)}));u.displayName="BasicView",u.propTypes={children:o().node,className:o().string};const g=u},22118:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(77277),s=n(8629),c=n(49429),d=n(38724),p=n(55999),u=n(79249);const g=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),h=e=>{let{open:t,title:n,content:r,onCancel:o,cancelCaption:h=l().text("Cancel"),onDiscard:m,discardCaption:f="",onSave:b,saveCaption:y=l().text("Save"),disabledSave:x=!1}=e;const v=g();return a().createElement(s.Z,{open:t,onClose:o,classes:{paperScrollPaper:v.paper}},a().createElement(u.Z,{classes:{root:v.title}},n),a().createElement(d.Z,{classes:{root:v.content}},a().createElement(p.Z,{classes:{root:v.contentText}},r)),a().createElement(c.Z,{className:v.actionButtons,disableSpacing:!0},o&&a().createElement(i.Z,{onClick:o},h),a().createElement("div",null,m&&a().createElement(i.Z,{onClick:m,classes:{root:v.discardButton}},f),a().createElement(i.Z,{onClick:b,color:"primary",disabled:x,autoFocus:!0},y))))}},85596:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(22241),s=n(17440),c=n(64651),d=n(65629);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 u=e=>{let{relation:t={},inRelationTypes:n=[],outRelationTypes:o=[],onChange:l=s.identity,applyFirstByDefault:i=!1,reversedContextLabels:u=!1}=e,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:h,fromEditorValue:m,toEditorValue:f}=(0,c.n)({reversedContextLabels:u}),b=(0,r.useMemo)((()=>h(n,o)),[h,n,o]),y=(0,r.useCallback)((0,s.pipe)(m(n,o),l),[m,n,o,l]),x=!!t.relationType;return(0,r.useEffect)((()=>{i&&b.length&&!x&&y(b[0])}),[b,i,y,x]),a().createElement(d.Z,p({value:f(t,b),options:b,onChange:y},g))};u.propTypes={className:l().string,relation:i.bNA,inRelationTypes:l().arrayOf(i.IYE),outRelationTypes:l().arrayOf(i.IYE),applyFirstByDefault:l().bool,reversedContextLabels:l().bool,onChange:l().func};const g=u},46804:(e,t,n)=>{n.d(t,{i:()=>f});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(17440),s=n(87685),c=n(61837),d=n(29611),p=n(50581),u=n(21853),g=n(40435),h=n(79573);const m=(0,n(79692).Z)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{flex:"1 0 200px",marginLeft:"70px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),f=e=>{let{query:t,onChange:n}=e;const[o,f]=(0,r.useState)(t),[b,y]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{f(t)}),[t]);const x=m(),v=o&&o.length;return b?a().createElement(d.Z,{className:x.input,value:o,autoFocus:!0,placeholder:l().text("Search"),disableUnderline:!0,onChange:(0,i.pipe)(h.NA,f),startAdornment:a().createElement(p.Z,{position:"start"},a().createElement(u.default,{className:x.startAdornment})),endAdornment:a().createElement(p.Z,{position:"end"},v&&a().createElement(g.Z,{size:"S",icon:s.default,onClick:(0,i.pipe)(i.F,y,(0,i.always)(""),(0,i.tap)(n),f)})),onKeyPress:(0,i.when)((0,i.propEq)("key","Enter"),(0,i.pipe)((0,i.always)(o),i.trim,n))}):a().createElement(c.Z,{className:x.searchButton,onClick:(0,i.pipe)(i.T,y)},a().createElement(u.default,null))}},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(17998);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const o=s();return a().createElement(i.Z,{title:n,classes:{root:l()(o.container,t),title:o.title}},r)}},10742:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(13980),a=n.n(r),o=n(24328),l=n.n(o),i=n(44443);const s=()=>l().createElement("div",{style:{display:"none"}}),c=e=>{let{widthToHide:t,children:n}=e;return l().createElement(i.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?l().createElement(l().Fragment,null,n):l().createElement(s,null)}})};c.propTypes={children:a().node,widthToHide:a().number.isRequired};const d=c},48685:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),l=e=>{let{to:t,children:n,onClick:r}=e;const l=o();return a().createElement("a",{href:t,onClick:e=>{r&&(r(),e.stopPropagation(),e.preventDefault())},className:l.link},n)}},22834:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(85777);const s=(0,n(79692).Z)((e=>({label:{backgroundColor:"rgba(43,152,240,0.12)",fontSize:"12px",lineHeight:"14px",color:e.palette.text.primary,display:"flex",alignItems:"center",padding:"4px 8px"},container:{display:"flex",alignItems:"center",cursor:"pointer",marginBottom:"8px"}})));function c(){return c=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},c.apply(this,arguments)}const d=(0,r.forwardRef)(((e,t)=>{let{children:n,expanded:r,onExpand:o,className:d}=e,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","expanded","onExpand","className"]);const u=s();return a().createElement("div",c({onClick:o,ref:t,className:l()(u.container,d)},p),a().createElement(i.Z,{expanded:r}),a().createElement("div",{className:u.label},n))}));d.displayName="MatchRuleBadge";const p=d},10160:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(22241),l=n(35583),i=n(70170),s=n(3421);const c=e=>{let{entitiesMap:t,entity:n,match:r,metadata:c}=e;return(0,o.Pcm)(r)?a().createElement(i.Z,{transitiveMatchRules:(0,o.wB1)(c,r,t)}):a().createElement(s.Z,{matchRules:(0,o.LS0)(c,n.type,r.matchRules),Component:l.Z})}},6975:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o);const i=e=>{let{isMlMatch:t=!1}=e;return a().createElement(a().Fragment,null,t?l().text("Match IQ"):l().text("Match rules"))}},43977:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),o=n(6975);const l=(0,n(79692).Z)({title:{fontWeight:500,marginBottom:"9px"},body:{fontWeight:"normal",marginLeft:"16px"},container:{padding:"8px",fontSize:"12px",lineHeight:"14px"}}),i=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const r=l();return a().createElement("div",{className:r.container},a().createElement("div",{className:r.title},a().createElement(o.Z,{isMlMatch:t})," "),a().createElement("div",{className:r.body},n.map((e=>a().createElement("div",{key:e.uri},`- ${e.label}`)))))}},45362:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(6975);const s=(0,n(79692).Z)((e=>({container:{fontSize:"13px",lineHeight:"15px"},title:{color:e.palette.text.secondary,marginBottom:"7px"},labelsContainer:{color:e.palette.text.primary,marginBottom:"8px"}}))),c=e=>{let{isMlMatch:t,matchRules:n,className:r}=e;const o=s();return a().createElement("div",{className:l()(o.container,r)},a().createElement("div",{className:o.title},a().createElement(i.Z,{isMlMatch:t})),a().createElement("div",{className:o.labelsContainer},n.map((e=>a().createElement("div",{key:e.uri},`- ${e.label}`)))))}},35583:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),o=n(43977),l=n(45362),i=n(78223),s=n(22834);const c=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column",alignItems:"flex-start"},rulesContainer:{marginLeft:"16px"},icon:{height:"17px",width:"15px",marginRight:"5px"}});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)}const p=e=>a().createElement("svg",d({width:192,height:192,viewBox:"0 0 192 192",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"94.582%",y1:"6.451%",x2:"23.195%",y2:"83.323%",id:"MLMatch_svg__b"},a().createElement("stop",{stopColor:"#CDE1FF",offset:"0%"}),a().createElement("stop",{stopColor:"#AFFBF4",offset:"100%"})),a().createElement("linearGradient",{x1:"94.582%",y1:"6.594%",x2:"23.195%",y2:"83.214%",id:"MLMatch_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FDFFFF",offset:"100%"})),a().createElement("linearGradient",{x1:"93.837%",y1:"55.274%",x2:"29.292%",y2:"-20.431%",id:"MLMatch_svg__g"},a().createElement("stop",{stopColor:"#FFFCC7",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#FFF470",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"98.152%",id:"MLMatch_svg__i"},a().createElement("stop",{stopColor:"#83D6FF",offset:"0%"}),a().createElement("stop",{stopColor:"#72B9EF",offset:"100%"})),a().createElement("path",{d:"M1.821 66.003L34.263 9.94C36.633 5.813 45.673.594 51.398.072l64.445-.064c5.06-.241 14.821 5.084 17.888 10.395l31.467 54.503c3.186 5.518 2.765 16.592-.13 22.117l-30.948 53.481c-3.776 5.127-14.165 11.126-19.57 11.328l-62.134.061c-5.51-.264-15.934-5.764-18.758-10.655L1.856 86.155C-.846 81.475-.37 70.648 1.82 66.003z",id:"MLMatch_svg__a"}),a().createElement("path",{d:"M11.109 67.042l28.713-49.618C41.92 13.77 49.931 9.158 55.006 8.7l57.143.005c4.486-.209 13.147 4.516 15.871 9.223l27.954 48.298c2.83 4.89 2.467 14.696-.095 19.586l-27.391 47.334c-3.343 4.537-12.55 9.84-17.342 10.013l-55.094-.004c-4.886-.24-14.134-5.12-16.643-9.454L11.16 84.889c-2.4-4.147-1.989-13.735-.05-17.847z",id:"MLMatch_svg__c"}),a().createElement("path",{d:"M.995 0c26.4.684 47.59 22.234 47.59 48.72 0 26.23-23.795 34.53-23.795 56.987 0 3.703-3.011 6.705-6.725 6.705l-17.07-.001V68.985c6.466-1.238 11.353-6.923 11.353-13.75S7.46 42.722.995 41.485V0z",id:"MLMatch_svg__e"}),a().createElement("path",{d:"M47.353 0l-.087 41.235-.225.003c-7.588.167-13.688 6.37-13.688 13.997 0 7.683 6.19 13.92 13.854 14l-.091 43.265H27.887c-1.894-.56-3.197-1.234-3.91-2.025-.712-.79-1.357-2.275-1.933-4.455l-2.335-10.733c-.354-1.265-.674-2.183-.96-2.753-.286-.57-.784-1.281-1.494-2.134L2.002 70.367c-.846-.949-1.383-1.73-1.61-2.343-.228-.613-.356-1.626-.386-3.038V31.34c-.028-.785.044-1.37.216-1.757.173-.387.566-.848 1.18-1.382L28.368.885c.37-.367.665-.601.885-.704.22-.103.557-.163 1.01-.181h17.09z",id:"MLMatch_svg__h"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("g",{transform:"translate(12 6)"},a().createElement("use",{fill:"url(#MLMatch_svg__b)",xlinkHref:"#MLMatch_svg__a"}),a().createElement("use",{fill:"url(#MLMatch_svg__d)",opacity:.5,xlinkHref:"#MLMatch_svg__c"})),a().createElement("g",{transform:"translate(69.652 30.765)"},a().createElement("rect",{fill:"#363636",x:15.457,y:132.745,width:21.151,height:23.158,rx:10.576}),a().createElement("path",{d:"M48.146 118.763v18.93c0 7.198-5.944 13.035-13.277 13.035h-16.71c-7.333 0-13.278-5.837-13.278-13.036v-18.929a13 13 0 01.023-.763h43.22a13 13 0 01.022.763z",fill:"#717171"}),a().createElement("path",{d:"M41.348 137.2c0 7.199-4.947 13.035-11.048 13.035H16.395c-6.101 0-11.047-5.836-11.047-13.035v-18.965h36V137.2z",fill:"#828282"}),a().createElement("path",{d:"M47.51 138.235a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956z",fill:"#B1B1B1"}),a().createElement("path",{d:"M24.999 138.234v8h-16v-8h16zm0-11v8h-16v-8h16zm0-11v8h-16v-8h16z",fill:"#C5C5C5"}),a().createElement("g",{transform:"translate(27)"},a().createElement("mask",{id:"MLMatch_svg__f",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__e"})),a().createElement("use",{fill:"#FFD44B",xlinkHref:"#MLMatch_svg__e"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFD347",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFDE72",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M11.965 48.645c.17-7.171 7.488-10.693 13.863-6.802 7.245 4.422 4.05 16.311-4.742 16.548l-.268.004h-3.227l-4.608 56.092-5.995-.253 4.413-51.248.185-4.592-10.592.001v-6h10.83l.139-3.585.002-.165zm10.737-1.681c-2.54-1.55-4.64-.58-4.737 1.766l-.005.284-.131 3.38 2.99.001c2.852 0 3.999-3.945 2.011-5.347l-.128-.084z",fill:"#F3BE13",mask:"url(#MLMatch_svg__f)"}),a().createElement("ellipse",{fill:"url(#MLMatch_svg__g)",mask:"url(#MLMatch_svg__f)",cx:-1.89,cy:48.245,rx:36.534,ry:36.667}))),a().createElement("g",{transform:"translate(45.647 30.765)"},a().createElement("mask",{id:"MLMatch_svg__j",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__h"})),a().createElement("use",{fill:"url(#MLMatch_svg__i)",xlinkHref:"#MLMatch_svg__h"}),a().createElement("path",{fill:"#D6FCFA",fillRule:"nonzero",opacity:.5,mask:"url(#MLMatch_svg__j)",d:"M38.24 11.235v6l-3.55-.001-22.207 22.207h-18.13v-6H9.997l22.207-22.206zM25.682 40.779l13.8 13.799H50v6H36.997L21.439 45.021zM53.311 28.235v6h-13.65l-3.935 4.246-4.4-4.08 5.718-6.166zM14.248 52.235l20.52 20.52h3.695v6h-6.18l-20.52-20.52H-.647v-6zM21.353 84.235h8.95L40.4 94.332h16.753v6H37.915L27.817 90.235z"})),a().createElement("circle",{fill:"#008FD8",cx:94,cy:86,r:9})));var u=n(87918),g=n.n(u);const h=(0,i.Z)(s.Z),m=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const i=c(),[s,d]=(0,r.useState)(!1),u=(0,r.useCallback)((()=>d((e=>!e))),[]);return a().createElement("div",{className:i.container},a().createElement(h,{tooltipTitle:a().createElement(o.Z,{matchRules:n,isMlMatch:t}),tooltipPlacement:"bottom-start",onExpand:u,expanded:s},t?a().createElement(a().Fragment,null,a().createElement(p,{className:i.icon}),g().text("Match IQ")):g().text("Rules")),s?a().createElement(l.Z,{className:i.rulesContainer,matchRules:n,isMlMatch:t}):null)}},3421:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(17440),s=n(22241);function c(){return c=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},c.apply(this,arguments)}const d=e=>{let{matchRules:t,Component:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["matchRules","Component"]);const[o,l]=(0,s.UkJ)(t);return a().createElement(a().Fragment,null,(0,i.isEmpty)(l)?null:a().createElement(n,c({matchRules:l},r)),(0,i.isEmpty)(o)?null:a().createElement(n,c({isMlMatch:!0,matchRules:o},r)))};d.propTypes={matchRules:s.p3$,Component:l().func};const p=d},70170:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(22834),s=n(85777),c=n(45362),d=n(3421),p=n(79692);const u=(0,p.Z)((e=>({label:{fontSize:"13px",lineHeight:"15px",color:e.palette.primary.light},container:{display:"flex",flexDirection:"column"},badge:{display:"flex",marginBottom:"8px",cursor:"pointer"},matchLabels:{marginLeft:"30px"}}))),g=e=>{let{label:t,matchRules:n}=e;const o=u(),[l,i]=(0,r.useState)(!1),p=(0,r.useCallback)((()=>i((e=>!e))),[]);return a().createElement("div",{className:o.container},a().createElement("div",{onClick:p,className:o.badge},a().createElement(s.Z,{expanded:l}),a().createElement("div",{className:o.label},t)),l?a().createElement(d.Z,{Component:c.Z,matchRules:n,className:o.matchLabels}):null)},h=(0,p.Z)({container:{display:"flex",flexDirection:"column"},rulesWrapper:{display:"flex",flexDirection:"column"}});var m=n(78223),f=n(43977);const b=(0,p.Z)({ruleWrapper:{paddingTop:"8px"},label:{fontWeight:500,fontSize:"12px"}}),y=e=>{let{transitiveMatchRules:t}=e;const n=b();return a().createElement(a().Fragment,null,t.map(((e,t)=>{let{label:r,matchRules:o}=e;return a().createElement("div",{key:t,className:n.ruleWrapper},a().createElement("div",{className:n.label},r),a().createElement(f.Z,{matchRules:o}))})))};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)}const v=(0,m.Z)(i.Z),E=e=>{let{transitiveMatchRules:t}=e;const n=h(),[o,i]=(0,r.useState)(!1),s=(0,r.useCallback)((()=>i((e=>!e))),[]);return a().createElement("div",{className:n.container},a().createElement(v,{tooltipTitle:a().createElement(y,{transitiveMatchRules:t}),tooltipPlacement:"bottom-start",onExpand:s,expanded:o},l().text("Transitive matches")),o?t.map(((e,t)=>a().createElement(g,x({key:t},e)))):null)}},84236:(e,t,n)=>{n.d(t,{H:()=>g});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o);function i(){return i=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},i.apply(this,arguments)}const s=e=>a().createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M17.045 20.455l1.41-1.41-3.41-3.41-1.41 1.41 3.41 3.41zm-9.5-12.41h3.5v5.59l-5.41 5.41 1.41 1.41 6-6v-6.41h3.5l-4.5-4.5-4.5 4.5z",id:"MergeDark_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"MergeDark_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#MergeDark_svg__a",transform:"rotate(90 12.045 12)"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#MergeDark_svg__b)",d:"M0 0h24v24H0z"})));var c=n(79573),d=n(25601),p=n(50447);function u(){return u=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},u.apply(this,arguments)}const g=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=d.N.iconButton,onMenuClose:o=c.ZT,disabled:i=!1,entity:g,entities:h,onStartRequest:m,onFinishRequest:f,onError:b}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onError"]);const{sendMergeAllRequest:x}=(0,p._)({entity:g,entities:h,onStartRequest:m,onFinishRequest:f,onError:b});return a().createElement(d.K,u({className:n,disabled:i,mode:r,label:l().text("Merge"),icon:s,onClick:x,onMenuClose:o,ref:t},y))}));g.displayName="mergeButton"},36777:(e,t,n)=>{n.d(t,{T:()=>f});var r=n(24328),a=n.n(r),o=n(17440),l=n(71153),i=n.n(l),s=n(73698),c=n(12231),d=n(95544),p=n(90436),u=n(80030);const g=(0,n(79692).Z)((e=>({root:{maxWidth:156,paddingTop:"9px",paddingBottom:"9px"},outlined:{paddingRight:32,paddingLeft:12},arrowIcon:{fontSize:"18px",top:"calc(50% - 9px)",right:"12px",color:e.palette.text.secondary},currentValue:{display:"flex",alignItems:"center"},currentValueIcon:{fontSize:"18px",marginRight:"8px",color:e.palette.text.secondary},currentValueText:{fontSize:"14px",lineHeight:"16px",textTransform:"uppercase",fontWeight:500,color:e.palette.text.primary,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},menuItem:{padding:"9px 12px 7px"},firstMenuItemButton:{borderTop:"1px solid #e4e4e4"},menuItemInner:{display:"flex",alignItems:"flex-start"},menuItemIcon:{fontSize:"18px",color:e.palette.text.secondary,marginRight:"9px"},menuItemLabel:{fontSize:"14px",lineHeight:"16px",fontWeight:500,color:e.palette.text.primary},menuItemDescription:{fontSize:"10px",lineHeight:"16px",color:e.palette.text.secondary}})));function h(){return h=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},h.apply(this,arguments)}const m=e=>"onClick"in e,f=e=>{let{optionsGroup:t,buttonsGroup:n,value:r,onChange:l,disabled:f=!1}=e;const b=g();return a().createElement(s.Z,{classes:{root:b.root,icon:b.arrowIcon,outlined:b.outlined},value:r,onChange:e=>{const{value:n}=e.target;t.some((0,o.propEq)("value",n))&&l(n)},variant:"outlined",renderValue:e=>{const{icon:n,label:r=e}=t.find((0,o.propEq)("value",e))||{};return a().createElement(d.Z,{className:b.currentValue},n&&a().createElement(n,{className:b.currentValueIcon}),a().createElement(u.ZP,{title:r},a().createElement(p.Z,{className:b.currentValueText},r)))},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},getContentAnchorEl:null},disabled:f,"data-reltio-id":"reltio-profile-select-mode"},(e=>{const t=e.findIndex(m);return e.map(((e,n)=>{const{value:r,description:o,icon:l}=e,s={value:r,className:b.menuItem};return m(e)&&(s.onClick=()=>e.onClick(r),s.className=i()(s.className,{[b.firstMenuItemButton]:n===t})),a().createElement(c.Z,h({key:r},s,{"data-reltio-id":`reltio-profile-select-mode-${r}`}),a().createElement(d.Z,{className:b.menuItemInner},a().createElement(l,{className:b.menuItemIcon}),a().createElement(d.Z,null,a().createElement(p.Z,{className:b.menuItemLabel},r),a().createElement(p.Z,{className:b.menuItemDescription},o))))}))})([...t,...n]))}},48376:(e,t,n)=>{n.d(t,{i:()=>g});var r=n(25601),a=n(24328),o=n.n(a);function l(){return l=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},l.apply(this,arguments)}const i=e=>o().createElement("svg",l({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),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:"NotMatchDark_svg__a"})),o().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"NotMatchDark_svg__b",fill:"#fff"},o().createElement("use",{xlinkHref:"#NotMatchDark_svg__a"})),o().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#NotMatchDark_svg__b)",d:"M0 0h24v24H0z"})));var s=n(79573),c=n(87918),d=n.n(c),p=n(19278);function u(){return u=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},u.apply(this,arguments)}const g=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=r.N.iconButton,onMenuClose:l=s.ZT,disabled:c=!1,entity:g,entities:h,onStartRequest:m,onFinishRequest:f}=e,b=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest"]);const{sendMarkAsNotMatchRequest:y}=(0,p.m)({entity:g,entities:h,onStartRequest:m,onFinishRequest:f});return o().createElement(r.K,u({className:n,disabled:c,mode:a,label:d().text("Not a match"),icon:i,onClick:y,onMenuClose:l,ref:t},b))}));g.displayName="notMatchButton"},91026:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(52730),s=n(22241),c=n(35674);const d=(0,n(79692).Z)((e=>({container:{position:"relative",display:"flex",fontSize:"12px",lineHeight:"14px",color:e.palette.text.primary,padding:"8px 8px 8px 0",overflow:"hidden"},colorBox:{position:"absolute",opacity:.12,top:0,left:0,bottom:0,width:"32px"},image:{width:"32px",height:"32px"},avatar:{marginRight:"8px",marginLeft:"16px",marginTop:"2px"},info:{overflow:"hidden",display:"flex",flexDirection:"column"},firstRow:{width:"100%"},label:{display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:500,color:e.palette.primary.main},link:{textDecoration:"none"},secondRow:{wordWrap:"break-word",marginTop:"4px",lineHeight:"13px",fontSize:"11px"},thirdRow:{display:"flex",alignItems:"center",fontSize:"12px",color:e.palette.text.secondary,marginTop:"auto"}})));var p=n(37573),u=n(18527),g=n(83088),h=n(20146);function m(){return m=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},m.apply(this,arguments)}const f=(0,r.memo)((e=>{let{entity:t,classes:n={},disableEntityTypeColor:r}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","classes","disableEntityTypeColor"]);const f=d(),{secondaryLabel:b,label:y,container:x}=n,v=(0,i.useSelector)(c.ZP.selectors.getMetadata),E=(0,s.idV)(t.label),{secondaryLabel:w,type:O}=t,C=(0,s.nt9)(v,O)||{},P=(0,s.VD3)(v,C,"typeColor")||s.rSc.palette.primary.main;return a().createElement("div",m({className:l()(f.container,x)},o),a().createElement("div",{className:f.colorBox,style:r?void 0:{backgroundColor:P}}),a().createElement(p.Z,{entity:t,avatarClassName:f.avatar,imageClassName:f.image}),a().createElement("div",{className:f.info},a().createElement("div",{className:f.firstRow},a().createElement(u.Z,{value:(0,s.wwR)(t),className:f.link},a().createElement(g.C,{value:E,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:l()(f.label,y)},E)))),a().createElement("div",{className:f.secondRow},w&&a().createElement(g.C,{value:w,placement:"top",showOnExceededHeight:!0},a().createElement("span",{className:b},w))),a().createElement("div",{className:f.thirdRow},a().createElement(h.Z,{entity:t}),a().createElement("div",null,(0,s.BTI)(t)))))}))},20200:(e,t,n)=>{n.d(t,{M:()=>d});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1},rulesContainer:{paddingLeft:"40px"}});var l=n(91026),i=n(10160),s=n(71153),c=n.n(s);const d=e=>{let{children:t,entitiesMap:n,entity:r,match:s,metadata:d,className:p}=e;const u=o();return a().createElement("div",{className:c()(u.root,p)},a().createElement("div",{className:u.profileCardWrapper},a().createElement(l.Z,{entity:s.object,classes:{container:u.profileCardContainer},disableEntityTypeColor:!0}),t),a().createElement("div",{className:u.rulesContainer},a().createElement(i.Z,{match:s,metadata:d,entitiesMap:n,entity:r})))}},37163:(e,t,n)=>{n.d(t,{ZP:()=>K});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(81521),s=n(17440),c=n(8978),d=n(13896),p=n(58651),u=n(46847),g=n(15459);function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var m=n(79692);const f=(0,m.Z)((()=>({"@global .rst__node":{minWidth:"100%",whiteSpace:"nowrap",position:"relative",textAlign:"left"},"@global .rst__node.rst__rtl":{textAlign:"right"},"@global .rst__nodeContent":{position:"absolute",top:0,bottom:0},"@global .rst__lineBlock, .rst__absoluteLineBlock":{height:"100%",position:"relative",display:"inline-block"},"@global .rst__absoluteLineBlock":{position:"absolute",top:0},"@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{position:"absolute",content:"",backgroundColor:"black"},"@global .rst__lineHalfHorizontalRight::before":{height:"1px",top:"50%",right:0,width:"50%"},"@global .rst__rtl.rst__lineHalfHorizontalRight::before":{left:0,right:"initial"},"@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{width:"1px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after":{right:"50%",left:"initial"},"@global .rst__lineHalfVerticalTop::after":{height:"50%"},"@global .rst__lineHalfVerticalBottom::after":{top:"auto",bottom:0,height:"50%"},"@global .rst__highlightLineVertical":{zIndex:3},"@global .rst__highlightLineVertical::before":{position:"absolute",content:"",backgroundColor:"#36c2f6",width:"8px",marginLeft:"-4px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__highlightLineVertical::before":{marginLeft:"initial",marginRight:"-4px",left:"initial",right:"50%"},"@keyframes arrow-pulse":{"0%":{transform:"translate(0, 0)",opacity:0},"30%":{transform:"translate(0, 300%)",opacity:1},"70%":{transform:"translate(0, 700%)",opacity:1},"100%":{transform:"translate(0, 1000%)",opacity:0}},"@global .rst__highlightLineVertical::after":{content:"",position:"absolute",height:0,marginLeft:"-4px",left:"50%",top:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid white",animation:"arrow-pulse 1s infinite linear both"},"@global .rst__rtl.rst__highlightLineVertical::after":{marginLeft:"initial",marginRight:"-4px",right:"50%",left:"initial"},"@global .rst__highlightTopLeftCorner::before":{zIndex:3,content:"",position:"absolute",borderTop:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(50% + 4px)",top:"50%",marginTop:"-4px",right:0,width:"calc(50% + 4px)"},"@global .rst__rtl.rst__highlightTopLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:0,right:"initial"},"@global .rst__highlightBottomLeftCorner":{zIndex:3},"@global .rst__highlightBottomLeftCorner::before":{content:"",position:"absolute",borderBottom:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(100% + 4px)",top:0,right:"12px",width:"calc(50% - 8px)"},"@global .rst__rtl.rst__highlightBottomLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:"12px",right:"initial"},"@global .rst__highlightBottomLeftCorner::after":{content:"",position:"absolute",height:0,right:0,top:"100%",marginTop:"-12px",borderTop:"12px solid transparent",borderBottom:"12px solid transparent",borderLeft:"12px solid #36c2f6"},"@global .rst__rtl.rst__highlightBottomLeftCorner::after":{left:0,right:"initial",borderRight:"12px solid #36c2f6",borderLeft:"none"}})));function b(){return b=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},b.apply(this,arguments)}const y=e=>{let{children:t,listIndex:n,swapFrom:o,swapLength:l,swapDepth:i,scaffoldBlockPxWidth:s,lowerSiblingCounts:c,connectDropTarget:d,isOver:p,draggedNode:u,canDrop:g,treeIndex:m,treeId:y,getPrevRow:x,node:v,path:E,rowDirection:w}=e,O=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]);f();const C="rtl"===w?"rst__rtl":null,P=c.length,T=[];let I;return c.forEach(((e,t)=>{let r="";if(e>0?r=0===n?"rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":t===P-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":0===n?r="rst__lineHalfHorizontalRight":t===P-1&&(r="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),T.push(a().createElement("div",{key:`pre_${1+t}`,style:{width:s},className:h("rst__lineBlock",r,C)})),m!==n&&t===i){let e,r="";r=n===o+l-1?"rst__highlightBottomLeftCorner":m===o?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",e="rtl"===w?{width:s,right:s*t}:{width:s,left:s*t},T.push(a().createElement("div",{key:t,style:e,className:h("rst__absoluteLineBlock",r,C)}))}})),I="rtl"===w?{right:s*P}:{left:s*P},d(a().createElement("div",b({},O,{className:h("rst__node",C)}),T,a().createElement("div",{className:"rst__nodeContent",style:I},r.Children.map(t,(e=>(0,r.cloneElement)(e,{isOver:p,canDrop:g,draggedNode:u}))))))};y.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},y.propTypes={treeIndex:l().number.isRequired,treeId:l().string.isRequired,swapFrom:l().number,swapDepth:l().number,swapLength:l().number,scaffoldBlockPxWidth:l().number.isRequired,lowerSiblingCounts:l().arrayOf(l().number).isRequired,listIndex:l().number.isRequired,children:l().node.isRequired,connectDropTarget:l().func.isRequired,isOver:l().bool.isRequired,canDrop:l().bool,draggedNode:l().shape({}),getPrevRow:l().func.isRequired,node:l().shape({}).isRequired,path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,rowDirection:l().string};const x=y;var v=n(98858);function E(){return E=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},E.apply(this,arguments)}function w(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 C=e=>{let{scaffoldBlockPxWidth:t,toggleChildrenVisibility:n,connectDragPreview:r,connectDragSource:o,isDragging:l,canDrop:i,canDrag:s,node:c,title:d,subtitle:p,draggedNode:u,path:g,treeIndex:m,isSearchMatch:f,isSearchFocus:b,buttons:y,className:x,style:O,didDrop:C,treeId:P,isOver:T,parentNode:I,rowDirection:S}=e,N=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]);const k=d||c.title,D=p||c.subtitle,_="rtl"===S?"rst__rtl":null;let R;s&&(R="function"==typeof c.children&&c.expanded?a().createElement("div",{className:"rst__loadingHandle"},a().createElement("div",{className:"rst__loadingCircle"},[...new Array(12)].map(((e,t)=>a().createElement("div",{key:t,className:h("rst__loadingCirclePoint",_)}))))):o(a().createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));const j=u&&(0,v.SG)(u,c),M=!C&&l;let L={left:-.5*t};return"rtl"===S&&(L={right:-.5*t}),a().createElement("div",E({style:{height:"100%"}},N),n&&c.children&&(c.children.length>0||"function"==typeof c.children)&&a().createElement("div",null,a().createElement("button",{type:"button","aria-label":c.expanded?"Collapse":"Expand",className:h(c.expanded?"rst__collapseButton":"rst__expandButton",_),style:L,onClick:()=>n({node:c,path:g,treeIndex:m})}),c.expanded&&!l&&a().createElement("div",{style:{width:t},className:h("rst__lineChildren",_)})),a().createElement("div",{className:h("rst__rowWrapper",_)},r(a().createElement("div",{className:h("rst__row",M&&"rst__rowLandingPad",M&&!i&&"rst__rowCancelPad",f&&"rst__rowSearchMatch",b&&"rst__rowSearchFocus",_,x),style:w({opacity:j?.5:1},O)},R,a().createElement("div",{className:h("rst__rowContents",!s&&"rst__rowContentsDragDisabled",_)},a().createElement("div",{className:h("rst__rowLabel",_)},a().createElement("span",{className:h("rst__rowTitle",c.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof k?k({node:c,path:g,treeIndex:m}):k),D&&a().createElement("span",{className:"rst__rowSubtitle"},"function"==typeof D?D({node:c,path:g,treeIndex:m}):D)),a().createElement("div",{className:"rst__rowToolbar"},y.map(((e,t)=>a().createElement("div",{key:t,className:"rst__toolbarButton"},e)))))))))};C.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},C.propTypes={node:l().shape({}).isRequired,title:l().oneOfType([l().func,l().node]),subtitle:l().oneOfType([l().func,l().node]),path:l().arrayOf(l().oneOfType([l().string,l().number])).isRequired,treeIndex:l().number.isRequired,treeId:l().string.isRequired,isSearchMatch:l().bool,isSearchFocus:l().bool,canDrag:l().bool,scaffoldBlockPxWidth:l().number.isRequired,toggleChildrenVisibility:l().func,buttons:l().arrayOf(l().node),className:l().string,style:l().shape({}),connectDragPreview:l().func.isRequired,connectDragSource:l().func.isRequired,parentNode:l().shape({}),isDragging:l().bool.isRequired,didDrop:l().bool.isRequired,draggedNode:l().shape({}),isOver:l().bool.isRequired,canDrop:l().bool,rowDirection:l().string};const P=C;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 I extends r.Component{render(){const e=this.props,{children:t,connectDropTarget:n,treeId:o,drop:l}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","connectDropTarget","treeId","drop"]);return n(a().createElement("div",null,r.Children.map(t,(e=>(0,r.cloneElement)(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){T(e,t,n[t])}))}return e}({},i))))))}}I.defaultProps={canDrop:!1,draggedNode:null},I.propTypes={children:l().node.isRequired,connectDropTarget:l().func.isRequired,isOver:l().bool.isRequired,canDrop:l().bool,draggedNode:l().shape({}),treeId:l().string.isRequired,drop:l().func.isRequired};const S=I,N=(0,m.Z)((()=>({"@global .rst__placeholder":{position:"relative",height:"68px",maxWidth:"300px",padding:"10px"},"@global .rst__placeholder, .rst__placeholder > *":{boxSizing:"border-box"},"@global .rst__placeholder::before":{border:"3px dashed #d9d9d9",content:"",position:"absolute",top:"5px",right:"5px",bottom:"5px",left:"5px",zIndex:-1},"@global .rst__placeholderLandingPad, .rst__placeholderCancelPad":{border:"none !important",boxShadow:"none !important",outline:"none !important"},"@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *":{opacity:"0 !important"},"@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before":{backgroundColor:"lightblue",borderColor:"white"},"@global .rst__placeholderCancelPad::before":{backgroundColor:"#e6a8ad"}}))),k=e=>{let{isOver:t,canDrop:n}=e;return N(),a().createElement("div",{className:h("rst__placeholder",n&&"rst__placeholderLandingPad",n&&!t&&"rst__placeholderCancelPad")})};k.defaultProps={isOver:!1,canDrop:!1},k.propTypes={isOver:l().bool,canDrop:l().bool};const D=k,_=e=>{let t=[],n=[],r=null;return a=>{const o=Object.keys(a).sort(),l=o.map((e=>a[e]));return(l.length!==t.length||l.some(((e,n)=>e!==t[n]))||o.some(((e,t)=>e!==n[t])))&&(t=l,n=o,r=e(a)),r}},R=_(v.Lf),j=_(v.Pg),M=_(v.o5);var L=n(22506),Z=n(75047);class A{constructor(e){this.hoverHandler=()=>{if(null===this.hoverProps)return;const{dropTargetProps:e,monitor:t,component:n}=this.hoverProps,r=t.getItem();if(!r)return;const a=this.getTargetDepth(e,t,n),o=r.node;(e.node!==this.lastDropTargetNode||a!==this.lastDropTargetDepth)&&(this.lastDropTargetNode=e.node,this.lastDropTargetDepth=a,this.dragHover({node:o,path:r.path,minimumTreeIndex:e.listIndex,depth:a}),this.hoverProps=null)},this.deferredCallHoverHandler=()=>{if(this.shouldSkipMoreFrames)return this.shouldSkipMoreFrames=!1,void(this.rafId=requestAnimationFrame(this.deferredCallHoverHandler));this.rafId=null,this.hoverHandler()},this.treeRef=e,this.resetDragVariables()}get startDrag(){return this.treeRef.startDrag}get dragHover(){return this.treeRef.dragHover}get endDrag(){return this.treeRef.endDrag}get drop(){return this.treeRef.drop}get treeId(){return this.treeRef.treeId}get dndType(){return this.treeRef.dndType}get treeData(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}get getNodeKey(){return this.treeRef.props.getNodeKey}get customCanDrop(){return this.treeRef.props.canDrop}get maxDepth(){return this.treeRef.props.maxDepth}resetDragVariables(){this.lastDropTargetNode=null,this.lastDropTargetDepth=null,this.hoverProps=null,this.lastCanDropResult=null,this.lastCanDropProps=null,this.shouldSkipMoreFrames=!1,this.rafId=null}getTargetDepth(e,t,n){let r=0;const a=e.getPrevRow();if(a){let{path:t}=a;!this.treeRef.canNodeHaveChildren(a.node)&&(t=t.slice(0,t.length-1)),r=Math.min(t.length,e.path.length)}let o,l=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(l=0,n){const r=(0,Z.findDOMNode)(n).getBoundingClientRect(),a=t.getSourceClientOffset().x-r.left;o=Math.round(a/e.scaffoldBlockPxWidth)}else o=e.path.length;else{const n="rtl"===e.rowDirection?-1:1;o=Math.round(n*t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth)}let i=Math.min(r,Math.max(0,l+o-1));if(void 0!==this.maxDepth&&null!==this.maxDepth){const e=t.getItem().node,n=(0,v.hh)(e);i=Math.max(0,Math.min(i,this.maxDepth-n-1))}return i}canDrop(e,t){if(!t.isOver())return!1;const n=e.getPrevRow(),r=n?n.path:[],a=n?n.node:{},o=Math.round(t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth),l={nodeId:void 0!==e.node.nodeId?e.node.nodeId:e.node,rowAbove:n,abovePath:r,aboveNodeId:void 0!==a.nodeId?a.nodeId:a,blocksOffset:o};if((0,s.equals)(this.lastCanDropProps,l))return this.lastCanDropResult;this.lastCanDropProps=l;const i=this.getTargetDepth(e,t,null);if(i>=r.length&&"function"==typeof a.children)return this.lastCanDropResult=!1;if("function"==typeof this.customCanDrop){const{node:n}=t.getItem(),r=R({treeData:this.treeData,newNode:n,depth:i,getNodeKey:this.getNodeKey,minimumTreeIndex:e.listIndex,expandParent:!0});return this.lastCanDropResult=this.customCanDrop({node:n,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:r.path,nextParent:r.parentNode,nextTreeIndex:r.treeIndex})}return this.lastCanDropResult=!0}wrapSource(e){const t={beginDrag:e=>(this.startDrag(e),{node:e.node,parentNode:e.parentNode,path:e.path,treeIndex:e.treeIndex,treeId:e.treeId}),endDrag:(e,t)=>{this.rafId&&cancelAnimationFrame(this.rafId),this.endDrag(t.getDropResult()),this.resetDragVariables()},isDragging:(e,t)=>{const n=t.getItem().node;return e.node===n}};return(0,d.DragSource)(this.dndType,t,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),didDrop:t.didDrop()}}))(e)}wrapTarget(e){const t={drop:(e,t,n)=>{this.rafId&&cancelAnimationFrame(this.rafId);const r={node:t.getItem().node,path:t.getItem().path,treeIndex:t.getItem().treeIndex,treeId:this.treeId,minimumTreeIndex:e.treeIndex,depth:this.getTargetDepth(e,t,n)};return this.lastDropTargetNode=null,this.drop(r),r},hover:(e,t,n)=>{this.rafId?this.shouldSkipMoreFrames=!0:(this.shouldSkipMoreFrames=!1,this.hoverProps={dropTargetProps:e,monitor:t,component:n},this.rafId=requestAnimationFrame(this.deferredCallHoverHandler))},canDrop:this.canDrop.bind(this)};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}wrapPlaceholder(e){const t={drop:(e,t)=>{const{node:n,path:r,treeIndex:a}=t.getItem(),o={node:n,path:r,treeIndex:a,treeId:this.treeId,minimumTreeIndex:0,depth:0};return this.drop(o),o}};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}}function F(){return F=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},F.apply(this,arguments)}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){z(e,t,n[t])}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let U=1;const V=e=>{const t=B({},e,{style:B({},e.theme.style,e.style),innerStyle:B({},e.theme.innerStyle,e.innerStyle),reactVirtualizedListProps:B({},e.theme.reactVirtualizedListProps,e.reactVirtualizedListProps)}),n={nodeContentRenderer:P,placeholderRenderer:D,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:x};return Object.keys(n).forEach((r=>{null===e[r]&&(t[r]=void 0!==e.theme[r]?e.theme[r]:n[r])})),t};class H extends r.Component{constructor(e){super(e);const{dndType:t,nodeContentRenderer:n,treeNodeRenderer:r,isVirtualized:a,slideRegionSize:o}=V(e);this.dndManager=new A(this),this.treeId=`rst__${U}`,U+=1,this.dndType=t||this.treeId,this.nodeContentRenderer=this.dndManager.wrapSource(n),this.treePlaceholderRenderer=this.dndManager.wrapPlaceholder(S),this.treeNodeRenderer=this.dndManager.wrapTarget(r),a&&(this.scrollZoneVirtualList=(c._t||c.ZP)(i.aV),this.vStrength=(0,c.Kx)(o),this.hStrength=(0,c.v7)(o)),this.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,draggingExpandedPaths:[],ignoreOneTreeUpdate:!1,instanceProps:{treeData:this.props.treeData||[],searchQuery:null,searchFocusOffset:null,ignoreTreeChanges:!1}},this.toggleChildrenVisibility=this.toggleChildrenVisibility.bind(this),this.moveNode=this.moveNode.bind(this),this.startDrag=this.startDrag.bind(this),this.dragHover=this.dragHover.bind(this),this.endDrag=this.endDrag.bind(this),this.drop=this.drop.bind(this),this.handleDndMonitorChange=this.handleDndMonitorChange.bind(this)}componentDidMount(){H.loadLazyChildren(this.props);const e=H.search(this.props,this.state,!0,!0,!1);this.setState(e),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}static getDerivedStateFromProps(e,t){const{instanceProps:n}=t,r={};return(0,s.equals)(n.searchQuery,e.searchQuery)?n.searchFocusOffset!==e.searchFocusOffset&&Object.assign(r,H.search(e,t,!0,!0,!0)):Object.assign(r,H.search(e,t,!0,!0,!1)),n.searchQuery=e.searchQuery,n.searchFocusOffset=e.searchFocusOffset,r.instanceProps=n,r}componentDidUpdate(e,t){if(this.state.dragging!==t.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode}),this.state.dragging)if((0,s.equals)(this.props.treeData,e.treeData))this.state.draggingTreeData&&t.draggingTreeData!==this.state.draggingTreeData&&(0,v._p)({treeData:this.state.draggingTreeData,getNodeKey:this.props.getNodeKey,callback:e=>{let{node:t,path:n,lowerSiblingCounts:r,treeIndex:a}=e;t.pending&&t.expanded&&this.props.onLazyLoadChildren({node:t,path:n,lowerSiblingCounts:r,treeIndex:a})}});else{const{treeData:e}=(0,v.ZF)({treeData:this.props.treeData,path:t.draggedPath,getNodeKey:this.props.getNodeKey});this.setState((t=>{let{draggingExpandedPaths:n}=t;return{draggingTreeData:n.reduce(((e,t)=>{let n;try{n=(0,v.Gm)({treeData:e,path:t,newNode:e=>{let{node:t}=e;return B({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey})}catch(t){n=e}return n}),e)}}))}else if(this.props.treeData!==e.treeData){const t=(0,s.equals)(this.props.treeData,e.treeData),{ignoreOneTreeUpdate:n,instanceProps:r}=this.state,a={};t||(n?a.ignoreOneTreeUpdate=!1:(a.searchFocusTreeIndex=null,H.loadLazyChildren(this.props),Object.assign(a,H.search(this.props,this.state,!1,!1,!1))),a.draggingTreeData=null,a.draggedNode=null,a.draggedMinimumTreeIndex=null,a.draggedDepth=null,a.dragging=!1,a.draggingExpandedPaths=[],a.instanceProps=B({},r,{treeData:this.props.treeData}),this.setState(a))}}componentWillUnmount(){this.clearMonitorSubscription()}getRows(e){return j({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:e})}handleDndMonitorChange(){!this.props.dragDropManager.getMonitor().isDragging()&&this.state.draggingTreeData&&this.endDrag()}toggleChildrenVisibility(e){let{node:t,path:n}=e;const{instanceProps:r}=this.state,a=(0,v.Gm)({treeData:r.treeData,path:n,newNode:e=>{let{node:t}=e;return B({},t,{expanded:!t.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(a),this.props.onVisibilityToggle({treeData:a,node:t,expanded:!t.expanded,path:n})}moveNode(e){let{node:t,path:n,treeIndex:r,depth:a,minimumTreeIndex:o}=e;const{treeData:l,treeIndex:i,path:s,parentNode:c}=(0,v.Lf)({treeData:this.state.draggingTreeData,newNode:t,depth:a,minimumTreeIndex:o,expandParent:!0,getNodeKey:this.props.getNodeKey});this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1,draggingExpandedPaths:[]},(()=>{this.props.onChange(l),this.props.onMoveNode({treeData:l,node:t,treeIndex:i,path:s,nextPath:s,nextTreeIndex:i,prevPath:n,prevTreeIndex:r,nextParentNode:c})}))}static search(e,t,n,r,a){const{onChange:o,getNodeKey:l,searchFinishCallback:i,searchQuery:s,searchMethod:c,searchFocusOffset:d,onlyExpandSearchedNodes:p}=e,{instanceProps:u}=t;if(!s&&!c)return i&&i([]),{searchMatches:[]};const g={},{treeData:h,matches:m}=(0,v.sE)({getNodeKey:l,treeData:p?(0,v.Vk)({treeData:u.treeData,expanded:!1}):u.treeData,searchQuery:s,searchMethod:c||L.v2,searchFocusOffset:d,expandAllMatchPaths:r&&!a,expandFocusMatchPaths:!!r});r&&(g.ignoreOneTreeUpdate=!0,o(h)),i&&i(m);let f=null;return n&&null!==d&&d<m.length&&(f=m[d].treeIndex),g.searchMatches=m,g.searchFocusTreeIndex=f,g}startDrag(e){let{path:t}=e;this.setState((e=>{const{treeData:n,node:r,treeIndex:a}=(0,v.ZF)({treeData:e.instanceProps.treeData,path:t,getNodeKey:this.props.getNodeKey});return{draggingTreeData:n,draggedNode:r,draggedDepth:t.length-1,draggedMinimumTreeIndex:a,draggedPath:t,dragging:!0}}))}dragHover(e){let{node:t,depth:n,minimumTreeIndex:r}=e;this.state.draggedDepth===n&&this.state.draggedMinimumTreeIndex===r||this.setState((e=>{let{draggingTreeData:a,instanceProps:o,draggingExpandedPaths:l}=e;const i=a||o.treeData,c=R({treeData:i,newNode:t,depth:n,minimumTreeIndex:r,expandParent:!0,getNodeKey:this.props.getNodeKey}),d=this.getRows(c.treeData)[c.treeIndex].path.slice(0,-1),p=(0,s.pipe)((0,s.when)((0,s.always)((0,s.gt)(d.length,0)),(0,s.append)(d)),(0,s.uniqWith)((0,s.eqBy)(String)))(l);return{draggedNode:t,draggedDepth:n,draggedMinimumTreeIndex:r,draggingTreeData:(0,v.Gm)({treeData:i,path:d,newNode:e=>{let{node:t}=e;return B({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0,draggingExpandedPaths:p}}))}endDrag(e){const{instanceProps:t}=this.state;if(e){if(e.treeId!==this.treeId){const{node:n,path:r,treeIndex:a}=e;let o=this.props.shouldCopyOnOutsideDrop;"function"==typeof o&&(o=o({node:n,prevTreeIndex:a,prevPath:r}));let l=this.state.draggingTreeData||t.treeData;o&&(l=(0,v.Gm)({treeData:t.treeData,path:r,newNode:e=>{let{node:t}=e;return B({},t)},getNodeKey:this.props.getNodeKey})),this.props.onChange(l),this.props.onMoveNode({treeData:l,node:n,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:r,prevTreeIndex:a})}}else(()=>{this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})})()}drop(e){this.moveNode(e)}canNodeHaveChildren(e){const{canNodeHaveChildren:t}=this.props;return!t||t(e)}static loadLazyChildren(e){(0,v._p)({treeData:e.treeData,getNodeKey:e.getNodeKey,callback:t=>{let{node:n,path:r,lowerSiblingCounts:a,treeIndex:o}=t;n.pending&&(n.expanded||e.loadCollapsedLazyChildren)&&e.onLazyLoadChildren({node:n,path:r,lowerSiblingCounts:a,treeIndex:o,done:t=>e.onChange((0,v.Gm)({treeData:e.treeData,path:r,newNode:e=>{let{node:r}=e;return r===n?B({},r,{children:t}):r},getNodeKey:e.getNodeKey}),!0)})}})}renderRow(e,t){let{listIndex:n,style:r,getPrevRow:o,matchKeys:l,swapFrom:i,swapDepth:s,swapLength:c}=t;const{node:d,parentNode:p,path:u,lowerSiblingCounts:g,treeIndex:h}=e,{canDrag:m,generateNodeProps:f,scaffoldBlockPxWidth:b,searchFocusOffset:y,rowDirection:x}=V(this.props),v=this.treeNodeRenderer,E=this.nodeContentRenderer,w=u[u.length-1],O=w in l,C=O&&l[w]===y,P={node:d,parentNode:p,path:u,lowerSiblingCounts:g,treeIndex:h,isSearchMatch:O,isSearchFocus:C},T=f?f(P):{},I="function"!=typeof m?m:m(P),S={treeIndex:h,scaffoldBlockPxWidth:b,node:d,path:u,treeId:this.treeId,rowDirection:x};return a().createElement(v,F({style:r,key:w,listIndex:n,getPrevRow:o,lowerSiblingCounts:g,swapFrom:i,swapLength:c,swapDepth:s},S),a().createElement(E,F({parentNode:p,isSearchMatch:O,isSearchFocus:C,canDrag:I,toggleChildrenVisibility:this.toggleChildrenVisibility},S,T)))}render(){const{dragDropManager:e,style:t,className:n,innerStyle:r,rowHeight:o,isVirtualized:l,placeholderRenderer:s,reactVirtualizedListProps:c,getNodeKey:d,rowDirection:p}=V(this.props),{searchMatches:u,searchFocusTreeIndex:g,draggedNode:m,draggedDepth:f,draggedMinimumTreeIndex:b}=this.state,y=this.state.draggingTreeData||this.props.treeData,x="rtl"===p?"rst__rtl":null;let v,E=null,w=null;if(m&&null!==b){const e=R({treeData:y,newNode:m,depth:f,minimumTreeIndex:b,expandParent:!0,getNodeKey:d}),t=b;E=e.treeIndex,w=1+M({node:m}),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const a=[...e.slice(0,t),...e.slice(t+r)];return[...a.slice(0,n),...e.slice(t,t+r),...a.slice(n)]}(this.getRows(e.treeData),E,t,w)}else v=this.getRows(y);const O={};u.forEach(((e,t)=>{let{path:n}=e;O[n[n.length-1]]=t}));const C=null!==g?{scrollToIndex:g}:{};let P,T=t;if(v.length<1){const e=this.treePlaceholderRenderer,t=s;P=a().createElement(e,{treeId:this.treeId,drop:this.drop},a().createElement(t,null))}else if(l){T=B({height:"100%"},T);const t=this.scrollZoneVirtualList;P=a().createElement(i.qj,null,(n=>{let{height:l,width:i}=n;return a().createElement(t,F({},C,{dragDropManager:e,verticalStrength:this.vStrength,horizontalStrength:this.hStrength,speed:30,scrollToAlignment:"start",className:this.props.classes.rst__virtualScrollOverride,width:i,onScroll:e=>{let{scrollTop:t}=e;this.scrollTop=t},height:l,style:r,rowCount:v.length,estimatedRowSize:"function"!=typeof o?o:void 0,rowHeight:"function"!=typeof o?o:e=>{let{index:t}=e;return o({index:t,treeIndex:t,node:v[t].node,path:v[t].path})},rowRenderer:e=>{let{index:t,style:n}=e;return this.renderRow(v[t],{listIndex:t,style:n,getPrevRow:()=>v[t-1]||null,matchKeys:O,swapFrom:E,swapDepth:f,swapLength:w})}},c))}))}else P=v.map(((e,t)=>this.renderRow(e,{listIndex:t,style:{height:"function"!=typeof o?o:o({index:t,treeIndex:t,node:e.node,path:e.path})},getPrevRow:()=>v[t-1]||null,matchKeys:O,swapFrom:E,swapDepth:f,swapLength:w})));return a().createElement("div",{className:h("rst__tree",n,x),style:T},P)}}H.propTypes={classes:l().object,dragDropManager:l().shape({getMonitor:l().func}).isRequired,treeData:l().arrayOf(l().object).isRequired,style:l().shape({}),className:l().string,innerStyle:l().shape({}),rowHeight:l().oneOfType([l().number,l().func]),slideRegionSize:l().number,reactVirtualizedListProps:l().shape({}),scaffoldBlockPxWidth:l().number,maxDepth:l().number,searchMethod:l().func,searchQuery:l().any,searchFocusOffset:l().number,searchFinishCallback:l().func,generateNodeProps:l().func,isVirtualized:l().bool,treeNodeRenderer:l().func,nodeContentRenderer:l().func,placeholderRenderer:l().func,theme:l().shape({style:l().shape({}),innerStyle:l().shape({}),reactVirtualizedListProps:l().shape({}),scaffoldBlockPxWidth:l().number,slideRegionSize:l().number,rowHeight:l().oneOfType([l().number,l().func]),treeNodeRenderer:l().func,nodeContentRenderer:l().func,placeholderRenderer:l().func}),getNodeKey:l().func,onChange:l().func.isRequired,onMoveNode:l().func,canDrag:l().oneOfType([l().func,l().bool]),canDrop:l().func,canNodeHaveChildren:l().func,shouldCopyOnOutsideDrop:l().oneOfType([l().func,l().bool]),onVisibilityToggle:l().func,dndType:l().string,onDragStateChanged:l().func,onlyExpandSearchedNodes:l().bool,rowDirection:l().string,onLazyLoadChildren:l().func,ignoreTreeChanges:l().bool},H.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:()=>!0,className:"",dndType:null,generateNodeProps:null,getNodeKey:L.TS,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:()=>{},onVisibilityToggle:()=>{},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:()=>{},onlyExpandSearchedNodes:!1,rowDirection:"ltr",onLazyLoadChildren:()=>{},ignoreTreeChanges:!1},(0,u.polyfill)(H);const W=(0,g.Z)((()=>({"@global .ReactVirtualized__Grid__innerScrollContainer":{overflow:"visible !important"},"@global .ReactVirtualized__Grid":{outline:"none"},"@global .ReactVirtualized__List":{},rst__virtualScrollOverride:{overflow:"auto !important"},"@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer":{direction:"rtl"}})))(H),q=e=>a().createElement(d.DndContext.Consumer,null,(t=>{let{dragDropManager:n}=t;return void 0===n?null:a().createElement(W,F({},e,{dragDropManager:n}))})),K=e=>a().createElement(d.DndProvider,{backend:p.default},a().createElement(q,e))},22506:(e,t,n)=>{function r(e){let{treeIndex:t}=e;return t}function a(e){return"string"==typeof e?e:null===e||"object"!=typeof e||!e.props||!e.props.children||"string"!=typeof e.props.children&&"object"!=typeof e.props.children?"":"string"==typeof e.props.children?e.props.children:e.props.children.map((e=>a(e))).join("")}function o(e,t,n,r,o){return"function"==typeof n[e]?String(n[e]({node:n,path:r,treeIndex:o})).indexOf(t)>-1:"object"==typeof n[e]?a(n[e]).indexOf(t)>-1:n[e]&&String(n[e]).indexOf(t)>-1}function l(e){let{node:t,path:n,treeIndex:r,searchQuery:a}=e;return o("title",a,t,n,r)||o("subtitle",a,t,n,r)}n.d(t,{TS:()=>r,v2:()=>l,ZP:()=>i});const i={defaultSearchMethod:l,defaultGetNodeKey:r}},98858:(e,t,n)=>{function r(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}function o(e){let{targetIndex:t,node:n,currentIndex:r,getNodeKey:a,path:l=[],lowerSiblingCounts:i=[],ignoreCollapsed:s=!0,isPseudoRoot:c=!1}=e;const d=c?[]:[...l,a({node:n,treeIndex:r})];if(r===t)return{node:n,lowerSiblingCounts:i,path:d};if(!n.children||s&&!0!==n.expanded)return{nextIndex:r+1};let p=r+1;const u=n.children.length;for(let e=0;e<u;e+=1){const r=o({ignoreCollapsed:s,getNodeKey:a,targetIndex:t,node:n.children[e],currentIndex:p,lowerSiblingCounts:[...i,u-e-1],path:d});if(r.node)return r;p=r.nextIndex}return{nextIndex:p}}function l(e){let{node:t,ignoreCollapsed:n=!0}=e;return o({getNodeKey:()=>{},ignoreCollapsed:n,node:t,currentIndex:0,targetIndex:-1}).nextIndex-1}function i(e){let{callback:t,getNodeKey:n,ignoreCollapsed:r,isPseudoRoot:a=!1,node:o,parentNode:l=null,currentIndex:s,path:c=[],lowerSiblingCounts:d=[]}=e;const p=a?[]:[...c,n({node:o,treeIndex:s})];if(!a&&!1===t(a?null:{node:o,parentNode:l,path:p,lowerSiblingCounts:d,treeIndex:s}))return!1;if(!o.children||!0!==o.expanded&&r&&!a)return s;let u=s;const g=o.children.length;if("function"!=typeof o.children)for(let e=0;e<g;e+=1)if(u=i({callback:t,getNodeKey:n,ignoreCollapsed:r,node:o.children[e],parentNode:a?null:o,currentIndex:u+1,lowerSiblingCounts:[...d,g-e-1],path:p}),!1===u)return!1;return u}function s(e){let{callback:t,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:o=!1,node:l,parentNode:i=null,currentIndex:c,path:d=[],lowerSiblingCounts:p=[]}=e;const u=r({},l),g=o?[]:[...d,n({node:u,treeIndex:c})],h={node:u,parentNode:i,path:g,lowerSiblingCounts:p,treeIndex:c};if(!u.children||!0!==u.expanded&&a&&!o)return{treeIndex:c,node:t(h)};let m=c;const f=u.children.length;return"function"!=typeof u.children&&(u.children=u.children.map(((e,r)=>{const l=s({callback:t,getNodeKey:n,ignoreCollapsed:a,node:e,parentNode:o?null:u,currentIndex:m+1,lowerSiblingCounts:[...p,f-r-1],path:g});return m=l.treeIndex,l.node}))),{node:t(h),treeIndex:m}}function c(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;!t||t.length<1||i({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function d(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;return!t||t.length<1?[]:s({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function p(e){let{treeData:t,expanded:n=!0}=e;return d({treeData:t,callback:e=>{let{node:t}=e;return r({},t,{expanded:n})},getNodeKey:e=>{let{treeIndex:t}=e;return t},ignoreCollapsed:!1})}function u(e){let{treeData:t,path:n,newNode:a,getNodeKey:o,ignoreCollapsed:i=!0}=e;const s="RESULT_MISS",c=e=>{let{isPseudoRoot:t=!1,node:d,currentTreeIndex:p,pathIndex:u}=e;if(!t&&o({node:d,treeIndex:p})!==n[u])return s;if(u>=n.length-1)return"function"==typeof a?a({node:d,treeIndex:p}):a;if(!d.children)throw new Error("Path referenced children of node with no children.");let g=p+1;for(let e=0;e<d.children.length;e+=1){const t=c({node:d.children[e],currentTreeIndex:g,pathIndex:u+1});if(t!==s)return r({},d,t?{children:[...d.children.slice(0,e),t,...d.children.slice(e+1)]}:{children:[...d.children.slice(0,e),...d.children.slice(e+1)]});g+=1+l({node:d.children[e],ignoreCollapsed:i})}return s},d=c({node:{children:t},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(d===s)throw new Error("No node found at the given path.");return d.children}function g(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null,l=null;return{treeData:u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o=t,l=n,null}}),node:o,treeIndex:l}}function h(e){let{targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:i,isPseudoRoot:s=!1,isLastChild:c,node:d,currentIndex:p,currentDepth:u,getNodeKey:g,path:m=[]}=e;const f=e=>s?[]:[...m,g({node:e,treeIndex:p})];if(p>=n-1||c&&(!d.children||!d.children.length)){if("function"==typeof d.children)throw new Error("Cannot add to children defined by a function");{const e=r({},d,i?{expanded:!0}:{},{children:d.children?[a,...d.children]:[a]});return{node:e,nextIndex:p+2,insertedTreeIndex:p+1,parentPath:f(e),parentNode:s?null:e}}}if(u>=t-1){if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let e=p+1,t=null,i=null;for(let r=0;r<d.children.length;r+=1){if(e>=n){t=e,i=r;break}e+=1+l({node:d.children[r],ignoreCollapsed:o})}if(null===i){if(e<n&&!c)return{node:d,nextIndex:e};t=e,i=d.children.length}const u=r({},d,{children:[...d.children.slice(0,i),a,...d.children.slice(i)]});return{node:u,nextIndex:e,insertedTreeIndex:t,parentPath:f(u),parentNode:s?null:u}}if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let b=null,y=null,x=null,v=p+1,E=d.children;"function"!=typeof E&&(E=E.map(((e,r)=>{if(null!==b)return e;const l=h({targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:i,isLastChild:c&&r===E.length-1,node:e,currentIndex:v,currentDepth:u+1,getNodeKey:g,path:[]});return"insertedTreeIndex"in l&&({insertedTreeIndex:b,parentNode:x,parentPath:y}=l),v=l.nextIndex,l.node})));const w=r({},d,{children:E}),O={node:w,nextIndex:v};return null!==b&&(O.insertedTreeIndex=b,O.parentPath=[...f(w),...y],O.parentNode=x),O}function m(e){let{treeData:t,depth:n,minimumTreeIndex:r,newNode:a,getNodeKey:o=(()=>{}),ignoreCollapsed:l=!0,expandParent:i=!1}=e;if(!t&&0===n)return{treeData:[a],treeIndex:0,path:[o({node:a,treeIndex:0})],parentNode:null};const s=h({targetDepth:n,minimumTreeIndex:r,newNode:a,ignoreCollapsed:l,expandParent:i,getNodeKey:o,isPseudoRoot:!0,isLastChild:!0,node:{children:t},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in s))throw new Error("No suitable position found to insert.");const c=s.insertedTreeIndex;return{treeData:s.node.children,treeIndex:c,path:[...s.parentPath,o({node:a,treeIndex:c})],parentNode:s.parentNode}}function f(e){let{treeData:t,getNodeKey:n,ignoreCollapsed:r=!0}=e;if(!t||t.length<1)return[];const a=[];return c({treeData:t,getNodeKey:n,ignoreCollapsed:r,callback:e=>{a.push(e)}}),a}function b(e,t){return!!e.children&&"function"!=typeof e.children&&e.children.some((e=>e===t||b(e,t)))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.children?"function"==typeof e.children?t+1:e.children.reduce(((e,n)=>Math.max(e,y(n,t+1))),t):t}function x(e){let{getNodeKey:t,treeData:n,searchQuery:a,searchMethod:o,searchFocusOffset:l,expandAllMatchPaths:i=!1,expandFocusMatchPaths:s=!0}=e,c=0;const d=e=>{let{isPseudoRoot:n=!1,node:p,currentIndex:u,path:g=[]}=e,h=[],m=!1,f=!1;const b=n?[]:[...g,t({node:p,treeIndex:u})],y=n?null:{path:b,treeIndex:u},x=p.children&&"function"!=typeof p.children&&p.children.length>0;!n&&o(r({},y,{node:p,searchQuery:a}))&&(c===l&&(f=!0),c+=1,m=!0);let v=u;const E=r({},p);return x&&(E.children=E.children.map((e=>{const t=d({node:e,currentIndex:v+1,path:b});return t.node.expanded?v=t.treeIndex:v+=1,(t.matches.length>0||t.hasFocusMatch)&&(h=[...h,...t.matches],t.hasFocusMatch&&(f=!0),(i&&t.matches.length>0||(i||s)&&t.hasFocusMatch)&&(E.expanded=!0)),t.node}))),n||E.expanded||(h=h.map((e=>r({},e,{treeIndex:null})))),m&&(h=[r({},y,{node:E}),...h]),{node:h.length>0?E:p,matches:h,hasFocusMatch:f,treeIndex:v}},p=d({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:p.matches,treeData:p.node.children}}n.d(t,{o5:()=>l,_p:()=>c,Vk:()=>p,Gm:()=>u,ZF:()=>g,Lf:()=>m,Pg:()=>f,SG:()=>b,hh:()=>y,sE:()=>x,ZP:()=>v});const v={find:x,getDepth:y,isDescendant:b,getTreeFromFlatData:function(e){let{flatData:t,getKey:n=(e=>e.id),getParentKey:a=(e=>e.parentId),rootKey:o="0"}=e;if(!t)return[];const l={};if(t.forEach((e=>{const t=a(e);t in l?l[t].push(e):l[t]=[e]})),!(o in l))return[];const i=e=>{const t=n(e);return t in l?r({},e,{children:l[t].map((e=>i(e)))}):r({},e)};return l[o].map((e=>i(e)))},getFlatDataFromTree:f,insertNode:m,addNodeUnderParent:function(e){let{treeData:t,newNode:n,parentKey:a=null,getNodeKey:o,ignoreCollapsed:i=!0,expandParent:s=!1,addAsFirstChild:c=!1}=e;if(null===a)return c?{treeData:[n,...t||[]],treeIndex:0}:{treeData:[...t||[],n],treeIndex:(t||[]).length};let p=null,u=!1;const g=d({treeData:t,getNodeKey:o,ignoreCollapsed:i,callback:e=>{let{node:t,treeIndex:o,path:d}=e;const g=d?d[d.length-1]:null;if(u||g!==a)return t;u=!0;const h=r({},t);if(s&&(h.expanded=!0),!h.children)return p=o+1,r({},h,{children:[n]});if("function"==typeof h.children)throw new Error("Cannot add to children defined by a function");let m=o+1;for(let e=0;e<h.children.length;e+=1)m+=1+l({node:h.children[e],ignoreCollapsed:i});return p=m,r({},h,{children:c?[n,...h.children]:[...h.children,n]})}});if(!u)throw new Error("No node found with the given key.");return{treeData:g,treeIndex:p}},getNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null;try{u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o={node:t,treeIndex:n},t}})}catch(e){}return o},removeNode:g,removeNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e;return u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:null})},changeNodeAtPath:u,toggleExpandedForAll:p,map:d,walk:c,getVisibleNodeInfoAtIndex:function(e){let{treeData:t,index:n,getNodeKey:r}=e;if(!t||t.length<1)return null;const a=o({targetIndex:n,getNodeKey:r,node:{children:t,expanded:!0},currentIndex:-1,path:[],lowerSiblingCounts:[],isPseudoRoot:!0});return a.node?a:null},getVisibleNodeCount:function(e){let{treeData:t}=e;const n=e=>e.children&&!0===e.expanded&&"function"!=typeof e.children?1+e.children.reduce(((e,t)=>e+n(t)),0):1;return t.reduce(((e,t)=>e+n(t)),0)},getDescendantCount:l}},821:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(77277),s=n(90436),c=n(87918),d=n.n(c),p=n(71153),u=n.n(p),g=n(17440);const h=(0,n(79692).Z)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}});var m=n(22241),f=n(35674),b=n(85256),y=n(85596),x=n(93555),v=n(72283),E=n(76141);function w(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 C=e=>{let{connection:t,modifiedEntity:n,allModifiedEntities:o,dispatch:l,config:c,mode:p,metadata:O,globalSearchRequestOptions:C,error:P}=e;const{relationUri:T,relationType:I,direction:S}=t.relation,N=t.isNew,k=h(),{inRelations:D=[],outRelations:_=[]}=(0,r.useMemo)((()=>(0,m.ocC)({content:t.parentEntityUri?c.contentSecondLevel:c.content,direction:S,relationType:I,mode:p,metadata:O})),[c,S,I,p,O,t.parentEntityUri]),R=(0,r.useMemo)((()=>(0,m.xF8)(O,I)),[I,O]),j=(0,r.useMemo)((()=>w({attributes:w({},f.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,m.p2l)(t.relation))),[t]),M=(0,r.useRef)(t),L=(0,r.useRef)(n),Z=(0,r.useMemo)((()=>(0,m.SAs)(o,n)),[o,n]),A=(0,r.useRef)([]);(0,r.useEffect)((()=>{A.current=(0,g.pipe)((0,g.concat)(Z.map((0,g.prop)("uri"))),g.uniq)(A.current)}),[Z]);const F=(0,r.useRef)(Z),B=(0,m.z7d)(D,_),z=M.current!==t||L.current!==n||(U=F.current,V=Z,U.length!==V.length||U.some(((e,t)=>U[t]!==V[t])))||t.isNew&&!(0,m.O27)((0,g.path)(["relation","object","attributes"],t));var U,V;const H=N?f.N5.relations.actions.addRelation:f.N5.relations.actions.editRelation,W=(0,r.useCallback)((0,g.pipe)(f.N5.relations.actions.setRelationType(c.id,T),l),[c,T,l]),q=(0,r.useCallback)((()=>(0,g.pipe)(f.N5.relations.actions.closeRelationEditor,l)(c.id,T)),[c,T,l]),K=(0,r.useCallback)((e=>{if(n){const t=(0,m.nt9)(O,n.type);return(0,m.wx9)(t,n,e)}return e}),[n,O]),G=(0,r.useCallback)((e=>l(f.N5.modifiedEntities.actions.entityCreated(e))),[l]),Y=(0,r.useCallback)((e=>l(f.N5.modifiedEntities.actions.entityDeleted(e))),[l]),$=(0,r.useCallback)((e=>{n&&Y(n.uri),l(f.N5.relations.actions.setRelationEntity(c.id,T,e)),P&&l(f.N5.errors.actions.errorDeactivated((0,m.iFp)(P)))}),[c.id,T,l,n,Y,P]),J=(0,r.useCallback)((()=>{const e=(0,m.Bd_)(O,o,t);return l(f.N5.errors.actions.errorsSet(e)),0===e.length}),[t,O,o,l]),Q=(0,r.useCallback)((()=>l(f.N5.errors.actions.errorsSet([]))),[l]),X=(0,r.useCallback)((0,g.pipe)((0,g.always)(t),(0,g.when)(J,(0,g.pipe)(m.zhn,K,H(c.id),l,(0,g.always)((0,g.differenceWith)(g.equals,A.current,Z.map((0,g.prop)("uri")))),(0,g.forEach)(Y),q))),[t,c,l,K,J,Z]),ee=(0,r.useCallback)((()=>{const e=L.current;n!==e&&(e?(G(e),n&&n.uri!==e.uri&&Y(n.uri)):Y(n.uri));const t=F.current;(0,g.differenceWith)(g.equals,A.current,t.map((0,g.prop)("uri"))).forEach(Y),t.forEach(G),Q(),q()}),[q,G,Y,Q,n]),te=(0,r.useCallback)((e=>(0,g.pipe)(f.N5.actions.addAttributes,l)(e.map((e=>w({},e,{viewId:c.id}))))),[c.id,l]),ne=(0,r.useCallback)((e=>(0,g.pipe)(f.N5.actions.modifyAttribute,l)(w({},e,{viewId:c.id}))),[c.id,l]),re=(0,r.useCallback)((e=>(0,g.pipe)(f.N5.actions.removeAttribute,l)(w({},e,{viewId:c.id}))),[c.id,l]),ae=(0,r.useCallback)(((e,t)=>{const n=(0,m.nt9)(O,e),r=(0,g.pipe)(m.wcJ,(0,m._kX)(p))(n),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:O,mode:p});$(a),G(a)}),[G,$,p,O]),oe=(0,m.e$p)(P),le=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=c;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[c,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:k.editor},a().createElement(s.Z,{className:k.title},N?d().text("Add new item"):d().text("Edit item")),null===B&&a().createElement(y.Z,{className:k.item,relation:t.relation,inRelationTypes:D,outRelationTypes:_,onChange:W}),Boolean(I)&&a().createElement(a().Fragment,null,a().createElement(x.Z,{errorMessage:oe},a().createElement(v.Z,{className:u()(k.item,{[k.dense]:oe||t.entity&&(0,m.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:le()||[],max:c.max||20,globalSearchRequestOptions:C,mode:p,onChange:$,onCreate:ae,metadata:O,attributeTypesSelectionStrategy:m.wcJ})),a().createElement(E.Z,{className:k.item,attrTypes:R,entity:j,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:p,parentUri:T,onAddAttributes:te,onChangeAttribute:ne,onDeleteAttribute:re}))),a().createElement("div",{className:k.actionButtons},a().createElement(i.Z,{onClick:ee},d().text("Cancel")),a().createElement(i.Z,{color:"primary",disabled:!z,onClick:X},d().text("Apply"))),a().createElement(b.Z,null))};C.propTypes={connection:m.Rjq,modifiedEntity:m.pyR,allModifiedEntities:l().object,dispatch:l().func,config:m.PiC,mode:l().string,metadata:m.pGS,globalSearchRequestOptions:l().object,error:m.wfT,parentEntityUri:l().string};const P=C;const T=(0,n(52730).connect)(((e,t)=>{const n=(r=t,f.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(0,m.ZiX)(n);return{modifiedEntity:a?f.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:a?f.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:f.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,m.ATu)(t.connection,f.ZP.selectors.getProfileErrors(e))}}))(P)},17822:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(13980),a=n.n(r),o=n(24328),l=n.n(o),i=n(66244),s=n.n(i),c=n(44443),d=n(17440),p=n(71153),u=n.n(p);function g(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const h=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:l,minHeight:i,maxWidth:s,maxHeight:c,isStatic:d}=e;return{x:t,y:n,w:r,h:a,minW:l,minH:i,maxW:s,maxH:c,i:o,static:d}},m=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:l,minH:i,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:l,minHeight:i,maxWidth:o,maxHeight:s,id:c,isStatic:g(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},f=e=>(e||[]).map(m),b=(0,d.curry)(((e,t)=>(e||[]).find((0,d.propEq)("id",t)))),y=(0,d.curry)(((e,t,n)=>(0,d.mergeAll)([n,(0,d.pick)(e,t)]))),x=(0,d.curry)(((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.prop)("id"),b(t),(0,d.defaultTo)({}),y(e,d.__,n))(n)))));var v=n(79692),E=n(22241);const w=(0,v.Z)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.cssTransforms":{transitionProperty:"transform"},"&.resizing":{zIndex:9,willChange:"width, height",pointerEvents:"none"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"17px",height:"17px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,E.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}}})));function O(){return O=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},O.apply(this,arguments)}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 P=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:i,LayoutItem:p,onRemove:g,onDrop:y,droppingItem:v,isDroppable:E,classes:P}=e;const T=(0,o.useRef)(),I=w(),[S,N]=(0,o.useState)(null),[k,D]=(0,o.useState)(0),{cols:_,rowHeight:R,margin:j}=r,M=(0,o.useMemo)((()=>(e=>(e||[]).map(h))(n)),[n]),L=(0,d.pipe)(f,x(["autosizing"],n),a),Z=(0,o.useCallback)((e=>N((t=>t?null:e))),[]),A=null!==S,F=(0,o.useCallback)(((e,t)=>{let o=!1;const l=n.map((n=>{if(n.id===t&&e){const t=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(e,r);if(n.height!==t)return o=!0,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){C(e,t,n[t])}))}return e}({},n,{minHeight:t,maxHeight:t,height:t})}return n}));o&&a(l)}),[n,r,a]);return l().createElement(l().Fragment,null,l().createElement(c.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>D(e)}),l().createElement(s(),{innerRef:T,layout:M,cols:_,draggableHandle:i,autoSize:!0,rowHeight:R,width:k,margin:j,onLayoutChange:L,isResizable:!A,isDraggable:!A,className:u()(I.gridLayout,{[I.gridFullscreen]:A}),onDrop:(e,t,n)=>{y&&y(f(e),m(t),n)},droppingItem:v,isDroppable:E},M.map((e=>{const r=S===e.i,a=(b(n,e.i)||{}).autosizing?{AutosizeComponent:(o=e.i,l().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>{F(t,o)}}))}:{};var o;return l().createElement(p,O({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:Z,onRemove:g,className:u()({fullscreen:r},P.item),isFullscreen:r},a))}))))};P.defaultProps={layoutOptions:{cols:4,rowHeight:30,margin:[15,15]},onConfigChanged:d.identity,onLayoutChanged:d.identity,classes:{}},P.propTypes={views:a().array,layout:a().array,layoutOptions:a().object,onConfigChanged:a().func,onLayoutChanged:a().func,onDrop:a().func,onRemove:a().func,LayoutItem:a().elementType,draggableHandle:a().string,isDroppable:a().bool,droppingItem:a().object,classes:a().shape({item:a().string})};const T=(0,o.memo)(P)},62116:(e,t,n)=>{n.d(t,{Z:()=>q});var r=n(24328),a=n.n(r),o=n(17440),l=n(17871),i=n(75047);const s=e=>{let{children:t,className:n,position:a,map:o}=e;const[l,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),s(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{l&&n&&l.classList.add(n)}),[n,l]),l?(0,i.createPortal)(t,l):null};var c=n(87918),d=n.n(c),p=n(77277),u=n(78223),g=n(41039);const h="circle",m="polygon",f=.001;function b(){return b=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},b.apply(this,arguments)}const y=e=>a().createElement("svg",b({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));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)}const v=e=>a().createElement("svg",x({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var E=n(79692);const w=(0,E.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),O=(0,u.Z)(p.Z),C=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:l}=e;const i=w(),s=e=>()=>{o(e)};return a().createElement("div",{className:i.container},t||r?a().createElement(O,{tooltipTitle:d().text("Clear area"),className:i.button,onClick:r?l:s(null)},a().createElement(g.Z,{className:i.icon})):n.map((e=>{const t=(e=>{switch(e){case h:return y;case m:return v;default:return null}})(e);return a().createElement(O,{tooltipTitle:d().text("Draw area"),key:e,className:i.button,onClick:s(e)},a().createElement(t,{className:i.icon}))})))};var P=n(5806),T=n(21324);const I=(0,E.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),S=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=I();return a().createElement(P.Z,{classes:{root:r.container,label:r.label},control:a().createElement(T.Z,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:d().text("Search as I move the map")})},N=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),l=r.lat(),i=r.lng(),s=[],c=[];if(!(180===o&&-180===i||-180===o&&180===i)){const e=t.getCenter();s.push([a,e.lng()]),c.push([l,e.lng()])}return[[a,o],...s,[a,i],[l,i],...c,[l,o]]},k=e=>{switch(e){case h:return window.google.maps.drawing.OverlayType.CIRCLE;case m:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},D=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var _=n(91026),R=n(7421),j=n(22241),M=n(3064);const L=(0,E.Z)({popper:{maxWidth:"263px",minWidth:"150px",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",backgroundColor:"white",borderRadius:"2px"}});function Z(){return Z=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},Z.apply(this,arguments)}const A=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),F=(0,j.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),B=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=L(),c=(0,r.useRef)(),[d,p]=(0,r.useState)(!1),{activeEntityUri:u}=(0,r.useContext)(M.P),g=(0,o.pathEq)(["entity","uri"],u,t),h={lat:t.point.lat,lng:t.point.lng},m=(0,r.useCallback)((0,j.DsO)(p,50),[]),f=(0,r.useCallback)((()=>m(!0)),[m]),b=(0,r.useCallback)((()=>m(!1)),[m]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(R.Z,{anchorEl:c.current,open:d,className:s.popper,modal:!1,placement:"top"},a().createElement(_.Z,{entity:t.entity,onMouseOver:f,onMouseOut:b})),a().createElement(l.Jx,Z({icon:{url:d||g?A:F,scaledSize:new google.maps.Size(22,32)},position:h,onClick:y,visible:!1!==t.visible,onMouseOver:f,onMouseOut:b},i)),a().createElement(l.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:h},a().createElement("span",{ref:c})))}));var z=n(53857);const U=(0,E.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});var V=n(90690);function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=["drawing"],q=e=>{let{markers:t=[],mapKey:n,defaultZoom:i,defaultCenter:c,loadingElement:d,isSearchOnMapMove:p,isSearchEnabled:u,activeOverlay:g,overlayOptions:h,drawingModes:m=[],markerClusterer:b,markerClustererOptions:y,mapContainerClassName:x,onMapBoundsChanged:v,onOverlayUpdated:E,onMarkerClicked:w}=e;const O=U(),{isLoaded:P,loadError:T}=(0,l.Ji)({googleMapsApiKey:n,libraries:W}),I=(0,r.useRef)(null),[_,R]=(0,r.useState)(null),[j,M]=(0,r.useState)(null),[L,Z]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const l=(0,V.D)(t),i=(0,V.D)(n),s=o&&window.google;(0,r.useEffect)((()=>{s&&!a&&t.length&&t!==l?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+f,e.lng()+f)),r.extend(new window.google.maps.LatLng(e.lat()-f,e.lng()-f))}t.fitBounds(r),n&&D(t,n,r)})(t,o,n):s&&n&&n!==i&&D(o,n)}),[o,t,n])})({markers:t,activeOverlay:g,map:_,isSearchOnMapMove:p});const A=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}({},z.r,h||{})),[h]),F=(0,r.useCallback)((e=>{v(e?N(_):null),Z(null),clearTimeout(I.current)}),[_,v]),q=(0,r.useCallback)((()=>{clearTimeout(I.current)}),[]),K=(0,r.useCallback)((()=>{p&&v(N(_))}),[p,_,v]),G=(0,r.useCallback)((()=>{p&&(clearTimeout(I.current),I.current=setTimeout(K,1e3))}),[K,p]),Y=(0,r.useCallback)(((e,t)=>{const n=t||j&&{type:z.vl.POLYGON,overlay:j};if(!(0,o.isEmpty)(n)&&"function"==typeof E){const{overlay:e,type:t}=n,r={[z.vl.POLYGON]:()=>e.getPath().getArray().map((e=>[e.lat(),e.lng()])),[z.vl.CIRCLE]:()=>({radius:e.getRadius()/1e3,center:e.getCenter()})},a=r[t]&&r[t]();a&&E({data:a,type:t})}}),[E,j]),$=(0,r.useCallback)((e=>t=>{Y(null,{type:e,overlay:t}),t.setMap(null),Z(null)}),[Y]),J=(0,r.useCallback)((()=>{E(null)}),[E]),Q=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(B,{key:t.id,marker:t,clusterer:e,onClick:w})));return T?null:P?a().createElement(l.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:{mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},onLoad:R,zoom:i,center:c,onZoomChanged:q,onDragStart:q,onIdle:G,mapContainerClassName:x},_&&u&&Boolean(m.length)&&a().createElement(s,{className:O.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:_},a().createElement(C,{hasActiveOverlay:!!g,drawingModes:m,drawingMode:L,onDrawingModeChanged:Z,onClearOverlay:J})),_&&u&&a().createElement(s,{className:O.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:_},a().createElement(S,{onChangeIsSearchOnMapMove:F,isSearchOnMapMove:p})),b?(X=y,a().createElement(l.XL,{options:X},Q)):Q(),!k(L)&&g&&(0,o.propEq)("type",z.vl.POLYGON,g)&&a().createElement(l.mg,{onLoad:M,path:g.path,editable:!0,options:A,onMouseUp:Y,onDragEnd:Y}),u&&Boolean(m.length)&&a().createElement(l.j_,{onPolygonComplete:$(z.vl.POLYGON),onCircleComplete:$(z.vl.CIRCLE),drawingMode:k(L),options:{drawingControl:!1,circleOptions:A,polygonOptions:A}})):d;var X}},11821:(e,t,n)=>{n.d(t,{h:()=>l});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",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)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),l=e=>{let{width:t,open:n,children:r}=e;const l=o();return a().createElement("div",{className:l.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},98273:(e,t,n)=>{n.d(t,{P:()=>u});var r=n(24328),a=n.n(r),o=n(87685);const l=(0,n(79692).Z)({container:{display:"flex",flexShrink:0,height:"63px",alignItems:"center",borderBottom:"1px solid rgba(0,0,0,0.12)"},icon:{margin:"0 12px"},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"19px 17px"},secondTitle:{fontSize:"14px"}});var i=n(90436),s=n(85256),c=n(87918),d=n.n(c),p=n(39475);const u=e=>{let{onClose:t,mainTitle:n,secondTitle:r,content:c,rightContent:u}=e;const g=l();return a().createElement("div",{className:g.container},a().createElement(p.k,{size:"L",icon:o.default,onClick:t,className:g.icon,tooltipTitle:d().text("Close")}),c||a().createElement(a().Fragment,null,a().createElement(i.Z,{variant:"h6"},n),r&&a().createElement(a().Fragment,null,a().createElement(s.Z,{orientation:"vertical",flexItem:!0,className:g.divider}),a().createElement(i.Z,{variant:"body1",color:"textSecondary",className:g.secondTitle},r)),u))}},55310:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(13980),a=n.n(r),o=n(24328),l=n.n(o);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:a().number,margin:a().number};const s=i},15177:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(52730),a=n(35674),o=n(24328),l=n.n(o),i=n(22241),s=n(71153),c=n.n(s),d=n(87918),p=n.n(d),u=n(95544),g=n(90436),h=n(80687),m=n(1730),f=n(52194),b=n(89978),y=n(26978),x=n(79692);const v=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:d="",excludeUris:x=[],includeUris:E=[],attributesCount:w=16}=e;const O=v(),C=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),P=(0,o.useMemo)((()=>(0,y.U)(s,n.type,E,x)),[x,E,s,n.type]),T=(0,i.fyF)(P,n).filter((e=>{let{values:t}=e;return!(0,i.O27)(t)})).length>0;return T||!(0,i.O27)(d)?l().createElement(h.J.Provider,{value:C},l().createElement(m.Z,{className:t},d&&l().createElement(f.Z,{className:O.header,title:d}),l().createElement(u.Z,{className:c()(O.attributesContainer,{[O.noCaption]:!d})},T?l().createElement(b.Z,{entity:n,attrTypes:P,parentUri:n.uri,drawLines:!1,max:w}):l().createElement(g.Z,{className:O.noData},p().text("No data found"))))):null}));var w=n(17440),O=n(76141),C=n(12212),P=n(1108);const T=(0,x.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:d,caption:p="",excludeUris:g=[],includeUris:h=[],pinnedAttributes:b}=e;const x=T(),v=(0,r.useDispatch)(),E=(0,o.useContext)(C.m),S=(0,r.useSelector)(a.ZP.selectors.getUserRoles),N=(0,o.useMemo)((()=>(0,i.mC3)(b,S)),[b,S]),k=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),D=(0,o.useMemo)((()=>(0,y.U)(d,k.type,h,g)),[g,h,d,k.type]),_=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>I({},e,{viewId:E}))))),[E,v]),R=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,v)(I({},e,{viewId:E}))),[E,v]),j=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,v)(I({},e,{viewId:E}))),[E,v]);return l().createElement(m.Z,{className:t},p&&l().createElement(f.Z,{className:x.header,title:p}),l().createElement(u.Z,{className:c()(x.attributesContainer,{[x.noCaption]:!p})},l().createElement(P.c.Provider,{value:N},l().createElement(O.Z,{entity:k,attrTypes:D,parentUri:k.uri,drawLines:!1,mode:s,showEmptyEditors:(0,i.ZiX)(k.uri),crosswalks:k.crosswalks,onAddAttributes:_,onChangeAttribute:R,onDeleteAttribute:j}))))}));var k=n(10609);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)}const _=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=i.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return l().createElement(k.u.Provider,{value:a},(0,i.uzs)(t)?l().createElement(E,D({attributesCount:n,entity:a},o)):l().createElement(N,D({mode:t,pinnedAttributes:r,entity:a},o)))}))},65629:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(87918),s=n.n(i),c=n(17440),d=n(71153),p=n.n(d),u=n(12231),g=n(90436);const h=(0,n(79692).Z)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var m=n(42662),f=n(83088);function b(){return b=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},b.apply(this,arguments)}const y=e=>{let{innerRef:t,innerProps:n,selectOption:r,data:o}=e;const l=h(),{value:i,label:s,startObject:c,endObject:d}=o,y=c.objectType.label+" ↔ "+d.objectType.label;return a().createElement(u.Z,b({className:l.container,ref:t,key:i,onClick:()=>r({label:s,value:i,startObject:c,endObject:d})},n),a().createElement("div",{className:l.icons},a().createElement(m.Z,{className:l.iconTop,entityType:c.objectType}),a().createElement(m.Z,{className:l.iconBottom,entityType:d.objectType})),a().createElement("div",{className:l.text},a().createElement(f.C,{value:s},a().createElement(g.Z,{className:p()(l.textItem,l.primaryTextItem)},s)),a().createElement(f.C,{value:y},a().createElement(g.Z,{color:"textSecondary",className:p()(l.textItem,l.secondaryTextItem)},y))))};y.propTypes={innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),innerProps:l().object.isRequired,selectOption:l().func.isRequired,data:l().shape({value:l().string.isRequired,label:l().string.isRequired,startObject:l().object,endObject:l().object})};const x=y;var v=n(84425);function E(){return E=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},E.apply(this,arguments)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=e=>{let{value:t={},options:n=[],onChange:o=c.identity,TextFieldProps:l}=e,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","options","onChange","TextFieldProps"]);const d=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}({},(0,c.defaultTo)({},l),{"data-reltio-id":"relation-type-selector"})),[l]);return a().createElement(v.Z,E({value:t,options:n,onChange:o,label:s().text("Select relationship type "),components:{Option:x},TextFieldProps:d},i))},C=l().shape({label:l().string.isRequired,value:l().string.isRequired,startObject:l().object,endObject:l().object});O.propTypes={value:C,options:l().arrayOf(C),onChange:l().func};const P=O},589:(e,t,n)=>{n.d(t,{u:()=>p});var r=n(24328),a=n(52730),o=n(17440),l=n(22241),i=n(35674);const s={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:l.VGB,refRelation:l.VGB}),d=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,p=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(i.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(i.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(i.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(i.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=l.nwO.HistoryManager.createHistoryManager(l.nwO.AttributesDiff).computeEntityHistoryDiff(d(o===i.Z9.Current?c:r),d(n));e(i.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||s}},37193:(e,t,n)=>{n.d(t,{s:()=>at});var r=n(24328),a=n.n(r),o=n(22241),l=n(71153),i=n.n(l),s=n(73272),c=n(87918),d=n.n(c),p=n(80030),u=n(79692);const g=(0,u.Z)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}})));var h=n(28831),m=n(84425),f=n(4091);const b=e=>{let{taskId:t,assignee:n,isTaskOpen:r}=e;const{assignee:o,getAssignees:l,updateAssignee:i,updateRequestIsInProgress:s,readOnly:c}=(0,f.r)({taskId:t,assignee:n,isOpen:r}),p=s||c;return a().createElement(m.Z,{isDisabled:p,getOptions:l,onChange:i,hideSelectedOptions:!1,label:d().text("Assigned to"),value:o,defaultOptions:!0,TextFieldProps:{disabled:p},height:40})};var y=n(17440);const x=(0,u.Z)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}});var v=n(39600),E=n(52730),w=n(35674),O=n(29627),C=n(14834),P=n(35782),T=n(36571),I=n(35860);const S=e=>{let{taskId:t,dueDate:n,isTaskOpen:l,className:s}=e;const c=x(),{updateDueDate:p,updateRequestIsInProgress:u,readOnly:g}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:l}=(0,r.useContext)(C.O)||{},i=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),d=(0,O._)(),[p,u]=(0,r.useState)(!1),g=(0,T.Z)()("UPDATE_TASK")&&(0,I.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{i&&g&&n&&e&&t!==e&&(u(!0),d((0,o.KF3)({taskId:n,workflowPath:i,environment:s,tenant:c,dueDate:e})).then((()=>{null==l||l(n,{dueDate:e})})).catch(P.R).finally((()=>{u(!1)})))}),[i,n,s,c,l,d,t,g]),updateRequestIsInProgress:p,readOnly:!g}})({dueDate:n,taskId:t,isOpen:l});return a().createElement(v.Z,{className:i()(c.dueDate,s),disabled:u||g,value:n,label:d().text("Due date"),onChange:(0,y.pipe)((e=>e&&e.getTime()),p),margin:"dense",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}})},N=e=>{let{taskId:t,priority:n,isTaskOpen:l,className:i}=e;const{priorities:s,updatePriority:c,updateRequestIsInProgress:p,readOnly:u}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:l}=(0,r.useContext)(C.O)||{},i=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,O._)(),[u,g]=(0,r.useState)(!1),h=(0,T.Z)()("UPDATE_TASK")&&(0,I.tg)(a),m=(0,r.useCallback)((e=>{const{value:r}=e;i&&h&&n&&t!==r&&(g(!0),p((0,o.ax9)({taskId:n,workflowPath:i,environment:s,tenant:c,priority:r})).then((()=>{null==l||l(n,{priority:r})})).catch(P.R).finally((()=>{g(!1)})))}),[i,n,s,c,l,p,t,h]);return{priorities:(0,r.useMemo)((()=>[{label:d().text("Low"),value:o.NVC.low},{label:d().text("Medium"),value:o.NVC.medium},{label:d().text("High"),value:o.NVC.high},{label:d().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:m,updateRequestIsInProgress:u,readOnly:!h}})({taskId:t,priority:n,isOpen:l}),g=p||u;return a().createElement(m.Z,{className:i,isDisabled:g,options:s,onChange:c,hideSelectedOptions:!1,label:d().text("Priority"),value:s.find((0,y.propEq)("value",n)),TextFieldProps:{disabled:g},height:40})};var k=n(55932),D=n(43054),_=n(12212),R=n(98538),j=n(40435);const M=e=>{let{taskId:t,possibleActions:n,assignee:l,isTaskOpen:i}=e;const{actions:s,actionRequestIsInProgress:c}=(e=>{let{possibleActions:t,assignee:n,taskId:a,isOpen:l}=e;const{loadWorkflowTasks:i}=(0,r.useContext)(C.O)||{},s=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),c=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),d=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,E.useSelector)(w.ZP.selectors.getUserName),u=(0,E.useSelector)(w.ZP.selectors.getEntityUri),[g,h]=(0,r.useState)(!1),m=(0,r.useContext)(_.m),f=(0,E.useDispatch)(),b=(0,r.useCallback)((e=>()=>{s&&a&&(h(!0),(0,o.TZ_)({taskId:a,workflowPath:s,environment:c,tenant:d,action:e}).then((()=>{"Delete"===e?f(w.ui.actions.entityDeletionFinished()):(f(w.N5.entity.actions.loadEntity({viewId:m,uri:u})),null==i||i())})).catch(P.R).finally((()=>{h(!1)})))}),[s,a,c,d,f,u,m,i]);return{actions:(0,r.useMemo)((()=>p===n&&(0,I.tg)(l)?(t||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:b(t)}})):[]),[t,b,p,n,l]),actionRequestIsInProgress:g}})({taskId:t,possibleActions:n,assignee:l,isOpen:i});return s.length>0?a().createElement(R.Z,{buttonComponent:j.Z,buttonProps:{icon:D.Z,size:"L",disabled:c},menuId:"workflow-actions",menuItems:s}):null},L=(0,u.Z)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}});var Z=n(85256);const A=e=>{let{className:t,children:n,plain:r,first:o,last:l,transparent:s,divider:c}=e;const d=L();return a().createElement("div",{className:i()(t,d.decorator)},a().createElement("div",{className:i()(d.lineBlock,{[d.withLinePadding]:o})},!s&&a().createElement(a().Fragment,null,a().createElement("div",{className:d.noLine}),a().createElement("div",{className:i()(d.line,{[d.plain]:r},{[d.last]:l})}))),a().createElement("div",{className:d.content},n,c&&a().createElement(Z.Z,{className:d.rowDivider,light:!0,variant:"inset"})))};let F={};const B=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let z=0;function U(){return U=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},U.apply(this,arguments)}const V=e=>a().createElement("svg",U({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"}))),H=e=>{let{task:t,children:n,actions:o,Icon:l}=e;const{taskId:c,dueDate:u,priority:m,assignee:f,createdBy:y,createTime:x,displayName:v,processDefinitionDisplayName:E,objectURIs:w,processInstanceComments:O,possibleActions:C,isOpen:P}=t,D=(0,I.Xs)(w),_=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return F[n]||(F[n]=B[z],z++,z>B.length-1&&(z=0)),F[n]})({processDefinitionDisplayName:E}),R=g({color:_}),[j,L]=(0,r.useState)(!1),Z=(0,T.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS");return a().createElement("div",{className:R.card},a().createElement("div",{className:i()({[R.withBackground]:j})},a().createElement("div",{className:R.lineWrapper},a().createElement("div",{className:R.line}),l&&a().createElement(l,{className:R.icon}),a().createElement(A,{plain:!0,first:!0,transparent:!j},a().createElement("div",{className:R.mainInfo},a().createElement("div",{className:R.title},a().createElement("div",{className:i()(R.caption,R.flex)},E),a().createElement(s.Z,{className:R.flag}),a().createElement(p.ZP,{title:d().text("Due date")},a().createElement("span",{className:R.date},d().date(u,"L"))),a().createElement(h.Z,{isOpen:j,size:"L",onClick:()=>{L(!j)}})),a().createElement("div",{className:R.infoBlock},a().createElement("div",{className:R.flex},D&&a().createElement("div",{className:R.info},d().text("DCR ID"),": ",a().createElement("span",{className:R.infoValue},D)),a().createElement("div",{className:R.info},d().text("Created by"),": ",a().createElement("span",{className:R.infoValue},y)," ",d().text("on")," ",a().createElement("span",{className:R.infoValue},d().date(x,"L"))),a().createElement("div",{className:R.info},d().text("Step"),": ",a().createElement("span",{className:R.infoValue},v)),Z&&(null==O?void 0:O.length)>0&&a().createElement("div",{className:R.commentsInfo},a().createElement(V,{className:R.commentsIcon}),a().createElement("div",{className:R.infoValue},O.length))),o||a().createElement(M,{taskId:c,possibleActions:C,assignee:f,isTaskOpen:P}))))),j&&a().createElement(A,{plain:!0},a().createElement("div",{className:R.controlsBox},a().createElement("div",{className:R.controlsInRow},a().createElement(S,{taskId:c,dueDate:u,isTaskOpen:P}),a().createElement(N,{taskId:c,priority:m,className:R.priority,isTaskOpen:P})),a().createElement(b,{taskId:c,assignee:f,isTaskOpen:P})))),j&&a().createElement(a().Fragment,null,n,Z&&a().createElement("div",{className:R.comments},a().createElement(k.V,{taskId:c,processInstanceComments:O,isTaskOpen:P}))))};function W(){return W=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},W.apply(this,arguments)}const q=e=>a().createElement("svg",W({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));let K,G;!function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(K||(K={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(G||(G={}));var Y=n(26978);const $=(e,t)=>{switch(e){case G.CREATE_RELATIONSHIP:case G.INSERT_ATTRIBUTE:return K.ADDED;case G.UPDATE_TAGS:case G.UPDATE_ROLES:case G.UPDATE_ATTRIBUTE:return K.EDITED;case G.DELETE_ATTRIBUTE:case G.DELETE_RELATIONSHIP:return K.DELETED;case G.PIN_ATTRIBUTE:return null!=t&&t.pin?K.PIN_DELETED:K.PINNED;case G.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?K.IGNORE_DELETED:K.IGNORED}},J=e=>({[K.ADDED]:d().text("added"),[K.EDITED]:d().text("edited"),[K.DELETED]:d().text("deleted"),[K.PINNED]:d().text("pinned"),[K.PIN_DELETED]:d().text("pin deleted"),[K.IGNORED]:d().text("ignored"),[K.IGNORE_DELETED]:d().text("ignore deleted")}[e]||""),Q=(e,t)=>(0,y.when)((0,y.allPass)([(0,y.pipe)((0,y.prop)("type"),(0,y.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,y.evolve)({type:(0,y.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));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){ee(e,t,n[t])}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=(e,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,y.pathOr)([],["value",t.name])(n),l=(0,y.pathOr)([],["value",t.name])(r),i=Math.max(o.length,l.length);return(0,y.times)((e=>[{value:{newValue:o[e],oldValue:l[e],type:a}}]),i)}const n=e[t.name];return n?[n]:[]},ne=(0,y.curry)(((e,t,n)=>{const r=(0,Y.U)(e,t.type,[],[]);return ae(e,r,n)})),re=(0,y.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),l=(0,o.xF8)(e,t.type);return(0,y.flatten)([X({level:1,label:(0,y.propOr)("","label",a),attributeType:a,attributeValue:X({},t,n)},((e,t)=>{if(t===G.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=$(t);return e?{operation:e}:{}}return{}})(n,r)),ae(e,l,n,2)])})),ae=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,y.flatten)(t.map((t=>te(n,t).map((n=>n.map((n=>oe(e,t,n,r))))))).filter((0,y.complement)(y.isEmpty)))},oe=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return le(e,t,n,r);case o.oS0.TYPE_REFERENCE:return ie(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,y.is)(Object,n)?n:{newValue:t,type:G.INSERT_ATTRIBUTE}})(t,n);return se(t,e,r)}}},le=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},ae(e,a,n.value,r+1)]},ie=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},ae(e,a,n.value,r+1)]},se=(e,t,n)=>{const{newValue:r,oldValue:a,type:o}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===G.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:$(o,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function ce(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){de(e,t,n[t])}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pe=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],ue=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),l=a(t),i=a(n);return l&&i?[{type:G.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:l?[{type:G.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:i?[{type:G.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},ge=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,l=a===G.UPDATE_ROLES?(0,o.xqc)(e):y.identity,i=(0,y.difference)(n,r),s=(0,y.difference)(r,n),c=[];return i.length&&c.push({type:G.INSERT_ATTRIBUTE,newValue:{value:i.map(l).join(", ")}}),s.length&&c.push({type:G.DELETE_ATTRIBUTE,oldValue:{value:s.map(l).join(", ")}}),c},he=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,l=t===G.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,l].join("/")}return l})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var l;const n=r[e],o=r[e+1],i=(a[n]||[]).find((0,y.propEq)("id",o)),s=r.length===e+2?t:{},c=i||{id:o,value:s},d=(null===(l=t.refObjectURI)||void 0===l?void 0:l.indexOf(o))>=0&&t.refObjectURI;d&&(c.refObjectURI=d),(0,y.isNil)(i)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},me=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:l,tags:i,defaultProfilePicValue:s}=t,c=ce({},n);return s&&(c.defaultProfilePicValue=[s]),l&&(c[o.xPW.roles.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:l.map((0,o.xqc)(e)).join(", ")}}]),i&&(c[o.xPW.tags.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:i.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},fe=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case G.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case G.UPDATE_TAGS:r[o.xPW.tags.name]=ge(e,n);break;case G.UPDATE_ROLES:r[o.xPW.roles.name]=ge(e,n);break;case G.UPDATE_START_DATE:r[o.xPW.startDate.name]=ue(n);break;case G.UPDATE_END_DATE:r[o.xPW.endDate.name]=ue(n);break;case G.CREATE_RELATIONSHIP:case G.CREATE_ENTITY:return ce({},r,me(e,n.newValue));case G.INSERT_ATTRIBUTE:case G.UPDATE_ATTRIBUTE:case G.DELETE_ATTRIBUTE:case G.PIN_ATTRIBUTE:case G.IGNORE_ATTRIBUTE:he(r,n)}return r};var be=n(86689);const ye=(0,u.Z)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),xe=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const l=ye();return a().createElement(be.Z,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:l.linkLabel},n?d().text("View less suggestions"):d().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var ve=n(43525),Ee=n(7089);const we=(0,u.Z)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),Oe=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:l}=e;const s=we(),c=n||r;return a().createElement("div",{className:i()(s.field,l)},a().createElement("span",{className:s.fieldName},t,":"),!(0,y.isNil)(c)&&a().createElement("span",{className:s.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(ve.Z,{className:s.arrow}),r)),o&&a().createElement(Ee.Z,{variant:"outlined",label:J(o),className:i()(s.chip,o)}))},Ce=a().createContext(null);Ce.displayName="AttributesChangesContext";var Pe=n(67586),Te=n(18527);const Ie=(0,u.Z)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),Se=e=>{let{label:t,level:n,attributeType:l,attributeValue:s,oldValue:c,newValue:d,operation:p}=e;const u=Ie({level:n}),g=(0,E.useSelector)(w.ZP.selectors.getEntityUri),h=(0,r.useContext)(Ce),m=(0,r.useCallback)((()=>{if((0,o.YkG)(l)){const e=(0,y.when)((0,y.anyPass)([(0,y.hasPath)(["value","newValue"]),(0,y.hasPath)(["value","oldValue"])]),(0,y.ifElse)((0,y.hasPath)(["value","newValue"]),(0,y.path)(["value","newValue"]),(0,y.path)(["value","oldValue"])))(s);return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=o[t.refObjectURI];return l?(a=n===l.startObjectUri?l.endObjectUri:l.startObjectUri,r=n===l.startObjectUri?l.endObjectLabel:l.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(l,e,g,h)}if("endObject"in l){const{endObjectUri:e,endObjectLabel:t}=s;return{objectUri:e,objectLabel:t}}}),[l,s,g,h]),f=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=m()||{};if(!(0,y.isNil)(e)&&!(0,y.isNil)(t)){var n;const r=!1===(null===(n=h[e])||void 0===n?void 0:n.isExist);return a().createElement(Te.Z,{value:e,className:i()(u.linkContainer,{[u.disabledLink]:r})},a().createElement("span",{className:i()(u.linkLabel,{[u.label]:r})},(0,o.idV)(t)))}return null}),[m,h,u]),b=(0,r.useMemo)((()=>a().createElement("span",null,t,f())),[t,f]),x=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(Pe.Z,{value:t,dataTypeDefinition:Q(l,t)})}),[l]);return a().createElement(Oe,{className:u.change,label:b,oldValue:c&&x(c),newValue:d&&x(d),operation:p})},Ne=(0,u.Z)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});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 De=e=>{let{changes:t}=e;const n=Ne();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,y.has)("level",e)?a().createElement(Se,ke({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},_e=(0,y.pipe)((0,y.filter)((0,y.has)("operation")),y.length),Re=(0,u.Z)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),je=e=>{let{changes:t,objectsInfo:n,entityInfo:l,relationsInfo:i,max:s}=e;const c=Re(),p=(0,E.useSelector)(w.ZP.selectors.getMetadata),[u,g]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,y.pipe)((0,y.pick)([t]),ne(e,n)),l=(0,y.curry)(((e,t)=>(0,y.reduce)(((e,n)=>(0,y.concat)(e,n(t))),[],e))),i=(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>fe(e,n,r,t)),{}),s=r.map((n=>((e,t,n)=>(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>fe(e,n,r,t)),{}))(e,t,n)));return[l([(0,y.pipe)((0,y.omit)(pe),ne(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],i),(0,y.flatten)(r.map(((n,r)=>{const a=(0,y.path)([n.uri,0,"type"],t);return re(e,n,s[r],a)})))]})(p,t,l,i)),[p,t,l,i]),h=(0,r.useMemo)((()=>{const e={label:d().text("Relationships")};return g.length>0?(0,y.flatten)([u,e,g]):u}),[u,g]),{isExpanded:m,onToggle:f,itemsToShow:b,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),l=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),i=(0,r.useMemo)((()=>_e(e)),[e]),s=(0,r.useMemo)((()=>_e(l)),[l]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:l,collapsedSuggestionsCount:i-s}}(h,s);return a().createElement(Ce.Provider,{value:n},a().createElement("div",{className:c.container},a().createElement(Te.Z,{className:c.uri,value:(0,o.wwR)(l)},a().createElement("div",{className:c.label},(0,o.idV)(l.label))),a().createElement(De,{changes:b}),x>0&&a().createElement(xe,{onClick:f,suggestionsCount:x,isExpanded:m,className:c.showMoreLink})))};function Me(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){Le(e,t,n[t])}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.WgC)),Ae=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.bC9)),Fe=(e,t)=>(0,y.filter)((0,y.allPass)([(0,y.pipe)((0,y.prop)("uri"),o.bC9),(0,y.pipe)((0,y.prop)("startObjectUri"),(0,y.equals)(t))]))(e),Be=(0,y.curry)(((e,t)=>({entity:t,relations:Fe(e,t.uri)}))),ze=(0,y.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Me({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),Ue=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,y.pipe)((0,y.pathOr)([],[a,"relations"]),(0,y.concat)(r),y.uniq)(e);return e[a]={entity:n,relations:o},e};function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const He=e=>{let{task:t}=e;const{objectURIs:n}=t,l=(0,I.rc)(n),{dcr:i,groupedObjects:s}=(e=>{const[t,n]=(0,r.useState)([]),[a,l]=(0,r.useState)(null),i=(0,O._)(),s=(0,r.useCallback)((e=>(0,y.isEmpty)(e)?Promise.resolve([]):i((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,y.pipe)(y.keys,(0,y.filter)((t=>(0,y.prop)([t],e))),(0,y.map)((e=>Me({},t[e],{uri:e}))))(t))(t,r),o=(0,y.pipe)(Ze,(0,y.map)(Be(a)))(a),i=(0,y.pipe)(Ae,(0,y.map)(ze(r)))(a),[c,d]=(0,y.partition)((0,y.has)("entity"),i),p=d.map((0,y.path)(["relations",0,"startObjectUri"]));s(p).then((e=>{const t=d.map(((t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ve(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,y.pipe)(y.flatten,(0,y.reduce)(Ue,{}),y.values,n)([o,c,t])})).catch(P.R),l(e)})).catch(P.R)}),[e,s]),{dcr:a,groupedObjects:t}})(l);return a().createElement(H,{task:t,Icon:q},i&&s.map(((e,t)=>a().createElement(A,{key:t,last:t===s.length-1,divider:!0},a().createElement(je,{entityInfo:e.entity,relationsInfo:e.relations,changes:i.changes,objectsInfo:i.objectsInfo})))))},We=(0,u.Z)({pmCard:{marginLeft:"-15px"}});function qe(){return qe=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},qe.apply(this,arguments)}const Ke=e=>a().createElement("svg",qe({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var Ge=n(23044),Ye=n(20200);const $e={showTransitiveMatches:!0,showInactiveEntities:!1},Je=e=>{let{task:t}=e;const n=We(),{objectURIs:r}=t,o=(0,E.useSelector)(w.ZP.selectors.getEntity),l=(0,E.useSelector)(w.ZP.selectors.getMetadata),{matches:i,entitiesMap:s}=(0,Ge.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:$e}),c=null==i?void 0:i.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(H,{task:t,Icon:Ke},c&&a().createElement(A,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(Ye.M,{metadata:l,entity:o,match:c,entitiesMap:s}))))};function Qe(){return Qe=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},Qe.apply(this,arguments)}const Xe=e=>a().createElement("svg",Qe({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function et(){return et=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},et.apply(this,arguments)}const tt=e=>a().createElement("svg",et({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class nt{}nt.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(He,{task:t});case o.Yj_.potentialMatchReview:return a().createElement(Je,{task:t});case o.Yj_.recommendForDelete:return a().createElement(H,{task:t,Icon:tt});default:return a().createElement(H,{task:t,Icon:Xe})}};const rt=nt,at=e=>{let{task:t}=e;return rt.build({task:t})}},37778:(e,t,n)=>{n.d(t,{G:()=>P});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(77277),s=n(65549),c=n(36571),d=n(86619),p=n(8560),u=n(37265),g=n(79784),h=n(90436),m=n(90590),f=n(35674),b=n(22241),y=n(52730),x=n(14834),v=n(35782),E=n(79692);const w=(0,E.Z)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),O=e=>{let{anchorEl:t,onClose:n}=e;const o=w(),[s,c]=(0,r.useState)(""),[E,O]=(0,r.useState)(null),[C,P]=(0,r.useState)(!1),{definitions:T}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,y.useSelector)(f.ZP.selectors.getWorkflowPath),a=(0,y.useSelector)(f.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,y.useSelector)(f.ZP.selectors.getTenant),l=(0,y.useSelector)(f.ZP.selectors.getEntity).type;return(0,r.useEffect)((()=>{(0,b.IU6)({workflowPath:n,environment:a,tenant:o}).then((e=>{let{data:n}=e;return t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,l))}))}),[l,n,a,o]),{definitions:e}})(),{processInstance:I,loading:S}=(()=>{const{loadWorkflowTasks:e}=(0,r.useContext)(x.O),t=(0,y.useSelector)(f.ZP.selectors.getWorkflowPath),n=(0,y.useSelector)(f.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,y.useSelector)(f.ZP.selectors.getTenant),o=(0,y.useSelector)(f.ZP.selectors.getEntity).uri,[l,i]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,l)=>(i(!0),(0,b.$ju)({workflowPath:t,tenant:a,environment:n,processType:l,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,v.R)(e),e})).finally((()=>{i(!1)})))),[o,n,e,a,t]),loading:l}})(),N=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(g.ZP,{open:N,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(h.Z,{className:o.title},l().text("Add new workflow")),a().createElement(m.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:l().text("Select task type"),value:E,onChange:e=>{O(e)},label:"",options:T.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(d.Z,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:s,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(i.Z,{disabled:S,className:o.cancelButton,onClick:n},l().text("Cancel")),a().createElement(i.Z,{disabled:S,color:"primary",onClick:()=>{I(s,null==E?void 0:E.value).then((()=>{P(!0),c(""),O(null),n()})).catch((()=>{}))}},l().text("Start")))),a().createElement(p.Z,{container:document.body},a().createElement(u.Z,{open:C,autoHideDuration:5e3,onClose:()=>{P(!1)},message:l().text("A new workflow has started")})))},C=(0,E.Z)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),P=()=>{const e=C(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),d=o("START_PROCESS_INSTANCE"),p=o("VIEW_PROCESS_DEFINITIONS");return d&&p?a().createElement(a().Fragment,null,a().createElement(i.Z,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(s.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},l().text("Add"))),a().createElement(O,{anchorEl:t,onClose:()=>n(null)})):null}},55932:(e,t,n)=>{n.d(t,{V:()=>N});var r=n(24328),a=n.n(r),o=n(17440),l=n(29611),i=n(50581),s=n(94842),c=n(13980),d=n.n(c),p=n(87918),u=n.n(p),g=n(61837),h=n(43434),m=n(98685),f=n(71153),b=n.n(f),y=n(79692);const x=(0,y.Z)((e=>({comment:{display:"flex",flexDirection:"row",flex:1,marginLeft:"6px"},avatar:{height:"24px",width:"24px",margin:"3px 13px 0 0"},icon:{fill:"#537280",backgroundColor:"#EAEDEE"},firstLine:{display:"flex",flexDirection:"row"},info:{flex:1},author:{flex:1,fontWeight:"500",color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px"},date:{color:"rgba(0, 0, 0, 0.54)",fontSize:"11px",marginRight:"17px",lineHeight:"15px"},text:{color:"rgba(0, 0, 0, 0.6)",fontSize:"13px",wordWrap:"break-word",wordBreak:"break-all",paddingRight:"10px"}}))),v=(0,y.Z)((e=>({circleButton:{maxWidth:"14px",maxHeight:"14px",border:"1px solid rgba(0, 0, 0, 0.3)",fontSize:"13px",color:"rgba(0, 0, 0, 0.6)",position:"absolute",top:"-11px",left:"5px",backgroundColor:"#ffffff","&:hover":{backgroundColor:"#f7f7f7"},"&.focused":{backgroundColor:"#f7f7f7"}},delimiter:{position:"relative",height:"4px",borderTop:"1px solid rgba(0, 0, 0, 0.3)",borderBottom:"1px solid rgba(0, 0, 0, 0.3)",margin:"15px 0 24px 0"}}))),E=(0,y.Z)((e=>({container:{padding:"5px 0",display:"flex",flexDirection:"column"},commentsContainer:{maxHeight:"300px",overflowY:"auto"},title:{margin:"0 0 8px 5px",fontSize:"14px",color:"rgba(0, 0, 0, 0.87)"},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"0 6px",height:"40px",margin:"10px 17px 0 6px",fontSize:"14px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}}))),w=(0,y.Z)((e=>({messageContainer:{borderBottom:"1px solid rgba(0,0,0,0.3)",paddingBottom:"7px",marginBottom:"7px"}}))),O=e=>{let{author:t,classes:n,message:r,time:o}=e;const l=x();return a().createElement("div",{className:l.comment},a().createElement(h.Z,{className:l.avatar},a().createElement(m.Z,{className:l.icon})),a().createElement("div",{className:b()(l.info,n.messageContainer)},a().createElement("div",{className:l.firstLine},a().createElement("div",{className:l.author},t),a().createElement("span",{className:l.date},u().date(o,"L LT"))),a().createElement("div",{className:l.text},r)))};O.defaultProps={classes:{}},O.propTypes={classes:d().object,author:d().string,id:d().string,message:d().string,time:d().number};const C=e=>{let{comments:t,onClick:n}=e;const r=v();return a().createElement(a().Fragment,null,a().createElement(O,t[0]),a().createElement("div",{className:r.delimiter},a().createElement(g.Z,{className:r.circleButton,onClick:n},t.length-2)),a().createElement(O,t[t.length-1]))};C.propTypes={comments:d().arrayOf(d().shape({author:d().string,id:d().string,message:d().string,time:d().number})),onClick:d().func};const P=e=>{let{comments:t}=e;const n=w();return t.map((e=>{let{author:t,id:r,message:o,time:l}=e;return a().createElement(O,{classes:{messageContainer:n.messageContainer},key:r,author:t,message:o,time:l})}))};P.propTypes={comments:d().arrayOf(d().shape({author:d().string,id:d().string,message:d().string,time:d().number}))};var T=n(12132),I=n(40435);const S=e=>e.target.value,N=e=>{let{processInstanceComments:t,taskId:n,isTaskOpen:c}=e;const d=E(),[p,g]=(0,r.useState)(!1),[h,m]=(0,r.useState)(""),{comments:f,writeComment:b,readOnly:y}=(0,T.W)({processInstanceComments:t,taskId:n,isOpen:c}),x=(0,r.useCallback)((()=>{b(h),m("")}),[h,b]),v=(0,o.pipe)(S,m);return a().createElement("div",{className:d.container},a().createElement("div",{className:d.title}," ",u().text("Comments")," "),a().createElement("div",{className:d.commentsContainer},p||f.length<3?a().createElement(P,{comments:f}):a().createElement(C,{onClick:()=>g(!0),comments:f})),!y&&a().createElement(l.Z,{endAdornment:a().createElement(i.Z,{position:"end"},a().createElement(I.Z,{icon:s.Z,disabled:0===h.length,onClick:x})),classes:{root:d.filledInputRoot},placeholder:u().text("Write a comment"),value:h,onKeyPress:(0,o.when)((0,o.propEq)("key","Enter"),x),onChange:v,disableUnderline:!0}))};N.propTypes={processInstanceComments:d().arrayOf(d().shape({author:d().string,id:d().string,message:d().string,time:d().number})),taskId:d().string}},35782:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(87918),a=n.n(r),o=n(22241),l=n(97333);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{errorMessage:t,errorCode:n}=e;n!==o.Xt7.WORKFLOW_IS_NOT_REGISTERED_ERROR&&(console.error(e),l.Z.addError({title:a().text("Error"),message:t||a().text("Something went wrong...")}))}},35860:(e,t,n)=>{n.d(t,{rc:()=>a,Xs:()=>o,tg:()=>l});var r=n(17440);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.find((0,r.startsWith)("changeRequests/"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,r.pipe)(a,(0,r.unless)(r.isNil,(0,r.pipe)((0,r.split)("/"),(0,r.nth)(1))))(e)},l=e=>void 0===e||!0===e},4091:(e,t,n)=>{n.d(t,{r:()=>h});var r=n(24328),a=n(17440),o=n(52730),l=n(22241),i=n(35674),s=n(29627),c=n(14834),d=n(35782),p=n(36571),u=n(35860);const g=e=>({label:e,value:e}),h=e=>{let{assignee:t,taskId:n,isOpen:h}=e;const{updateTaskState:m}=(0,r.useContext)(c.O)||{},f=(0,o.useSelector)(i.ZP.selectors.getWorkflowPath),b=(0,o.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),y=(0,o.useSelector)(i.ZP.selectors.getTenant),x=(0,s._)(),v=(0,s._)(),[E,w]=(0,r.useState)(null),[O,C]=(0,r.useState)(),[P,T]=(0,r.useState)(!1),I=(0,p.Z)()("UPDATE_TASK")&&(0,u.tg)(h);(0,r.useEffect)((()=>{w(g(t))}),[t]);const S=(0,r.useCallback)((e=>{if(f&&I&&n){const t=(0,a.filter)((t=>t.value.toLowerCase().includes(e)));return O?Promise.resolve(t(O)):v((0,l.j2$)({taskId:n,workflowPath:f,environment:b,tenant:y})).then((e=>{const{data:n}=e,r=n.sort(((e,t)=>l.P6Y.strings.sort("asc",e,t))).map(g);return C(r),t(r)})).catch(d.R)}}),[f,n,b,y,O,C,I]),N=(0,r.useCallback)((e=>{if(f&&I&&n){const{value:t}=e;T(!0),x((0,l._C4)({taskId:n,workflowPath:f,environment:b,tenant:y,assignee:t})).then((()=>{w(g(t)),null==m||m(n,{assignee:t})})).catch(d.R).finally((()=>{T(!1)}))}}),[f,n,b,y,I]);return{assignee:E,getAssignees:S,updateAssignee:N,updateRequestIsInProgress:P,readOnly:!I}}},36571:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(52730),a=n(35674);const o=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getWorkflowPath),t=(0,r.useSelector)(a.ZP.selectors.getCanUserStartProcessFromQuery),n=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowJobs),o=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowEnvironmentConfigJar),l=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowDefinition),i=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowConfigJar),s=(0,r.useSelector)(a.ZP.selectors.getCanUserViewProcessInstanceSearchQuery),c=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateWorkflowDataTask),d=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateProcessInstance),p=(0,r.useSelector)(a.ZP.selectors.getCanUserReadWorkflowDataTask),u=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowEnvironmentDefinition),g=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowDefinition),h=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsValidateTasks),m=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsUpdateTasks),f=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsTerminateProcessInstance),b=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsSyncBusinessProcessData),y=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobs),x=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowEnvironmentConfigJar),v=(0,r.useSelector)(a.ZP.selectors.getCanUserRegisterConfigEnvironments),E=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowConfigJar);return r=>{if(!e)return!1;switch(r){case"VIEW_PROCESS_DEFINITIONS":return l;case"DEPLOY_GENERIC_PROCESS_DEFINITION":return u;case"VIEW_JOBS":return n;case"START_JOB":return y||b&&f&&m&&h;case"VIEW_CUSTOM_JARS":return i||o;case"UPDATE_PROCESS_INSTANCE":return d;case"VIEW_TASKS":return p;case"REGISTER_TENANT":return v;case"START_PROCESS_INSTANCE":case"START_PROCESS_INSTANCE_SEARCH_QUERY":return t;case"VIEW_PROCESS_INSTANCE_COMMENTS":case"VIEW_PROCESS_INSTANCES":case"VIEW_PROCESS_INSTANCE_COUNT":return s;case"UPDATE_TASK":return c;case"DEPLOY_TENANT_PROCESS_DEFINITION":return g;case"DEPLOY_CUSTOM_JAR":return E&&x}return!1}}},12132:(e,t,n)=>{n.d(t,{W:()=>u});var r=n(24328),a=n(22241),o=n(35674),l=n(52730),i=n(29627),s=n(14834),c=n(35782),d=n(36571),p=n(35860);const u=e=>{let{processInstanceComments:t,taskId:n,isOpen:u}=e;const{updateTaskState:g}=(0,r.useContext)(s.O)||{},h=(0,l.useSelector)(o.ZP.selectors.getWorkflowPath),m=(0,l.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,l.useSelector)(o.ZP.selectors.getTenant),b=(0,i._)(),[y,x]=(0,r.useState)([]),[v,E]=(0,r.useState)(!1),w=(0,d.Z)()("UPDATE_TASK")&&(0,p.tg)(u);(0,r.useEffect)((()=>{x(t||[])}),[t]);const O=(0,r.useCallback)((e=>{w&&(E(!0),b((0,a.tZe)({workflowPath:h,environment:m,tenant:f,taskId:n,comment:e}).then((()=>(0,a.yW4)({workflowPath:h,environment:m,tenant:f,taskId:n})))).then((e=>{let{processInstanceComments:t}=e;x(t||[]),null==g||g(n,{processInstanceComments:t})})).catch(c.R).finally((()=>E(!1))))}),[m,n,f,h,b,g,w]);return{comments:y,requestIsInProgress:v,writeComment:O,readOnly:!w}}},27938:(e,t,n)=>{n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(17440),l=n(35674),i=n(22241),s=n(29627),c=n(36571);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},g=(0,s._)(),h=(0,a.useSelector)(l.ZP.selectors.getWorkflowPath),m=(0,a.useSelector)(l.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(l.ZP.selectors.isWorkflowEnabled),b=(0,a.useSelector)(l.ZP.selectors.getTenant),y=(0,a.useSelector)(l.ZP.selectors.getEntityUri),x=(0,a.useSelector)(l.ZP.selectors.getIsEditableMode),v=(0,c.Z)()("VIEW_TASKS"),E=!(!h||!m)&&f&&v,[w,O]=(0,r.useState)(null),[C,P]=(0,r.useState)(0),[T,I]=(0,r.useState)(!1),S=(0,r.useCallback)((()=>{I(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,i.uT0)({entityUri:y,workflowPath:h,environment:m,tenant:b,filter:{assignee:n,processType:e},includeClosed:!!p})));g(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);O(r),P(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{I(!1)}))}),[y,m,g,b,h,n,p,t]);(0,r.useEffect)((()=>{y&&E&&!(0,i.ZiX)(y)?S():(O(null),P(0))}),[E,y,S,x]);const N=(0,r.useCallback)(((e,t)=>{O((n=>n.map((n=>n.taskId===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){d(e,t,n[t])}))}return e}({},n,t):n))))}),[]);return{tasks:w,total:C,loading:T,updateTaskState:N,loadWorkflowTasks:S}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},53857:(e,t,n)=>{n.d(t,{vl:()=>r,r:()=>a,Pi:()=>o});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o=.001},3064:(e,t,n)=>{n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},80231:(e,t,n)=>{n.d(t,{j:()=>a});var r=n(24328);const a=n.n(r)().createContext(!1);a.displayName="ProfilePerspectiveViewContext"},14834:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(24328);const a=n.n(r)().createContext(null);a.displayName="WorkflowTasksContext"},17569:(e,t,n)=>{n.d(t,{o:()=>l});var r=n(24328),a=n(17440);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 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){o(e,t,n[t])}))}return e}({},e,{[r]:(0,a.pipe)(l,n)})}),{})),[n,t])}},36852:(e,t,n)=>{n.d(t,{C:()=>u});var r=n(24328),a=n(52730),o=n(17440),l=n(22241),i=n(35674);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 d=[],p=e=>console.error("Collaboration error",e),u=e=>{let{objectIds:t=d,objectTypes:n,enabled:c=!0}=e;const u=(0,a.useSelector)(i.ZP.selectors.getEntity),g=(0,a.useSelector)(i.ZP.selectors.getTenant),h=(0,a.useSelector)(i.ZP.selectors.getCollaborationPath),m=(0,a.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[f,b]=(0,r.useState)(null),[y,x]=(0,r.useState)([]),[v,E]=(0,r.useState)(null),[w,O]=(0,r.useState)(null),[C,P]=(0,r.useState)(!1),[T,I]=(0,r.useState)(!1),S=(0,r.useCallback)((e=>{E((t=>s({},t,e)))}),[]),N=null==u?void 0:u.uri,k=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(m&&N&&!(0,l.ZiX)(N)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,o.pipe)(l.$oF,(0,o.andThen)((0,o.map)((0,o.props)(["objectId","comments"]))),(0,o.andThen)(o.fromPairs),(0,o.andThen)(t?E:S),(0,o.otherwise)(n))({uris:e,tenant:g,collaborationPath:h})}else E(null)}),[S,h,N,m,g]);(0,r.useEffect)((()=>{k(t,!0)}),[t,k]);const D=(0,r.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:h,tenant:g,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:r}=e;x((e=>t?(0,o.uniqBy)((0,o.prop)("commentId"),[...e,...n]):n)),b(r)})).catch(p)}),[h,g]),_=(0,r.useCallback)((e=>{I(!0),(0,l.d7q)({collaborationPath:h,tenant:g,commentId:e}).then(O).catch(p).finally((()=>I(!1)))}),[h,g]),R=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:o}=e;P(!0);const i={objectId:a,content:t,relatedObjectUris:o,objectType:r,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:h,tenant:g,data:i}).then((e=>{let[t]=e;return((e,t)=>{O(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),x((t=>[e,...t]))})(t,a)})).catch(p).finally((()=>P(!1)))}),[h,g]),j=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,objectType:r,uri:a,relatedObjectUris:i,commentId:c,replies:d}=e;P(!0);const u={objectId:a,content:t,relatedObjectUris:i,objectType:r,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:d};return(0,l.uAg)({collaborationPath:h,tenant:g,data:u}).then((e=>(e=>{O(e),x((0,o.map)((0,o.when)((0,o.propEq)("commentId",e.commentId),(0,o.always)(e))))})(s({},e,{replies:d})))).catch(p).finally((()=>P(!1)))}),[h,g]),M=(0,r.useCallback)((e=>{let{uri:t,commentId:n}=e;P(!0),(0,l.YFy)({collaborationPath:h,tenant:g,commentId:n}).then((()=>((e,t)=>{O(null),E((n=>{const r=n[t]||[];return s({},n,{[t]:r.filter((t=>t.commentId!==e))})})),x((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(p).finally((()=>P(!1)))}),[h,g]),L=(0,r.useCallback)(((e,t,n)=>{const r="resolve"===e.action?"resolved":"open";O("resolved"===r?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:r,replies:e.replies+1}):e))}))),x((t=>t.map((t=>t.commentId===n?s({},t,{status:r,replies:[...t.replies,e]}):t))))}),[]),Z=(0,r.useCallback)((e=>{let{content:t,namedUsers:n,commentId:r,action:a,uri:o}=e;P(!0);const i={content:t,action:a,namedUsers:n};return(0,l.PP2)({collaborationPath:h,tenant:g,commentId:r,data:i}).then((e=>{let[t]=e;return L(t,o,r)})).catch(p).finally((()=>P(!1)))}),[h,g,L]),A=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;Z({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[Z]),F=(0,r.useCallback)((e=>{let{commentId:t,uri:n}=e;Z({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[Z]);return{clearCurrentComment:(0,r.useCallback)((()=>{O(null)}),[]),comments:y,commentsMap:v,createComment:R,createReply:Z,currentComment:w,deleteComment:M,editComment:j,getComment:_,getComments:D,getCommentsCount:k,loading:T,objectTypes:n,pageToken:f,reOpenThread:F,resolveThread:A,sending:C}}},47081:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(52730),a=n(35674),o=n(22241),l=n(24328);const i=[],s=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||i;return{canCreate:(0,l.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,l.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,l.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,l.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},19278:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(22241),a=n(52730),o=n(35674),l=n(24328);const i=e=>{let{entities:t,entity:n,onFinishRequest:i,onStartRequest:s}=e;const c=(0,a.useSelector)(o.ZP.selectors.getTenant),d=(0,a.useSelector)(o.ZP.selectors.getDtssPath),[p,u]=(0,l.useState)(!1);return{isPending:p,sendMarkAsNotMatchRequest:(0,l.useCallback)((()=>{null==s||s(),u(!0);const e={dtssPath:d,customerTenant:c,entity:n,entities:t};((0,r.biM)(n)?(0,r.bMg)(e):(0,r.fZN)(e)).finally((()=>{null==i||i(),u(!1)}))}),[d,t,n,i,s,c])}}},23044:(e,t,n)=>{n.d(t,{s:()=>d});var r=n(24328),a=n(52730),o=n(35674),l=n(22241),i=n(18907),s=n(29627),c=n(17440);const d=e=>{let{enabled:t,entity:n,filter:d,onFinishLoading:p,onStartLoading:u,options:g,page:h,rowsPerPage:m,sorting:f}=e;const{order:b,field:y}=f||{},[x,v]=(0,r.useState)(0),[E,w]=(0,r.useState)([]),[O,C]=(0,r.useState)({}),P=(0,a.useSelector)(o.ZP.selectors.getTenant),T=(0,a.useSelector)(o.ZP.selectors.getDtssPath),I=(0,a.useSelector)(o.ZP.selectors.getDataTenants),S=(0,r.useMemo)((()=>({dtssPath:T,dataTenants:I,entity:n,customerTenant:P,dtssRequest:l.Rgl})),[T,I,n,P]),N=(0,r.useCallback)((0,l.U_T)(S,l.SP6),[S]),k=(0,i.a)(N),D=(0,i.a)(l.bFH),_=(0,c.prop)("uri",n),R=(0,s._)(),j=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t||(0,l.ZiX)(_))return v(0),w([]),void C({});null==u||u(),R((0,l.biM)(n)?D({dtssPath:T,entity:n,customerTenant:P,offset:h*m,max:m,force:e}):k({entityUri:_,offset:h*m,max:m,filter:d,sort:y,order:b,force:e,deep:g.showTransitiveMatches?void 0:1,activeness:g.showInactiveEntities?l.YJ7.ALL:l.YJ7.ACTIVE_ONLY})).then((e=>{const{response:t,total:n,originalResponse:r}=e;v(n),w(t),(0,l.B1H)(r).length>0&&C((0,l.KPC)(r))})).finally((()=>{null==p||p()}))}),[T,t,_,y,d,D,k,p,u,g,b,h,m,R,P]);return(0,r.useEffect)((()=>{j()}),[j]),{total:x,matches:E,entitiesMap:O,loadMatches:(0,r.useCallback)((()=>{j(!0)}),[j])}}},50447:(e,t,n)=>{n.d(t,{_:()=>s});var r=n(24328),a=n(52730),o=n(35674),l=n(22241),i=n(79573);const s=e=>{let{entities:t,entity:n,onFinishRequest:s,onStartRequest:c,onError:d=i.ZT}=e;const p=(0,a.useSelector)(o.ZP.selectors.getTenant),u=(0,a.useSelector)(o.ZP.selectors.getDtssPath),[g,h]=(0,r.useState)(!1);return{isPending:g,sendMergeAllRequest:(0,r.useCallback)((()=>{null==c||c(),h(!0);const e={dtssPath:u,customerTenant:p,entity:n,entities:t};((0,l.biM)(n)?(0,l.uJQ)(e):(0,l.OxG)(e)).catch(d).finally((()=>{null==s||s(),h(!1)}))}),[u,t,n,s,c,p])}}},18907:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(24328),a=n(17440);const o=e=>(0,r.useCallback)((e=>{let t={},n=[];return async r=>{let{max:o,offset:l,force:i}=r,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(r,["max","offset","force"]),c=i;const d=Object.keys(t);if(c=c||!(0,a.equals)(Object.keys(s),d),!c)for(const e of d)c=c||!(0,a.equals)(t[e],s[e]);return c&&(n=await e(s),t=s),{response:n.slice(l,l+o),total:n.length,originalResponse:n}}})(e),[e])},64651:(e,t,n)=>{n.d(t,{n:()=>l});var r=n(24328),a=n(22241),o=n(17440);const l=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,r.useCallback)(((e,n)=>{const r={},l=(0,o.pipe)(a.PjQ,(0,o.tap)((e=>r[e]=(0,o.propOr)(0,e,r)+1))),i=(0,o.ascend)((0,o.prop)("label")),s=(0,o.curry)(((e,n)=>{let{uri:r,label:o,startObject:i,endObject:s}=n;const c=e===(t?a.Nsj.OUT:a.Nsj.IN)?i:s;return{label:{directionalLabel:l(c),typeLabel:o},value:`${r},${e}`,startObject:i,endObject:s}}));return e.map(s(a.Nsj.IN)).concat(n.map(s(a.Nsj.OUT))).map((0,o.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?r[t]>1?`${t} (${n})`:t:n}})).sort(i)}),[t]),fromEditorValue:(0,r.useCallback)(((e,t)=>n=>{const[r,l]=n.value.split(",");return{type:(l===a.Nsj.IN?e:t).find((0,o.propEq)("uri",r)),direction:l}}),[]),toEditorValue:(0,r.useCallback)(((e,t)=>t.find((0,o.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},80225:(e,t,n)=>{n.d(t,{a:()=>g});var r=n(24328),a=n(52730),o=n(17440),l=n(35674),i=n(22241),s=n(29627),c=n(90690);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(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,o.when)(o.identity,(0,o.pipe)(i.VGB,o.length,(0,o.times)((e=>e+1)))),g=e=>{let{sorting:t,filter:n,page:p,rowsPerPage:g,config:h,entity:m,relationActivityFilter:f,mode:b}=e;const[y,x]=(0,r.useState)(!1),v=(0,a.useDispatch)(),E=(0,a.useSelector)(l.ZP.selectors.getTenant),w=(0,a.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:O,globalFilter:C}=(0,a.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},P=(0,s._)(),T=h.suggested,I=(0,r.useCallback)((()=>{if(null!=m&&m.uri){const e=d({},h.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:f||i.Ng6.ALL,entity:O},max:g,offset:p*g,filter:(0,i.vyX)(C,n)||void 0,suggested:u(T)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(i.VGB,(t=>t.map(((t,n)=>d({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(T)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:r,customerTenant:E,dataTenant:e.dataTenant,dtssPath:w})],[o.T,e=>(0,i.N6e)(e.uri,r)]]);x(!0),P(a(m)).then((e=>{let[{connections:t,total:n}]=e;v(l.N5.relations.actions.relationsLoaded({id:h.id,connections:t,total:n}))})).finally((()=>{x(!1)}))}}),[O,h,v,w,null==m?void 0:m.uri,null==m?void 0:m.dataTenant,n,C,p,f,g,P,t,E]),S=(0,r.useRef)(!1);S.current=!1,(0,r.useEffect)((()=>{S.current=!0,I()}),[I]);const N=(0,c.D)(b);return(0,r.useEffect)((()=>{b!==i.ARY.Viewing||S.current||N===b||(S.current=!0,I())}),[I,b,N]),{isLoading:y,reload:I}}},10:(e,t,n)=>{n.d(t,{U:()=>i});var r=n(24328),a=n(52730),o=n(22241),l=n(35674);const i=()=>{const[e,t]=(0,r.useState)([]),n=(0,a.useSelector)(l.ZP.selectors.getTenant),i=(0,a.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{(0,o.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}}}]);
1
+ /*! For license information please see 4589.js.LICENSE.txt */
2
+ (self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4589],{49429:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(7560),i=r(54530),o=r(24328),a=(r(13980),r(6277)),u=r(15459),s=o.forwardRef((function(t,e){var r=t.disableSpacing,u=void 0!==r&&r,s=t.classes,c=t.className,h=(0,i.Z)(t,["disableSpacing","classes","className"]);return o.createElement("div",(0,n.Z)({className:(0,a.Z)(s.root,c,!u&&s.spacing),ref:e},h))}));const c=(0,u.Z)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(s)},55999:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(7560),i=r(24328),o=(r(13980),r(15459)),a=r(90436),u=i.forwardRef((function(t,e){return i.createElement(a.Z,(0,n.Z)({component:"p",variant:"body1",color:"textSecondary",ref:e},t))}));const s=(0,o.Z)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(u)},79249:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var n=r(7560),i=r(54530),o=r(24328),a=(r(13980),r(6277)),u=r(15459),s=r(90436),c=o.forwardRef((function(t,e){var r=t.children,u=t.classes,c=t.className,h=t.disableTypography,l=void 0!==h&&h,d=(0,i.Z)(t,["children","classes","className","disableTypography"]);return o.createElement("div",(0,n.Z)({className:(0,a.Z)(u.root,c),ref:e},d),l?r:o.createElement(s.Z,{component:"h2",variant:"h6"},r))}));const h=(0,u.Z)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(c)},27604:(t,e,r)=>{"use strict";var n=r(14859);e.Z=void 0;var i=n(r(24328)),o=(0,n(r(50175)).default)(i.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");e.Z=o},36444:(t,e,r)=>{"use strict";var n=r(14859);e.Z=void 0;var i=n(r(24328)),o=(0,n(r(50175)).default)(i.default.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList");e.Z=o},82726:(t,e,r)=>{"use strict";var n=r(14859);e.Z=void 0;var i=n(r(24328)),o=(0,n(r(50175)).default)(i.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=o},46339:(t,e,r)=>{"use strict";r.d(e,{C6:()=>w,sG:()=>b,$j:()=>m,eP:()=>f,Ys:()=>d});var n=r(24328),i=r.n(n),o=r(76635),a=r(98996),u=r.n(a),s=r(49358);const c=(0,n.createContext)(null),h=c.Provider;function l(){const t=(0,n.useContext)(c);if(null==t)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}function d(){return l().sigma}function f(){const{sigma:t,container:e}=l(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n={};return Object.keys(r).forEach((e=>{n[e]=r[e],t.setSetting(e,r[e])})),()=>{t&&e&&e.offsetWidth>0&&e.offsetHeight>0&&Object.keys(n).forEach((e=>{t.setSetting(e,n[e])}))}}),[t,r,e]),i}const p=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","kill"],g=["click","rightClick","mouseup","mousedown","mousemove","doubleClick","wheel"],y=["mouseup","mousedown","mousemove"],v=["cameraUpdated"];function m(){const t=d(),e=f(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n=Object.keys(r),i={},o={},a=t.getSettings();return n.some((t=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(t)))&&!1===a.enableEdgeClickEvents&&(i.enableEdgeClickEvents=!0,o.enableEdgeClickEvents=!1),n.some((t=>["enterEdge","leaveEdge"].includes(t)))&&!1===a.enableEdgeHoverEvents&&(i.enableEdgeHoverEvents=!0,o.enableEdgeHoverEvents=!1),n.some((t=>["wheelEdge"].includes(t)))&&!1===a.enableEdgeWheelEvents&&(i.enableEdgeWheelEvents=!0,o.enableEdgeWheelEvents=!1),Object.keys(i).length>0&&e(i),n.forEach((e=>{const n=r[e];p.includes(e)&&t.on(e,n),g.includes(e)&&t.getMouseCaptor().on(e,n),y.includes(e)&&t.getTouchCaptor().on(e,n),v.includes(e)&&t.getCamera().on("updated",n)})),()=>{let n;if(Object.keys(o).length>0&&e(o),t)for(n in r){const e=r[n];p.includes(n)&&t.removeListener(n,e),g.includes(n)&&t.getMouseCaptor().removeListener(n,e),y.includes(n)&&t.getTouchCaptor().removeListener(n,e),v.includes(n)&&t.getCamera().removeListener("updated",e)}}}),[t,r,e]),i}function b(){const t=d();return(0,n.useCallback)(((e,r=!0)=>{t&&e&&(r&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}const w=({graph:t,id:e,className:r,style:a,initialSettings:c,children:l})=>{const d=(0,n.useRef)(null),f=(0,n.useRef)(null),p={className:`react-sigma ${r||""}`,id:e,style:a},[g,y]=(0,n.useState)(null),v=(0,n.useRef)();(0,o.isEqual)(v.current,c)||(v.current=c),(0,n.useEffect)((()=>{let e=null;if(null!==f.current){const r=t?"function"==typeof t?new t:t:new(u());e=new s.Sigma(r,f.current,v.current)}return y(e),()=>{e&&e.kill(),y(null)}}),[f,t,v]);const m=(0,n.useMemo)((()=>g&&d.current?{sigma:g,container:d.current}:null),[g,d.current]),b=null!==m?i().createElement(h,{value:m},l):null;return i().createElement("div",Object.assign({},p,{ref:d}),i().createElement("div",{className:"sigma-container",ref:f}),b)}},8884:t=>{t.exports=function(t,e){var r=e.length;if(0!==r){var n=t.length;t.length+=r;for(var i=0;i<r;i++)t[n+i]=e[i]}}},19869:t=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},36061:(t,e)=>{e.assign=function(t){t=t||{};var e,r,n,i=Array.prototype.slice.call(arguments).slice(1);for(e=0,n=i.length;e<n;e++)if(i[e])for(r in i[e])t[r]=i[e][r];return t},e.validateSettings=function(t){return"linLogMode"in t&&"boolean"!=typeof t.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&"boolean"!=typeof t.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&"boolean"!=typeof t.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&"number"!=typeof t.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in t)||"number"==typeof t.scalingRatio&&t.scalingRatio>=0?"strongGravityMode"in t&&"boolean"!=typeof t.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in t)||"number"==typeof t.gravity&&t.gravity>=0?"slowDown"in t&&!("number"==typeof t.slowDown||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&"boolean"!=typeof t.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in t)||"number"==typeof t.barnesHutTheta&&t.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},e.graphToByteArrays=function(t,e){var r,n=t.order,i=t.size,o={},a=new Float32Array(10*n),u=new Float32Array(3*i);return r=0,t.forEachNode((function(e,n){o[e]=r,a[r]=n.x,a[r+1]=n.y,a[r+2]=0,a[r+3]=0,a[r+4]=0,a[r+5]=0,a[r+6]=1+t.degree(e),a[r+7]=1,a[r+8]=n.size||1,a[r+9]=n.fixed?1:0,r+=10})),r=0,t.forEachEdge((function(t,n,i,a){u[r]=o[i],u[r+1]=o[a],u[r+2]=function(t){if(!e)return 1;var r=t[e];return("number"!=typeof r||isNaN(r))&&(r=1),r}(n),r+=3})),{nodes:a,edges:u}},e.assignLayoutChanges=function(t,e,r){var n=0;t.updateEachNodeAttributes((function(t,i){return i.x=e[n],i.y=e[n+1],n+=10,r?r(t,i):i}))},e.readGraphPositions=function(t,e){var r=0;t.forEachNode((function(t,n){e[r]=n.x,e[r+1]=n.y,r+=10}))},e.collectLayoutChanges=function(t,e,r){for(var n=t.nodes(),i={},o=0,a=0,u=e.length;o<u;o+=10){if(r){var s=Object.assign({},t.getNodeAttributes(n[a]));s.x=e[o],s.y=e[o+1],s=r(n[a],s),i[n[a]]={x:s.x,y:s.y}}else i[n[a]]={x:e[o],y:e[o+1]};a++}return i},e.createWorker=function(t){var e=window.URL||window.webkitURL,r=t.toString(),n=e.createObjectURL(new Blob(["("+r+").call(this);"],{type:"text/javascript"})),i=new Worker(n);return e.revokeObjectURL(n),i}},3660:(t,e,r)=>{var n=r(31880),i=r(8725),o=r(36061),a=r(19869);function u(t,e,r){if(!n(e))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"==typeof r&&(r={iterations:r});var u=r.iterations;if("number"!=typeof u)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(u<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var s=r.attributes||{},c=r.weighted?s.weight||"weight":null,h="function"==typeof r.outputReducer?r.outputReducer:null,l=o.assign({},a,r.settings),d=o.validateSettings(l);if(d)throw new Error("graphology-layout-forceatlas2: "+d.message);var f,p=o.graphToByteArrays(e,c);for(f=0;f<u;f++)i(l,p.nodes,p.edges);if(!t)return o.collectLayoutChanges(e,p.nodes);o.assignLayoutChanges(e,p.nodes,h)}var s=u.bind(null,!1);s.assign=u.bind(null,!0),s.inferSettings=function(t){var e="number"==typeof t?t:t.order;return{barnesHutOptimize:e>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(e)}},t.exports=s},8725:t=>{var e=10;t.exports=function(t,r,n){var i,o,a,u,s,c,h,l,d,f,p,g,y,v,m,b,w,_,x,E,A,L,k,S=r.length,M=n.length,C=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,F=[];for(a=0;a<S;a+=e)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<S;a+=e)p+=r[a+6];p/=S/e}if(t.barnesHutOptimize){var O,T,G,P=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<S;a+=e)P=Math.min(P,r[a+0]),R=Math.max(R,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=R-P,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(P-=(U-z)/2)+U,F[0]=-1,F[1]=(P+R)/2,F[2]=(N+j)/2,F[3]=Math.max(R-P,j-N),F[4]=-1,F[5]=-1,F[6]=0,F[7]=0,F[8]=0,i=1,a=0;a<S;a+=e)for(o=0,G=3;;){if(!(F[o+5]>=0)){if(F[o+0]<0){F[o+0]=a;break}if(F[o+5]=9*i,l=F[o+3]/2,F[(d=F[o+5])+0]=-1,F[d+1]=F[o+1]-l,F[d+2]=F[o+2]-l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]-l,F[d+2]=F[o+2]+l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]+l,F[d+2]=F[o+2]-l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]+l,F[d+2]=F[o+2]+l,F[d+3]=l,F[d+4]=F[o+4],F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,i+=4,O=r[F[o+0]+0]<F[o+1]?r[F[o+0]+1]<F[o+2]?F[o+5]:F[o+5]+9:r[F[o+0]+1]<F[o+2]?F[o+5]+18:F[o+5]+27,F[o+6]=r[F[o+0]+6],F[o+7]=r[F[o+0]+0],F[o+8]=r[F[o+0]+1],F[O+0]=F[o+0],F[o+0]=-1,O===(T=r[a+0]<F[o+1]?r[a+1]<F[o+2]?F[o+5]:F[o+5]+9:r[a+1]<F[o+2]?F[o+5]+18:F[o+5]+27)){if(G--){o=O;continue}G=3;break}F[T+0]=a;break}O=r[a+0]<F[o+1]?r[a+1]<F[o+2]?F[o+5]:F[o+5]+9:r[a+1]<F[o+2]?F[o+5]+18:F[o+5]+27,F[o+7]=(F[o+7]*F[o+6]+r[a+0]*r[a+6])/(F[o+6]+r[a+6]),F[o+8]=(F[o+8]*F[o+6]+r[a+1]*r[a+6])/(F[o+6]+r[a+6]),F[o+6]+=r[a+6],o=O}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<S;a+=e)for(o=0;;)if(F[o+5]>=0){if(b=Math.pow(r[a+0]-F[o+7],2)+Math.pow(r[a+1]-F[o+8],2),4*(f=F[o+3])*f/b<D){if(y=r[a+0]-F[o+7],v=r[a+1]-F[o+8],!0===C?b>0?(w=g*r[a+6]*F[o+6]/b,r[a+2]+=y*w,r[a+3]+=v*w):b<0&&(w=-g*r[a+6]*F[o+6]/Math.sqrt(b),r[a+2]+=y*w,r[a+3]+=v*w):b>0&&(w=g*r[a+6]*F[o+6]/b,r[a+2]+=y*w,r[a+3]+=v*w),(o=F[o+4])<0)break;continue}o=F[o+5]}else if((c=F[o+0])>=0&&c!==a&&(b=(y=r[a+0]-r[c+0])*y+(v=r[a+1]-r[c+1])*v,!0===C?b>0?(w=g*r[a+6]*r[c+6]/b,r[a+2]+=y*w,r[a+3]+=v*w):b<0&&(w=-g*r[a+6]*r[c+6]/Math.sqrt(b),r[a+2]+=y*w,r[a+3]+=v*w):b>0&&(w=g*r[a+6]*r[c+6]/b,r[a+2]+=y*w,r[a+3]+=v*w)),(o=F[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<S;u+=e)for(s=0;s<u;s+=e)y=r[u+0]-r[s+0],v=r[u+1]-r[s+1],!0===C?(b=Math.sqrt(y*y+v*v)-r[u+8]-r[s+8])>0?(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]+=y*w,r[s+3]+=v*w):b<0&&(w=100*g*r[u+6]*r[s+6],r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w):(b=Math.sqrt(y*y+v*v))>0&&(w=g*r[u+6]*r[s+6]/b/b,r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<S;a+=e)w=0,y=r[a+0],v=r[a+1],b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.strongGravityMode?b>0&&(w=g*r[a+6]*d):b>0&&(w=g*r[a+6]*d/b),r[a+2]-=y*w,r[a+3]-=v*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<M;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),y=r[u+0]-r[s+0],v=r[u+1]-r[s+1],!0===C?(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)-r[u+8]-r[s+8]),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/r[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/r[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/r[u+6]):(b=1,w=-g*m)),b>0&&(r[u+2]+=y*w,r[u+3]+=v*w,r[s+2]-=y*w,r[s+3]-=v*w);if(!0===C)for(a=0;a<S;a+=e)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);else for(a=0;a<S;a+=e)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,A=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),L=r[a+0]+r[a+2]*(A/t.slowDown),r[a+0]=L,k=r[a+1]+r[a+3]*(A/t.slowDown),r[a+1]=k);return{}}},61026:t=>{t.exports=function(){var t,e,r,n={};r=10,n.exports=function(t,e,n){var i,o,a,u,s,c,h,l,d,f,p,g,y,v,m,b,w,_,x,E,A,L,k,S=e.length,M=n.length,C=t.adjustSizes,D=t.barnesHutTheta*t.barnesHutTheta,F=[];for(a=0;a<S;a+=r)e[a+4]=e[a+2],e[a+5]=e[a+3],e[a+2]=0,e[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<S;a+=r)p+=e[a+6];p/=S/r}if(t.barnesHutOptimize){var O,T,G,P=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<S;a+=r)P=Math.min(P,e[a+0]),R=Math.max(R,e[a+0]),N=Math.min(N,e[a+1]),j=Math.max(j,e[a+1]);var z=R-P,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(P-=(U-z)/2)+U,F[0]=-1,F[1]=(P+R)/2,F[2]=(N+j)/2,F[3]=Math.max(R-P,j-N),F[4]=-1,F[5]=-1,F[6]=0,F[7]=0,F[8]=0,i=1,a=0;a<S;a+=r)for(o=0,G=3;;){if(!(F[o+5]>=0)){if(F[o+0]<0){F[o+0]=a;break}if(F[o+5]=9*i,l=F[o+3]/2,F[(d=F[o+5])+0]=-1,F[d+1]=F[o+1]-l,F[d+2]=F[o+2]-l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]-l,F[d+2]=F[o+2]+l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]+l,F[d+2]=F[o+2]-l,F[d+3]=l,F[d+4]=d+9,F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,F[(d+=9)+0]=-1,F[d+1]=F[o+1]+l,F[d+2]=F[o+2]+l,F[d+3]=l,F[d+4]=F[o+4],F[d+5]=-1,F[d+6]=0,F[d+7]=0,F[d+8]=0,i+=4,O=e[F[o+0]+0]<F[o+1]?e[F[o+0]+1]<F[o+2]?F[o+5]:F[o+5]+9:e[F[o+0]+1]<F[o+2]?F[o+5]+18:F[o+5]+27,F[o+6]=e[F[o+0]+6],F[o+7]=e[F[o+0]+0],F[o+8]=e[F[o+0]+1],F[O+0]=F[o+0],F[o+0]=-1,O===(T=e[a+0]<F[o+1]?e[a+1]<F[o+2]?F[o+5]:F[o+5]+9:e[a+1]<F[o+2]?F[o+5]+18:F[o+5]+27)){if(G--){o=O;continue}G=3;break}F[T+0]=a;break}O=e[a+0]<F[o+1]?e[a+1]<F[o+2]?F[o+5]:F[o+5]+9:e[a+1]<F[o+2]?F[o+5]+18:F[o+5]+27,F[o+7]=(F[o+7]*F[o+6]+e[a+0]*e[a+6])/(F[o+6]+e[a+6]),F[o+8]=(F[o+8]*F[o+6]+e[a+1]*e[a+6])/(F[o+6]+e[a+6]),F[o+6]+=e[a+6],o=O}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<S;a+=r)for(o=0;;)if(F[o+5]>=0){if(b=Math.pow(e[a+0]-F[o+7],2)+Math.pow(e[a+1]-F[o+8],2),4*(f=F[o+3])*f/b<D){if(y=e[a+0]-F[o+7],v=e[a+1]-F[o+8],!0===C?b>0?(w=g*e[a+6]*F[o+6]/b,e[a+2]+=y*w,e[a+3]+=v*w):b<0&&(w=-g*e[a+6]*F[o+6]/Math.sqrt(b),e[a+2]+=y*w,e[a+3]+=v*w):b>0&&(w=g*e[a+6]*F[o+6]/b,e[a+2]+=y*w,e[a+3]+=v*w),(o=F[o+4])<0)break;continue}o=F[o+5]}else if((c=F[o+0])>=0&&c!==a&&(b=(y=e[a+0]-e[c+0])*y+(v=e[a+1]-e[c+1])*v,!0===C?b>0?(w=g*e[a+6]*e[c+6]/b,e[a+2]+=y*w,e[a+3]+=v*w):b<0&&(w=-g*e[a+6]*e[c+6]/Math.sqrt(b),e[a+2]+=y*w,e[a+3]+=v*w):b>0&&(w=g*e[a+6]*e[c+6]/b,e[a+2]+=y*w,e[a+3]+=v*w)),(o=F[o+4])<0)break}else for(g=t.scalingRatio,u=0;u<S;u+=r)for(s=0;s<u;s+=r)y=e[u+0]-e[s+0],v=e[u+1]-e[s+1],!0===C?(b=Math.sqrt(y*y+v*v)-e[u+8]-e[s+8])>0?(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]+=y*w,e[s+3]+=v*w):b<0&&(w=100*g*e[u+6]*e[s+6],e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w):(b=Math.sqrt(y*y+v*v))>0&&(w=g*e[u+6]*e[s+6]/b/b,e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w);for(d=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<S;a+=r)w=0,y=e[a+0],v=e[a+1],b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.strongGravityMode?b>0&&(w=g*e[a+6]*d):b>0&&(w=g*e[a+6]*d/b),e[a+2]-=y*w,e[a+3]-=v*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<M;h+=3)u=n[h+0],s=n[h+1],l=n[h+2],m=Math.pow(l,t.edgeWeightInfluence),y=e[u+0]-e[s+0],v=e[u+1]-e[s+1],!0===C?(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)-e[u+8]-e[s+8]),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*m/e[u+6]):b>0&&(w=-g*m)):(b=Math.sqrt(Math.pow(y,2)+Math.pow(v,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*m*Math.log(1+b)/b/e[u+6]):b>0&&(w=-g*m*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*m/e[u+6]):(b=1,w=-g*m)),b>0&&(e[u+2]+=y*w,e[u+3]+=v*w,e[s+2]-=y*w,e[s+3]-=v*w);if(!0===C)for(a=0;a<S;a+=r)1!==e[a+9]&&((_=Math.sqrt(Math.pow(e[a+2],2)+Math.pow(e[a+3],2)))>10&&(e[a+2]=10*e[a+2]/_,e[a+3]=10*e[a+3]/_),x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=.1*Math.log(1+E)/(1+Math.sqrt(x)),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);else for(a=0;a<S;a+=r)1!==e[a+9]&&(x=e[a+6]*Math.sqrt((e[a+4]-e[a+2])*(e[a+4]-e[a+2])+(e[a+5]-e[a+3])*(e[a+5]-e[a+3])),E=Math.sqrt((e[a+4]+e[a+2])*(e[a+4]+e[a+2])+(e[a+5]+e[a+3])*(e[a+5]+e[a+3]))/2,A=e[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),e[a+7]=Math.min(1,Math.sqrt(A*(Math.pow(e[a+2],2)+Math.pow(e[a+3],2))/(1+Math.sqrt(x)))),L=e[a+0]+e[a+2]*(A/t.slowDown),e[a+0]=L,k=e[a+1]+e[a+3]*(A/t.slowDown),e[a+1]=k);return{}};var i=n.exports;self.addEventListener("message",(function(r){var n=r.data;t=new Float32Array(n.nodes),n.edges&&(e=new Float32Array(n.edges)),i(n.settings,t,e),self.postMessage({nodes:t.buffer},[t.buffer])}))}},28301:(t,e,r)=>{var n=r(61026),i=r(31880),o=r(36061),a=r(19869);function u(t,e){if(e=e||{},!i(t))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var r=e.attributes||{},n=e.weighted?r.weight||"weight":null,u=o.assign({},a,e.settings),s=o.validateSettings(u);if(s)throw new Error("graphology-layout-forceatlas2/worker: "+s.message);this.worker=null,this.graph=t,this.settings=u,this.weightAttribute=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"==typeof e.outputReducer?e.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var c=void 0,h=this;this.handleGraphUpdate=function(){h.worker&&h.worker.terminate(),c&&clearTimeout(c),c=setTimeout((function(){c=void 0,h.spawnWorker()}),0)},t.on("nodeAdded",this.handleGraphUpdate),t.on("edgeAdded",this.handleGraphUpdate),t.on("nodeDropped",this.handleGraphUpdate),t.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}u.prototype.isRunning=function(){return this.running},u.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=o.createWorker(n),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},u.prototype.handleMessage=function(t){if(this.running){var e=new Float32Array(t.data.nodes);o.assignLayoutChanges(this.graph,e,this.outputReducer),this.outputReducer&&o.readGraphPositions(this.graph,e),this.matrices.nodes=e,this.askForIterations()}},u.prototype.askForIterations=function(t){var e=this.matrices,r={settings:this.settings,nodes:e.nodes.buffer},n=[e.nodes.buffer];return t&&(r.edges=e.edges.buffer,n.push(e.edges.buffer)),this.worker.postMessage(r,n),this},u.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=o.graphToByteArrays(this.graph,this.weightAttribute),this.running=!0,this.askForIterations(!0)),this},u.prototype.stop=function(){return this.running=!1,this},u.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},t.exports=u},11155:(t,e,r)=>{var n=r(46586),i=r(31880),o=r(64341),a={attributes:{x:"x",y:"y"},center:0,hierarchyAttributes:[],rng:Math.random,scale:1};function u(t,e,r,n,i){this.wrappedCircle=i||null,this.children={},this.countChildren=0,this.id=t||null,this.next=null,this.previous=null,this.x=e||null,this.y=r||null,this.r=i?1010101:n||999}function s(t,e,r){for(var n in e.children){var i=e.children[n];i.hasChildren()?s(t,i,r):r[i.id]={x:i.x,y:i.y}}}function c(t,e){var r=t.r-e.r,n=e.x-t.x,i=e.y-t.y;return r<0||r*r<n*n+i*i}function h(t,e){var r=t.r-e.r+1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function l(t,e){for(var r=0;r<e.length;++r)if(!h(t,e[r]))return!1;return!0}function d(t,e){var r=t.x,n=t.y,i=t.r,o=e.x,a=e.y,s=e.r,c=o-r,h=a-n,l=s-i,d=Math.sqrt(c*c+h*h);return new u(null,(r+o+c/d*l)/2,(n+a+h/d*l)/2,(d+i+s)/2)}function f(t,e,r){var n=t.x,i=t.y,o=t.r,a=e.x,s=e.y,c=e.r,h=r.x,l=r.y,d=r.r,f=n-a,p=n-h,g=i-s,y=i-l,v=c-o,m=d-o,b=n*n+i*i-o*o,w=b-a*a-s*s+c*c,_=b-h*h-l*l+d*d,x=p*g-f*y,E=(g*_-y*w)/(2*x)-n,A=(y*v-g*m)/x,L=(p*w-f*_)/(2*x)-i,k=(f*m-p*v)/x,S=A*A+k*k-1,M=2*(o+E*A+L*k),C=E*E+L*L-o*o,D=-(S?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return new u(null,n+E+A*D,i+L+k*D,D)}function p(t){switch(t.length){case 1:return new u(null,(e=t[0]).x,e.y,e.r);case 2:return d(t[0],t[1]);case 3:return f(t[0],t[1],t[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+t.length)}var e}function g(t,e){var r,n;if(l(e,t))return[e];for(r=0;r<t.length;++r)if(c(e,t[r])&&l(d(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(n=r+1;n<t.length;++n)if(c(d(t[r],t[n]),e)&&c(d(t[r],e),t[n])&&c(d(t[n],e),t[r])&&l(f(t[r],t[n],e),t))return[t[r],t[n],e];throw new Error("graphology-layout/circlepack: extendBasis failure !")}function y(t){var e=t.wrappedCircle,r=t.next.wrappedCircle,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,o=(e.y*r.r+r.y*e.r)/n;return i*i+o*o}function v(t,e,r){var n,i,o,a,u=t.x-e.x,s=t.y-e.y,c=u*u+s*s;c?(i=e.r+r.r,i*=i,a=t.r+r.r,i>(a*=a)?(n=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-n*n)),r.x=t.x-n*u-o*s,r.y=t.y-n*s+o*u):(n=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*u-o*s,r.y=e.y+n*s+o*u)):(r.x=e.x+r.r,r.y=e.y)}function m(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function b(t,e){var r=0;if(t.hasChildren()){for(var n in t.children){var i=t.children[n];i.hasChildren()&&(i.r=b(i,e))}r=function(t,e){var r,n,i,o,a,s,c,l,d,f,b=t.length;if(0===b)return 0;if((r=t[0]).x=0,r.y=0,b<=1)return r.r;if(n=t[1],r.x=-n.r,n.x=r.r,n.y=0,b<=2)return r.r+n.r;v(n,r,i=t[2]),r=new u(null,null,null,null,r),n=new u(null,null,null,null,n),i=new u(null,null,null,null,i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(s=3;s<b;++s){i=t[s],v(r.wrappedCircle,n.wrappedCircle,i),i=new u(null,null,null,null,i),c=n.next,l=r.previous,d=n.wrappedCircle.r,f=r.wrappedCircle.r;do{if(d<=f){if(m(c.wrappedCircle,i.wrappedCircle)){n=c,r.next=n,n.previous=r,--s;continue t}d+=c.wrappedCircle.r,c=c.next}else{if(m(l.wrappedCircle,i.wrappedCircle)){(r=l).next=n,n.previous=r,--s;continue t}f+=l.wrappedCircle.r,l=l.previous}}while(c!==l.next);for(i.previous=r,i.next=n,r.next=n.previous=n=i,o=y(r);(i=i.next)!==n;)(a=y(i))<o&&(r=i,o=a);n=r.next}r=[n.wrappedCircle],i=n;for(var w=1e4;(i=i.next)!==n&&0!=--w;)r.push(i.wrappedCircle);for(i=function(t,e){var r,n,i=0,o=t.slice(),a=t.length,u=[];for(e(o);i<a;)r=o[i],n&&h(n,r)?++i:(n=p(u=g(u,r)),i=0);return n}(r,e),s=0;s<b;++s)(r=t[s]).x-=i.x,r.y-=i.y;return i.r}(Object.values(t.children),e)}return r}function w(t,e,r){if(!i(e))throw new Error("graphology-layout/circlepack: the given graph is not a valid graphology instance.");r=n(r,a);var c={},h={},l=e.nodes(),d=r.center,f=r.hierarchyAttributes,p=o.createShuffleInPlace(r.rng),g=r.scale,y=new u;e.forEachNode((function(t,e){var r=new u(t,null,null,e.size?e.size:1),n=y;f.forEach((function(t){var r=e[t];n=n.getChild(r)})),n.addChild(t,r)})),function(t,e){for(var r in b(t,e),t.children)t.children[r].applyPositionToChildren()}(y,p),s(e,y,c);var v,m,w,_=l.length;for(w=0;w<_;w++){var x=l[w];v=d+g*c[x].x,m=d+g*c[x].y,h[x]={x:v,y:m},t&&(e.setNodeAttribute(x,r.attributes.x,v),e.setNodeAttribute(x,r.attributes.y,m))}return h}u.prototype.hasChildren=function(){return this.countChildren>0},u.prototype.addChild=function(t,e){this.children[t]=e,++this.countChildren},u.prototype.getChild=function(t){if(!this.children.hasOwnProperty(t)){var e=new u;this.children[t]=e,++this.countChildren}return this.children[t]},u.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var t=this;for(var e in t.children){var r=t.children[e];r.x+=t.x,r.y+=t.y,r.applyPositionToChildren()}}};var _=w.bind(null,!1);_.assign=w.bind(null,!0),t.exports=_},28833:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||2!==a.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=r.center,s=r.scale,c=2*Math.PI,h=(u-.5)*s,l=e.order,d=a[0],f=a[1];function p(t,e){return e[d]=s*Math.cos(t*c/l)+h,e[f]=s*Math.sin(t*c/l)+h,e}var g=0;if(!t){var y={};return e.forEachNode((function(t){y[t]=p(g++,{})})),y}e.updateEachNodeAttributes((function(t,e){return p(g++,e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},36039:(t,e,r)=>{r(11155),r(28833),r(18645),e.rotation=r(47621)},18645:(t,e,r)=>{var n=r(46586),i=r(31880),o={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||a.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var u=a.length,s=r.center,c=r.rng,h=r.scale,l=(s-.5)*h;function d(t){for(var e=0;e<u;e++)t[a[e]]=c()*h+l;return t}if(!t){var f={};return e.forEachNode((function(t){f[t]=d({})})),f}e.updateEachNodeAttributes((function(t,e){return d(e),e}),{attributes:a})}var u=a.bind(null,!1);u.assign=a.bind(null,!0),t.exports=u},47621:(t,e,r)=>{var n=r(46586),i=r(31880),o=Math.PI/180,a={dimensions:["x","y"],centeredOnZero:!1,degrees:!1};function u(t,e,r,u){if(!i(e))throw new Error("graphology-layout/rotation: the given graph is not a valid graphology instance.");(u=n(u,a)).degrees&&(r*=o);var s=u.dimensions;if(!Array.isArray(s)||2!==s.length)throw new Error("graphology-layout/random: given dimensions are invalid.");if(0===e.order){if(t)return;return{}}var c=s[0],h=s[1],l=0,d=0;if(!u.centeredOnZero){var f=1/0,p=-1/0,g=1/0,y=-1/0;e.forEachNode((function(t,e){var r=e[c],n=e[h];r<f&&(f=r),r>p&&(p=r),n<g&&(g=n),n>y&&(y=n)})),l=(f+p)/2,d=(g+y)/2}var v=Math.cos(r),m=Math.sin(r);function b(t){var e=t[c],r=t[h];return t[c]=l+(e-l)*v-(r-d)*m,t[h]=d+(e-l)*m+(r-d)*v,t}if(!t){var w={};return e.forEachNode((function(t,e){var r={};r[c]=e[c],r[h]=e[h],w[t]=b(r)})),w}e.updateEachNodeAttributes((function(t,e){return b(e),e}),{attributes:s})}var s=u.bind(null,!1);s.assign=u.bind(null,!0),t.exports=s},61359:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var r=t.nullCopy();r.mergeAttributes(t.getAttributes());var a={},u={},s=0;return t.forEachNode((function(t,e){a[t]=s,i(r,s,e),s++})),e.forEachNode((function(t,e){u[t]=s,i(r,s,e),s++})),s=0,t.forEachEdge((function(t,e,n,i,u,c,h){o(r,h,s++,a[n],a[i],i,e)})),e.forEachEdge((function(t,e,n,i,a,c,h){o(r,h,s++,u[n],u[i],i,e)})),r}},35174:(t,e,r)=>{r(61359),r(9484),r(61499),r(76458),r(88947),r(92971),r(14230),e.toUndirected=r(51624),r(79106)},9484:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/reverse: invalid graph.");var e=t.emptyCopy();return t.forEachUndirectedEdge((function(t,r,n,o){i(e,!0,t,n,o,r)})),t.forEachDirectedEdge((function(t,r,n,o){i(e,!1,t,o,n,r)})),e}},61499:(t,e,r)=>{var n=r(31880),i=r(97052).B,o=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/subgraph: invalid graph instance.");var r=t.nullCopy(),a=e;if(Array.isArray(e)){if(0===e.length)return r;e=new Set(e)}if(e instanceof Set){if(0===e.size)return r;a=function(t){return e.has(t)};var u=e;e=new Set,u.forEach((function(t){e.add(""+t)}))}if("function"!=typeof a)throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if("function"==typeof e){if(t.forEachNode((function(t,e){a(t,e)&&i(r,t,e)})),0===r.order)return r}else e.forEach((function(e){if(!t.hasNode(e))throw new Error('graphology-operators/subgraph: the "'+e+'" node was not found in the graph.');i(r,e,t.getNodeAttributes(e))}));return t.forEachEdge((function(t,e,n,i,u,s,c){a(n,u)&&(i===n||a(i,s))&&o(r,c,t,n,i,e)})),r}},76458:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("directed"===t.type)return t.copy();var o=t.emptyCopy({type:"directed"});return t.forEachDirectedEdge((function(t,e,r,n){i(o,!1,t,r,n,e)})),t.forEachUndirectedEdge((function(e,n,a,u){var s=!t.multi&&"mixed"===t.type&&o.edge(a,u),c=!t.multi&&"mixed"===t.type&&o.edge(u,a);s?o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)):i(o,!1,null,a,u,n),a!==u&&(c?o.replaceEdgeAttributes(c,r(o.getEdgeAttributes(c),n)):i(o,!1,null,u,a,n))})),o}},88947:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return t.copy({type:"mixed"})}},92971:(t,e,r)=>{var n=r(31880);t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return t.copy({multi:!0})}},14230:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t){if(!n(t))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");if(!t.multi)return t.copy();var e=t.emptyCopy({multi:!1});return t.forEachDirectedEdge((function(t,r,n,o){e.hasDirectedEdge(n,o)||i(e,!1,t,n,o,r)})),t.forEachUndirectedEdge((function(t,r,n,o){e.hasUndirectedEdge(n,o)||i(e,!0,t,n,o,r)})),e}},51624:(t,e,r)=>{var n=r(31880),i=r(27155).De;t.exports=function(t,e){if(!n(t))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");"function"==typeof e&&(e={mergeEdge:e});var r="function"==typeof(e=e||{}).mergeEdge?e.mergeEdge:null;if("undirected"===t.type)return t.copy();var o=t.emptyCopy({type:"undirected"});return t.forEachUndirectedEdge((function(t,e,r,n){i(o,!0,t,r,n,e)})),t.forEachDirectedEdge((function(e,n,a,u){if(!t.multi){var s=o.edge(a,u);if(s)return void(r&&o.replaceEdgeAttributes(s,r(o.getEdgeAttributes(s),n)))}i(o,!0,null,a,u,n)})),o}},79106:(t,e,r)=>{var n=r(31880);t.exports=function(t,e){if(!n(t)||!n(e))throw new Error("graphology-operators/union: invalid graph.");if(t.multi!==e.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var r=t.copy();return r.import(e,!0),r}},39260:(t,e,r)=>{r(31880),r(4363).Q6,r(64231)},60715:(t,e,r)=>{var n=r(15129),i=r(77672);r(39260),e.Ar=n.bidirectional,n.singleSource,n.singleSourceLength,n.undirectedSingleSourceLength,n.brandes,i.edgePathFromNodePath},15129:(t,e,r)=>{var n=r(31880),i=r(4034),o=r(8884);function a(t,e,r){if(!n(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" source node does not exist in the given graph.');r=""+r;var i=new Set,a={},u=0;a[r]=0;for(var s,c,h,l=[r];0!==l.length;){var d=[];for(s=0,c=l.length;s<c;s++)h=l[s],i.has(h)||(i.add(h),o(d,e[t](h)),a[h]=u);u++,l=d}return a}var u=a.bind(null,"outboundNeighbors"),s=a.bind(null,"neighbors");e.bidirectional=function(t,e,r){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!t.hasNode(r))throw new Error('graphology-shortest-path: the "'+r+'" target node does not exist in the given graph.');if((e=""+e)==(r=""+r))return[e];var i=t.inboundNeighbors.bind(t),o=t.outboundNeighbors.bind(t),a={},u={};a[e]=null,u[r]=null;var s,c,h,l,d,f,p,g,y=[e],v=[r],m=!1;t:for(;y.length&&v.length;)if(y.length<=v.length){for(s=y,y=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=o(c=s[d])).length;f<g;f++)if((l=h[f])in a||(y.push(l),a[l]=c),l in u){m=!0;break t}}else for(s=v,v=[],d=0,p=s.length;d<p;d++)for(f=0,g=(h=i(c=s[d])).length;f<g;f++)if((l=h[f])in u||(v.push(l),u[l]=c),l in a){m=!0;break t}if(!m)return null;for(var b=[];l;)b.unshift(l),l=a[l];for(l=u[b[b.length-1]];l;)b.push(l),l=u[l];return b.length?b:null},e.singleSource=function(t,e){if(!n(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!t.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');var r,i,o,a,u,s,c={},h={};for(c[e=""+e]=!0,h[e]=[e];Object.keys(c).length;)for(o in r=c,c={},r)for(u=0,s=(i=t.outboundNeighbors(o)).length;u<s;u++)h[a=i[u]]||(h[a]=h[o].concat(a),c[a]=!0);return h},e.singleSourceLength=u,e.undirectedSingleSourceLength=s,e.brandes=function(t,e){e=""+e;var r,n,o,a,u,s,c,h,l,d=[],f={},p={},g=t.nodes();for(s=0,h=g.length;s<h;s++)f[a=g[s]]=[],p[a]=0;var y={};p[e]=1,y[e]=0;for(var v=i.of(e);v.size;)for(a=v.dequeue(),d.push(a),r=y[a],n=p[a],c=0,l=(o=t.outboundNeighbors(a)).length;c<l;c++)(u=o[c])in y||(v.enqueue(u),y[u]=r+1),y[u]===r+1&&(p[u]+=n,f[u].push(a));return[d,f,p]}},77672:(t,e)=>{var r=function(){return!0};e.edgePathFromNodePath=function(t,e){var n,i,o,a,u=e.length;if(u<2)return i=e[0],(a=t.multi?t.findEdge(i,i,r):t.edge(i,i))?[a]:[];u--;var s=new Array(u);for(n=0;n<u;n++){if(i=e[n],o=e[n+1],void 0===(a=t.multi?t.findOutboundEdge(i,o,r):t.edge(i,o)))throw new Error("graphology-shortest-path: given path is impossible in given graph.");s[n]=a}return s}},27155:(t,e)=>{e.De=function(t,e,r,n,i,o){return o=Object.assign({},o),e?null==r?t.addUndirectedEdge(n,i,o):t.addUndirectedEdgeWithKey(r,n,i,o):null==r?t.addDirectedEdge(n,i,o):t.addDirectedEdgeWithKey(r,n,i,o)}},97052:(t,e)=>{e.B=function(t,e,r){return r=Object.assign({},r),t.addNode(e,r)}},46586:t=>{t.exports=function t(e,r){e=e||{};var n,i={};for(var o in r){var a=e[o],u=r[o];!(n=u)||"object"!=typeof n||"function"==typeof n||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date?i[o]=void 0===a?u:a:i[o]=t(a,u)}return i}},4363:(t,e)=>{function r(t){return"number"!=typeof t||isNaN(t)?1:t}e.Q6=function(t){return function(t,e){var r={},n=function(t){return void 0===t?e:t};"function"==typeof e&&(n=e);var i=function(e){return n(e[t])},o=function(){return n(void 0)};return"string"==typeof t?(r.fromAttributes=i,r.fromGraph=function(t,e){return i(t.getEdgeAttributes(e))},r.fromEntry=function(t,e){return i(e)},r.fromPartialEntry=r.fromEntry,r.fromMinimalEntry=r.fromEntry):"function"==typeof t?(r.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},r.fromGraph=function(e,r){var i=e.extremities(r);return n(t(r,e.getEdgeAttributes(r),i[0],i[1],e.getNodeAttributes(i[0]),e.getNodeAttributes(i[1]),e.isUndirected(r)))},r.fromEntry=function(e,r,i,o,a,u,s){return n(t(e,r,i,o,a,u,s))},r.fromPartialEntry=function(e,r,i,o){return n(t(e,r,i,o))},r.fromMinimalEntry=function(e,r){return n(t(e,r))}):(r.fromAttributes=o,r.fromGraph=o,r.fromEntry=o,r.fromMinimalEntry=o),r}(t,r)}},31880:t=>{t.exports=function(t){return null!==t&&"object"==typeof t&&"function"==typeof t.addUndirectedEdgeWithKey&&"function"==typeof t.dropNode&&"boolean"==typeof t.multi}},98996:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,r){return o=i()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return o(t,arguments,r(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,t)},a(t)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function(){for(var t=arguments[0],e=1,r=arguments.length;e<r;e++)if(arguments[e])for(var n in arguments[e])t[n]=arguments[e][n];return t};function c(t,e,r,n){var i=t._nodes.get(e),o=null;return i?o="mixed"===n?i.out&&i.out[r]||i.undirected&&i.undirected[r]:"directed"===n?i.out&&i.out[r]:i.undirected&&i.undirected[r]:o}function h(e){return null!==e&&"object"===t(e)&&"function"==typeof e.addUndirectedEdgeWithKey&&"function"==typeof e.dropNode}function l(e){return"object"===t(e)&&null!==e&&e.constructor===Object}function d(t){var e;for(e in t)return!1;return!0}function f(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function p(t,e,r){var n={enumerable:!0,configurable:!0};"function"==typeof r?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function g(t){return!(!l(t)||t.attributes&&!Array.isArray(t.attributes))}"function"==typeof Object.assign&&(s=Object.assign);var y,v={exports:{}},m="object"==typeof Reflect?Reflect:null,b=m&&"function"==typeof m.apply?m.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};y=m&&"function"==typeof m.ownKeys?m.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var w=Number.isNaN||function(t){return t!=t};function _(){_.init.call(this)}v.exports=_,v.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}F(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&F(t,"error",e,{once:!0})}(t,i)}))},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var x=10;function E(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function A(t){return void 0===t._maxListeners?_.defaultMaxListeners:t._maxListeners}function L(t,e,r,n){var i,o,a,u;if(E(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=A(t))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function k(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=k.bind(n);return i.listener=r,n.wrapFn=i,i}function M(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):D(i,i.length)}function C(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function D(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function F(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}function O(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return x},set:function(t){if("number"!=typeof t||t<0||w(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");x=t}}),_.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||w(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},_.prototype.getMaxListeners=function(){return A(this)},_.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)b(u,this,e);else{var s=u.length,c=D(u,s);for(r=0;r<s;++r)b(c[r],this,e)}return!0},_.prototype.addListener=function(t,e){return L(this,t,e,!1)},_.prototype.on=_.prototype.addListener,_.prototype.prependListener=function(t,e){return L(this,t,e,!0)},_.prototype.once=function(t,e){return E(e),this.on(t,S(this,t,e)),this},_.prototype.prependOnceListener=function(t,e){return E(e),this.prependListener(t,S(this,t,e)),this},_.prototype.removeListener=function(t,e){var r,n,i,o,a;if(E(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},_.prototype.listeners=function(t){return M(this,t,!0)},_.prototype.rawListeners=function(t){return M(this,t,!1)},_.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):C.call(t,e)},_.prototype.listenerCount=C,_.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]},"undefined"!=typeof Symbol&&(O.prototype[Symbol.iterator]=function(){return this}),O.of=function(){var t=arguments,e=t.length,r=0;return new O((function(){return r>=e?{done:!0}:{done:!1,value:t[r++]}}))},O.empty=function(){return new O((function(){return{done:!0}}))},O.fromSequence=function(t){var e=0,r=t.length;return new O((function(){return e>=r?{done:!0}:{done:!1,value:t[e++]}}))},O.is=function(t){return t instanceof O||"object"==typeof t&&null!==t&&"function"==typeof t.next};var T=O,G={};G.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,G.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var P=T,R=G,N=R.ARRAY_BUFFER_SUPPORT,j=R.SYMBOL_SUPPORT,z=function(t){var e=function(t){return"string"==typeof t||Array.isArray(t)||N&&ArrayBuffer.isView(t)?P.fromSequence(t):"object"!=typeof t||null===t?null:j&&"function"==typeof t[Symbol.iterator]?t[Symbol.iterator]():"function"==typeof t.next?t:null}(t);if(!e)throw new Error("obliterator: target is not iterable nor a valid iterator.");return e},U=z,I=function(t,e){for(var r,n=arguments.length>1?e:1/0,i=n!==1/0?new Array(n):[],o=0,a=U(t);;){if(o===n)return i;if((r=a.next()).done)return o!==e&&(i.length=o),i;i[o++]=r.value}},B=function(t){function r(e){var r;return(r=t.call(this)||this).name="GraphError",r.message=e,r}return e(r,t),r}(a(Error)),W=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B),q=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B),H=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u(n),r.prototype.constructor),n}return e(r,t),r}(B);function Y(t,e){this.key=t,this.attributes=e,this.clear()}function Z(t,e){this.key=t,this.attributes=e,this.clear()}function V(t,e){this.key=t,this.attributes=e,this.clear()}function K(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}function $(t,e,r,n,i,o,a){var u,s,c,h;if(n=""+n,0===r){if(!(u=t._nodes.get(n)))throw new q("Graph.".concat(e,': could not find the "').concat(n,'" node in the graph.'));c=i,h=o}else if(3===r){if(i=""+i,!(s=t._edges.get(i)))throw new q("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));var l=s.source.key,d=s.target.key;if(n===l)u=s.target;else{if(n!==d)throw new q("Graph.".concat(e,': the "').concat(n,'" node is not attached to the "').concat(i,'" edge (').concat(l,", ").concat(d,")."));u=s.source}c=o,h=a}else{if(!(s=t._edges.get(n)))throw new q("Graph.".concat(e,': could not find the "').concat(n,'" edge in the graph.'));u=1===r?s.source:s.target,c=i,h=o}return[u,c,h]}Y.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.in={},this.out={},this.undirected={}},Z.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.in={},this.out={}},V.prototype.clear=function(){this.undirectedDegree=0,this.undirected={}},K.prototype.attach=function(){var t="out",e="in";this.undirected&&(t=e="undirected");var r=this.source.key,n=this.target.key;this.source[t][n]=this,this.undirected&&r===n||(this.target[e][r]=this)},K.prototype.attachMulti=function(){var t="out",e="in",r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");var i=this.source[t],o=i[n];if(void 0===o)return i[n]=this,void(this.undirected&&r===n||(this.target[e][r]=this));o.previous=this,this.next=o,i[n]=this,this.target[e][r]=this},K.prototype.detach=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]},K.prototype.detachMulti=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var X=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes[u]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){return $(this,e,r,t,n)[0].attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];return a.attributes.hasOwnProperty(u)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=$(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];return u.attributes[s]=c,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=$(this,e,r,t,n,i,o),u=a[0],s=a[1],c=a[2];if("function"!=typeof c)throw new W("Graph.".concat(e,": updater should be a function."));var h=u.attributes,l=c(h[s]);return h[s]=l,this.emit("nodeAttributesUpdated",{key:u.key,type:"set",attributes:u.attributes,name:s}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];return delete a.attributes[u],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:u}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];if(!l(u))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=u,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];if(!l(u))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return s(a.attributes,u),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:u}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=$(this,e,r,t,n,i),a=o[0],u=o[1];if("function"!=typeof u)throw new W("Graph.".concat(e,": provided updater is not a function."));return a.attributes=u(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],Q=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes[n]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t){var n;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+t,o=""+arguments[1];if(!(n=c(this,i,o,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(i,'" - "').concat(o,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(n=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return n.attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes.hasOwnProperty(n)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return o.attributes[n]=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,u=""+n;if(n=arguments[2],i=arguments[3],!(o=c(this,a,u,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(u,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof i)throw new W("Graph.".concat(e,": updater should be a function."));return o.attributes[n]=i(o.attributes[n]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return delete i.attributes[n],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:n}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!l(n))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return i.attributes=n,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!l(n))throw new W("Graph.".concat(e,": provided attributes are not a plain object."));return s(i.attributes,n),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:n}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new H("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new H("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=c(this,o,a,r)))throw new q("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new H("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new q("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof n)throw new W("Graph.".concat(e,": provided updater is not a function."));return i.attributes=n(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],J=T,tt=z,et=function(){var t=arguments,e=null,r=-1;return new J((function(){for(var n=null;;){if(null===e){if(++r>=t.length)return{done:!0};e=tt(t[r])}if(!0!==(n=e.next()).done)break;e=null}return n}))},rt=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function nt(t,e,r,n){var i=!1;for(var o in e)if(o!==n){var a=e[o];if(i=r(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),t&&i)return a.key}}function it(t,e,r,n){var i,o,a,u=!1;for(var s in e)if(s!==n){i=e[s];do{if(o=i.source,a=i.target,u=r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),t&&u)return i.key;i=i.next}while(void 0!==i)}}function ot(t,e){var r,n=Object.keys(t),i=n.length,o=0;return new T((function(){do{if(r)r=r.next;else{if(o>=i)return{done:!0};var a=n[o++];if(a===e){r=void 0;continue}r=t[a]}}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}))}function at(t,e,r,n){var i=e[r];if(i){var o=i.source,a=i.target;return n(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&t?i.key:void 0}}function ut(t,e,r,n){var i=e[r];if(i){var o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&o)return i.key;i=i.next}while(void 0!==i)}}function st(t,e){var r=t[e];return void 0!==r.next?new T((function(){if(!r)return{done:!0};var t={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:t}})):T.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function ct(t,e){if(0===t.size)return[];if("mixed"===e||e===t.type)return"function"==typeof Array.from?Array.from(t._edges.keys()):I(t._edges.keys(),t._edges.size);for(var r,n,i="undirected"===e?t.undirectedSize:t.directedSize,o=new Array(i),a="undirected"===e,u=t._edges.values(),s=0;!0!==(r=u.next()).done;)(n=r.value).undirected===a&&(o[s++]=n.key);return o}function ht(t,e,r,n){if(0!==e.size)for(var i,o,a="mixed"!==r&&r!==e.type,u="undirected"===r,s=!1,c=e._edges.values();!0!==(i=c.next()).done;)if(o=i.value,!a||o.undirected===u){var h=o,l=h.key,d=h.attributes,f=h.source,p=h.target;if(s=n(l,d,f.key,p.key,f.attributes,p.attributes,o.undirected),t&&s)return l}}function lt(t,e){if(0===t.size)return T.empty();var r="mixed"!==e&&e!==t.type,n="undirected"===e,i=t._edges.values();return new T((function(){for(var t,e;;){if((t=i.next()).done)return t;if(e=t.value,!r||e.undirected===n)break}return{value:{edge:e.key,attributes:e.attributes,source:e.source.key,target:e.target.key,sourceAttributes:e.source.attributes,targetAttributes:e.target.attributes,undirected:e.undirected},done:!1}}))}function dt(t,e,r,n,i,o){var a,u=e?it:nt;if("undirected"!==r){if("out"!==n&&(a=u(t,i.in,o),t&&a))return a;if("in"!==n&&(a=u(t,i.out,o,n?void 0:i.key),t&&a))return a}if("directed"!==r&&(a=u(t,i.undirected,o),t&&a))return a}function ft(t,e,r,n){var i=[];return dt(!1,t,e,r,n,(function(t){i.push(t)})),i}function pt(t,e,r){var n=T.empty();return"undirected"!==t&&("out"!==e&&void 0!==r.in&&(n=et(n,ot(r.in))),"in"!==e&&void 0!==r.out&&(n=et(n,ot(r.out,e?void 0:r.key)))),"directed"!==t&&void 0!==r.undirected&&(n=et(n,ot(r.undirected))),n}function gt(t,e,r,n,i,o,a){var u,s=r?ut:at;if("undirected"!==e){if(void 0!==i.in&&"out"!==n&&(u=s(t,i.in,o,a),t&&u))return u;if(void 0!==i.out&&"in"!==n&&(n||i.key!==o)&&(u=s(t,i.out,o,a),t&&u))return u}if("directed"!==e&&void 0!==i.undirected&&(u=s(t,i.undirected,o,a),t&&u))return u}function yt(t,e,r,n,i){var o=[];return gt(!1,t,e,r,n,i,(function(t){o.push(t)})),o}function vt(t,e,r,n){var i=T.empty();return"undirected"!==t&&(void 0!==r.in&&"out"!==e&&n in r.in&&(i=et(i,st(r.in,n))),void 0!==r.out&&"in"!==e&&n in r.out&&(e||r.key!==n)&&(i=et(i,st(r.out,n)))),"directed"!==t&&void 0!==r.undirected&&n in r.undirected&&(i=et(i,st(r.undirected,n))),i}var mt=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function bt(){this.A=null,this.B=null}function wt(t,e,r,n,i){for(var o in n){var a=n[o],u=a.source,s=a.target,c=u===r?s:u;if(!e||!e.has(c.key)){var h=i(c.key,c.attributes);if(t&&h)return c.key}}}function _t(t,e,r,n,i){if("mixed"!==e){if("undirected"===e)return wt(t,null,n,n.undirected,i);if("string"==typeof r)return wt(t,null,n,n[r],i)}var o,a=new bt;if("undirected"!==e){if("out"!==r){if(o=wt(t,null,n,n.in,i),t&&o)return o;a.wrap(n.in)}if("in"!==r){if(o=wt(t,a,n,n.out,i),t&&o)return o;a.wrap(n.out)}}if("directed"!==e&&(o=wt(t,a,n,n.undirected,i),t&&o))return o}function xt(t,e,r){var n=Object.keys(r),i=n.length,o=0;return new T((function(){var a=null;do{if(o>=i)return t&&t.wrap(r),{done:!0};var u=r[n[o++]],s=u.source,c=u.target;a=s===e?c:s,t&&t.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function Et(t,e,r,n,i){for(var o,a,u,s,c,h,l,d=n._nodes.values(),f=n.type;!0!==(o=d.next()).done;){var p=!1;if(a=o.value,"undirected"!==f)for(u in s=a.out){c=s[u];do{if(h=c.target,p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if("directed"!==f)for(u in s=a.undirected)if(!(e&&a.key>u)){c=s[u];do{if((h=c.target).key!==u&&(h=c.source),p=!0,l=i(a.key,h.key,a.attributes,h.attributes,c.key,c.attributes,c.undirected),t&&l)return c;c=c.next}while(c)}if(r&&!p&&(l=i(a.key,null,a.attributes,null,null,null,null),t&&l))return null}}function At(t){if(!l(t))throw new W('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new W("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!l(t.attributes)||null===t.attributes))throw new W("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Lt(t){if(!l(t))throw new W('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new W("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new W("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!l(t.attributes)||null===t.attributes))throw new W("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&"boolean"!=typeof t.undirected)throw new W("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}bt.prototype.wrap=function(t){null===this.A?this.A=t:null===this.B&&(this.B=t)},bt.prototype.has=function(t){return null!==this.A&&t in this.A||null!==this.B&&t in this.B};var kt,St=(kt=255&Math.floor(256*Math.random()),function(){return kt++}),Mt=new Set(["directed","undirected","mixed"]),Ct=new Set(["domain","_events","_eventsCount","_maxListeners"]),Dt={allowSelfLoops:!0,multi:!1,type:"mixed"};function Ft(t,e,r){var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function Ot(t,e,r,n,i,o,a,u){if(!n&&"undirected"===t.type)throw new H("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new H("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(u&&!l(u))throw new W("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));if(o=""+o,a=""+a,u=u||{},!t.allowSelfLoops&&o===a)throw new H("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var s=t._nodes.get(o),c=t._nodes.get(a);if(!s)throw new q("Graph.".concat(e,': source node "').concat(o,'" not found.'));if(!c)throw new q("Graph.".concat(e,': target node "').concat(a,'" not found.'));var h={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new H("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));if(!t.multi&&(n?void 0!==s.undirected[a]:void 0!==s.out[a]))throw new H("Graph.".concat(e,': an edge linking "').concat(o,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var d=new K(n,i,s,c,u);t._edges.set(i,d);var f=o===a;return n?(s.undirectedDegree++,c.undirectedDegree++,f&&t._undirectedSelfLoopCount++):(s.outDegree++,c.inDegree++,f&&t._directedSelfLoopCount++),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,h.key=i,t.emit("edgeAdded",h),i}function Tt(t,e,r,n,i,o,a,u,c){if(!n&&"undirected"===t.type)throw new H("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new H("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(u)if(c){if("function"!=typeof u)throw new W("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(u,'"'))}else if(!l(u))throw new W("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(u,'"'));var h;if(o=""+o,a=""+a,c&&(h=u,u=void 0),!t.allowSelfLoops&&o===a)throw new H("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var d,f,p=t._nodes.get(o),g=t._nodes.get(a);if(!r&&(d=t._edges.get(i))){if(!(d.source.key===o&&d.target.key===a||n&&d.source.key===a&&d.target.key===o))throw new H("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(o,'" source & "').concat(a,'" target vs. ("').concat(d.source.key,'", "').concat(d.target.key,'").'));f=d}if(f||t.multi||!p||(f=n?p.undirected[a]:p.out[a]),f){var y=[f.key,!1,!1,!1];if(c?!h:!u)return y;if(c){var v=f.attributes;f.attributes=h(v),t.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else s(f.attributes,u),t.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:u});return y}u=u||{},c&&h&&(u=h(u));var m={key:null,undirected:n,source:o,target:a,attributes:u};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new H("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));var b=!1,w=!1;p||(p=Ft(t,o,{}),b=!0,o===a&&(g=p,w=!0)),g||(g=Ft(t,a,{}),w=!0),d=new K(n,i,p,g,u),t._edges.set(i,d);var _=o===a;return n?(p.undirectedDegree++,g.undirectedDegree++,_&&t._undirectedSelfLoopCount++):(p.outDegree++,g.inDegree++,_&&t._directedSelfLoopCount++),t.multi?d.attachMulti():d.attach(),n?t._undirectedSize++:t._directedSize++,m.key=i,t.emit("edgeAdded",m),[i,!0,b,w]}function Gt(t,e){t._edges.delete(e.key);var r=e.source,n=e.target,i=e.attributes,o=e.undirected,a=r===n;o?(r.undirectedDegree--,n.undirectedDegree--,a&&t._undirectedSelfLoopCount--):(r.outDegree--,n.inDegree--,a&&t._directedSelfLoopCount--),t.multi?e.detachMulti():e.detach(),o?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:o})}var Pt=function(r){function n(t){var e;if(e=r.call(this)||this,"boolean"!=typeof(t=s({},Dt,t)).multi)throw new W("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(t.multi,'".'));if(!Mt.has(t.type))throw new W('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(t.type,'".'));if("boolean"!=typeof t.allowSelfLoops)throw new W("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(t.allowSelfLoops,'".'));var n="mixed"===t.type?Y:"directed"===t.type?Z:V;f(u(e),"NodeDataClass",n);var i="geid_"+St()+"_",o=0;return f(u(e),"_attributes",{}),f(u(e),"_nodes",new Map),f(u(e),"_edges",new Map),f(u(e),"_directedSize",0),f(u(e),"_undirectedSize",0),f(u(e),"_directedSelfLoopCount",0),f(u(e),"_undirectedSelfLoopCount",0),f(u(e),"_edgeKeyGenerator",(function(){var t;do{t=i+o++}while(e._edges.has(t));return t})),f(u(e),"_options",t),Ct.forEach((function(t){return f(u(e),t,e[t])})),p(u(e),"order",(function(){return e._nodes.size})),p(u(e),"size",(function(){return e._edges.size})),p(u(e),"directedSize",(function(){return e._directedSize})),p(u(e),"undirectedSize",(function(){return e._undirectedSize})),p(u(e),"selfLoopCount",(function(){return e._directedSelfLoopCount+e._undirectedSelfLoopCount})),p(u(e),"directedSelfLoopCount",(function(){return e._directedSelfLoopCount})),p(u(e),"undirectedSelfLoopCount",(function(){return e._undirectedSelfLoopCount})),p(u(e),"multi",e._options.multi),p(u(e),"type",e._options.type),p(u(e),"allowSelfLoops",e._options.allowSelfLoops),p(u(e),"implementation",(function(){return"graphology"})),e}e(n,r);var i=n.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(t){return this._nodes.has(""+t)},i.hasDirectedEdge=function(t,e){if("undirected"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&!n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);if(!i)return!1;var o=i.out[e];return!(!o||this.multi&&!o.size)}throw new W("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasUndirectedEdge=function(t,e){if("directed"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);if(!i)return!1;var o=i.undirected[e];return!(!o||this.multi&&!o.size)}throw new W("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasEdge=function(t,e){if(1===arguments.length){var r=""+t;return this._edges.has(r)}if(2===arguments.length){t=""+t,e=""+e;var n=this._nodes.get(t);if(!n)return!1;var i=void 0!==n.out&&n.out[e];return i||(i=void 0!==n.undirected&&n.undirected[e]),!(!i||this.multi&&!i.size)}throw new W("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.directedEdge=function(t,e){if("undirected"!==this.type){if(t=""+t,e=""+e,this.multi)throw new H("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var r=this._nodes.get(t);if(!r)throw new q('Graph.directedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.directedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||void 0;return n?n.key:void 0}},i.undirectedEdge=function(t,e){if("directed"!==this.type){if(t=""+t,e=""+e,this.multi)throw new H("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var r=this._nodes.get(t);if(!r)throw new q('Graph.undirectedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.undirectedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.undirected&&r.undirected[e]||void 0;return n?n.key:void 0}},i.edge=function(t,e){if(this.multi)throw new H("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.edge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q('Graph.edge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||r.undirected&&r.undirected[e]||void 0;if(n)return n.key},i.areDirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areDirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)},i.areOutNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areOutNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out},i.areInNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areInNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in},i.areUndirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areUndirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"directed"!==this.type&&e in r.undirected},i.areNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)||"directed"!==this.type&&e in r.undirected},i.areInboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areInboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in||"directed"!==this.type&&e in r.undirected},i.areOutboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new q('Graph.areOutboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out||"directed"!==this.type&&e in r.undirected},i.inDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree},i.outDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree},i.directedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.directedDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree},i.undirectedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.undirectedDegree: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree},i.inboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree),r},i.outboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.outDegree),r},i.degree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.degree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree),r},i.inDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.in[t],n=r?this.multi?r.size:1:0;return e.inDegree-n},i.outDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.out[t],n=r?this.multi?r.size:1:0;return e.outDegree-n},i.directedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("undirected"===this.type)return 0;var r=e.out[t],n=r?this.multi?r.size:1:0;return e.inDegree+e.outDegree-2*n},i.undirectedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new q('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));if("directed"===this.type)return 0;var r=e.undirected[t],n=r?this.multi?r.size:1:0;return e.undirectedDegree-2*n},i.inboundDegreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.inDegree,i+=(e=r.out[t])?this.multi?e.size:1:0),n-i},i.outboundDegreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.outDegree,i+=(e=r.in[t])?this.multi?e.size:1:0),n-i},i.degreeWithoutSelfLoops=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.degreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var n=0,i=0;return"directed"!==this.type&&(n+=r.undirectedDegree,i+=2*((e=r.undirected[t])?this.multi?e.size:1:0)),"undirected"!==this.type&&(n+=r.inDegree+r.outDegree,i+=2*((e=r.out[t])?this.multi?e.size:1:0)),n-i},i.source=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.source: could not find the "'.concat(t,'" edge in the graph.'));return e.source.key},i.target=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.target: could not find the "'.concat(t,'" edge in the graph.'));return e.target.key},i.extremities=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.extremities: could not find the "'.concat(t,'" edge in the graph.'));return[e.source.key,e.target.key]},i.opposite=function(t,e){t=""+t,e=""+e;var r=this._edges.get(e);if(!r)throw new q('Graph.opposite: could not find the "'.concat(e,'" edge in the graph.'));var n=r.source.key,i=r.target.key;if(t===n)return i;if(t===i)return n;throw new q('Graph.opposite: the "'.concat(t,'" node is not attached to the "').concat(e,'" edge (').concat(n,", ").concat(i,")."))},i.hasExtremity=function(t,e){t=""+t,e=""+e;var r=this._edges.get(t);if(!r)throw new q('Graph.hasExtremity: could not find the "'.concat(t,'" edge in the graph.'));return r.source.key===e||r.target.key===e},i.isUndirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isUndirected: could not find the "'.concat(t,'" edge in the graph.'));return e.undirected},i.isDirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isDirected: could not find the "'.concat(t,'" edge in the graph.'));return!e.undirected},i.isSelfLoop=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new q('Graph.isSelfLoop: could not find the "'.concat(t,'" edge in the graph.'));return e.source===e.target},i.addNode=function(t,e){var r=function(t,e,r){if(r&&!l(r))throw new W('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},t._nodes.has(e))throw new H('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}(this,t,e);return r.key},i.mergeNode=function(t,e){if(e&&!l(e))throw new W('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(e,'"'));t=""+t,e=e||{};var r=this._nodes.get(t);return r?(e&&(s(r.attributes,e),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:e})),[t,!1]):(r=new this.NodeDataClass(t,e),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:e}),[t,!0])},i.updateNode=function(t,e){if(e&&"function"!=typeof e)throw new W('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(e,'"'));t=""+t;var r=this._nodes.get(t);if(r){if(e){var n=r.attributes;r.attributes=e(n),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}var i=e?e({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]},i.dropNode=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new q('Graph.dropNode: could not find the "'.concat(t,'" node in the graph.'));if("undirected"!==this.type){for(var n in r.out){e=r.out[n];do{Gt(this,e),e=e.next}while(e)}for(var i in r.in){e=r.in[i];do{Gt(this,e),e=e.next}while(e)}}if("directed"!==this.type)for(var o in r.undirected){e=r.undirected[o];do{Gt(this,e),e=e.next}while(e)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:r.attributes})},i.dropEdge=function(t){var e;if(arguments.length>1){var r=""+arguments[0],n=""+arguments[1];if(!(e=c(this,r,n,this.type)))throw new q('Graph.dropEdge: could not find the "'.concat(r,'" -> "').concat(n,'" edge in the graph.'))}else if(t=""+t,!(e=this._edges.get(t)))throw new q('Graph.dropEdge: could not find the "'.concat(t,'" edge in the graph.'));return Gt(this,e),this},i.dropDirectedEdge=function(t,e){if(arguments.length<2)throw new H("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new H("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=c(this,t=""+t,e=""+e,"directed");if(!r)throw new q('Graph.dropDirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Gt(this,r),this},i.dropUndirectedEdge=function(t,e){if(arguments.length<2)throw new H("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new H("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=c(this,t,e,"undirected");if(!r)throw new q('Graph.dropUndirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Gt(this,r),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var t,e=this._nodes.values();!0!==(t=e.next()).done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(t){return this._attributes[t]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(t){return this._attributes.hasOwnProperty(t)},i.setAttribute=function(t,e){return this._attributes[t]=e,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.updateAttribute=function(t,e){if("function"!=typeof e)throw new W("Graph.updateAttribute: updater should be a function.");var r=this._attributes[t];return this._attributes[t]=e(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.removeAttribute=function(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this},i.replaceAttributes=function(t){if(!l(t))throw new W("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(t){if(!l(t))throw new W("Graph.mergeAttributes: provided attributes are not a plain object.");return s(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this},i.updateAttributes=function(t){if("function"!=typeof t)throw new W("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(t,e){if("function"!=typeof t)throw new W("Graph.updateEachNodeAttributes: expecting an updater function.");if(e&&!g(e))throw new W("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i=this._nodes.values();!0!==(r=i.next()).done;)(n=r.value).attributes=t(n.key,n.attributes);this.emit("eachNodeAttributesUpdated",{hints:e||null})},i.updateEachEdgeAttributes=function(t,e){if("function"!=typeof t)throw new W("Graph.updateEachEdgeAttributes: expecting an updater function.");if(e&&!g(e))throw new W("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i,o,a=this._edges.values();!0!==(r=a.next()).done;)i=(n=r.value).source,o=n.target,n.attributes=t(n.key,n.attributes,i.key,o.key,i.attributes,o.attributes,n.undirected);this.emit("eachEdgeAttributesUpdated",{hints:e||null})},i.forEachAdjacencyEntry=function(t){if("function"!=typeof t)throw new W("Graph.forEachAdjacencyEntry: expecting a callback.");Et(!1,!1,!1,this,t)},i.forEachAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new W("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Et(!1,!1,!0,this,t)},i.forEachAssymetricAdjacencyEntry=function(t){if("function"!=typeof t)throw new W("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Et(!1,!0,!1,this,t)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new W("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Et(!1,!0,!0,this,t)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):I(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(t){if("function"!=typeof t)throw new W("Graph.forEachNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)},i.findNode=function(t){if("function"!=typeof t)throw new W("Graph.findNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return r.key},i.mapNodes=function(t){if("function"!=typeof t)throw new W("Graph.mapNode: expecting a callback.");for(var e,r,n=this._nodes.values(),i=new Array(this.order),o=0;!0!==(e=n.next()).done;)r=e.value,i[o++]=t(r.key,r.attributes);return i},i.someNode=function(t){if("function"!=typeof t)throw new W("Graph.someNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return!0;return!1},i.everyNode=function(t){if("function"!=typeof t)throw new W("Graph.everyNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(!t((r=e.value).key,r.attributes))return!1;return!0},i.filterNodes=function(t){if("function"!=typeof t)throw new W("Graph.filterNodes: expecting a callback.");for(var e,r,n=this._nodes.values(),i=[];!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)&&i.push(r.key);return i},i.reduceNodes=function(t,e){if("function"!=typeof t)throw new W("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new W("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var r,n,i=e,o=this._nodes.values();!0!==(r=o.next()).done;)i=t(i,(n=r.value).key,n.attributes);return i},i.nodeEntries=function(){var t=this._nodes.values();return new T((function(){var e=t.next();if(e.done)return e;var r=e.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}))},i.export=function(){var t=new Array(this._nodes.size),e=0;this._nodes.forEach((function(r,n){t[e++]=function(t,e){var r={key:t};return d(e.attributes)||(r.attributes=s({},e.attributes)),r}(n,r)}));var r=new Array(this._edges.size);return e=0,this._edges.forEach((function(t,n){r[e++]=function(t,e){var r={key:t,source:e.source.key,target:e.target.key};return d(e.attributes)||(r.attributes=s({},e.attributes)),e.undirected&&(r.undirected=!0),r}(n,t)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}},i.import=function(t){var e,r,n,i,o,a=this,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(t))return t.forEachNode((function(t,e){u?a.mergeNode(t,e):a.addNode(t,e)})),t.forEachEdge((function(t,e,r,n,i,o,s){u?s?a.mergeUndirectedEdgeWithKey(t,r,n,e):a.mergeDirectedEdgeWithKey(t,r,n,e):s?a.addUndirectedEdgeWithKey(t,r,n,e):a.addDirectedEdgeWithKey(t,r,n,e)})),this;if(!l(t))throw new W("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!l(t.attributes))throw new W("Graph.import: invalid attributes. Expecting a plain object.");u?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}if(t.nodes){if(n=t.nodes,!Array.isArray(n))throw new W("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=n.length;e<r;e++){At(i=n[e]);var s=i,c=s.key,d=s.attributes;u?this.mergeNode(c,d):this.addNode(c,d)}}if(t.edges){if(n=t.edges,!Array.isArray(n))throw new W("Graph.import: invalid edges. Expecting an array.");for(e=0,r=n.length;e<r;e++){Lt(o=n[e]);var f=o,p=f.source,g=f.target,y=f.attributes,v=f.undirected,m=void 0!==v&&v;"key"in o?(u?m?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:m?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,o.key,p,g,y):(u?m?this.mergeUndirectedEdge:this.mergeDirectedEdge:m?this.addUndirectedEdge:this.addDirectedEdge).call(this,p,g,y)}}return this},i.nullCopy=function(t){var e=new n(s({},this._options,t));return e.replaceAttributes(s({},this.getAttributes())),e},i.emptyCopy=function(t){var e=this.nullCopy(t);return this._nodes.forEach((function(t,r){var n=s({},t.attributes);t=new e.NodeDataClass(r,n),e._nodes.set(r,t)})),e},i.copy=function(t){if("string"==typeof(t=t||{}).type&&t.type!==this.type&&"mixed"!==t.type)throw new H('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(t.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof t.multi&&t.multi!==this.multi&&!0!==t.multi)throw new H("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof t.allowSelfLoops&&t.allowSelfLoops!==this.allowSelfLoops&&!0!==t.allowSelfLoops)throw new H("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var e,r,n=this.emptyCopy(t),i=this._edges.values();!0!==(e=i.next()).done;)Ot(n,"copy",!1,(r=e.value).undirected,r.key,r.source.key,r.target.key,s({},r.attributes));return n},i.toJSON=function(){return this.export()},i.toString=function(){return"[object Graph]"},i.inspect=function(){var e=this,r={};this._nodes.forEach((function(t,e){r[e]=t.attributes}));var n={},i={};this._edges.forEach((function(t,r){var o,a=t.undirected?"--":"->",u="",s=t.source.key,c=t.target.key;t.undirected&&s>c&&(o=s,s=c,c=o);var h="(".concat(s,")").concat(a,"(").concat(c,")");r.startsWith("geid_")?e.multi&&(void 0===i[h]?i[h]=0:i[h]++,u+="".concat(i[h],". ")):u+="[".concat(r,"]: "),n[u+=h]=t.attributes}));var o={};for(var a in this)this.hasOwnProperty(a)&&!Ct.has(a)&&"function"!=typeof this[a]&&"symbol"!==t(a)&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=r,o.edges=n,f(o,"constructor",this.constructor),o},n}(v.exports.EventEmitter);"undefined"!=typeof Symbol&&(Pt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Pt.prototype.inspect),[{name:function(t){return"".concat(t,"Edge")},generateKey:!0},{name:function(t){return"".concat(t,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(t){return"".concat(t,"EdgeWithKey")}},{name:function(t){return"".concat(t,"DirectedEdgeWithKey")},type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(t){["add","merge","update"].forEach((function(e){var r=t.name(e),n="add"===e?Ot:Tt;t.generateKey?Pt.prototype[r]=function(i,o,a){return n(this,r,!0,"undirected"===(t.type||this.type),null,i,o,a,"update"===e)}:Pt.prototype[r]=function(i,o,a,u){return n(this,r,!1,"undirected"===(t.type||this.type),i,o,a,u,"update"===e)}}))})),function(t){X.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Node"),0),n(t,r("Source"),1),n(t,r("Target"),2),n(t,r("Opposite"),3)}))}(Pt),function(t){Q.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Edge"),"mixed"),n(t,r("DirectedEdge"),"directed"),n(t,r("UndirectedEdge"),"undirected")}))}(Pt),function(t){rt.forEach((function(e){!function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];if(!arguments.length)return ct(this,n);if(1===arguments.length){t=""+t;var o=this._nodes.get(t);if(void 0===o)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return ft(this.multi,"mixed"===n?this.type:n,i,o)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(r,': could not find the "').concat(e,'" target node in the graph.'));return yt(n,this.multi,i,a,e)}throw new W("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"===n||"mixed"===this.type||n===this.type){if(1===arguments.length)return ht(!1,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!1,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return gt(!1,n,this.multi,i,u,e,r)}throw new W("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(){var t,e=Array.prototype.slice.call(arguments),r=e.pop();if(0===e.length){var i=0;"directed"!==n&&(i+=this.undirectedSize),"undirected"!==n&&(i+=this.directedSize),t=new Array(i);var a=0;e.push((function(e,n,i,o,u,s,c){t[a++]=r(e,n,i,o,u,s,c)}))}else t=[],e.push((function(e,n,i,o,a,u,s){t.push(r(e,n,i,o,a,u,s))}));return this[o].apply(this,e),t};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),r=[];return t.push((function(t,n,i,o,a,u,s){e(t,n,i,o,a,u,s)&&r.push(t)})),this[o].apply(this,t),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){var t,e,r=Array.prototype.slice.call(arguments);if(r.length<2||r.length>4)throw new W("Graph.".concat(s,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(r.length,")."));if("function"==typeof r[r.length-1]&&"function"!=typeof r[r.length-2])throw new W("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));2===r.length?(t=r[0],e=r[1],r=[]):3===r.length?(t=r[1],e=r[2],r=[r[0]]):4===r.length&&(t=r[2],e=r[3],r=[r[0],r[1]]);var n=e;return r.push((function(e,r,i,o,a,u,s){n=t(n,e,r,i,o,a,u,s)})),this[o].apply(this,r),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return!1;if(1===arguments.length)return ht(!0,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!0,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var u=this._nodes.get(t);if(!u)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return gt(!0,n,this.multi,i,u,e,r)}throw new W("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return e(t,r,n,i,o,a,u)})),!!this[o].apply(this,t)};var u="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[u]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,u){return!e(t,r,n,i,o,a,u)})),!this[o].apply(this,t)}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return T.empty();if(!arguments.length)return lt(this,n);if(1===arguments.length){t=""+t;var r=this._nodes.get(t);if(!r)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return pt(n,i,r)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new q("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return vt(n,i,a,e)}throw new W("Graph.".concat(o,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e)}))}(Pt),function(t){mt.forEach((function(e){(function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new q("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return Object.keys(r.undirected);if("string"==typeof e)return Object.keys(r[e])}var n=[];return _t(!1,t,e,r,(function(t){n.push(t)})),n}("mixed"===n?this.type:n,i,e)}})(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));_t(!1,"mixed"===n?this.type:n,i,r,e)}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(t,e){var r=[];return this[o](t,(function(t,n){r.push(e(t,n))})),r};var u="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[u]=function(t,e){var r=[];return this[o](t,(function(t,n){e(t,n)&&r.push(t)})),r};var s="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(t,e,r){if(arguments.length<3)throw new W("Graph.".concat(s,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var n=r;return this[o](t,(function(t,r){n=e(n,t,r)})),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r[0].toUpperCase()+r.slice(1,-1),a="find"+o;t.prototype[a]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new q("Graph.".concat(a,': could not find the "').concat(t,'" node in the graph.'));return _t(!0,"mixed"===n?this.type:n,i,r,e)}};var u="some"+o;t.prototype[u]=function(t,e){return!!this[a](t,e)};var s="every"+o;t.prototype[s]=function(t,e){return!this[a](t,(function(t,r){return!e(t,r)}))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return T.empty();t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new q("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return xt(null,r,r.undirected);if("string"==typeof e)return xt(null,r,r[e])}var n=T.empty(),i=new bt;return"undirected"!==t&&("out"!==e&&(n=et(n,xt(i,r,r.in))),"in"!==e&&(n=et(n,xt(i,r,r.out)))),"directed"!==t&&(n=et(n,xt(i,r,r.undirected))),n}("mixed"===n?this.type:n,i,e)}}(t,e)}))}(Pt);var Rt=function(t){function r(e){var r=s({type:"directed"},e);if("multi"in r&&!1!==r.multi)throw new W("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==r.type)throw new W('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Pt),Nt=function(t){function r(e){var r=s({type:"undirected"},e);if("multi"in r&&!1!==r.multi)throw new W("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==r.type)throw new W('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Pt),jt=function(t){function r(e){var r=s({multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return t.call(this,r)||this}return e(r,t),r}(Pt),zt=function(t){function r(e){var r=s({type:"directed",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==r.type)throw new W('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Pt),Ut=function(t){function r(e){var r=s({type:"undirected",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new W("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==r.type)throw new W('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Pt);function It(t){t.from=function(e,r){var n=s({},e.options,r),i=new t(n);return i.import(e),i}}return It(Pt),It(Rt),It(Nt),It(jt),It(zt),It(Ut),Pt.Graph=Pt,Pt.DirectedGraph=Rt,Pt.UndirectedGraph=Nt,Pt.MultiGraph=jt,Pt.MultiDirectedGraph=zt,Pt.MultiUndirectedGraph=Ut,Pt.InvalidArgumentsGraphError=W,Pt.NotFoundGraphError=q,Pt.UsageGraphError=H,Pt}()},76635:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,h=1/0,l=9007199254740991,d=NaN,f=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",E="[object Number]",A="[object Object]",L="[object Promise]",k="[object RegExp]",S="[object Set]",M="[object String]",C="[object Symbol]",D="[object WeakMap]",F="[object ArrayBuffer]",O="[object DataView]",T="[object Float32Array]",G="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",I="[object Uint32Array]",B=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,Z=RegExp(H.source),V=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+|\s+$/g,it=/^\s+/,ot=/\s+$/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="["+At+"]",kt="["+_t+"]",St="\\d+",Mt="["+xt+"]",Ct="[^\\ud800-\\udfff"+At+St+"\\u2700-\\u27bf"+xt+Et+"]",Dt="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+Et+"]",Pt="(?:"+Mt+"|"+Ct+")",Rt="(?:"+Gt+"|"+Ct+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",jt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+kt+"|"+Dt+")?",Ut="[\\ufe0e\\ufe0f]?",It=Ut+zt+"(?:\\u200d(?:"+[Ft,Ot,Tt].join("|")+")"+Ut+zt+")*",Bt="(?:"+["[\\u2700-\\u27bf]",Ot,Tt].join("|")+")"+It,Wt="(?:"+[Ft+kt+"?",kt,Ot,Tt,"[\\ud800-\\udfff]"].join("|")+")",qt=RegExp("['’]","g"),Ht=RegExp(kt,"g"),Yt=RegExp(Dt+"(?="+Dt+")|"+Wt+It,"g"),Zt=RegExp([Gt+"?"+Mt+"+"+Nt+"(?="+[Lt,Gt,"$"].join("|")+")",Rt+"+"+jt+"(?="+[Lt,Gt+Pt,"$"].join("|")+")",Gt+"?"+Pt+"+"+Nt,Gt+"+"+jt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",St,Bt].join("|"),"g"),Vt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$t=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xt=-1,Qt={};Qt[T]=Qt[G]=Qt[P]=Qt[R]=Qt[N]=Qt[j]=Qt[z]=Qt[U]=Qt[I]=!0,Qt[g]=Qt[y]=Qt[F]=Qt[v]=Qt[O]=Qt[m]=Qt[b]=Qt[w]=Qt[x]=Qt[E]=Qt[A]=Qt[k]=Qt[S]=Qt[M]=Qt[D]=!1;var Jt={};Jt[g]=Jt[y]=Jt[F]=Jt[O]=Jt[v]=Jt[m]=Jt[T]=Jt[G]=Jt[P]=Jt[R]=Jt[N]=Jt[x]=Jt[E]=Jt[A]=Jt[k]=Jt[S]=Jt[M]=Jt[C]=Jt[j]=Jt[z]=Jt[U]=Jt[I]=!0,Jt[b]=Jt[w]=Jt[D]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ne="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=ne||ie||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&ne.process,he=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),le=he&&he.isArrayBuffer,de=he&&he.isDate,fe=he&&he.isMap,pe=he&&he.isRegExp,ge=he&&he.isSet,ye=he&&he.isTypedArray;function ve(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function me(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function be(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function we(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function xe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function Ee(t,e){return!(null==t||!t.length)&&Te(t,e,0)>-1}function Ae(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Le(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function ke(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Se(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Me(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var De=Ne("length");function Fe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Oe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Te(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Oe(t,Pe,r)}function Ge(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Pe(t){return t!=t}function Re(t,e){var r=null==t?0:t.length;return r?Ue(t,e)/r:d}function Ne(t){return function(e){return null==e?i:e[t]}}function je(t){return function(e){return null==t?i:t[e]}}function ze(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ue(t,e){for(var r,n=-1,o=t.length;++n<o;){var a=e(t[n]);a!==i&&(r=r===i?a:r+a)}return r}function Ie(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Be(t){return function(e){return t(e)}}function We(t,e){return Le(e,(function(e){return t[e]}))}function qe(t,e){return t.has(e)}function He(t,e){for(var r=-1,n=t.length;++r<n&&Te(e,t[r],0)>-1;);return r}function Ye(t,e){for(var r=t.length;r--&&Te(e,t[r],0)>-1;);return r}function Ze(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Ve=je({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=je({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function $e(t){return"\\"+te[t]}function Xe(t){return Vt.test(t)}function Qe(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Je(t,e){return function(r){return t(e(r))}}function tr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r];a!==e&&a!==u||(t[r]=u,o[i++]=r)}return o}function er(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function nr(t){return Xe(t)?function(t){for(var e=Yt.lastIndex=0;Yt.test(t);)++e;return e}(t):De(t)}function ir(t){return Xe(t)?function(t){return t.match(Yt)||[]}(t):function(t){return t.split("")}(t)}var or=je({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ar=function t(e){var r,n=(e=null==e?oe:ar.defaults(oe.Object(),e,ar.pick(oe,$t))).Array,_t=e.Date,xt=e.Error,Et=e.Function,At=e.Math,Lt=e.Object,kt=e.RegExp,St=e.String,Mt=e.TypeError,Ct=n.prototype,Dt=Et.prototype,Ft=Lt.prototype,Ot=e["__core-js_shared__"],Tt=Dt.toString,Gt=Ft.hasOwnProperty,Pt=0,Rt=(r=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Nt=Ft.toString,jt=Tt.call(Lt),zt=oe._,Ut=kt("^"+Tt.call(Gt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=se?e.Buffer:i,Bt=e.Symbol,Wt=e.Uint8Array,Yt=It?It.allocUnsafe:i,Vt=Je(Lt.getPrototypeOf,Lt),te=Lt.create,ne=Ft.propertyIsEnumerable,ie=Ct.splice,ae=Bt?Bt.isConcatSpreadable:i,ue=Bt?Bt.iterator:i,ce=Bt?Bt.toStringTag:i,he=function(){try{var t=so(Lt,"defineProperty");return t({},"",{}),t}catch(t){}}(),De=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,je=_t&&_t.now!==oe.Date.now&&_t.now,ur=e.setTimeout!==oe.setTimeout&&e.setTimeout,sr=At.ceil,cr=At.floor,hr=Lt.getOwnPropertySymbols,lr=It?It.isBuffer:i,dr=e.isFinite,fr=Ct.join,pr=Je(Lt.keys,Lt),gr=At.max,yr=At.min,vr=_t.now,mr=e.parseInt,br=At.random,wr=Ct.reverse,_r=so(e,"DataView"),xr=so(e,"Map"),Er=so(e,"Promise"),Ar=so(e,"Set"),Lr=so(e,"WeakMap"),kr=so(Lt,"create"),Sr=Lr&&new Lr,Mr={},Cr=jo(_r),Dr=jo(xr),Fr=jo(Er),Or=jo(Ar),Tr=jo(Lr),Gr=Bt?Bt.prototype:i,Pr=Gr?Gr.valueOf:i,Rr=Gr?Gr.toString:i;function Nr(t){if(eu(t)&&!qa(t)&&!(t instanceof Ir)){if(t instanceof Ur)return t;if(Gt.call(t,"__wrapped__"))return zo(t)}return new Ur(t)}var jr=function(){function t(){}return function(e){if(!tu(e))return{};if(te)return te(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function zr(){}function Ur(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Ir(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Br(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new qr;++e<r;)this.add(t[e])}function Yr(t){var e=this.__data__=new Wr(t);this.size=e.size}function Zr(t,e){var r=qa(t),n=!r&&Wa(t),i=!r&&!n&&Va(t),o=!r&&!n&&!i&&cu(t),a=r||n||i||o,u=a?Ie(t.length,St):[],s=u.length;for(var c in t)!e&&!Gt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,s))||u.push(c);return u}function Vr(t){var e=t.length;return e?t[Hn(0,e-1)]:i}function Kr(t,e){return To(ki(t),on(e,0,t.length))}function $r(t){return To(ki(t))}function Xr(t,e,r){(r!==i&&!Ua(t[e],r)||r===i&&!(e in t))&&rn(t,e,r)}function Qr(t,e,r){var n=t[e];Gt.call(t,e)&&Ua(n,r)&&(r!==i||e in t)||rn(t,e,r)}function Jr(t,e){for(var r=t.length;r--;)if(Ua(t[r][0],e))return r;return-1}function tn(t,e,r,n){return hn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Si(e,Fu(e),t)}function rn(t,e,r){"__proto__"==e&&he?he(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var r=-1,o=e.length,a=n(o),u=null==t;++r<o;)a[r]=u?i:ku(t,e[r]);return a}function on(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function an(t,e,r,n,o,a){var u,s=1&e,c=2&e,h=4&e;if(r&&(u=o?r(t,n,o,a):r(t)),u!==i)return u;if(!tu(t))return t;var l=qa(t);if(l){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Gt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!s)return ki(t,u)}else{var d=lo(t),f=d==w||d==_;if(Va(t))return wi(t,s);if(d==A||d==g||f&&!o){if(u=c||f?{}:po(t),!s)return c?function(t,e){return Si(t,ho(t),e)}(t,function(t,e){return t&&Si(e,Ou(e),t)}(u,t)):function(t,e){return Si(t,co(t),e)}(t,en(u,t))}else{if(!Jt[d])return o?t:{};u=function(t,e,r){var n,i=t.constructor;switch(e){case F:return _i(t);case v:case m:return new i(+t);case O:return function(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case T:case G:case P:case R:case N:case j:case z:case U:case I:return xi(t,r);case x:return new i;case E:case M:return new i(t);case k:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case S:return new i;case C:return n=t,Pr?Lt(Pr.call(n)):{}}}(t,d,s)}}a||(a=new Yr);var p=a.get(t);if(p)return p;a.set(t,u),au(t)?t.forEach((function(n){u.add(an(n,e,r,n,t,a))})):ru(t)&&t.forEach((function(n,i){u.set(i,an(n,e,r,i,t,a))}));var y=l?i:(h?c?eo:to:c?Ou:Fu)(t);return be(y||t,(function(n,i){y&&(n=t[i=n]),Qr(u,i,an(n,e,r,i,t,a))})),u}function un(t,e,r){var n=r.length;if(null==t)return!n;for(t=Lt(t);n--;){var o=r[n],a=e[o],u=t[o];if(u===i&&!(o in t)||!a(u))return!1}return!0}function sn(t,e,r){if("function"!=typeof t)throw new Mt(o);return Co((function(){t.apply(i,r)}),e)}function cn(t,e,r,n){var i=-1,o=Ee,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;r&&(e=Le(e,Be(r))),n?(o=Ae,a=!1):e.length>=200&&(o=qe,a=!1,e=new Hr(e));t:for(;++i<u;){var h=t[i],l=null==r?h:r(h);if(h=n||0!==h?h:0,a&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;s.push(h)}else o(e,l,n)||s.push(h)}return s}Nr.templateSettings={escape:K,evaluate:$,interpolate:X,variable:"",imports:{_:Nr}},Nr.prototype=zr.prototype,Nr.prototype.constructor=Nr,Ur.prototype=jr(zr.prototype),Ur.prototype.constructor=Ur,Ir.prototype=jr(zr.prototype),Ir.prototype.constructor=Ir,Br.prototype.clear=function(){this.__data__=kr?kr(null):{},this.size=0},Br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Br.prototype.get=function(t){var e=this.__data__;if(kr){var r=e[t];return r===a?i:r}return Gt.call(e,t)?e[t]:i},Br.prototype.has=function(t){var e=this.__data__;return kr?e[t]!==i:Gt.call(e,t)},Br.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kr&&e===i?a:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=Jr(e,t);return!(r<0||(r==e.length-1?e.pop():ie.call(e,r,1),--this.size,0))},Wr.prototype.get=function(t){var e=this.__data__,r=Jr(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return Jr(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=Jr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(xr||Wr),string:new Br}},qr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},qr.prototype.get=function(t){return ao(this,t).get(t)},qr.prototype.has=function(t){return ao(this,t).has(t)},qr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,a),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Yr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Yr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Yr.prototype.get=function(t){return this.__data__.get(t)},Yr.prototype.has=function(t){return this.__data__.has(t)},Yr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!xr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new qr(n)}return r.set(t,e),this.size=r.size,this};var hn=Di(mn),ln=Di(bn,!0);function dn(t,e){var r=!0;return hn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function fn(t,e,r){for(var n=-1,o=t.length;++n<o;){var a=t[n],u=e(a);if(null!=u&&(s===i?u==u&&!su(u):r(u,s)))var s=u,c=a}return c}function pn(t,e){var r=[];return hn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function gn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=go),i||(i=[]);++o<a;){var u=t[o];e>0&&r(u)?e>1?gn(u,e-1,r,n,i):ke(i,u):n||(i[i.length]=u)}return i}var yn=Fi(),vn=Fi(!0);function mn(t,e){return t&&yn(t,e,Fu)}function bn(t,e){return t&&vn(t,e,Fu)}function wn(t,e){return xe(e,(function(e){return Xa(t[e])}))}function _n(t,e){for(var r=0,n=(e=yi(e,t)).length;null!=t&&r<n;)t=t[No(e[r++])];return r&&r==n?t:i}function xn(t,e,r){var n=e(t);return qa(t)?n:ke(n,r(t))}function En(t){return null==t?t===i?"[object Undefined]":"[object Null]":ce&&ce in Lt(t)?function(t){var e=Gt.call(t,ce),r=t[ce];try{t[ce]=i;var n=!0}catch(t){}var o=Nt.call(t);return n&&(e?t[ce]=r:delete t[ce]),o}(t):function(t){return Nt.call(t)}(t)}function An(t,e){return t>e}function Ln(t,e){return null!=t&&Gt.call(t,e)}function kn(t,e){return null!=t&&e in Lt(t)}function Sn(t,e,r){for(var o=r?Ae:Ee,a=t[0].length,u=t.length,s=u,c=n(u),h=1/0,l=[];s--;){var d=t[s];s&&e&&(d=Le(d,Be(e))),h=yr(d.length,h),c[s]=!r&&(e||a>=120&&d.length>=120)?new Hr(s&&d):i}d=t[0];var f=-1,p=c[0];t:for(;++f<a&&l.length<h;){var g=d[f],y=e?e(g):g;if(g=r||0!==g?g:0,!(p?qe(p,y):o(l,y,r))){for(s=u;--s;){var v=c[s];if(!(v?qe(v,y):o(t[s],y,r)))continue t}p&&p.push(y),l.push(g)}}return l}function Mn(t,e,r){var n=null==(t=Lo(t,e=yi(e,t)))?t:t[No($o(e))];return null==n?i:ve(n,t,r)}function Cn(t){return eu(t)&&En(t)==g}function Dn(t,e,r,n,o){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,r,n,o,a){var u=qa(t),s=qa(e),c=u?y:lo(t),h=s?y:lo(e),l=(c=c==g?A:c)==A,d=(h=h==g?A:h)==A,f=c==h;if(f&&Va(t)){if(!Va(e))return!1;u=!0,l=!1}if(f&&!l)return a||(a=new Yr),u||cu(t)?Qi(t,e,r,n,o,a):function(t,e,r,n,i,o,a){switch(r){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case F:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case v:case m:case E:return Ua(+t,+e);case b:return t.name==e.name&&t.message==e.message;case k:case M:return t==e+"";case x:var u=Qe;case S:var s=1&n;if(u||(u=er),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var h=Qi(u(t),u(e),n,i,o,a);return a.delete(t),h;case C:if(Pr)return Pr.call(t)==Pr.call(e)}return!1}(t,e,c,r,n,o,a);if(!(1&r)){var p=l&&Gt.call(t,"__wrapped__"),w=d&&Gt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,L=w?e.value():e;return a||(a=new Yr),o(_,L,r,n,a)}}return!!f&&(a||(a=new Yr),function(t,e,r,n,o,a){var u=1&r,s=to(t),c=s.length;if(c!=to(e).length&&!u)return!1;for(var h=c;h--;){var l=s[h];if(!(u?l in e:Gt.call(e,l)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var p=u;++h<c;){var g=t[l=s[h]],y=e[l];if(n)var v=u?n(y,g,l,e,t,a):n(g,y,l,t,e,a);if(!(v===i?g===y||o(g,y,r,n,a):v)){f=!1;break}p||(p="constructor"==l)}if(f&&!p){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(t),a.delete(e),f}(t,e,r,n,o,a))}(t,e,r,n,Dn,o))}function Fn(t,e,r,n){var o=r.length,a=o,u=!n;if(null==t)return!a;for(t=Lt(t);o--;){var s=r[o];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){var c=(s=r[o])[0],h=t[c],l=s[1];if(u&&s[2]){if(h===i&&!(c in t))return!1}else{var d=new Yr;if(n)var f=n(h,l,c,t,e,d);if(!(f===i?Dn(l,h,3,n,d):f))return!1}}return!0}function On(t){return!(!tu(t)||(e=t,Rt&&Rt in e))&&(Xa(t)?Ut:gt).test(jo(t));var e}function Tn(t){return"function"==typeof t?t:null==t?ns:"object"==typeof t?qa(t)?jn(t[0],t[1]):Nn(t):ds(t)}function Gn(t){if(!_o(t))return pr(t);var e=[];for(var r in Lt(t))Gt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Pn(t,e){return t<e}function Rn(t,e){var r=-1,i=Ya(t)?n(t.length):[];return hn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Nn(t){var e=uo(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(r){return r===t||Fn(r,t,e)}}function jn(t,e){return mo(t)&&xo(e)?Eo(No(t),e):function(r){var n=ku(r,t);return n===i&&n===e?Su(r,t):Dn(e,n,3)}}function zn(t,e,r,n,o){t!==e&&yn(e,(function(a,u){if(o||(o=new Yr),tu(a))!function(t,e,r,n,o,a,u){var s=So(t,r),c=So(e,r),h=u.get(c);if(h)Xr(t,r,h);else{var l=a?a(s,c,r+"",t,e,u):i,d=l===i;if(d){var f=qa(c),p=!f&&Va(c),g=!f&&!p&&cu(c);l=c,f||p||g?qa(s)?l=s:Za(s)?l=ki(s):p?(d=!1,l=wi(c,!0)):g?(d=!1,l=xi(c,!0)):l=[]:iu(c)||Wa(c)?(l=s,Wa(s)?l=vu(s):tu(s)&&!Xa(s)||(l=po(c))):d=!1}d&&(u.set(c,l),o(l,c,n,a,u),u.delete(c)),Xr(t,r,l)}}(t,e,u,r,zn,n,o);else{var s=n?n(So(t,u),a,u+"",t,e,o):i;s===i&&(s=a),Xr(t,u,s)}}),Ou)}function Un(t,e){var r=t.length;if(r)return yo(e+=e<0?r:0,r)?t[e]:i}function In(t,e,r){var n=-1;e=Le(e.length?e:[ns],Be(oo()));var i=Rn(t,(function(t,r,i){var o=Le(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,u=r.length;++n<a;){var s=Ei(i[n],o[n]);if(s)return n>=u?s:s*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Bn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],u=_n(t,a);r(u,a)&&$n(o,yi(a,t),u)}return o}function Wn(t,e,r,n){var i=n?Ge:Te,o=-1,a=e.length,u=t;for(t===e&&(e=ki(e)),r&&(u=Le(t,Be(r)));++o<a;)for(var s=0,c=e[o],h=r?r(c):c;(s=i(u,h,s,n))>-1;)u!==t&&ie.call(u,s,1),ie.call(t,s,1);return t}function qn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;yo(i)?ie.call(t,i,1):si(t,i)}}return t}function Hn(t,e){return t+cr(br()*(e-t+1))}function Yn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=cr(e/2))&&(t+=t)}while(e);return r}function Zn(t,e){return Do(Ao(t,e,ns),t+"")}function Vn(t){return Vr(Uu(t))}function Kn(t,e){var r=Uu(t);return To(r,on(e,0,r.length))}function $n(t,e,r,n){if(!tu(t))return t;for(var o=-1,a=(e=yi(e,t)).length,u=a-1,s=t;null!=s&&++o<a;){var c=No(e[o]),h=r;if(o!=u){var l=s[c];(h=n?n(l,c,s):i)===i&&(h=tu(l)?l:yo(e[o+1])?[]:{})}Qr(s,c,h),s=s[c]}return t}var Xn=Sr?function(t,e){return Sr.set(t,e),t}:ns,Qn=he?function(t,e){return he(t,"toString",{configurable:!0,enumerable:!1,value:ts(e),writable:!0})}:ns;function Jn(t){return To(Uu(t))}function ti(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function ei(t,e){var r;return hn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!su(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return ni(t,e,ns,r)}function ni(t,e,r,n){e=r(e);for(var o=0,a=null==t?0:t.length,u=e!=e,s=null===e,c=su(e),h=e===i;o<a;){var l=cr((o+a)/2),d=r(t[l]),f=d!==i,p=null===d,g=d==d,y=su(d);if(u)var v=n||g;else v=h?g&&(n||f):s?g&&f&&(n||!p):c?g&&f&&!p&&(n||!y):!p&&!y&&(n?d<=e:d<e);v?o=l+1:a=l}return yr(a,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],u=e?e(a):a;if(!r||!Ua(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function oi(t){return"number"==typeof t?t:su(t)?d:+t}function ai(t){if("string"==typeof t)return t;if(qa(t))return Le(t,ai)+"";if(su(t))return Rr?Rr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Ee,o=t.length,a=!0,u=[],s=u;if(r)a=!1,i=Ae;else if(o>=200){var c=e?null:Yi(t);if(c)return er(c);a=!1,i=qe,s=new Hr}else s=e?[]:u;t:for(;++n<o;){var h=t[n],l=e?e(h):h;if(h=r||0!==h?h:0,a&&l==l){for(var d=s.length;d--;)if(s[d]===l)continue t;e&&s.push(l),u.push(h)}else i(s,l,r)||(s!==u&&s.push(l),u.push(h))}return u}function si(t,e){return null==(t=Lo(t,e=yi(e,t)))||delete t[No($o(e))]}function ci(t,e,r,n){return $n(t,e,r(_n(t,e)),n)}function hi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof Ir&&(r=r.value()),Se(e,(function(t,e){return e.func.apply(e.thisArg,ke([t],e.args))}),r)}function di(t,e,r){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var u=t[o],s=-1;++s<i;)s!=o&&(a[o]=cn(a[o]||u,t[s],e,r));return ui(gn(a,1),e,r)}function fi(t,e,r){for(var n=-1,o=t.length,a=e.length,u={};++n<o;){var s=n<a?e[n]:i;r(u,t[n],s)}return u}function pi(t){return Za(t)?t:[]}function gi(t){return"function"==typeof t?t:ns}function yi(t,e){return qa(t)?t:mo(t,e)?[t]:Ro(mu(t))}var vi=Zn;function mi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ti(t,e,r)}var bi=De||function(t){return oe.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=Yt?Yt(r):new t.constructor(r);return t.copy(n),n}function _i(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function xi(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,a=su(t),u=e!==i,s=null===e,c=e==e,h=su(e);if(!s&&!h&&!a&&t>e||a&&u&&c&&!s&&!h||n&&u&&c||!r&&c||!o)return 1;if(!n&&!a&&!h&&t<e||h&&r&&o&&!n&&!a||s&&r&&o||!u&&o||!c)return-1}return 0}function Ai(t,e,r,i){for(var o=-1,a=t.length,u=r.length,s=-1,c=e.length,h=gr(a-u,0),l=n(c+h),d=!i;++s<c;)l[s]=e[s];for(;++o<u;)(d||o<a)&&(l[r[o]]=t[o]);for(;h--;)l[s++]=t[o++];return l}function Li(t,e,r,i){for(var o=-1,a=t.length,u=-1,s=r.length,c=-1,h=e.length,l=gr(a-s,0),d=n(l+h),f=!i;++o<l;)d[o]=t[o];for(var p=o;++c<h;)d[p+c]=e[c];for(;++u<s;)(f||o<a)&&(d[p+r[u]]=t[o++]);return d}function ki(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Si(t,e,r,n){var o=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=n?n(r[s],t[s],s,r,t):i;c===i&&(c=t[s]),o?rn(r,s,c):Qr(r,s,c)}return r}function Mi(t,e){return function(r,n){var i=qa(r)?me:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Ci(t){return Zn((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,u=o>2?r[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,u&&vo(r[0],r[1],u)&&(a=o<3?i:a,o=1),e=Lt(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e}))}function Di(t,e){return function(r,n){if(null==r)return r;if(!Ya(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Lt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Fi(t){return function(e,r,n){for(var i=-1,o=Lt(e),a=n(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===r(o[s],s,o))break}return e}}function Oi(t){return function(e){var r=Xe(e=mu(e))?ir(e):i,n=r?r[0]:e.charAt(0),o=r?mi(r,1).join(""):e.slice(1);return n[t]()+o}}function Ti(t){return function(e){return Se(Xu(Wu(e).replace(qt,"")),t,"")}}function Gi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=jr(t.prototype),n=t.apply(r,e);return tu(n)?n:r}}function Pi(t){return function(e,r,n){var o=Lt(e);if(!Ya(e)){var a=oo(r,3);e=Fu(e),r=function(t){return a(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[a?e[u]:u]:i}}function Ri(t){return Ji((function(e){var r=e.length,n=r,a=Ur.prototype.thru;for(t&&e.reverse();n--;){var u=e[n];if("function"!=typeof u)throw new Mt(o);if(a&&!s&&"wrapper"==no(u))var s=new Ur([],!0)}for(n=s?n:r;++n<r;){var c=no(u=e[n]),h="wrapper"==c?ro(u):i;s=h&&bo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?s[no(h[0])].apply(s,h[3]):1==u.length&&bo(u)?s[c]():s.thru(u)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&qa(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ni(t,e,r,o,a,u,s,h,l,d){var f=e&c,p=1&e,g=2&e,y=24&e,v=512&e,m=g?i:Gi(t);return function i(){for(var c=arguments.length,b=n(c),w=c;w--;)b[w]=arguments[w];if(y)var _=io(i),x=Ze(b,_);if(o&&(b=Ai(b,o,a,y)),u&&(b=Li(b,u,s,y)),c-=x,y&&c<d){var E=tr(b,_);return qi(t,e,Ni,i.placeholder,r,b,E,h,l,d-c)}var A=p?r:this,L=g?A[t]:t;return c=b.length,h?b=ko(b,h):v&&c>1&&b.reverse(),f&&l<c&&(b.length=l),this&&this!==oe&&this instanceof i&&(L=m||Gi(L)),L.apply(A,b)}}function ji(t,e){return function(r,n){return function(t,e,r,n){return mn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function zi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=oi(r),n=oi(n)),o=t(r,n)}return o}}function Ui(t){return Ji((function(e){return e=Le(e,Be(oo())),Zn((function(r){var n=this;return t(e,(function(t){return ve(t,n,r)}))}))}))}function Ii(t,e){var r=(e=e===i?" ":ai(e)).length;if(r<2)return r?Yn(e,t):e;var n=Yn(e,sr(t/nr(e)));return Xe(e)?mi(ir(n),0,t).join(""):n.slice(0,t)}function Bi(t){return function(e,r,o){return o&&"number"!=typeof o&&vo(e,r,o)&&(r=o=i),e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r,i){for(var o=-1,a=gr(sr((e-t)/(r||1)),0),u=n(a);a--;)u[i?a:++o]=t,t+=r;return u}(e,r,o=o===i?e<r?1:-1:fu(o),t)}}function Wi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=yu(e),r=yu(r)),t(e,r)}}function qi(t,e,r,n,o,a,u,c,h,l){var d=8&e;e|=d?s:64,4&(e&=~(d?64:s))||(e&=-4);var f=[t,e,o,d?a:i,d?u:i,d?i:a,d?i:u,c,h,l],p=r.apply(i,f);return bo(t)&&Mo(p,f),p.placeholder=n,Fo(p,t,e)}function Hi(t){var e=At[t];return function(t,r){if(t=yu(t),(r=null==r?0:yr(pu(r),292))&&dr(t)){var n=(mu(t)+"e").split("e");return+((n=(mu(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Yi=Ar&&1/er(new Ar([,-0]))[1]==h?function(t){return new Ar(t)}:ss;function Zi(t){return function(e){var r=lo(e);return r==x?Qe(e):r==S?rr(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Vi(t,e,r,a,h,l,d,f){var p=2&e;if(!p&&"function"!=typeof t)throw new Mt(o);var g=a?a.length:0;if(g||(e&=-97,a=h=i),d=d===i?d:gr(pu(d),0),f=f===i?f:pu(f),g-=h?h.length:0,64&e){var y=a,v=h;a=h=i}var m=p?i:ro(t),b=[t,e,r,a,h,y,v,l,d,f];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!a)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var s=e[3];if(s){var h=t[3];t[3]=h?Ai(h,s,e[4]):s,t[4]=h?tr(t[3],u):e[4]}(s=e[5])&&(h=t[5],t[5]=h?Li(h,s,e[6]):s,t[6]=h?tr(t[5],u):e[6]),(s=e[7])&&(t[7]=s),n&c&&(t[8]=null==t[8]?e[8]:yr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,m),t=b[0],e=b[1],r=b[2],a=b[3],h=b[4],!(f=b[9]=b[9]===i?p?0:t.length:gr(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Gi(t);return function a(){for(var u=arguments.length,s=n(u),c=u,h=io(a);c--;)s[c]=arguments[c];var l=u<3&&s[0]!==h&&s[u-1]!==h?[]:tr(s,h);return(u-=l.length)<r?qi(t,e,Ni,a.placeholder,i,s,l,i,i,r-u):ve(this&&this!==oe&&this instanceof a?o:t,this,s)}}(t,e,f):e!=s&&33!=e||h.length?Ni.apply(i,b):function(t,e,r,i){var o=1&e,a=Gi(t);return function e(){for(var u=-1,s=arguments.length,c=-1,h=i.length,l=n(h+s),d=this&&this!==oe&&this instanceof e?a:t;++c<h;)l[c]=i[c];for(;s--;)l[c++]=arguments[++u];return ve(d,o?r:this,l)}}(t,e,r,a);else var w=function(t,e,r){var n=1&e,i=Gi(t);return function e(){return(this&&this!==oe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Fo((m?Xn:Mo)(w,b),t,e)}function Ki(t,e,r,n){return t===i||Ua(t,Ft[r])&&!Gt.call(n,r)?e:t}function $i(t,e,r,n,o,a){return tu(t)&&tu(e)&&(a.set(e,t),zn(t,e,i,$i,a),a.delete(e)),t}function Xi(t){return iu(t)?i:t}function Qi(t,e,r,n,o,a){var u=1&r,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var h=a.get(t);if(h&&a.get(e))return h==e;var l=-1,d=!0,f=2&r?new Hr:i;for(a.set(t,e),a.set(e,t);++l<s;){var p=t[l],g=e[l];if(n)var y=u?n(g,p,l,e,t,a):n(p,g,l,t,e,a);if(y!==i){if(y)continue;d=!1;break}if(f){if(!Ce(e,(function(t,e){if(!qe(f,e)&&(p===t||o(p,t,r,n,a)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!o(p,g,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function Ji(t){return Do(Ao(t,i,Ho),t+"")}function to(t){return xn(t,Fu,co)}function eo(t){return xn(t,Ou,ho)}var ro=Sr?function(t){return Sr.get(t)}:ss;function no(t){for(var e=t.name+"",r=Mr[e],n=Gt.call(Mr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Gt.call(Nr,"placeholder")?Nr:t).placeholder}function oo(){var t=Nr.iteratee||is;return t=t===is?Tn:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Fu(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,xo(i)]}return e}function so(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return On(r)?r:i}var co=hr?function(t){return null==t?[]:(t=Lt(t),xe(hr(t),(function(e){return ne.call(t,e)})))}:gs,ho=hr?function(t){for(var e=[];t;)ke(e,co(t)),t=Vt(t);return e}:gs,lo=En;function fo(t,e,r){for(var n=-1,i=(e=yi(e,t)).length,o=!1;++n<i;){var a=No(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Ja(i)&&yo(a,i)&&(qa(t)||Wa(t))}function po(t){return"function"!=typeof t.constructor||_o(t)?{}:jr(Vt(t))}function go(t){return qa(t)||Wa(t)||!!(ae&&t&&t[ae])}function yo(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&vt.test(t))&&t>-1&&t%1==0&&t<e}function vo(t,e,r){if(!tu(r))return!1;var n=typeof e;return!!("number"==n?Ya(r)&&yo(e,r.length):"string"==n&&e in r)&&Ua(r[e],t)}function mo(t,e){if(qa(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!su(t))||J.test(t)||!Q.test(t)||null!=e&&t in Lt(e)}function bo(t){var e=no(t),r=Nr[e];if("function"!=typeof r||!(e in Ir.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(_r&&lo(new _r(new ArrayBuffer(1)))!=O||xr&&lo(new xr)!=x||Er&&lo(Er.resolve())!=L||Ar&&lo(new Ar)!=S||Lr&&lo(new Lr)!=D)&&(lo=function(t){var e=En(t),r=e==A?t.constructor:i,n=r?jo(r):"";if(n)switch(n){case Cr:return O;case Dr:return x;case Fr:return L;case Or:return S;case Tr:return D}return e});var wo=Ot?Xa:ys;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function xo(t){return t==t&&!tu(t)}function Eo(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in Lt(r))}}function Ao(t,e,r){return e=gr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=gr(i.length-e,0),u=n(a);++o<a;)u[o]=i[e+o];o=-1;for(var s=n(e+1);++o<e;)s[o]=i[o];return s[e]=r(u),ve(t,this,s)}}function Lo(t,e){return e.length<2?t:_n(t,ti(e,0,-1))}function ko(t,e){for(var r=t.length,n=yr(e.length,r),o=ki(t);n--;){var a=e[n];t[n]=yo(a,r)?o[a]:i}return t}function So(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Mo=Oo(Xn),Co=ur||function(t,e){return oe.setTimeout(t,e)},Do=Oo(Qn);function Fo(t,e,r){var n=e+"";return Do(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return be(p,(function(r){var n="_."+r[0];e&r[1]&&!Ee(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(st):[]}(n),r)))}function Oo(t){var e=0,r=0;return function(){var n=vr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function To(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var a=Hn(r,o),u=t[a];t[a]=t[r],t[r]=u}return t.length=e,t}var Go,Po,Ro=(Go=Ga((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ht,"$1"):r||t)})),e}),(function(t){return 500===Po.size&&Po.clear(),t})),Po=Go.cache,Go);function No(t){if("string"==typeof t||su(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function jo(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zo(t){if(t instanceof Ir)return t.clone();var e=new Ur(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Zn((function(t,e){return Za(t)?cn(t,gn(e,1,Za,!0)):[]})),Io=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),oo(r,2)):[]})),Bo=Zn((function(t,e){var r=$o(e);return Za(r)&&(r=i),Za(t)?cn(t,gn(e,1,Za,!0),i,r):[]}));function Wo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Oe(t,oo(e,3),i)}function qo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=pu(r),o=r<0?gr(n+o,0):yr(o,n-1)),Oe(t,oo(e,3),o,!0)}function Ho(t){return null!=t&&t.length?gn(t,1):[]}function Yo(t){return t&&t.length?t[0]:i}var Zo=Zn((function(t){var e=Le(t,pi);return e.length&&e[0]===t[0]?Sn(e):[]})),Vo=Zn((function(t){var e=$o(t),r=Le(t,pi);return e===$o(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Sn(r,oo(e,2)):[]})),Ko=Zn((function(t){var e=$o(t),r=Le(t,pi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Sn(r,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Xo=Zn(Qo);function Qo(t,e){return t&&t.length&&e&&e.length?Wn(t,e):t}var Jo=Ji((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return qn(t,Le(e,(function(t){return yo(t,r)?+t:t})).sort(Ei)),n}));function ta(t){return null==t?t:wr.call(t)}var ea=Zn((function(t){return ui(gn(t,1,Za,!0))})),ra=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),ui(gn(t,1,Za,!0),oo(e,2))})),na=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,ui(gn(t,1,Za,!0),i,e)}));function ia(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(Za(t))return e=gr(t.length,e),!0})),Ie(e,(function(e){return Le(t,Ne(e))}))}function oa(t,e){if(!t||!t.length)return[];var r=ia(t);return null==e?r:Le(r,(function(t){return ve(e,i,t)}))}var aa=Zn((function(t,e){return Za(t)?cn(t,e):[]})),ua=Zn((function(t){return di(xe(t,Za))})),sa=Zn((function(t){var e=$o(t);return Za(e)&&(e=i),di(xe(t,Za),oo(e,2))})),ca=Zn((function(t){var e=$o(t);return e="function"==typeof e?e:i,di(xe(t,Za),i,e)})),ha=Zn(ia),la=Zn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,oa(t,r)}));function da(t){var e=Nr(t);return e.__chain__=!0,e}function fa(t,e){return e(t)}var pa=Ji((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ir&&yo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:fa,args:[o],thisArg:i}),new Ur(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ga=Mi((function(t,e,r){Gt.call(t,r)?++t[r]:rn(t,r,1)})),ya=Pi(Wo),va=Pi(qo);function ma(t,e){return(qa(t)?be:hn)(t,oo(e,3))}function ba(t,e){return(qa(t)?we:ln)(t,oo(e,3))}var wa=Mi((function(t,e,r){Gt.call(t,r)?t[r].push(e):rn(t,r,[e])})),_a=Zn((function(t,e,r){var i=-1,o="function"==typeof e,a=Ya(t)?n(t.length):[];return hn(t,(function(t){a[++i]=o?ve(e,t,r):Mn(t,e,r)})),a})),xa=Mi((function(t,e,r){rn(t,r,e)}));function Ea(t,e){return(qa(t)?Le:Rn)(t,oo(e,3))}var Aa=Mi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),La=Zn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&vo(t,e[0],e[1])?e=[]:r>2&&vo(e[0],e[1],e[2])&&(e=[e[0]]),In(t,gn(e,1),[])})),ka=je||function(){return oe.Date.now()};function Sa(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Vi(t,c,i,i,i,i,e)}function Ma(t,e){var r;if("function"!=typeof e)throw new Mt(o);return t=pu(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Ca=Zn((function(t,e,r){var n=1;if(r.length){var i=tr(r,io(Ca));n|=s}return Vi(t,n,e,r,i)})),Da=Zn((function(t,e,r){var n=3;if(r.length){var i=tr(r,io(Da));n|=s}return Vi(e,n,t,r,i)}));function Fa(t,e,r){var n,a,u,s,c,h,l=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new Mt(o);function g(e){var r=n,o=a;return n=a=i,l=e,s=t.apply(o,r)}function y(t){return l=t,c=Co(m,e),d?g(t):s}function v(t){var r=t-h;return h===i||r>=e||r<0||f&&t-l>=u}function m(){var t=ka();if(v(t))return b(t);c=Co(m,function(t){var r=e-(t-h);return f?yr(r,u-(t-l)):r}(t))}function b(t){return c=i,p&&n?g(t):(n=a=i,s)}function w(){var t=ka(),r=v(t);if(n=arguments,a=this,h=t,r){if(c===i)return y(h);if(f)return bi(c),c=Co(m,e),g(h)}return c===i&&(c=Co(m,e)),s}return e=yu(e)||0,tu(r)&&(d=!!r.leading,u=(f="maxWait"in r)?gr(yu(r.maxWait)||0,e):u,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&bi(c),l=0,n=h=a=c=i},w.flush=function(){return c===i?s:b(ka())},w}var Oa=Zn((function(t,e){return sn(t,1,e)})),Ta=Zn((function(t,e,r){return sn(t,yu(e)||0,r)}));function Ga(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Mt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ga.Cache||qr),r}function Pa(t){if("function"!=typeof t)throw new Mt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ga.Cache=qr;var Ra=vi((function(t,e){var r=(e=1==e.length&&qa(e[0])?Le(e[0],Be(oo())):Le(gn(e,1),Be(oo()))).length;return Zn((function(n){for(var i=-1,o=yr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return ve(t,this,n)}))})),Na=Zn((function(t,e){var r=tr(e,io(Na));return Vi(t,s,i,e,r)})),ja=Zn((function(t,e){var r=tr(e,io(ja));return Vi(t,64,i,e,r)})),za=Ji((function(t,e){return Vi(t,256,i,i,i,e)}));function Ua(t,e){return t===e||t!=t&&e!=e}var Ia=Wi(An),Ba=Wi((function(t,e){return t>=e})),Wa=Cn(function(){return arguments}())?Cn:function(t){return eu(t)&&Gt.call(t,"callee")&&!ne.call(t,"callee")},qa=n.isArray,Ha=le?Be(le):function(t){return eu(t)&&En(t)==F};function Ya(t){return null!=t&&Ja(t.length)&&!Xa(t)}function Za(t){return eu(t)&&Ya(t)}var Va=lr||ys,Ka=de?Be(de):function(t){return eu(t)&&En(t)==m};function $a(t){if(!eu(t))return!1;var e=En(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!iu(t)}function Xa(t){if(!tu(t))return!1;var e=En(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qa(t){return"number"==typeof t&&t==pu(t)}function Ja(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var ru=fe?Be(fe):function(t){return eu(t)&&lo(t)==x};function nu(t){return"number"==typeof t||eu(t)&&En(t)==E}function iu(t){if(!eu(t)||En(t)!=A)return!1;var e=Vt(t);if(null===e)return!0;var r=Gt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Tt.call(r)==jt}var ou=pe?Be(pe):function(t){return eu(t)&&En(t)==k},au=ge?Be(ge):function(t){return eu(t)&&lo(t)==S};function uu(t){return"string"==typeof t||!qa(t)&&eu(t)&&En(t)==M}function su(t){return"symbol"==typeof t||eu(t)&&En(t)==C}var cu=ye?Be(ye):function(t){return eu(t)&&Ja(t.length)&&!!Qt[En(t)]},hu=Wi(Pn),lu=Wi((function(t,e){return t<=e}));function du(t){if(!t)return[];if(Ya(t))return uu(t)?ir(t):ki(t);if(ue&&t[ue])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[ue]());var e=lo(t);return(e==x?Qe:e==S?er:Uu)(t)}function fu(t){return t?(t=yu(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pu(t){var e=fu(t),r=e%1;return e==e?r?e-r:e:0}function gu(t){return t?on(pu(t),0,f):0}function yu(t){if("number"==typeof t)return t;if(su(t))return d;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(nt,"");var r=pt.test(t);return r||yt.test(t)?re(t.slice(2),r?2:8):ft.test(t)?d:+t}function vu(t){return Si(t,Ou(t))}function mu(t){return null==t?"":ai(t)}var bu=Ci((function(t,e){if(_o(e)||Ya(e))Si(e,Fu(e),t);else for(var r in e)Gt.call(e,r)&&Qr(t,r,e[r])})),wu=Ci((function(t,e){Si(e,Ou(e),t)})),_u=Ci((function(t,e,r,n){Si(e,Ou(e),t,n)})),xu=Ci((function(t,e,r,n){Si(e,Fu(e),t,n)})),Eu=Ji(nn),Au=Zn((function(t,e){t=Lt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&vo(e[0],e[1],o)&&(n=1);++r<n;)for(var a=e[r],u=Ou(a),s=-1,c=u.length;++s<c;){var h=u[s],l=t[h];(l===i||Ua(l,Ft[h])&&!Gt.call(t,h))&&(t[h]=a[h])}return t})),Lu=Zn((function(t){return t.push(i,$i),ve(Gu,i,t)}));function ku(t,e,r){var n=null==t?i:_n(t,e);return n===i?r:n}function Su(t,e){return null!=t&&fo(t,e,kn)}var Mu=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=r}),ts(ns)),Cu=ji((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Gt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Du=Zn(Mn);function Fu(t){return Ya(t)?Zr(t):Gn(t)}function Ou(t){return Ya(t)?Zr(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var r in Lt(t))e.push(r);return e}(t);var e=_o(t),r=[];for(var n in t)("constructor"!=n||!e&&Gt.call(t,n))&&r.push(n);return r}(t)}var Tu=Ci((function(t,e,r){zn(t,e,r)})),Gu=Ci((function(t,e,r,n){zn(t,e,r,n)})),Pu=Ji((function(t,e){var r={};if(null==t)return r;var n=!1;e=Le(e,(function(e){return e=yi(e,t),n||(n=e.length>1),e})),Si(t,eo(t),r),n&&(r=an(r,7,Xi));for(var i=e.length;i--;)si(r,e[i]);return r})),Ru=Ji((function(t,e){return null==t?{}:function(t,e){return Bn(t,e,(function(e,r){return Su(t,r)}))}(t,e)}));function Nu(t,e){if(null==t)return{};var r=Le(eo(t),(function(t){return[t]}));return e=oo(e),Bn(t,r,(function(t,r){return e(t,r[0])}))}var ju=Zi(Fu),zu=Zi(Ou);function Uu(t){return null==t?[]:We(t,Fu(t))}var Iu=Ti((function(t,e,r){return e=e.toLowerCase(),t+(r?Bu(e):e)}));function Bu(t){return $u(mu(t).toLowerCase())}function Wu(t){return(t=mu(t))&&t.replace(mt,Ve).replace(Ht,"")}var qu=Ti((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Hu=Ti((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Yu=Oi("toLowerCase"),Zu=Ti((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Vu=Ti((function(t,e,r){return t+(r?" ":"")+$u(e)})),Ku=Ti((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),$u=Oi("toUpperCase");function Xu(t,e,r){return t=mu(t),(e=r?i:e)===i?function(t){return Kt.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Qu=Zn((function(t,e){try{return ve(t,i,e)}catch(t){return $a(t)?t:new xt(t)}})),Ju=Ji((function(t,e){return be(e,(function(e){e=No(e),rn(t,e,Ca(t[e],t))})),t}));function ts(t){return function(){return t}}var es=Ri(),rs=Ri(!0);function ns(t){return t}function is(t){return Tn("function"==typeof t?t:an(t,1))}var os=Zn((function(t,e){return function(r){return Mn(r,t,e)}})),as=Zn((function(t,e){return function(r){return Mn(t,r,e)}}));function us(t,e,r){var n=Fu(e),i=wn(e,n);null!=r||tu(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,Fu(e)));var o=!(tu(r)&&"chain"in r&&!r.chain),a=Xa(t);return be(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=ki(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,ke([this.value()],arguments))})})),t}function ss(){}var cs=Ui(Le),hs=Ui(_e),ls=Ui(Ce);function ds(t){return mo(t)?Ne(No(t)):function(t){return function(e){return _n(e,t)}}(t)}var fs=Bi(),ps=Bi(!0);function gs(){return[]}function ys(){return!1}var vs,ms=zi((function(t,e){return t+e}),0),bs=Hi("ceil"),ws=zi((function(t,e){return t/e}),1),_s=Hi("floor"),xs=zi((function(t,e){return t*e}),1),Es=Hi("round"),As=zi((function(t,e){return t-e}),0);return Nr.after=function(t,e){if("function"!=typeof e)throw new Mt(o);return t=pu(t),function(){if(--t<1)return e.apply(this,arguments)}},Nr.ary=Sa,Nr.assign=bu,Nr.assignIn=wu,Nr.assignInWith=_u,Nr.assignWith=xu,Nr.at=Eu,Nr.before=Ma,Nr.bind=Ca,Nr.bindAll=Ju,Nr.bindKey=Da,Nr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Nr.chain=da,Nr.chunk=function(t,e,r){e=(r?vo(t,e,r):e===i)?1:gr(pu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,u=0,s=n(sr(o/e));a<o;)s[u++]=ti(t,a,a+=e);return s},Nr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Nr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return ke(qa(r)?ki(r):[r],gn(e,1))},Nr.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new Mt(o);return[r(t[0]),t[1]]})):[],Zn((function(r){for(var n=-1;++n<e;){var i=t[n];if(ve(i[0],this,r))return ve(i[1],this,r)}}))},Nr.conforms=function(t){return function(t){var e=Fu(t);return function(r){return un(r,t,e)}}(an(t,1))},Nr.constant=ts,Nr.countBy=ga,Nr.create=function(t,e){var r=jr(t);return null==e?r:en(r,e)},Nr.curry=function t(e,r,n){var o=Vi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.curryRight=function t(e,r,n){var o=Vi(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Nr.debounce=Fa,Nr.defaults=Au,Nr.defaultsDeep=Lu,Nr.defer=Oa,Nr.delay=Ta,Nr.difference=Uo,Nr.differenceBy=Io,Nr.differenceWith=Bo,Nr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=r||e===i?1:pu(e))<0?0:e,n):[]},Nr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,0,(e=n-(e=r||e===i?1:pu(e)))<0?0:e):[]},Nr.dropRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0,!0):[]},Nr.dropWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!0):[]},Nr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&vo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=pu(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:pu(n))<0&&(n+=o),n=r>n?0:gu(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Nr.filter=function(t,e){return(qa(t)?xe:pn)(t,oo(e,3))},Nr.flatMap=function(t,e){return gn(Ea(t,e),1)},Nr.flatMapDeep=function(t,e){return gn(Ea(t,e),h)},Nr.flatMapDepth=function(t,e,r){return r=r===i?1:pu(r),gn(Ea(t,e),r)},Nr.flatten=Ho,Nr.flattenDeep=function(t){return null!=t&&t.length?gn(t,h):[]},Nr.flattenDepth=function(t,e){return null!=t&&t.length?gn(t,e=e===i?1:pu(e)):[]},Nr.flip=function(t){return Vi(t,512)},Nr.flow=es,Nr.flowRight=rs,Nr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Nr.functions=function(t){return null==t?[]:wn(t,Fu(t))},Nr.functionsIn=function(t){return null==t?[]:wn(t,Ou(t))},Nr.groupBy=wa,Nr.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Nr.intersection=Zo,Nr.intersectionBy=Vo,Nr.intersectionWith=Ko,Nr.invert=Mu,Nr.invertBy=Cu,Nr.invokeMap=_a,Nr.iteratee=is,Nr.keyBy=xa,Nr.keys=Fu,Nr.keysIn=Ou,Nr.map=Ea,Nr.mapKeys=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},Nr.mapValues=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},Nr.matches=function(t){return Nn(an(t,1))},Nr.matchesProperty=function(t,e){return jn(t,an(e,1))},Nr.memoize=Ga,Nr.merge=Tu,Nr.mergeWith=Gu,Nr.method=os,Nr.methodOf=as,Nr.mixin=us,Nr.negate=Pa,Nr.nthArg=function(t){return t=pu(t),Zn((function(e){return Un(e,t)}))},Nr.omit=Pu,Nr.omitBy=function(t,e){return Nu(t,Pa(oo(e)))},Nr.once=function(t){return Ma(2,t)},Nr.orderBy=function(t,e,r,n){return null==t?[]:(qa(e)||(e=null==e?[]:[e]),qa(r=n?i:r)||(r=null==r?[]:[r]),In(t,e,r))},Nr.over=cs,Nr.overArgs=Ra,Nr.overEvery=hs,Nr.overSome=ls,Nr.partial=Na,Nr.partialRight=ja,Nr.partition=Aa,Nr.pick=Ru,Nr.pickBy=Nu,Nr.property=ds,Nr.propertyOf=function(t){return function(e){return null==t?i:_n(t,e)}},Nr.pull=Xo,Nr.pullAll=Qo,Nr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,oo(r,2)):t},Nr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,i,r):t},Nr.pullAt=Jo,Nr.range=fs,Nr.rangeRight=ps,Nr.rearg=za,Nr.reject=function(t,e){return(qa(t)?xe:pn)(t,Pa(oo(e,3)))},Nr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return qn(t,i),r},Nr.rest=function(t,e){if("function"!=typeof t)throw new Mt(o);return Zn(t,e=e===i?e:pu(e))},Nr.reverse=ta,Nr.sampleSize=function(t,e,r){return e=(r?vo(t,e,r):e===i)?1:pu(e),(qa(t)?Kr:Kn)(t,e)},Nr.set=function(t,e,r){return null==t?t:$n(t,e,r)},Nr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:$n(t,e,r,n)},Nr.shuffle=function(t){return(qa(t)?$r:Jn)(t)},Nr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&vo(t,e,r)?(e=0,r=n):(e=null==e?0:pu(e),r=r===i?n:pu(r)),ti(t,e,r)):[]},Nr.sortBy=La,Nr.sortedUniq=function(t){return t&&t.length?ii(t):[]},Nr.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Nr.split=function(t,e,r){return r&&"number"!=typeof r&&vo(t,e,r)&&(e=r=i),(r=r===i?f:r>>>0)?(t=mu(t))&&("string"==typeof e||null!=e&&!ou(e))&&!(e=ai(e))&&Xe(t)?mi(ir(t),0,r):t.split(e,r):[]},Nr.spread=function(t,e){if("function"!=typeof t)throw new Mt(o);return e=null==e?0:gr(pu(e),0),Zn((function(r){var n=r[e],i=mi(r,0,e);return n&&ke(i,n),ve(t,this,i)}))},Nr.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Nr.take=function(t,e,r){return t&&t.length?ti(t,0,(e=r||e===i?1:pu(e))<0?0:e):[]},Nr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=n-(e=r||e===i?1:pu(e)))<0?0:e,n):[]},Nr.takeRightWhile=function(t,e){return t&&t.length?hi(t,oo(e,3),!1,!0):[]},Nr.takeWhile=function(t,e){return t&&t.length?hi(t,oo(e,3)):[]},Nr.tap=function(t,e){return e(t),t},Nr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Mt(o);return tu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Fa(t,e,{leading:n,maxWait:e,trailing:i})},Nr.thru=fa,Nr.toArray=du,Nr.toPairs=ju,Nr.toPairsIn=zu,Nr.toPath=function(t){return qa(t)?Le(t,No):su(t)?[t]:ki(Ro(mu(t)))},Nr.toPlainObject=vu,Nr.transform=function(t,e,r){var n=qa(t),i=n||Va(t)||cu(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:tu(t)&&Xa(o)?jr(Vt(t)):{}}return(i?be:mn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Nr.unary=function(t){return Sa(t,1)},Nr.union=ea,Nr.unionBy=ra,Nr.unionWith=na,Nr.uniq=function(t){return t&&t.length?ui(t):[]},Nr.uniqBy=function(t,e){return t&&t.length?ui(t,oo(e,2)):[]},Nr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Nr.unset=function(t,e){return null==t||si(t,e)},Nr.unzip=ia,Nr.unzipWith=oa,Nr.update=function(t,e,r){return null==t?t:ci(t,e,gi(r))},Nr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ci(t,e,gi(r),n)},Nr.values=Uu,Nr.valuesIn=function(t){return null==t?[]:We(t,Ou(t))},Nr.without=aa,Nr.words=Xu,Nr.wrap=function(t,e){return Na(gi(e),t)},Nr.xor=ua,Nr.xorBy=sa,Nr.xorWith=ca,Nr.zip=ha,Nr.zipObject=function(t,e){return fi(t||[],e||[],Qr)},Nr.zipObjectDeep=function(t,e){return fi(t||[],e||[],$n)},Nr.zipWith=la,Nr.entries=ju,Nr.entriesIn=zu,Nr.extend=wu,Nr.extendWith=_u,us(Nr,Nr),Nr.add=ms,Nr.attempt=Qu,Nr.camelCase=Iu,Nr.capitalize=Bu,Nr.ceil=bs,Nr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=yu(r))==r?r:0),e!==i&&(e=(e=yu(e))==e?e:0),on(yu(t),e,r)},Nr.clone=function(t){return an(t,4)},Nr.cloneDeep=function(t){return an(t,5)},Nr.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:i)},Nr.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:i)},Nr.conformsTo=function(t,e){return null==e||un(t,e,Fu(e))},Nr.deburr=Wu,Nr.defaultTo=function(t,e){return null==t||t!=t?e:t},Nr.divide=ws,Nr.endsWith=function(t,e,r){t=mu(t),e=ai(e);var n=t.length,o=r=r===i?n:on(pu(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Nr.eq=Ua,Nr.escape=function(t){return(t=mu(t))&&V.test(t)?t.replace(Y,Ke):t},Nr.escapeRegExp=function(t){return(t=mu(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Nr.every=function(t,e,r){var n=qa(t)?_e:dn;return r&&vo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.find=ya,Nr.findIndex=Wo,Nr.findKey=function(t,e){return Fe(t,oo(e,3),mn)},Nr.findLast=va,Nr.findLastIndex=qo,Nr.findLastKey=function(t,e){return Fe(t,oo(e,3),bn)},Nr.floor=_s,Nr.forEach=ma,Nr.forEachRight=ba,Nr.forIn=function(t,e){return null==t?t:yn(t,oo(e,3),Ou)},Nr.forInRight=function(t,e){return null==t?t:vn(t,oo(e,3),Ou)},Nr.forOwn=function(t,e){return t&&mn(t,oo(e,3))},Nr.forOwnRight=function(t,e){return t&&bn(t,oo(e,3))},Nr.get=ku,Nr.gt=Ia,Nr.gte=Ba,Nr.has=function(t,e){return null!=t&&fo(t,e,Ln)},Nr.hasIn=Su,Nr.head=Yo,Nr.identity=ns,Nr.includes=function(t,e,r,n){t=Ya(t)?t:Uu(t),r=r&&!n?pu(r):0;var i=t.length;return r<0&&(r=gr(i+r,0)),uu(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Te(t,e,r)>-1},Nr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pu(r);return i<0&&(i=gr(n+i,0)),Te(t,e,i)},Nr.inRange=function(t,e,r){return e=fu(e),r===i?(r=e,e=0):r=fu(r),function(t,e,r){return t>=yr(e,r)&&t<gr(e,r)}(t=yu(t),e,r)},Nr.invoke=Du,Nr.isArguments=Wa,Nr.isArray=qa,Nr.isArrayBuffer=Ha,Nr.isArrayLike=Ya,Nr.isArrayLikeObject=Za,Nr.isBoolean=function(t){return!0===t||!1===t||eu(t)&&En(t)==v},Nr.isBuffer=Va,Nr.isDate=Ka,Nr.isElement=function(t){return eu(t)&&1===t.nodeType&&!iu(t)},Nr.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(qa(t)||"string"==typeof t||"function"==typeof t.splice||Va(t)||cu(t)||Wa(t)))return!t.length;var e=lo(t);if(e==x||e==S)return!t.size;if(_o(t))return!Gn(t).length;for(var r in t)if(Gt.call(t,r))return!1;return!0},Nr.isEqual=function(t,e){return Dn(t,e)},Nr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Dn(t,e,i,r):!!n},Nr.isError=$a,Nr.isFinite=function(t){return"number"==typeof t&&dr(t)},Nr.isFunction=Xa,Nr.isInteger=Qa,Nr.isLength=Ja,Nr.isMap=ru,Nr.isMatch=function(t,e){return t===e||Fn(t,e,uo(e))},Nr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Fn(t,e,uo(e),r)},Nr.isNaN=function(t){return nu(t)&&t!=+t},Nr.isNative=function(t){if(wo(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return On(t)},Nr.isNil=function(t){return null==t},Nr.isNull=function(t){return null===t},Nr.isNumber=nu,Nr.isObject=tu,Nr.isObjectLike=eu,Nr.isPlainObject=iu,Nr.isRegExp=ou,Nr.isSafeInteger=function(t){return Qa(t)&&t>=-9007199254740991&&t<=l},Nr.isSet=au,Nr.isString=uu,Nr.isSymbol=su,Nr.isTypedArray=cu,Nr.isUndefined=function(t){return t===i},Nr.isWeakMap=function(t){return eu(t)&&lo(t)==D},Nr.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==En(t)},Nr.join=function(t,e){return null==t?"":fr.call(t,e)},Nr.kebabCase=qu,Nr.last=$o,Nr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=pu(r))<0?gr(n+o,0):yr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Oe(t,Pe,o,!0)},Nr.lowerCase=Hu,Nr.lowerFirst=Yu,Nr.lt=hu,Nr.lte=lu,Nr.max=function(t){return t&&t.length?fn(t,ns,An):i},Nr.maxBy=function(t,e){return t&&t.length?fn(t,oo(e,2),An):i},Nr.mean=function(t){return Re(t,ns)},Nr.meanBy=function(t,e){return Re(t,oo(e,2))},Nr.min=function(t){return t&&t.length?fn(t,ns,Pn):i},Nr.minBy=function(t,e){return t&&t.length?fn(t,oo(e,2),Pn):i},Nr.stubArray=gs,Nr.stubFalse=ys,Nr.stubObject=function(){return{}},Nr.stubString=function(){return""},Nr.stubTrue=function(){return!0},Nr.multiply=xs,Nr.nth=function(t,e){return t&&t.length?Un(t,pu(e)):i},Nr.noConflict=function(){return oe._===this&&(oe._=zt),this},Nr.noop=ss,Nr.now=ka,Nr.pad=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Ii(cr(i),r)+t+Ii(sr(i),r)},Nr.padEnd=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?t+Ii(e-n,r):t},Nr.padStart=function(t,e,r){t=mu(t);var n=(e=pu(e))?nr(t):0;return e&&n<e?Ii(e-n,r)+t:t},Nr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),mr(mu(t).replace(it,""),e||0)},Nr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&vo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=fu(t),e===i?(e=t,t=0):e=fu(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=br();return yr(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return Hn(t,e)},Nr.reduce=function(t,e,r){var n=qa(t)?Se:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,hn)},Nr.reduceRight=function(t,e,r){var n=qa(t)?Me:ze,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},Nr.repeat=function(t,e,r){return e=(r?vo(t,e,r):e===i)?1:pu(e),Yn(mu(t),e)},Nr.replace=function(){var t=arguments,e=mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nr.result=function(t,e,r){var n=-1,o=(e=yi(e,t)).length;for(o||(o=1,t=i);++n<o;){var a=null==t?i:t[No(e[n])];a===i&&(n=o,a=r),t=Xa(a)?a.call(t):a}return t},Nr.round=Es,Nr.runInContext=t,Nr.sample=function(t){return(qa(t)?Vr:Vn)(t)},Nr.size=function(t){if(null==t)return 0;if(Ya(t))return uu(t)?nr(t):t.length;var e=lo(t);return e==x||e==S?t.size:Gn(t).length},Nr.snakeCase=Zu,Nr.some=function(t,e,r){var n=qa(t)?Ce:ei;return r&&vo(t,e,r)&&(e=i),n(t,oo(e,3))},Nr.sortedIndex=function(t,e){return ri(t,e)},Nr.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},Nr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&Ua(t[n],e))return n}return-1},Nr.sortedLastIndex=function(t,e){return ri(t,e,!0)},Nr.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},Nr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(Ua(t[r],e))return r}return-1},Nr.startCase=Vu,Nr.startsWith=function(t,e,r){return t=mu(t),r=null==r?0:on(pu(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},Nr.subtract=As,Nr.sum=function(t){return t&&t.length?Ue(t,ns):0},Nr.sumBy=function(t,e){return t&&t.length?Ue(t,oo(e,2)):0},Nr.template=function(t,e,r){var n=Nr.templateSettings;r&&vo(t,e,r)&&(e=i),t=mu(t),e=_u({},e,n,Ki);var o,a,u=_u({},e.imports,n.imports,Ki),s=Fu(u),c=We(u,s),h=0,l=e.interpolate||bt,d="__p += '",f=kt((e.escape||bt).source+"|"+l.source+"|"+(l===X?lt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Gt.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Xt+"]")+"\n";t.replace(f,(function(e,r,n,i,u,s){return n||(n=i),d+=t.slice(h,s).replace(wt,$e),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=s+e.length,e})),d+="';\n";var g=Gt.call(e,"variable")&&e.variable;g||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(B,""):d).replace(W,"$1").replace(q,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Qu((function(){return Et(s,p+"return "+d).apply(i,c)}));if(y.source=d,$a(y))throw y;return y},Nr.times=function(t,e){if((t=pu(t))<1||t>l)return[];var r=f,n=yr(t,f);e=oo(e),t-=f;for(var i=Ie(n,e);++r<t;)e(r);return i},Nr.toFinite=fu,Nr.toInteger=pu,Nr.toLength=gu,Nr.toLower=function(t){return mu(t).toLowerCase()},Nr.toNumber=yu,Nr.toSafeInteger=function(t){return t?on(pu(t),-9007199254740991,l):0===t?t:0},Nr.toString=mu,Nr.toUpper=function(t){return mu(t).toUpperCase()},Nr.trim=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ai(e)))return t;var n=ir(t),o=ir(e);return mi(n,He(n,o),Ye(n,o)+1).join("")},Nr.trimEnd=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(ot,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,0,Ye(n,ir(e))+1).join("")},Nr.trimStart=function(t,e,r){if((t=mu(t))&&(r||e===i))return t.replace(it,"");if(!t||!(e=ai(e)))return t;var n=ir(t);return mi(n,He(n,ir(e))).join("")},Nr.truncate=function(t,e){var r=30,n="...";if(tu(e)){var o="separator"in e?e.separator:o;r="length"in e?pu(e.length):r,n="omission"in e?ai(e.omission):n}var a=(t=mu(t)).length;if(Xe(t)){var u=ir(t);a=u.length}if(r>=a)return t;var s=r-nr(n);if(s<1)return n;var c=u?mi(u,0,s).join(""):t.slice(0,s);if(o===i)return c+n;if(u&&(s+=c.length-s),ou(o)){if(t.slice(s).search(o)){var h,l=c;for(o.global||(o=kt(o.source,mu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var d=h.index;c=c.slice(0,d===i?s:d)}}else if(t.indexOf(ai(o),s)!=s){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+n},Nr.unescape=function(t){return(t=mu(t))&&Z.test(t)?t.replace(H,or):t},Nr.uniqueId=function(t){var e=++Pt;return mu(t)+e},Nr.upperCase=Ku,Nr.upperFirst=$u,Nr.each=ma,Nr.eachRight=ba,Nr.first=Yo,us(Nr,(vs={},mn(Nr,(function(t,e){Gt.call(Nr.prototype,e)||(vs[e]=t)})),vs),{chain:!1}),Nr.VERSION="4.17.15",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nr[t].placeholder=Nr})),be(["drop","take"],(function(t,e){Ir.prototype[t]=function(r){r=r===i?1:gr(pu(r),0);var n=this.__filtered__&&!e?new Ir(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,f),type:t+(n.__dir__<0?"Right":"")}),n},Ir.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Ir.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),be(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Ir.prototype[t]=function(){return this[r](1).value()[0]}})),be(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Ir.prototype[t]=function(){return this.__filtered__?new Ir(this):this[r](1)}})),Ir.prototype.compact=function(){return this.filter(ns)},Ir.prototype.find=function(t){return this.filter(t).head()},Ir.prototype.findLast=function(t){return this.reverse().find(t)},Ir.prototype.invokeMap=Zn((function(t,e){return"function"==typeof t?new Ir(this):this.map((function(r){return Mn(r,t,e)}))})),Ir.prototype.reject=function(t){return this.filter(Pa(oo(t)))},Ir.prototype.slice=function(t,e){t=pu(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ir(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=pu(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ir.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ir.prototype.toArray=function(){return this.take(f)},mn(Ir.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Nr[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);o&&(Nr.prototype[e]=function(){var e=this.__wrapped__,u=n?[1]:arguments,s=e instanceof Ir,c=u[0],h=s||qa(e),l=function(t){var e=o.apply(Nr,ke([t],u));return n&&d?e[0]:e};h&&r&&"function"==typeof c&&1!=c.length&&(s=h=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=s&&!f;if(!a&&h){e=g?e:new Ir(this);var y=t.apply(e,u);return y.__actions__.push({func:fa,args:[l],thisArg:i}),new Ur(y,d)}return p&&g?t.apply(this,u):(y=this.thru(l),p?n?y.value()[0]:y.value():y)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Nr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[r]((function(r){return e.apply(qa(r)?r:[],t)}))}})),mn(Ir.prototype,(function(t,e){var r=Nr[e];if(r){var n=r.name+"";Gt.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:e,func:r})}})),Mr[Ni(i,2).name]=[{name:"wrapper",func:i}],Ir.prototype.clone=function(){var t=new Ir(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Ir.prototype.reverse=function(){if(this.__filtered__){var t=new Ir(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ir.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=qa(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=yr(e,t+a);break;case"takeRight":t=gr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=n?u:a-1,h=this.__iteratees__,l=h.length,d=0,f=yr(s,this.__takeCount__);if(!r||!n&&i==s&&f==s)return li(t,this.__actions__);var p=[];t:for(;s--&&d<f;){for(var g=-1,y=t[c+=e];++g<l;){var v=h[g],m=v.iteratee,b=v.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}p[d++]=y}return p},Nr.prototype.at=pa,Nr.prototype.chain=function(){return da(this)},Nr.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},Nr.prototype.next=function(){this.__values__===i&&(this.__values__=du(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nr.prototype.plant=function(t){for(var e,r=this;r instanceof zr;){var n=zo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Nr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ir){var e=t;return this.__actions__.length&&(e=new Ir(this)),(e=e.reverse()).__actions__.push({func:fa,args:[ta],thisArg:i}),new Ur(e,this.__chain__)}return this.thru(ta)},Nr.prototype.toJSON=Nr.prototype.valueOf=Nr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Nr.prototype.first=Nr.prototype.head,ue&&(Nr.prototype[ue]=function(){return this}),Nr}();oe._=ar,(n=function(){return ar}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},64231:(t,e,r)=>{var n=r(32528),i=r(50535),o=r(3535),a=i.DEFAULT_COMPARATOR,u=i.reverseComparator;function s(t,e,r,n){for(var i,o,a=e[n];n>r&&t(a,o=e[i=n-1>>1])<0;)e[n]=o,n=i;e[n]=a}function c(t,e,r){for(var n,i=e.length,o=r,a=e[r],u=2*r+1;u<i;)(n=u+1)<i&&t(e[u],e[n])>=0&&(u=n),e[r]=e[u],u=2*(r=u)+1;e[r]=a,s(t,e,o,r)}function h(t,e,r){e.push(r),s(t,e,0,e.length-1)}function l(t,e){var r=e.pop();if(0!==e.length){var n=e[0];return e[0]=r,c(t,e,0),n}return r}function d(t,e,r){if(0===e.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var n=e[0];return e[0]=r,c(t,e,0),n}function f(t,e,r){var n;return 0!==e.length&&t(e[0],r)<0&&(n=e[0],e[0]=r,r=n,c(t,e,0)),r}function p(t,e){for(var r=e.length>>1;--r>=0;)c(t,e,r)}function g(t,e){for(var r=e.length,n=0,i=new Array(r);n<r;)i[n++]=l(t,e);return i}function y(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function v(t){if(this.clear(),this.comparator=t||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=u(this.comparator)}y.prototype.clear=function(){this.items=[],this.size=0},y.prototype.push=function(t){return h(this.comparator,this.items,t),++this.size},y.prototype.peek=function(){return this.items[0]},y.prototype.pop=function(){return 0!==this.size&&this.size--,l(this.comparator,this.items)},y.prototype.replace=function(t){return d(this.comparator,this.items,t)},y.prototype.pushpop=function(t){return f(this.comparator,this.items,t)},y.prototype.consume=function(){return this.size=0,g(this.comparator,this.items)},y.prototype.toArray=function(){return g(this.comparator,this.items.slice())},y.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:y,enumerable:!1}),t},"undefined"!=typeof Symbol&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),v.prototype=y.prototype,y.from=function(t,e){var r,n=new y(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},v.from=function(t,e){var r,n=new v(e);return r=o.isArrayLike(t)?t.slice():o.toArray(t),p(n.comparator,r),n.items=r,n.size=r.length,n},y.siftUp=c,y.siftDown=s,y.push=h,y.pop=l,y.replace=d,y.pushpop=f,y.heapify=p,y.consume=g,y.nsmallest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===1/0||t(c,f)<0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===1/0||t(e,f)<0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(t);for(h=r.slice(0,e),p(l,h),i=e,s=r.length;i<s;i++)l(r[i],h[0])>0&&d(l,h,r[i]);return h.sort(t)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(t){i<e?h[i]=t:(i===e&&p(l,h),l(t,h[0])>0&&d(l,h,t)),i++})),h.length>i&&(h.length=i),h.sort(t)},y.nlargest=function(t,e,r){2===arguments.length&&(r=e,e=t,t=a);var i,s,c,h,l=u(t),f=-1/0;if(1===e){if(o.isArrayLike(r)){for(i=0,s=r.length;i<s;i++)c=r[i],(f===-1/0||t(c,f)>0)&&(f=c);return(h=new r.constructor(1))[0]=f,h}return n(r,(function(e){(f===-1/0||t(e,f)>0)&&(f=e)})),[f]}if(o.isArrayLike(r)){if(e>=r.length)return r.slice().sort(l);for(h=r.slice(0,e),p(t,h),i=e,s=r.length;i<s;i++)t(r[i],h[0])>0&&d(t,h,r[i]);return h.sort(l)}var g=o.guessLength(r);return null!==g&&g<e&&(e=g),h=new Array(e),i=0,n(r,(function(r){i<e?h[i]=r:(i===e&&p(t,h),t(r,h[0])>0&&d(t,h,r)),i++})),h.length>i&&(h.length=i),h.sort(l)},y.MinHeap=y,y.MaxHeap=v,t.exports=y},4034:(t,e,r)=>{var n=r(68298),i=r(32528);function o(){this.clear()}o.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},o.prototype.enqueue=function(t){return this.items.push(t),++this.size},o.prototype.dequeue=function(){if(this.size){var t=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,t}},o.prototype.peek=function(){if(this.size)return this.items[this.offset]},o.prototype.forEach=function(t,e){e=arguments.length>1?e:this;for(var r=this.offset,n=0,i=this.items.length;r<i;r++,n++)t.call(e,this.items[r],n,this)},o.prototype.toArray=function(){return this.items.slice(this.offset)},o.prototype.values=function(){var t=this.items,e=this.offset;return new n((function(){if(e>=t.length)return{done:!0};var r=t[e];return e++,{value:r,done:!1}}))},o.prototype.entries=function(){var t=this.items,e=this.offset,r=0;return new n((function(){if(e>=t.length)return{done:!0};var n=t[e];return e++,{value:[r++,n],done:!1}}))},"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.toString=function(){return this.toArray().join(",")},o.prototype.toJSON=function(){return this.toArray()},o.prototype.inspect=function(){var t=this.toArray();return Object.defineProperty(t,"constructor",{value:o,enumerable:!1}),t},"undefined"!=typeof Symbol&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect),o.from=function(t){var e=new o;return i(t,(function(t){e.enqueue(t)})),e},o.of=function(){return o.from(arguments)},t.exports=o},50535:(t,e)=>{e.DEFAULT_COMPARATOR=function(t,e){return t<e?-1:t>e?1:0},e.DEFAULT_REVERSE_COMPARATOR=function(t,e){return t<e?1:t>e?-1:0},e.reverseComparator=function(t){return function(e,r){return t(r,e)}},e.createTupleComparator=function(t){return 2===t?function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:t[1]<e[1]?-1:t[1]>e[1]?1:0}:function(e,r){for(var n=0;n<t;){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1;n++}return 0}}},3535:(t,e,r)=>{var n=r(32528),i=r(6023);function o(t){return"number"==typeof t.length?t.length:"number"==typeof t.size?t.size:void 0}e.isArrayLike=function(t){return Array.isArray(t)||i.isTypedArray(t)},e.guessLength=o,e.toArray=function(t){var e=o(t),r="number"==typeof e?new Array(e):[],i=0;return n(t,(function(t){r[i++]=t})),r},e.toArrayWithIndices=function(t){var e=o(t),r="number"==typeof e?i.getPointerArray(e):Array,a="number"==typeof e?new Array(e):[],u="number"==typeof e?new r(e):[],s=0;return n(t,(function(t){a[s]=t,u[s]=s++})),[a,u]}},6023:(t,e)=>{var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,i=Math.pow(2,32)-1,o=Math.pow(2,7)-1,a=Math.pow(2,15)-1,u=Math.pow(2,31)-1;e.getPointerArray=function(t){var e=t-1;if(e<=r)return Uint8Array;if(e<=n)return Uint16Array;if(e<=i)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(t){var e=t-1;return e<=o?Int8Array:e<=a?Int16Array:e<=u?Int32Array:Float64Array},e.getNumberType=function(t){return t===(0|t)?-1===Math.sign(t)?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,r){var n,i,o,a,u,c=null,h=0;for(a=0,u=t.length;a<u;a++)o=r?r(t[a]):t[a],i=e.getNumberType(o),(n=s[i.name])>h&&(h=n,c=i);return c},e.isTypedArray=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(t)},e.concat=function(){var t,e,r,n=0;for(t=0,r=arguments.length;t<r;t++)n+=arguments[t].length;var i=new arguments[0].constructor(n);for(t=0,e=0;t<r;t++)i.set(arguments[t],e),e+=arguments[t].length;return i},e.indices=function(t){for(var r=new(e.getPointerArray(t))(t),n=0;n<t;n++)r[n]=n;return r}},32528:(t,e,r)=>{var n=r(24529),i=n.ARRAY_BUFFER_SUPPORT,o=n.SYMBOL_SUPPORT;t.exports=function(t,e){var r,n,a,u,s;if(!t)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof e)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(t)||i&&ArrayBuffer.isView(t)||"string"==typeof t||"[object Arguments]"===t.toString())for(a=0,u=t.length;a<u;a++)e(t[a],a);else if("function"!=typeof t.forEach)if(o&&Symbol.iterator in t&&"function"!=typeof t.next&&(t=t[Symbol.iterator]()),"function"!=typeof t.next)for(n in t)t.hasOwnProperty(n)&&e(t[n],n);else for(r=t,a=0;!0!==(s=r.next()).done;)e(s.value,a),a++;else t.forEach(e)}},68298:t=>{function e(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,r=t.length,n=0;return new e((function(){return n>=r?{done:!0}:{done:!1,value:t[n++]}}))},e.empty=function(){return new e((function(){return{done:!0}}))},e.fromSequence=function(t){var r=0,n=t.length;return new e((function(){return r>=n?{done:!0}:{done:!1,value:t[r++]}}))},e.is=function(t){return t instanceof e||"object"==typeof t&&null!==t&&"function"==typeof t.next},t.exports=e},24529:(t,e)=>{e.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,e.SYMBOL_SUPPORT="undefined"!=typeof Symbol},94835:t=>{function e(t){return function(e,r){return e+Math.floor(t()*(r-e+1))}}var r=e(Math.random);r.createRandom=e,t.exports=r},64341:(t,e,r)=>{var n=r(94835).createRandom;function i(t){var e=n(t);return function(t){for(var r=t.length,n=r-1,i=-1;++i<r;){var o=e(i,n),a=t[o];t[o]=t[i],t[i]=a}}}var o=i(Math.random);o.createShuffleInPlace=i,t.exports=o},31250:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(31181),u=o(r(2383)),s=r(88586),c=r(30432),h=1.5,l=function(t){function e(){var e=t.call(this)||this;return e.x=.5,e.y=.5,e.angle=0,e.ratio=1,e.minRatio=null,e.maxRatio=null,e.nextFrame=null,e.previousState=null,e.enabled=!0,e.previousState=e.getState(),e}return i(e,t),e.from=function(t){return(new e).setState(t)},e.prototype.enable=function(){return this.enabled=!0,this},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},e.prototype.hasState=function(t){return this.x===t.x&&this.y===t.y&&this.ratio===t.ratio&&this.angle===t.angle},e.prototype.getPreviousState=function(){var t=this.previousState;return t?{x:t.x,y:t.y,angle:t.angle,ratio:t.ratio}:null},e.prototype.getBoundedRatio=function(t){var e=t;return"number"==typeof this.minRatio&&(e=Math.max(e,this.minRatio)),"number"==typeof this.maxRatio&&(e=Math.min(e,this.maxRatio)),e},e.prototype.validateState=function(t){var e={};return"number"==typeof t.x&&(e.x=t.x),"number"==typeof t.y&&(e.y=t.y),"number"==typeof t.angle&&(e.angle=t.angle),"number"==typeof t.ratio&&(e.ratio=this.getBoundedRatio(t.ratio)),e},e.prototype.isAnimated=function(){return!!this.nextFrame},e.prototype.setState=function(t){if(!this.enabled)return this;this.previousState=this.getState();var e=this.validateState(t);return"number"==typeof e.x&&(this.x=e.x),"number"==typeof e.y&&(this.y=e.y),"number"==typeof e.angle&&(this.angle=e.angle),"number"==typeof e.ratio&&(this.ratio=e.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},e.prototype.animate=function(t,e,r){var n=this;if(this.enabled){var i=Object.assign({},a.ANIMATE_DEFAULTS,e),o=this.validateState(t),c="function"==typeof i.easing?i.easing:u.default[i.easing],h=Date.now(),l=this.getState(),d=function(){var t=(Date.now()-h)/i.duration;if(t>=1)return n.nextFrame=null,n.setState(o),void(n.animationCallback&&(n.animationCallback.call(null),n.animationCallback=void 0));var e=c(t),r={};"number"==typeof o.x&&(r.x=l.x+(o.x-l.x)*e),"number"==typeof o.y&&(r.y=l.y+(o.y-l.y)*e),"number"==typeof o.angle&&(r.angle=l.angle+(o.angle-l.angle)*e),"number"==typeof o.ratio&&(r.ratio=l.ratio+(o.ratio-l.ratio)*e),n.setState(r),n.nextFrame=(0,s.requestFrame)(d)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(d)):d(),this.animationCallback=r}},e.prototype.animatedZoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio/t});this.animate({ratio:this.ratio/(t.factor||h)},t)}else this.animate({ratio:this.ratio/h})},e.prototype.animatedUnzoom=function(t){if(t){if("number"==typeof t)return this.animate({ratio:this.ratio*t});this.animate({ratio:this.ratio*(t.factor||h)},t)}else this.animate({ratio:this.ratio*h})},e.prototype.animatedReset=function(t){this.animate({x:.5,y:.5,ratio:1,angle:0},t)},e.prototype.copy=function(){return e.from(this.getState())},e}(c.TypedEventEmitter);e.default=l},48231:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getWheelDelta=e.getTouchCoords=e.getTouchesArray=e.getWheelCoords=e.getMouseCoords=e.getPosition=void 0;var a=r(30432);function u(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function s(t,e){return o(o({},u(t,e)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){this.sigmaDefaultPrevented=!0},original:t})}function c(t){for(var e=[],r=0,n=Math.min(t.length,2);r<n;r++)e.push(t[r]);return e}function h(t){if(void 0!==t.deltaY)return-3*t.deltaY/360;if(void 0!==t.detail)return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}e.getPosition=u,e.getMouseCoords=s,e.getWheelCoords=function(t,e){return o(o({},s(t,e)),{delta:h(t)})},e.getTouchesArray=c,e.getTouchCoords=function(t,e){return{touches:c(t.touches).map((function(t){return u(t,e)})),original:t}},e.getWheelDelta=h;var l=function(t){function e(e,r){var n=t.call(this)||this;return n.container=e,n.renderer=r,n}return i(e,t),e}(a.TypedEventEmitter);e.default=l},73834:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(48231)),c=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.draggedEvents=0,n.downStartTime=null,n.lastMouseX=null,n.lastMouseY=null,n.isMouseDown=!1,n.isMoving=!1,n.movingTimeout=null,n.startCameraState=null,n.clicks=0,n.doubleClickTimeout=null,n.currentWheelDirection=0,n.handleClick=n.handleClick.bind(n),n.handleRightClick=n.handleRightClick.bind(n),n.handleDown=n.handleDown.bind(n),n.handleUp=n.handleUp.bind(n),n.handleMove=n.handleMove.bind(n),n.handleWheel=n.handleWheel.bind(n),n.handleOut=n.handleOut.bind(n),e.addEventListener("click",n.handleClick,!1),e.addEventListener("contextmenu",n.handleRightClick,!1),e.addEventListener("mousedown",n.handleDown,!1),e.addEventListener("wheel",n.handleWheel,!1),e.addEventListener("mouseout",n.handleOut,!1),document.addEventListener("mousemove",n.handleMove,!1),document.addEventListener("mouseup",n.handleUp,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("click",this.handleClick),t.removeEventListener("contextmenu",this.handleRightClick),t.removeEventListener("mousedown",this.handleDown),t.removeEventListener("wheel",this.handleWheel),t.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},e.prototype.handleClick=function(t){var e=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"==typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(t);setTimeout((function(){e.clicks=0,e.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleRightClick=function(t){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(t,this.container))},e.prototype.handleDoubleClick=function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e=(0,s.getMouseCoords)(t,this.container);if(this.emit("doubleClick",e),!e.sigmaDefaultPrevented){var r=this.renderer.getCamera(),n=r.getBoundedRatio(r.getState().ratio/2.2);r.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),n),{easing:"quadraticInOut",duration:200})}}},e.prototype.handleDown=function(t){if(this.enabled){this.startCameraState=this.renderer.getCamera().getState();var e=(0,s.getPosition)(t,this.container),r=e.x,n=e.y;this.lastMouseX=r,this.lastMouseY=n,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0,this.emit("mousedown",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleUp=function(t){var e=this;if(this.enabled&&this.isMouseDown){var r=this.renderer.getCamera();this.isMouseDown=!1,"number"==typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var n=(0,s.getPosition)(t,this.container),i=n.x,o=n.y,a=r.getState(),u=r.getPreviousState()||{x:0,y:0};this.isMoving?r.animate({x:a.x+3*(a.x-u.x),y:a.y+3*(a.y-u.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===i&&this.lastMouseY===o||r.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){e.draggedEvents=0,e.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e=this;if(this.enabled){var r=(0,s.getMouseCoords)(t,this.container);if(this.emit("mousemovebody",r),t.target===this.container&&this.emit("mousemove",r),!r.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"==typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){e.movingTimeout=null,e.isMoving=!1}),100);var n=this.renderer.getCamera(),i=(0,s.getPosition)(t,this.container),o=i.x,a=i.y,u=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:o,y:a}),h=u.x-c.x,l=u.y-c.y,d=n.getState(),f=d.x+h,p=d.y+l;n.setState({x:f,y:p}),this.lastMouseX=o,this.lastMouseY=a,t.preventDefault(),t.stopPropagation()}}},e.prototype.handleWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),t.stopPropagation();var r=(0,s.getWheelDelta)(t);if(r){var n=(0,s.getWheelCoords)(t,this.container);if(this.emit("wheel",n),!n.sigmaDefaultPrevented){var i=r>0?1/1.7:1.7,o=this.renderer.getCamera(),a=o.getBoundedRatio(o.getState().ratio*i),u=r>0?1:-1,c=Date.now();this.currentWheelDirection===u&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTime<50||(o.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),a),{easing:"quadraticOut",duration:250},(function(){e.currentWheelDirection=0})),this.currentWheelDirection=u,this.lastWheelTriggerTime=c)}}}},e.prototype.handleOut=function(){},e}(s.default);e.default=c},40916:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return a(e,t),e},s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var c=u(r(48231)),h=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.isMoving=!1,n.touchMode=0,n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMove=n.handleMove.bind(n),e.addEventListener("touchstart",n.handleStart,!1),e.addEventListener("touchend",n.handleLeave,!1),e.addEventListener("touchcancel",n.handleLeave,!1),e.addEventListener("touchmove",n.handleMove,!1),n}return i(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("touchstart",this.handleStart),t.removeEventListener("touchend",this.handleLeave),t.removeEventListener("touchcancel",this.handleLeave),t.removeEventListener("touchmove",this.handleMove)},e.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},e.prototype.dispatchRelatedMouseEvent=function(t,e,r,n){var i=r||(0,c.getPosition)(e.touches[0],this.container),o=new MouseEvent(t,{clientX:i.x,clientY:i.y,altKey:e.altKey,ctrlKey:e.ctrlKey});(n||this.container).dispatchEvent(o)},e.prototype.handleStart=function(t){var e=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousedown",t);var r=(0,c.getTouchesArray)(t.touches);if(this.isMoving=!0,this.touchMode=r.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=r.map((function(t){return(0,c.getPosition)(t,e.container)})),this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var n=s(this.startTouchesPositions,2),i=n[0],o=i.x,a=i.y,u=n[1],h=u.x,l=u.y;this.startTouchesAngle=Math.atan2(l-a,h-o),this.startTouchesDistance=Math.sqrt(Math.pow(h-o,2)+Math.pow(l-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleLeave=function(t){if(this.enabled){switch(t.preventDefault(),0===t.touches.length&&this.lastTouchesPositions&&this.lastTouchesPositions.length&&(this.dispatchRelatedMouseEvent("mouseup",t,this.lastTouchesPositions[0],document),this.dispatchRelatedMouseEvent("click",t,this.lastTouchesPositions[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===t.touches.length){this.handleStart(t),t.preventDefault();break}case 1:if(this.isMoving){var e=this.renderer.getCamera(),r=e.getState(),n=e.getPreviousState()||{x:0,y:0};e.animate({x:r.x+3*(r.x-n.x),y:r.y+3*(r.y-n.y)},{duration:200,easing:"quadraticOut"})}this.isMoving=!1,this.touchMode=0}this.emit("touchup",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e,r=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousemove",t);var n=this.renderer.getCamera(),i=this.startCameraState,o=(0,c.getTouchesArray)(t.touches).map((function(t){return(0,c.getPosition)(t,r.container)}));switch(this.lastTouchesPositions=o,this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){r.isMoving=!1}),200),this.touchMode){case 1:var a=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=a.x,h=a.y,l=this.renderer.viewportToFramedGraph(o[0]),d=l.x,f=l.y;n.setState({x:i.x+u-d,y:i.y+h-f});break;case 2:var p={},g=o[0],y=g.x,v=g.y,m=o[1],b=m.x,w=m.y,_=Math.atan2(w-v,b-y)-this.startTouchesAngle,x=Math.hypot(w-v,b-y)/this.startTouchesDistance,E=n.getBoundedRatio(i.ratio/x);p.ratio=E,p.angle=i.angle+_;var A=this.getDimensions(),L=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:i}),k=Math.min(A.width,A.height),S=k/A.width,M=E/k;f=v-k/2/(k/A.height),d=(e=s([(d=y-k/2/S)*Math.cos(-p.angle)-f*Math.sin(-p.angle),f*Math.cos(-p.angle)+d*Math.sin(-p.angle)],2))[0],f=e[1],p.x=L.x-d*M,p.y=L.y+f*M,n.setState(p)}this.emit("touchmove",(0,c.getTouchCoords)(t,this.container))}},e}(c.default);e.default=h},2306:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edgeLabelsToDisplayFromNodes=e.LabelGrid=void 0;var r=function(){function t(t,e){this.key=t,this.size=e}return t.compare=function(t,e){return t.size>e.size?-1:t.size<e.size||t.key>e.key?1:-1},t}(),n=function(){function t(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return t.prototype.resizeAndClear=function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}},t.prototype.getIndex=function(t){var e=Math.floor(t.x/this.cellSize);return Math.floor(t.y/this.cellSize)*this.columns+e},t.prototype.add=function(t,e,n){var i=new r(t,e),o=this.getIndex(n),a=this.cells[o];a||(a=[],this.cells[o]=a),a.push(i)},t.prototype.organize=function(){for(var t in this.cells)this.cells[t].sort(r.compare)},t.prototype.getLabelsToDisplay=function(t,e){var r=this.cellSize*this.cellSize,n=r/t/t*e/r,i=Math.ceil(n),o=[];for(var a in this.cells)for(var u=this.cells[a],s=0;s<Math.min(i,u.length);s++)o.push(u[s].key);return o},t}();e.LabelGrid=n,e.edgeLabelsToDisplayFromNodes=function(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,o=[];return e.forEachEdge((function(t,e,a,u){(a===r||u===r||n.has(a)||n.has(u)||i.has(a)&&i.has(u))&&o.push(t)})),o}},39316:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rectangleCollidesWithQuad=e.squareCollidesWithQuad=e.getCircumscribedAlignedRectangle=e.isRectangleAligned=void 0;var a=o(r(8884)),u=!1;function s(t){return t.x1===t.x2||t.y1===t.y2}function c(t){var e=Math.sqrt(Math.pow(t.x2-t.x1,2)+Math.pow(t.y2-t.y1,2)),r=(t.y1-t.y2)*t.height/e,n=(t.x2-t.x1)*t.height/e,i={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},a={x:t.x1+r,y:t.y1+n},u={x:t.x2+r,y:t.y2+n},s=Math.min(i.x,o.x,a.x,u.x),c=Math.max(i.x,o.x,a.x,u.x),h=Math.min(i.y,o.y,a.y,u.y);return{x1:s,y1:h,x2:c,y2:h,height:Math.max(i.y,o.y,a.y,u.y)-h}}function h(t,e,r,n,i,o,a){return t<n+o&&t+r>n&&e<i+a&&e+r>i}function l(t,e,r,n,i,o,a,u){return t<i+a&&t+r>i&&e<o+u&&e+n>o}function d(t,e,r,n,i,o){var a=t<r+i/2;return e<n+o/2?a?1:2:a?3:4}e.isRectangleAligned=s,e.getCircumscribedAlignedRectangle=c,e.squareCollidesWithQuad=h,e.rectangleCollidesWithQuad=l;var f=function(){function t(t){var e;void 0===t&&(t={}),this.containers=((e={}).outside=[],e),this.cache=null,this.lastRectangle=null;var r=Math.pow(4,5);this.data=new Float32Array((4*r-1)/3*4),t.boundaries?this.resize(t.boundaries):this.resize({x:0,y:0,width:1,height:1})}return t.prototype.add=function(t,e,r,n){return function(t,e,r,n,i,o,a){for(var s=i-a,c=o-a,l=2*a,d=0,f=0;;){if(d>=5)return r[f]=r[f]||[],void r[f].push(n);var p=4*f+4,g=4*f+8,y=4*f+12,v=4*f+16,m=h(s,c,l,e[p+0],e[p+1],e[p+2],e[p+3]),b=h(s,c,l,e[g+0],e[g+1],e[g+2],e[g+3]),w=h(s,c,l,e[y+0],e[y+1],e[y+2],e[y+3]),_=h(s,c,l,e[v+0],e[v+1],e[v+2],e[v+3]),x=[m,b,w,_].reduce((function(t,e){return e?t+1:t}),0);if(0===x&&0===d)return r.outside.push(n),void(!u&&r.outside.length>=5&&(u=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===x)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(o,", size: ").concat(a,")."));if(3===x)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(d,", key: ").concat(n,", x: ").concat(i,", y: ").concat(o,", size: ").concat(a,")."));if(x>1)return r[f]=r[f]||[],void r[f].push(n);d++,m&&(f=p),b&&(f=g),w&&(f=y),_&&(f=v)}}(0,this.data,this.containers,t,e,r,n),this},t.prototype.resize=function(t){this.clear(),this.data[0]=t.x,this.data[1]=t.y,this.data[2]=t.width,this.data[3]=t.height,function(t,e){for(var r=[0,0];r.length;){var n=r.pop(),i=r.pop(),o=4*i+4,a=4*i+8,u=4*i+12,s=4*i+16,c=e[i+0],h=e[i+1],l=e[i+2]/2,d=e[i+3]/2;e[o+0]=c,e[o+1]=h,e[o+2]=l,e[o+3]=d,e[a+0]=c+l,e[a+1]=h,e[a+2]=l,e[a+3]=d,e[u+0]=c,e[u+1]=h+d,e[u+2]=l,e[u+3]=d,e[s+0]=c+l,e[s+1]=h+d,e[s+2]=l,e[s+3]=d,n<4&&(r.push(s,n+1),r.push(u,n+1),r.push(a,n+1),r.push(o,n+1))}}(0,this.data)},t.prototype.clear=function(){var t;return this.containers=((t={}).outside=[],t),this},t.prototype.point=function(t,e){var r=this.containers.outside,o=0,a=0;do{this.containers[o]&&r.push.apply(r,i([],n(this.containers[o]),!1)),o=4*o+4*d(t,e,this.data[o+0],this.data[o+1],this.data[o+2],this.data[o+3]),a++}while(a<=5);return r},t.prototype.rectangle=function(t,e,r,o,u){var h,d=this.lastRectangle;return d&&t===d.x1&&r===d.x2&&e===d.y1&&o===d.y2&&u===d.height||(this.lastRectangle={x1:t,y1:e,x2:r,y2:o,height:u},s(this.lastRectangle)||(this.lastRectangle=c(this.lastRectangle)),this.cache=function(t,e,r,n,i,o,u){for(var s,c=[0,0],h=[];c.length;){var d=c.pop(),f=c.pop();if((s=r[f])&&(0,a.default)(h,s),!(d>=5)){var p=4*f+4,g=4*f+8,y=4*f+12,v=4*f+16,m=l(n,i,o,u,e[p+0],e[p+1],e[p+2],e[p+3]),b=l(n,i,o,u,e[g+0],e[g+1],e[g+2],e[g+3]),w=l(n,i,o,u,e[y+0],e[y+1],e[y+2],e[y+3]),_=l(n,i,o,u,e[v+0],e[v+1],e[v+2],e[v+3]);m&&c.push(p,d+1),b&&c.push(g,d+1),w&&c.push(y,d+1),_&&c.push(v,d+1)}}return h}(0,this.data,this.containers,t,e,Math.abs(t-r)||Math.abs(e-o),u),(h=this.cache).push.apply(h,i([],n(this.containers.outside),!1))),this.cache},t}();e.default=f},49358:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Sigma=e.MouseCaptor=e.QuadTree=e.Camera=void 0;var i=n(r(38953));e.Sigma=i.default;var o=n(r(31250));e.Camera=o.default;var a=n(r(39316));e.QuadTree=a.default;var u=n(r(73834));e.MouseCaptor=u.default,e.default=i.default},30284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,u=i.edgeLabelWeight,s=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,c=e.label;if(c){t.fillStyle=s,t.font="".concat(u," ").concat(o,"px ").concat(a);var h,l,d=r.size,f=n.size,p=r.x,g=r.y,y=n.x,v=n.y,m=y-p,b=v-g,w=Math.sqrt(m*m+b*b);if(!(w<d+f)){h=((p+=m*d/w)+(y-=m*f/w))/2,l=((g+=b*d/w)+(v-=b*f/w))/2,m=y-p,b=v-g,w=Math.sqrt(m*m+b*b);var _,x=t.measureText(c).width;if(x>w){for(c+="…",x=t.measureText(c).width;x>w&&c.length>1;)c=c.slice(0,-2)+"…",x=t.measureText(c).width;if(c.length<4)return}_=m>0?b>0?Math.acos(m/w):Math.asin(b/w):b>0?Math.acos(m/w)+Math.PI:Math.asin(m/w)+Math.PI/2,t.save(),t.translate(h,l),t.rotate(_),t.fillText(c,-x/2,e.size/2+o),t.restore()}}}},64362:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(12193));e.default=function(t,e,r){var n=r.labelSize,o=r.labelFont,a=r.labelWeight;if(t.font="".concat(a," ").concat(n,"px ").concat(o),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000","string"==typeof e.label){var u=t.measureText(e.label).width,s=Math.round(u+5),c=Math.round(n+4),h=Math.max(e.size,n/2)+2,l=Math.asin(c/2/h),d=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(c/2,2)));t.beginPath(),t.moveTo(e.x+d,e.y+c/2),t.lineTo(e.x+h+s,e.y+c/2),t.lineTo(e.x+h+s,e.y-c/2),t.lineTo(e.x+d,e.y-c/2),t.arc(e.x,e.y,h,l,-l),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+2,0,2*Math.PI),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,(0,i.default)(t,e,r)}},12193:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,o=r.labelWeight,a=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=a,t.font="".concat(o," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}},64488:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createEdgeCompoundProgram=e.AbstractEdgeProgram=void 0;var o=function(t){function e(e,r,n,i,o){return t.call(this,e,r,n,i,o)||this}return i(e,t),e}(r(71549).AbstractProgram);e.AbstractEdgeProgram=o,e.createEdgeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.computeIndices=function(){this.programs.forEach((function(t){return t.computeIndices()}))},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r,n,i){this.programs.forEach((function(o){return o.process(t,e,r,n,i)}))},e}()}},23304:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.createNodeCompoundProgram=e.AbstractNodeProgram=void 0;var o=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i,o)||this;a.positionLocation=e.getAttribLocation(a.program,"a_position"),a.sizeLocation=e.getAttribLocation(a.program,"a_size"),a.colorLocation=e.getAttribLocation(a.program,"a_color");var u=e.getUniformLocation(a.program,"u_matrix");if(null===u)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=u;var s=e.getUniformLocation(a.program,"u_ratio");if(null===s)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=s;var c=e.getUniformLocation(a.program,"u_scale");if(null===c)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=c,a}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.sizeLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.sizeLocation,1,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},e}(r(71549).AbstractProgram);e.AbstractNodeProgram=o,e.createNodeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r){this.programs.forEach((function(n){return n.process(t,e,r)}))},e}()}},71549:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgram=void 0;var n=r(83451),i=function(){function t(t,e,r,i,o){this.array=new Float32Array,this.points=i,this.attributes=o,this.gl=t,this.vertexShaderSource=e,this.fragmentShaderSource=r;var a=t.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,t.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,n.loadVertexShader)(t,this.vertexShaderSource),this.fragmentShader=(0,n.loadFragmentShader)(t,this.fragmentShaderSource),this.program=(0,n.loadProgram)(t,[this.vertexShader,this.fragmentShader])}return t.prototype.bufferData=function(){var t=this.gl;t.bufferData(t.ARRAY_BUFFER,this.array,t.DYNAMIC_DRAW)},t.prototype.allocate=function(t){this.array=new Float32Array(this.points*this.attributes*t)},t.prototype.hasNothingToRender=function(){return 0===this.array.length},t}();e.AbstractProgram=i},65696:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(64488),o=n(r(23193)),a=n(r(83653)),u=(0,i.createEdgeCompoundProgram)([a.default,o.default]);e.default=u},23193:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(50577)),s=o(r(91604)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,3,9)||this;r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius"),r.barycentricLocation=e.getAttribLocation(r.program,"a_barycentric");var n=e.getUniformLocation(r.program,"u_matrix");if(null===n)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");r.matrixLocation=n;var i=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");r.sqrtZoomRatioLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return r.correctionRatioLocation=o,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.radiusLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.barycentricLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),t.vertexAttribPointer(this.barycentricLocation,3,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},e.prototype.computeIndices=function(){},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=27*i,u=o+27;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=e.size||1,h=t.x,l=t.y,d=e.x,f=e.y,p=(0,a.floatColor)(r.color),g=d-h,y=f-l,v=g*g+y*y,m=0,b=0;v&&(m=-y*(v=1/Math.sqrt(v))*s,b=g*v*s);var w=27*i,_=this.array;_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=1,_[w++]=0,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=1,_[w++]=0,_[w++]=d,_[w++]=f,_[w++]=-m,_[w++]=-b,_[w++]=c,_[w++]=p,_[w++]=0,_[w++]=0,_[w]=1}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawArrays(e.TRIANGLES,0,this.array.length/9)}},e}(r(64488).AbstractEdgeProgram);e.default=c},83653:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(64488),u=r(88586),s=o(r(83574)),c=o(r(73343)),h=function(t){function e(e){var r=t.call(this,e,s.default,c.default,4,6)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeClampedProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");r.sqrtZoomRatioLocation=o;var a=e.getUniformLocation(r.program,"u_correctionRatio");if(null===a)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return r.correctionRatioLocation=a,r.canUse32BitsIndices=(0,u.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.radiusLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=24*i,a=o+24;o<a;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=e.size||1,p=(0,u.floatColor)(r.color),g=l-c,y=d-h,v=g*g+y*y,m=0,b=0;v&&(m=-y*(v=1/Math.sqrt(v))*s,b=g*v*s);var w=24*i,_=this.array;_[w++]=c,_[w++]=h,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=0,_[w++]=c,_[w++]=h,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w++]=0,_[w++]=l,_[w++]=d,_[w++]=m,_[w++]=b,_[w++]=p,_[w++]=f,_[w++]=l,_[w++]=d,_[w++]=-m,_[w++]=-b,_[w++]=p,_[w]=-f}},e.prototype.computeIndices=function(){for(var t=this.array.length/6,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(a.AbstractEdgeProgram);e.default=h},46680:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(59843)),s=o(r(73343)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,4,5)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeProgram: error while creating indicesBuffer");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeProgram: error while getting correctionRatioLocation");r.correctionRatioLocation=o;var c=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===c)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return r.sqrtZoomRatioLocation=c,r.canUse32BitsIndices=(0,a.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return i(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},e.prototype.computeIndices=function(){for(var t=this.array.length/5,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=20*i,u=o+20;o<u;o++)this.array[o]=0;else{var s=r.size||1,c=t.x,h=t.y,l=e.x,d=e.y,f=(0,a.floatColor)(r.color),p=l-c,g=d-h,y=p*p+g*g,v=0,m=0;y&&(v=-g*(y=1/Math.sqrt(y))*s,m=p*y*s);var b=20*i,w=this.array;w[b++]=c,w[b++]=h,w[b++]=v,w[b++]=m,w[b++]=f,w[b++]=c,w[b++]=h,w[b++]=-v,w[b++]=-m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=v,w[b++]=m,w[b++]=f,w[b++]=l,w[b++]=d,w[b++]=-v,w[b++]=-m,w[b]=f}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(r(64488).AbstractEdgeProgram);e.default=c},90732:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(88586),u=o(r(21432)),s=o(r(36846)),c=function(t){function e(e){var r=t.call(this,e,u.default,s.default,1,4)||this;return r.bind(),r}return i(e,t),e.prototype.process=function(t,e,r){var n=this.array,i=1*r*4;if(e)return n[i++]=0,n[i++]=0,n[i++]=0,void(n[i++]=0);var o=(0,a.floatColor)(t.color);n[i++]=t.x,n[i++]=t.y,n[i++]=t.size,n[i]=o},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.drawArrays(e.POINTS,0,this.array.length/4)}},e}(r(23304).AbstractNodeProgram);e.default=c},91604:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";t.exports=r})()},50577:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83574:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},73343:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";t.exports=r})()},59843:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasint effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';t.exports=r})()},36846:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";t.exports=r})()},21432:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},83451:(t,e)=>{"use strict";function r(t,e,r){var n="VERTEX"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(null===i)throw new Error("loadShader: error while creating the shader");if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error("loadShader: error while compiling the shader:\n".concat(o,"\n").concat(r))}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.loadProgram=e.loadFragmentShader=e.loadVertexShader=void 0,e.loadVertexShader=function(t,e){return r("VERTEX",t,e)},e.loadFragmentShader=function(t,e){return r("FRAGMENT",t,e)},e.loadProgram=function(t,e){var r,n,i=t.createProgram();if(null===i)throw new Error("loadProgram: error while creating the program.");for(r=0,n=e.length;r<n;r++)t.attachShader(i,e[r]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw t.deleteProgram(i),new Error("loadProgram: error while linking the program.");return i}},49061:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_SETTINGS=e.validateSettings=void 0;var i=n(r(12193)),o=n(r(64362)),a=n(r(30284)),u=n(r(90732)),s=n(r(46680)),c=n(r(65696));e.validateSettings=function(t){if("number"!=typeof t.labelDensity||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if("number"==typeof e&&"number"==typeof r&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},e.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:i.default,hoverRenderer:o.default,edgeLabelRenderer:a.default,allowInvalidContainer:!1,nodeProgramClasses:{circle:u.default},edgeProgramClasses:{arrow:c.default,line:s.default}}},38953:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=u(r(31250)),c=u(r(73834)),h=u(r(39316)),l=r(30432),d=r(88586),f=r(2306),p=r(49061),g=u(r(40916)),y=r(42237),v=r(38073),m=(0,d.getPixelRatio)();function b(t,e,r){if(!r.hasOwnProperty("x")||!r.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),r.label||""===r.label||(r.label=null),void 0!==r.label&&null!==r.label?r.label=""+r.label:r.label=null,r.size||(r.size=2),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("highlighted")||(r.highlighted=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function w(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var _=function(t){function e(e,r,n){void 0===n&&(n={});var i=t.call(this)||this;if(i.elements={},i.canvasContexts={},i.webGLContexts={},i.activeListeners={},i.quadtree=new h.default,i.labelGrid=new f.LabelGrid,i.nodeDataCache={},i.edgeDataCache={},i.nodesWithForcedLabels=[],i.edgesWithForcedLabels=[],i.nodeExtent={x:[0,1],y:[0,1]},i.matrix=(0,y.identity)(),i.invMatrix=(0,y.identity)(),i.correctionRatio=1,i.customBBox=null,i.normalizationFunction=(0,d.createNormalizationFunction)({x:[-1/0,1/0],y:[-1/0,1/0]}),i.cameraSizeRatio=1,i.width=0,i.height=0,i.displayedLabels=new Set,i.highlightedNodes=new Set,i.hoveredNode=null,i.hoveredEdge=null,i.renderFrame=null,i.renderHighlightedNodesFrame=null,i.needToProcess=!1,i.needToSoftProcess=!1,i.checkEdgesEventsFrame=null,i.nodePrograms={},i.hoverNodePrograms={},i.edgePrograms={},i.settings=(0,d.assign)({},p.DEFAULT_SETTINGS,n),(0,p.validateSettings)(i.settings),(0,d.validateGraph)(e),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var o in i.graph=e,i.container=r,i.createWebGLContext("edges",{preserveDrawingBuffer:!0}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes"),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse"),i.webGLContexts){var a=i.webGLContexts[o];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var u in i.settings.nodeProgramClasses){var l=i.settings.nodeProgramClasses[u];i.nodePrograms[u]=new l(i.webGLContexts.nodes,i),i.hoverNodePrograms[u]=new l(i.webGLContexts.hoverNodes,i)}for(var u in i.settings.edgeProgramClasses){var v=i.settings.edgeProgramClasses[u];i.edgePrograms[u]=new v(i.webGLContexts.edges,i)}return i.resize(),i.camera=new s.default,i.bindCameraHandlers(),i.mouseCaptor=new c.default(i.elements.mouse,i),i.touchCaptor=new g.default(i.elements.mouse,i),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.process(),i.render(),i}return i(e,t),e.prototype.createCanvas=function(t){var e=(0,d.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(t)});return this.elements[t]=e,this.container.appendChild(e),e},e.prototype.createCanvasContext=function(t){var e=this.createCanvas(t);return this.canvasContexts[t]=e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},e.prototype.createWebGLContext=function(t,e){var r,n=this.createCanvas(t),i=o({preserveDrawingBuffer:!1,antialias:!1},e||{});return(r=n.getContext("webgl2",i))||(r=n.getContext("webgl",i)),r||(r=n.getContext("experimental-webgl",i)),this.webGLContexts[t]=r,this},e.prototype.bindCameraHandlers=function(){var t=this;return this.activeListeners.camera=function(){t._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},e.prototype.bindEventHandlers=function(){var t=this;this.activeListeners.handleResize=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize);var e=function(t,e,r,n,i){return t>r-i&&t<r+i&&e>n-i&&e<n+i&&Math.sqrt(Math.pow(t-r,2)+Math.pow(e-n,2))<i};this.activeListeners.handleMove=function(r){for(var n,i,a,u=(n=r.x,i=r.y,a=t.viewportToFramedGraph({x:n,y:i}),t.quadtree.point(a.x,1-a.y)),s={event:r,preventSigmaDefault:function(){this.event.preventSigmaDefault()}},c=1/0,h=null,l=0,f=u.length;l<f;l++){var p=u[l],g=t.nodeDataCache[p],y=t.framedGraphToViewport(g),v=t.scaleSize(g.size);if(!g.hidden&&e(r.x,r.y,y.x,y.y,v)){var m=Math.sqrt(Math.pow(r.x-y.x,2)+Math.pow(r.y-y.y,2));m<c&&(c=m,h=p)}}return h&&t.hoveredNode!==h&&!t.nodeDataCache[h].hidden?(t.hoveredNode&&t.emit("leaveNode",o(o({},s),{node:t.hoveredNode})),t.hoveredNode=h,t.emit("enterNode",o(o({},s),{node:h})),void t.scheduleHighlightedNodesRender()):t.hoveredNode&&(g=t.nodeDataCache[t.hoveredNode],y=t.framedGraphToViewport(g),v=t.scaleSize(g.size),!e(r.x,r.y,y.x,y.y,v))?(p=t.hoveredNode,t.hoveredNode=null,t.emit("leaveNode",o(o({},s),{node:p})),t.scheduleHighlightedNodesRender()):void(!0===t.settings.enableEdgeHoverEvents?t.checkEdgeHoverEvents(s):"debounce"===t.settings.enableEdgeHoverEvents&&(t.checkEdgesEventsFrame||(t.checkEdgesEventsFrame=(0,d.requestFrame)((function(){t.checkEdgeHoverEvents(s),t.checkEdgesEventsFrame=null})))))};var r=function(e){return function(r){var n={event:r,preventSigmaDefault:function(){this.event.preventSigmaDefault()}};if(t.hoveredNode)return t.emit("".concat(e,"Node"),o(o({},n),{node:t.hoveredNode}));if("wheel"===e?t.settings.enableEdgeWheelEvents:t.settings.enableEdgeClickEvents){var i=t.getEdgeAtPoint(r.x,r.y);if(i)return t.emit("".concat(e,"Edge"),o(o({},n),{edge:i}))}return t.emit("".concat(e,"Stage"),n)}};return this.activeListeners.handleClick=r("click"),this.activeListeners.handleRightClick=r("rightClick"),this.activeListeners.handleDoubleClick=r("doubleClick"),this.activeListeners.handleWheel=r("wheel"),this.activeListeners.handleDown=r("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this},e.prototype.bindGraphHandlers=function(){var t=this,e=this.graph;return this.activeListeners.graphUpdate=function(){t.needToProcess=!0,t._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(e){delete t.nodeDataCache[e.key],t.hoveredNode===e.key&&(t.hoveredNode=null),t.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(e){delete t.edgeDataCache[e.key],t.hoveredEdge===e.key&&(t.hoveredEdge=null),t.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){t.edgeDataCache={},t.hoveredEdge=null,t.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){t.nodeDataCache={},t.hoveredNode=null,t.activeListeners.clearEdgesGraphUpdate()},e.on("nodeAdded",this.activeListeners.graphUpdate),e.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgeAdded",this.activeListeners.graphUpdate),e.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.on("cleared",this.activeListeners.clearGraphUpdate),this},e.prototype.checkEdgeHoverEvents=function(t){var e=this.hoveredNode?null:this.getEdgeAtPoint(t.event.x,t.event.y);return e!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",o(o({},t),{edge:this.hoveredEdge})),e&&this.emit("enterEdge",o(o({},t),{edge:e})),this.hoveredEdge=e),this},e.prototype.getEdgeAtPoint=function(t,e){var r,n,i=this,o=this.edgeDataCache,u=this.nodeDataCache;if(!(0,v.isPixelColored)(this.webGLContexts.edges,t*m,e*m))return null;var s=this.viewportToGraph({x:t,y:e}),c=s.x,h=s.y,l=0;if(this.graph.someEdge((function(t,e,r,n,a,s){var c=a.x,h=a.y,d=s.x,f=s.y;if(o[t].hidden||u[r].hidden||u[n].hidden)return!1;if(c!==d||h!==f){var p=Math.sqrt(Math.pow(d-c,2)+Math.pow(f-h,2)),g=i.graphToViewport({x:c,y:h}),y=g.x,v=g.y,m=i.graphToViewport({x:d,y:f}),b=m.x,w=m.y,_=Math.sqrt(Math.pow(b-y,2)+Math.pow(w-v,2));return l=p/_,!0}})),!l)return null;var d=this.graph.filterEdges((function(t,e,r,n,a,s){return!(o[t].hidden||u[r].hidden||u[n].hidden)&&(!!(0,v.doEdgeCollideWithPoint)(c,h,a.x,a.y,s.x,s.y,o[t].size*l/i.cameraSizeRatio)||void 0)}));if(0===d.length)return null;var f=d[d.length-1],p=-1/0;try{for(var g=a(d),y=g.next();!y.done;y=g.next()){var b=y.value,w=this.graph.getEdgeAttribute(b,"zIndex");w>=p&&(f=b,p=w)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}return f},e.prototype.process=function(t){var e=this;void 0===t&&(t=!1);var r=this.graph,n=this.settings,i=this.getDimensions(),o=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(i,n.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,d.graphExtent)(r),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var u=new s.default,c=(0,d.matrixFromCamera)(u.getState(),this.getDimensions(),this.getGraphDimensions(),this.getSetting("stagePadding")||0);this.normalizationFunction=(0,d.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var h={},l=r.nodes(),f=0,p=l.length;f<p;f++){var g=l[f],y=Object.assign({},r.getNodeAttributes(g));n.nodeReducer&&(y=n.nodeReducer(g,y)),h[(m=b(this.settings,g,y)).type]=(h[m.type]||0)+1,this.nodeDataCache[g]=m,this.normalizationFunction.applyTo(m),m.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(m.zIndex<o[0]&&(o[0]=m.zIndex),m.zIndex>o[1]&&(o[1]=m.zIndex))}for(var v in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(v))throw new Error('Sigma: could not find a suitable program for node type "'.concat(v,'"!'));t||this.nodePrograms[v].allocate(h[v]||0),h[v]=0}for(this.settings.zIndex&&o[0]!==o[1]&&(l=(0,d.zIndexOrdering)(o,(function(t){return e.nodeDataCache[t].zIndex}),l)),f=0,p=l.length;f<p;f++){g=l[f];var m=this.nodeDataCache[g];this.quadtree.add(g,m.x,1-m.y,m.size/this.width),"string"!=typeof m.label||m.hidden||this.labelGrid.add(g,m.size,this.framedGraphToViewport(m,{matrix:c})),this.nodePrograms[m.type].process(m,m.hidden,h[m.type]++),m.highlighted&&!m.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var _={},x=r.edges();for(f=0,p=x.length;f<p;f++){var E=x[f];y=Object.assign({},r.getEdgeAttributes(E)),n.edgeReducer&&(y=n.edgeReducer(E,y)),_[(m=w(this.settings,0,y)).type]=(_[m.type]||0)+1,this.edgeDataCache[E]=m,m.forceLabel&&!m.hidden&&this.edgesWithForcedLabels.push(E),this.settings.zIndex&&(m.zIndex<a[0]&&(a[0]=m.zIndex),m.zIndex>a[1]&&(a[1]=m.zIndex))}for(var v in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(v))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(v,'"!'));t||this.edgePrograms[v].allocate(_[v]||0),_[v]=0}for(this.settings.zIndex&&a[0]!==a[1]&&(x=(0,d.zIndexOrdering)(a,(function(t){return e.edgeDataCache[t].zIndex}),x)),f=0,p=x.length;f<p;f++){E=x[f],m=this.edgeDataCache[E];var A=r.extremities(E),L=this.nodeDataCache[A[0]],k=this.nodeDataCache[A[1]],S=m.hidden||L.hidden||k.hidden;this.edgePrograms[m.type].process(L,k,m,S,_[m.type]++)}for(var v in this.edgePrograms){var M=this.edgePrograms[v];t||"function"!=typeof M.computeIndices||M.computeIndices()}return this},e.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},e.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},e.prototype._scheduleRefresh=function(){var t=this;return this.renderFrame||(this.renderFrame=(0,d.requestFrame)((function(){t._refresh(),t.renderFrame=null}))),this},e.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var t,e=this.camera.getState();if(e.ratio>=1)t=new Set(this.graph.nodes());else{var r=this.viewRectangle();t=new Set(this.quadtree.rectangle(r.x1,1-r.y1,r.x2,1-r.y2,r.height))}var n=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity).concat(this.nodesWithForcedLabels);this.displayedLabels=new Set;for(var i=this.canvasContexts.labels,a=0,u=n.length;a<u;a++){var s=n[a],c=this.nodeDataCache[s];if(!this.displayedLabels.has(s)&&!c.hidden){var h=this.framedGraphToViewport(c),l=h.x,d=h.y,f=this.scaleSize(c.size);!c.forceLabel&&f<this.settings.labelRenderedSizeThreshold||t.has(s)&&(this.displayedLabels.add(s),this.settings.labelRenderer(i,o(o({key:s},c),{size:f,x:l,y:d}),this.settings))}}return this},e.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var t=this.canvasContexts.edgeLabels;t.clearRect(0,0,this.width,this.height);for(var e=(0,f.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),r=new Set,n=0,i=e.length;n<i;n++){var a=e[n],u=this.graph.extremities(a),s=this.nodeDataCache[u[0]],c=this.nodeDataCache[u[1]],h=this.edgeDataCache[a];r.has(a)||h.hidden||s.hidden||c.hidden||(this.settings.edgeLabelRenderer(t,o(o({key:a},h),{size:this.scaleSize(h.size)}),o(o(o({key:u[0]},s),this.framedGraphToViewport(s)),{size:this.scaleSize(s.size)}),o(o(o({key:u[1]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),this.settings),r.add(a))}return this},e.prototype.renderHighlightedNodes=function(){var t=this,e=this.canvasContexts.hovers;e.clearRect(0,0,this.width,this.height);var r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach((function(e){e!==t.hoveredNode&&r.push(e)})),r.forEach((function(r){return function(r){var n=t.nodeDataCache[r],i=t.framedGraphToViewport(n),a=i.x,u=i.y,s=t.scaleSize(n.size);t.settings.hoverRenderer(e,o(o({key:r},n),{size:s,x:a,y:u}),t.settings)}(r)}));var n={};for(var i in r.forEach((function(e){var r=t.nodeDataCache[e].type;n[r]=(n[r]||0)+1})),this.hoverNodePrograms)this.hoverNodePrograms[i].allocate(n[i]||0),n[i]=0;for(var i in r.forEach((function(e){var r=t.nodeDataCache[e];t.hoverNodePrograms[r.type].process(r,r.hidden,n[r.type]++)})),this.hoverNodePrograms){var a=this.hoverNodePrograms[i];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:m})}},e.prototype.scheduleHighlightedNodesRender=function(){var t=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,d.requestFrame)((function(){t.renderHighlightedNodesFrame=null,t.renderHighlightedNodes(),t.renderEdgeLabels()})))},e.prototype.render=function(){var t=this;this.emit("beforeRender");var e=function(){return t.emit("afterRender"),t};if(this.renderFrame&&((0,d.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return e();var r=this.mouseCaptor,n=this.camera.isAnimated()||r.isMoving||r.draggedEvents||r.currentWheelDirection,i=this.camera.getState(),o=this.getDimensions(),a=this.getGraphDimensions(),u=this.getSetting("stagePadding")||0;for(var s in this.matrix=(0,d.matrixFromCamera)(i,o,a,u),this.invMatrix=(0,d.matrixFromCamera)(i,o,a,u,!0),this.correctionRatio=(0,d.getMatrixImpact)(this.matrix,i,o),this.nodePrograms)(c=this.nodePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:m});if(!this.settings.hideEdgesOnMove||!n)for(var s in this.edgePrograms){var c;(c=this.edgePrograms[s]).bind(),c.bufferData(),c.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:m})}return this.settings.hideLabelsOnMove&&n||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),e()},e.prototype.updateCachedValues=function(){var t=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(t)},e.prototype.getCamera=function(){return this.camera},e.prototype.getGraph=function(){return this.graph},e.prototype.getMouseCaptor=function(){return this.mouseCaptor},e.prototype.getTouchCaptor=function(){return this.touchCaptor},e.prototype.getDimensions=function(){return{width:this.width,height:this.height}},e.prototype.getGraphDimensions=function(){var t=this.customBBox||this.nodeExtent;return{width:t.x[1]-t.x[0]||1,height:t.y[1]-t.y[0]||1}},e.prototype.getNodeDisplayData=function(t){var e=this.nodeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getEdgeDisplayData=function(t){var e=this.edgeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getSettings=function(){return o({},this.settings)},e.prototype.getSetting=function(t){return this.settings[t]},e.prototype.setSetting=function(t,e){return this.settings[t]=e,(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.updateSetting=function(t,e){return this.settings[t]=e(this.settings[t]),(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.resize=function(){var t=this.width,e=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seing this error.");this.height=1}if(t===this.width&&e===this.height)return this;for(var r in this.emit("resize"),this.elements){var n=this.elements[r];n.style.width=this.width+"px",n.style.height=this.height+"px"}for(var r in this.canvasContexts)this.elements[r].setAttribute("width",this.width*m+"px"),this.elements[r].setAttribute("height",this.height*m+"px"),1!==m&&this.canvasContexts[r].scale(m,m);for(var r in this.webGLContexts)this.elements[r].setAttribute("width",this.width*m+"px"),this.elements[r].setAttribute("height",this.height*m+"px"),this.webGLContexts[r].viewport(0,0,this.width*m,this.height*m);return this},e.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this},e.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},e.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.getViewportZoomedState=function(t,e){var r=this.camera.getState(),n=r.ratio,i=r.angle,o=r.x,a=r.y,u=e/n,s={x:this.width/2,y:this.height/2},c=this.viewportToFramedGraph(t),h=this.viewportToFramedGraph(s);return{angle:i,x:(c.x-h.x)*(1-u)+o,y:(c.y-h.y)*(1-u)+a,ratio:e}},e.prototype.viewRectangle=function(){var t=0*this.width/8,e=0*this.height/8,r=this.viewportToFramedGraph({x:0-t,y:0-e}),n=this.viewportToFramedGraph({x:this.width+t,y:0-e}),i=this.viewportToFramedGraph({x:0,y:this.height+e});return{x1:r.x,y1:r.y,x2:n.x,y2:n.y,height:n.y-i.y}},e.prototype.framedGraphToViewport=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!!e.graphDimensions,n=e.matrix?e.matrix:r?(0,d.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0):this.matrix,i=(0,y.multiplyVec2)(n,t);return{x:(1+i.x)*this.width/2,y:(1-i.y)*this.height/2}},e.prototype.viewportToFramedGraph=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!e.graphDimensions,n=e.matrix?e.matrix:r?(0,d.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix;return(0,y.multiplyVec2)(n,{x:t.x/this.width*2-1,y:1-t.y/this.height*2})},e.prototype.viewportToGraph=function(t,e){return void 0===e&&(e={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(t,e))},e.prototype.graphToViewport=function(t,e){return void 0===e&&(e={}),this.framedGraphToViewport(this.normalizationFunction(t),e)},e.prototype.getBBox=function(){return(0,d.graphExtent)(this.graph)},e.prototype.getCustomBBox=function(){return this.customBBox},e.prototype.setCustomBBox=function(t){return this.customBBox=t,this._scheduleRefresh(),this},e.prototype.kill=function(){var t=this.graph;this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),t.removeListener("nodeAdded",this.activeListeners.dropNodeGraphUpdate),t.removeListener("nodeDropped",this.activeListeners.graphUpdate),t.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgeAdded",this.activeListeners.graphUpdate),t.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.removeListener("cleared",this.activeListeners.clearGraphUpdate),this.quadtree=new h.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,d.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,d.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild)},e.prototype.scaleSize=function(t){return t/this.cameraSizeRatio},e.prototype.getCanvases=function(){return o({},this.elements)},e}(l.TypedEventEmitter);e.default=_},30432:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var o=function(t){function e(){var e=t.call(this)||this;return e.rawEmitter=e,e}return i(e,t),e}(r(22699).EventEmitter);e.TypedEventEmitter=o},31181:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.animateNodes=e.ANIMATE_DEFAULTS=void 0;var i=r(88586),o=n(r(2383));e.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},e.animateNodes=function(t,r,n,a){var u=Object.assign({},e.ANIMATE_DEFAULTS,n),s="function"==typeof u.easing?u.easing:o.default[u.easing],c=Date.now(),h={};for(var l in r){var d=r[l];for(var f in h[l]={},d)h[l][f]=t.getNodeAttribute(l,f)}var p=null,g=function(){p=null;var e=(Date.now()-c)/u.duration;if(e>=1){for(var n in r){var o=r[n];for(var l in o)t.setNodeAttribute(n,l,o[l])}"function"==typeof a&&a()}else{for(var n in e=s(e),r){o=r[n];var d=h[n];for(var l in o)t.setNodeAttribute(n,l,o[l]*e+d[l]*(1-e))}p=(0,i.requestFrame)(g)}};return g(),function(){p&&(0,i.cancelFrame)(p)}}},71078:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTML_COLORS=void 0,e.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},2383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cubicInOut=e.cubicOut=e.cubicIn=e.quadraticInOut=e.quadraticOut=e.quadraticIn=e.linear=void 0,e.linear=function(t){return t},e.quadraticIn=function(t){return t*t},e.quadraticOut=function(t){return t*(2-t)},e.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},e.cubicIn=function(t){return t*t*t},e.cubicOut=function(t){return--t*t*t+1},e.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};var r={linear:e.linear,quadraticIn:e.quadraticIn,quadraticOut:e.quadraticOut,quadraticInOut:e.quadraticInOut,cubicIn:e.cubicIn,cubicOut:e.cubicOut,cubicInOut:e.cubicInOut};e.default=r},38073:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doEdgeCollideWithPoint=e.isPixelColored=void 0,e.isPixelColored=function(t,e,r){var n=new Uint8Array(4);return t.readPixels(e,t.drawingBufferHeight-r,1,1,t.RGBA,t.UNSIGNED_BYTE,n),n[3]>0},e.doEdgeCollideWithPoint=function(t,e,r,n,i,o,a){return!(t<r-a&&t<i-a||e<n-a&&e<o-a||t>r+a&&t>i+a||e>n+a&&e>o+a||!(Math.abs((i-r)*(n-e)-(r-t)*(o-n))/Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2))<a/2))}},88586:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateGraph=e.canUse32BitsIndices=e.extractPixel=e.getMatrixImpact=e.matrixFromCamera=e.getCorrectionRatio=e.floatColor=e.floatArrayColor=e.parseColor=e.zIndexOrdering=e.createNormalizationFunction=e.graphExtent=e.getPixelRatio=e.createElement=e.cancelFrame=e.requestFrame=e.assignDeep=e.assign=e.isPlainObject=void 0;var o=i(r(31880)),a=r(42237),u=r(71078);function s(t){return"object"==typeof t&&null!==t&&t.constructor===Object}e.isPlainObject=s,e.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t=t||{};for(var n=0,i=e.length;n<i;n++){var o=e[n];o&&Object.assign(t,o)}return t},e.assignDeep=function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e=e||{};for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a)for(var u in a)s(a[u])?e[u]=t(e[u],a[u]):e[u]=a[u]}return e},e.requestFrame="undefined"!=typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,0)},e.cancelFrame="undefined"!=typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:function(t){return clearTimeout(t)},e.createElement=function(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var i in r)n.setAttribute(i,r[i]);return n},e.getPixelRatio=function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1},e.graphExtent=function(t){var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode((function(t,o){var a=o.x,u=o.y;a<e&&(e=a),a>r&&(r=a),u<n&&(n=u),u>i&&(i=u)})),{x:[e,r],y:[n,i]}},e.createNormalizationFunction=function(t){var e=n(t.x,2),r=e[0],i=e[1],o=n(t.y,2),a=o[0],u=o[1],s=Math.max(i-r,u-a);0===s&&(s=1);var c=(i+r)/2,h=(u+a)/2,l=function(t){return{x:.5+(t.x-c)/s,y:.5+(t.y-h)/s}};return l.applyTo=function(t){t.x=.5+(t.x-c)/s,t.y=.5+(t.y-h)/s},l.inverse=function(t){return{x:c+s*(t.x-.5),y:h+s*(t.y-.5)}},l.ratio=s,l},e.zIndexOrdering=function(t,e,r){return r.sort((function(t,r){var n=e(t)||0,i=e(r)||0;return n<i?-1:n>i?1:0}))};var c=new Int8Array(4),h=new Int32Array(c.buffer,0,1),l=new Float32Array(c.buffer,0,1),d=/^\s*rgba?\s*\(/,f=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function p(t){var e=0,r=0,n=0,i=1;if("#"===t[0])4===t.length?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16));else if(d.test(t)){var o=t.match(f);o&&(e=+o[1],r=+o[2],n=+o[3],o[4]&&(i=+o[4]))}return{r:e,g:r,b:n,a:i}}e.parseColor=p;var g={};for(var y in u.HTML_COLORS)g[y]=v(u.HTML_COLORS[y]),g[u.HTML_COLORS[y]]=g[y];function v(t){if(void 0!==g[t])return g[t];var e=p(t),r=e.r,n=e.g,i=e.b,o=e.a;o=255*o|0,h[0]=4278190079&(o<<24|i<<16|n<<8|r);var a=l[0];return g[t]=a,a}function m(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}e.floatArrayColor=function(t){var e=p(t=u.HTML_COLORS[t]||t),r=e.r,n=e.g,i=e.b,o=e.a;return new Float32Array([r/255,n/255,i/255,o])},e.floatColor=v,e.getCorrectionRatio=m,e.matrixFromCamera=function(t,e,r,n,i){var o=t.angle,u=t.ratio,s=t.x,c=t.y,h=e.width,l=e.height,d=(0,a.identity)(),f=Math.min(h,l)-2*n,p=m(e,r);return i?((0,a.multiply)(d,(0,a.translate)((0,a.identity)(),s,c)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),u)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),h/f/2/p,l/f/2/p))):((0,a.multiply)(d,(0,a.scale)((0,a.identity)(),f/h*2*p,f/l*2*p)),(0,a.multiply)(d,(0,a.rotate)((0,a.identity)(),-o)),(0,a.multiply)(d,(0,a.scale)((0,a.identity)(),1/u)),(0,a.multiply)(d,(0,a.translate)((0,a.identity)(),-s,-c))),d},e.getMatrixImpact=function(t,e,r){var n=(0,a.multiplyVec2)(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,o=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/r.width},e.extractPixel=function(t,e,r,n){var i=n||new Uint8Array(4);return t.readPixels(e,r,1,1,t.RGBA,t.UNSIGNED_BYTE,i),i},e.canUse32BitsIndices=function(t){return"undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint")},e.validateGraph=function(t){if(!(0,o.default)(t))throw new Error("Sigma: invalid graph instance.");t.forEachNode((function(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},42237:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiplyVec2=e.multiply=e.translate=e.rotate=e.scale=e.identity=void 0,e.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},e.scale=function(t,e,r){return t[0]=e,t[4]="number"==typeof r?r:e,t},e.rotate=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t},e.translate=function(t,e,r){return t[6]=e,t[7]=r,t},e.multiply=function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],u=t[5],s=t[6],c=t[7],h=t[8],l=e[0],d=e[1],f=e[2],p=e[3],g=e[4],y=e[5],v=e[6],m=e[7],b=e[8];return t[0]=l*r+d*o+f*s,t[1]=l*n+d*a+f*c,t[2]=l*i+d*u+f*h,t[3]=p*r+g*o+y*s,t[4]=p*n+g*a+y*c,t[5]=p*i+g*u+y*h,t[6]=v*r+m*o+b*s,t[7]=v*n+m*a+b*c,t[8]=v*i+m*u+b*h,t},e.multiplyVec2=function(t,e,r){void 0===r&&(r=1);var n=t[0],i=t[1],o=t[3],a=t[4],u=t[6],s=t[7],c=e.x,h=e.y;return{x:c*n+h*o+u*r,y:c*i+h*a+s*r}}},52844:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(95038),i=r.n(n);const o=function(){function t(t){var e=void 0===t?{}:t,r=e.locale,n=e.instance,o=e.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=n||o||i(),this.locale=r}return t.prototype.parse=function(t,e){return""===t?null:this.moment(t,e,!0)},t.prototype.date=function(t){if(null===t)return null;var e=this.moment(t);return e.locale(this.locale),e},t.prototype.isValid=function(t){return this.moment(t).isValid()},t.prototype.isNull=function(t){return null===t},t.prototype.getDiff=function(t,e){return t.diff(e)},t.prototype.isAfter=function(t,e){return t.isAfter(e)},t.prototype.isBefore=function(t,e){return t.isBefore(e)},t.prototype.isAfterDay=function(t,e){return t.isAfter(e,"day")},t.prototype.isBeforeDay=function(t,e){return t.isBefore(e,"day")},t.prototype.isBeforeYear=function(t,e){return t.isBefore(e,"year")},t.prototype.isAfterYear=function(t,e){return t.isAfter(e,"year")},t.prototype.startOfDay=function(t){return t.clone().startOf("day")},t.prototype.endOfDay=function(t){return t.clone().endOf("day")},t.prototype.format=function(t,e){return t.locale(this.locale),t.format(e)},t.prototype.formatNumber=function(t){return t},t.prototype.getHours=function(t){return t.get("hours")},t.prototype.addDays=function(t,e){return e<0?t.clone().subtract(Math.abs(e),"days"):t.clone().add(e,"days")},t.prototype.setHours=function(t,e){return t.clone().hours(e)},t.prototype.getMinutes=function(t){return t.get("minutes")},t.prototype.setMinutes=function(t,e){return t.clone().minutes(e)},t.prototype.getSeconds=function(t){return t.get("seconds")},t.prototype.setSeconds=function(t,e){return t.clone().seconds(e)},t.prototype.getMonth=function(t){return t.get("month")},t.prototype.isSameDay=function(t,e){return t.isSame(e,"day")},t.prototype.isSameMonth=function(t,e){return t.isSame(e,"month")},t.prototype.isSameYear=function(t,e){return t.isSame(e,"year")},t.prototype.isSameHour=function(t,e){return t.isSame(e,"hour")},t.prototype.setMonth=function(t,e){return t.clone().month(e)},t.prototype.getMeridiemText=function(t){return"am"===t?"AM":"PM"},t.prototype.startOfMonth=function(t){return t.clone().startOf("month")},t.prototype.endOfMonth=function(t){return t.clone().endOf("month")},t.prototype.getNextMonth=function(t){return t.clone().add(1,"month")},t.prototype.getPreviousMonth=function(t){return t.clone().subtract(1,"month")},t.prototype.getMonthArray=function(t){for(var e=[t.clone().startOf("year")];e.length<12;){var r=e[e.length-1];e.push(this.getNextMonth(r))}return e},t.prototype.getYear=function(t){return t.get("year")},t.prototype.setYear=function(t,e){return t.clone().set("year",e)},t.prototype.mergeDateAndTime=function(t,e){return this.setMinutes(this.setHours(t,this.getHours(e)),this.getMinutes(e))},t.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},t.prototype.isEqual=function(t,e){return null===t&&null===e||this.moment(t).isSame(e)},t.prototype.getWeekArray=function(t){for(var e=t.clone().startOf("month").startOf("week"),r=t.clone().endOf("month").endOf("week"),n=0,i=e,o=[];i.isBefore(r);){var a=Math.floor(n/7);o[a]=o[a]||[],o[a].push(i),i=i.clone().add(1,"day"),n+=1}return o},t.prototype.getYearRange=function(t,e){for(var r=this.moment(t).startOf("year"),n=this.moment(e).endOf("year"),i=[],o=r;o.isBefore(n);)i.push(o),o=o.clone().add(1,"year");return i},t.prototype.getCalendarHeaderText=function(t){return this.format(t,this.yearMonthFormat)},t.prototype.getYearText=function(t){return this.format(t,"YYYY")},t.prototype.getDatePickerHeaderText=function(t){return this.format(t,"ddd, MMM D")},t.prototype.getDateTimePickerHeaderText=function(t){return this.format(t,"MMM D")},t.prototype.getMonthText=function(t){return this.format(t,"MMMM")},t.prototype.getDayText=function(t){return this.format(t,"D")},t.prototype.getHourText=function(t,e){return this.format(t,e?"hh":"HH")},t.prototype.getMinuteText=function(t){return this.format(t,"mm")},t.prototype.getSecondText=function(t){return this.format(t,"ss")},t}()}}]);