airdcpp-webui 2.12.0-beta.1 → 2.12.0-beta.2

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.
Files changed (64) hide show
  1. package/dist/index.html +1 -1
  2. package/dist/js/{317.bd64d61cd69d32cc9ce8.chunk.js → 317.4554e76168bdea543f39.chunk.js} +2 -2
  3. package/dist/js/317.4554e76168bdea543f39.chunk.js.gz +0 -0
  4. package/dist/js/{317.bd64d61cd69d32cc9ce8.chunk.js.map → 317.4554e76168bdea543f39.chunk.js.map} +1 -1
  5. package/dist/js/{424.56553dccda41d0a74c27.chunk.js → 424.8412d40847801f1f9167.chunk.js} +2 -2
  6. package/dist/js/424.8412d40847801f1f9167.chunk.js.gz +0 -0
  7. package/dist/js/{424.56553dccda41d0a74c27.chunk.js.map → 424.8412d40847801f1f9167.chunk.js.map} +1 -1
  8. package/dist/js/{668.67827dde6f8c0b775513.chunk.js → 668.1b704949fefd7be35639.chunk.js} +2 -2
  9. package/dist/js/668.1b704949fefd7be35639.chunk.js.gz +0 -0
  10. package/dist/js/{668.67827dde6f8c0b775513.chunk.js.map → 668.1b704949fefd7be35639.chunk.js.map} +1 -1
  11. package/dist/js/{favorite-hubs.4ea3baf530f0b10fc60d.chunk.js → favorite-hubs.83bf98475a69ad8f52a6.chunk.js} +2 -2
  12. package/dist/js/favorite-hubs.83bf98475a69ad8f52a6.chunk.js.gz +0 -0
  13. package/dist/js/{favorite-hubs.4ea3baf530f0b10fc60d.chunk.js.map → favorite-hubs.83bf98475a69ad8f52a6.chunk.js.map} +1 -1
  14. package/dist/js/{filelists.9709bafe058a67951fb3.chunk.js → filelists.4a3438ca82b22e48730d.chunk.js} +2 -2
  15. package/dist/js/filelists.4a3438ca82b22e48730d.chunk.js.gz +0 -0
  16. package/dist/js/{filelists.9709bafe058a67951fb3.chunk.js.map → filelists.4a3438ca82b22e48730d.chunk.js.map} +1 -1
  17. package/dist/js/{home.eec7d3d9f3aab299c2f6.chunk.js → home.850d7b48361869eded76.chunk.js} +3 -3
  18. package/dist/js/home.850d7b48361869eded76.chunk.js.gz +0 -0
  19. package/dist/js/{home.eec7d3d9f3aab299c2f6.chunk.js.map → home.850d7b48361869eded76.chunk.js.map} +1 -1
  20. package/dist/js/{hubs.0bebbc5015726ada3d8e.chunk.js → hubs.cacfe30f5c6c9f0c0d82.chunk.js} +2 -2
  21. package/dist/js/hubs.cacfe30f5c6c9f0c0d82.chunk.js.gz +0 -0
  22. package/dist/js/{hubs.0bebbc5015726ada3d8e.chunk.js.map → hubs.cacfe30f5c6c9f0c0d82.chunk.js.map} +1 -1
  23. package/dist/js/{main.62867f3535b7f4a4df23.entry.js → main.815a5cf9700ac26a30ed.entry.js} +3 -3
  24. package/dist/js/main.815a5cf9700ac26a30ed.entry.js.gz +0 -0
  25. package/dist/js/{main.62867f3535b7f4a4df23.entry.js.map → main.815a5cf9700ac26a30ed.entry.js.map} +1 -1
  26. package/dist/js/{messages.a58ec2e3dd50954be328.chunk.js → messages.9f53d30c18f58057c57d.chunk.js} +2 -2
  27. package/dist/js/messages.9f53d30c18f58057c57d.chunk.js.gz +0 -0
  28. package/dist/js/{messages.a58ec2e3dd50954be328.chunk.js.map → messages.9f53d30c18f58057c57d.chunk.js.map} +1 -1
  29. package/dist/js/queue.2e1513701df1ee7fefc1.chunk.js +2 -0
  30. package/dist/js/queue.2e1513701df1ee7fefc1.chunk.js.gz +0 -0
  31. package/dist/js/queue.2e1513701df1ee7fefc1.chunk.js.map +1 -0
  32. package/dist/js/{search.e7ff072ad1eabd233fa8.chunk.js → search.1e0fa7e40e3d03fab8be.chunk.js} +2 -2
  33. package/dist/js/search.1e0fa7e40e3d03fab8be.chunk.js.gz +0 -0
  34. package/dist/js/{search.e7ff072ad1eabd233fa8.chunk.js.map → search.1e0fa7e40e3d03fab8be.chunk.js.map} +1 -1
  35. package/dist/js/{settings.b1b9fc7eab3f7a1191cd.chunk.js → settings.8af56f982769208a13ad.chunk.js} +2 -2
  36. package/dist/js/settings.8af56f982769208a13ad.chunk.js.gz +0 -0
  37. package/dist/js/{settings.b1b9fc7eab3f7a1191cd.chunk.js.map → settings.8af56f982769208a13ad.chunk.js.map} +1 -1
  38. package/dist/js/{share.5d5e02875a628f362400.chunk.js → share.34085a7b094cb7734e59.chunk.js} +2 -2
  39. package/dist/js/share.34085a7b094cb7734e59.chunk.js.gz +0 -0
  40. package/dist/js/{share.5d5e02875a628f362400.chunk.js.map → share.34085a7b094cb7734e59.chunk.js.map} +1 -1
  41. package/dist/js/{transfers.fa728662e03670f8e3a9.chunk.js → transfers.4884df77ac8857e52a61.chunk.js} +2 -2
  42. package/dist/js/transfers.4884df77ac8857e52a61.chunk.js.gz +0 -0
  43. package/dist/js/{transfers.fa728662e03670f8e3a9.chunk.js.map → transfers.4884df77ac8857e52a61.chunk.js.map} +1 -1
  44. package/dist/sw.js +1 -1
  45. package/dist/sw.js.gz +0 -0
  46. package/package.json +1 -1
  47. package/dist/js/317.bd64d61cd69d32cc9ce8.chunk.js.gz +0 -0
  48. package/dist/js/424.56553dccda41d0a74c27.chunk.js.gz +0 -0
  49. package/dist/js/668.67827dde6f8c0b775513.chunk.js.gz +0 -0
  50. package/dist/js/favorite-hubs.4ea3baf530f0b10fc60d.chunk.js.gz +0 -0
  51. package/dist/js/filelists.9709bafe058a67951fb3.chunk.js.gz +0 -0
  52. package/dist/js/home.eec7d3d9f3aab299c2f6.chunk.js.gz +0 -0
  53. package/dist/js/hubs.0bebbc5015726ada3d8e.chunk.js.gz +0 -0
  54. package/dist/js/main.62867f3535b7f4a4df23.entry.js.gz +0 -0
  55. package/dist/js/messages.a58ec2e3dd50954be328.chunk.js.gz +0 -0
  56. package/dist/js/queue.1eb3dde1556e247be254.chunk.js +0 -2
  57. package/dist/js/queue.1eb3dde1556e247be254.chunk.js.gz +0 -0
  58. package/dist/js/queue.1eb3dde1556e247be254.chunk.js.map +0 -1
  59. package/dist/js/search.e7ff072ad1eabd233fa8.chunk.js.gz +0 -0
  60. package/dist/js/settings.b1b9fc7eab3f7a1191cd.chunk.js.gz +0 -0
  61. package/dist/js/share.5d5e02875a628f362400.chunk.js.gz +0 -0
  62. package/dist/js/transfers.fa728662e03670f8e3a9.chunk.js.gz +0 -0
  63. /package/dist/js/{home.eec7d3d9f3aab299c2f6.chunk.js.LICENSE.txt → home.850d7b48361869eded76.chunk.js.LICENSE.txt} +0 -0
  64. /package/dist/js/{main.62867f3535b7f4a4df23.entry.js.LICENSE.txt → main.815a5cf9700ac26a30ed.entry.js.LICENSE.txt} +0 -0
package/dist/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  {
13
13
  // We must inject the main chunk dynamically as well because the final path is not known on compile time
14
14
  var script = document.createElement('script');
15
- script.src = getBasePath() + "js/main.62867f3535b7f4a4df23.entry.js";
15
+ script.src = getBasePath() + "js/main.815a5cf9700ac26a30ed.entry.js";
16
16
  document.body.appendChild(script);
17
17
  }
18
18
 
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[317],{34378:(e,t,s)=>{s.d(t,{Z:()=>a});var n=s(87537),o=s.n(n),r=s(23645),i=s.n(r)()(o());i.push([e.id,".message-section {\n flex: 1;\n overflow-y: auto;\n}\n\n.message-list .date.divider i {\n margin-right: 5px;\n}\n\n.message-list .item .text .highlight.link {\n color: #4183c4;\n}\n\n.message-list .item .text .highlight.bold {\n font-weight: bold;\n}\n\n.message-list .item .text .table.dropdown,\n.message-list .item .text .table.dropdown .popup.trigger {\n max-width: 100%;\n}\n\n.message-list .item .text .table.dropdown .caption {\n overflow: hidden;\n}\n","",{version:3,sources:["webpack://./src/components/messages/messages.css"],names:[],mappings:"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".message-section {\n flex: 1;\n overflow-y: auto;\n}\n\n.message-list .date.divider i {\n margin-right: 5px;\n}\n\n.message-list .item .text .highlight.link {\n color: #4183c4;\n}\n\n.message-list .item .text .highlight.bold {\n font-weight: bold;\n}\n\n.message-list .item .text .table.dropdown,\n.message-list .item .text .table.dropdown .popup.trigger {\n max-width: 100%;\n}\n\n.message-list .item .text .table.dropdown .caption {\n overflow: hidden;\n}\n"],sourceRoot:""}]);const a=i},58317:(e,t,s)=>{s.d(t,{Z:()=>se});var n=s(85893),o=s(67294),r=s(94184),i=s.n(r),a=s(54883),l=s(99311),d=s(20867),c=s(45697),h=s.n(c);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},p.apply(this,arguments)}const g=new Map,m=new WeakMap;let u=0;function b(e,t,s={},n=undefined){if(void 0===window.IntersectionObserver&&void 0!==n){const o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof s.threshold?s.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:r,elements:i}=function(e){let t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(s=e.root,s?(m.has(s)||(u+=1,m.set(s,u.toString())),m.get(s)):"0"):e[t]}`;var s})).toString()}(e),s=g.get(t);if(!s){const n=new Map;let o;const r=new IntersectionObserver((t=>{t.forEach((t=>{var s;const r=t.isIntersecting&&o.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(s=n.get(t.target))||s.forEach((e=>{e(r,t)}))}))}),e);o=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),s={id:t,observer:r,elements:n},g.set(t,s)}return s}(s);let a=i.get(e)||[];return i.has(e)||i.set(e,a),a.push(t),r.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(i.delete(e),r.unobserve(e)),0===i.size&&(r.disconnect(),g.delete(o))}}const f=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function y(e){return"function"!=typeof e.children}class v extends o.Component{constructor(e){super(e),this.node=null,this._unobserveCb=null,this.handleNode=e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()},this.handleChange=(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),y(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)},this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:o,fallbackInView:r}=this.props;this._unobserveCb=b(this.node,this.handleChange,{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:o},r)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!y(this.props)){const{inView:e,entry:t}=this.state;return this.props.children({inView:e,entry:t,ref:this.handleNode})}const e=this.props,{children:t,as:s}=e,n=function(e,t){if(null==e)return{};var s,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)s=r[n],t.indexOf(s)>=0||(o[s]=e[s]);return o}(e,f);return o.createElement(s||"div",p({ref:this.handleNode},n),t)}}var O=s(36959),w=s(4333),j=s(2445);const x=({time:e})=>(0,n.jsx)("div",Object.assign({className:"time"},{children:(0,j.i$)(e)}));var A=s(94656);const C=e=>{var{emojify:t,message:s,user:o,label:r}=e,i=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["emojify","message","user","label"]);return(0,n.jsxs)("div",Object.assign({className:"text"},{children:[!!r&&(0,n.jsx)("span",Object.assign({className:"label"},{children:`${r}: `})),(0,n.jsx)(A.h,Object.assign({emojify:t,text:s.text,highlights:s.highlights,user:o},i))]}))};const E=({message:e,dropdownContext:t})=>(0,n.jsxs)("div",Object.assign({className:"header author"},{children:[e.third_person&&(0,n.jsx)("span",{children:"*"}),(0,n.jsx)(O.Ie,{contextElement:t,triggerIcon:null,user:e.from,direction:"downward",remoteMenuId:w.Z.HUB_USER,entityId:e.from.hub_session_id})]}));class I extends o.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,dropdownContext:s,menuProps:o}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message","dropdownContext","menuProps"]);return(0,n.jsxs)(v,Object.assign({className:"ui item chat "+t.from.flags.join(" ")},r,{children:[(0,n.jsx)(x,{time:t.time}),(0,n.jsxs)("div",Object.assign({className:"left "+(t.third_person?"third-person":"normal")},{children:[(0,n.jsx)(E,{message:t,dropdownContext:s}),(0,n.jsx)(C,{message:t,emojify:!0,user:t.from,menuProps:o})]}))]}))}}I.propTypes={message:h().object.isRequired,dropdownContext:h().string.isRequired};var N=s(35936),P=s(48117),_=s(76249);const R=e=>{switch(e){case _.m4.VERBOSE:return P.Z.VERBOSE;case _.m4.INFO:return P.Z.INFO+" circle";case _.m4.WARNING:return P.Z.WARNING;case _.m4.ERROR:return P.Z.ERROR;default:return""}};class k extends o.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,menuProps:s}=e,o=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message","menuProps"]);return(0,n.jsxs)(v,Object.assign({className:i()("ui item status",t.severity,t.type)},o,{children:[(0,n.jsx)(N.Z,{icon:R(t.severity)}),t.time>0&&(0,n.jsx)(x,{time:t.time}),(0,n.jsx)(C,{label:t.label,message:t,emojify:!1,menuProps:s})]}))}}k.propTypes={message:h().object.isRequired};const V=e=>{var{message:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message"]);return t.chat_message?(0,n.jsx)(I,Object.assign({message:t.chat_message,dropdownContext:".chat.session"},s)):t.log_message?(0,n.jsx)(k,Object.assign({message:t.log_message},s)):null};var M=s(91072);const S=e=>{const t=e.chat_message?e.chat_message:e.log_message;return t&&new Date(1e3*t.time).getDate()},B=e=>!!e.log_message&&e.log_message.type===_._Z.HISTORY,Z=({time:e})=>{const{t}=(0,M.$G)();return(0,n.jsxs)("div",Object.assign({className:"ui horizontal date divider"},{children:[(0,n.jsx)(N.Z,{icon:P.Z.DATE}),(0,j._s)(e,t)]}),`divider${e}`)},D=({entityId:e,onMessageVisibilityChanged:t,addDownload:s,highlightRemoteMenuId:o},r,i,a,l)=>{if(((e,t)=>{const s=t[e];return 0===e||1===e&&B(t[e-1])?S(s)!==(new Date).getDate()&&!B(s):S(t[e-1])!==S(s)})(a,l)){const e=i.chat_message?i.chat_message:i.log_message;e&&r.push((0,n.jsx)(Z,{time:e.time},`divider${e.id}`))}const c=(0,d.oi)(i);return r.push((0,n.jsx)(V,{id:(0,d.or)(c),onChange:e=>{t(c,e)},threshold:.4,message:i,menuProps:{addDownload:s,entityId:e,remoteMenuId:o,boundary:".message-section"}},c)),r};var G=s(8717),$=s(62285),T=s(32347),U=s(93379),H=s.n(U),W=s(7795),q=s.n(W),F=s(90569),z=s.n(F),L=s(3565),Y=s.n(L),J=s(19216),K=s.n(J),Q=s(44589),X=s.n(Q),ee=s(34378),te={};te.styleTagTransform=X(),te.setAttributes=Y(),te.insert=z().bind(null,"head"),te.domAPI=q(),te.insertStyleElement=K(),H()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;const se=o.memo((function(e){var{className:t,t:s}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["className","t"]);const d=(c=r.session,(0,o.useMemo)((()=>{const e={},t=t=>{const s=e[t];if(!s)throw new Error("Download was not found");return s};return{downloadDialogProps:{downloadHandler:(e,s,n,o)=>t(e.id).downloadHandler(e,s,n,o),userGetter:(e,s)=>{const n=t(e).userGetter;return n?n(e,s):void 0},itemDataGetter:(e,s)=>t(e).itemDataGetter(e,s),session:c},addDownloadItem:(t,s)=>{e[t]=s}}}),[]));var c;const{messageNodes:h,visibleItems:p}=(({highlightRemoteMenuId:e,messages:t,session:s},n)=>{const r=(0,o.useMemo)((()=>new Set),[s]),i=(e,t)=>{t?r.add(e):r.delete(e)};return{messageNodes:(0,o.useMemo)((()=>t?t.reduce(D.bind(null,{highlightRemoteMenuId:e,entityId:s?s.id:void 0,onMessageVisibilityChanged:i,addDownload:n.addDownloadItem}),[]):null),[t]),visibleItems:r}})(r,d),g=(0,l.Hc)(r,p);return(0,n.jsx)("div",Object.assign({ref:g,className:i()("message-section",t)},{children:h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",Object.assign({className:"ui list message-list"},{children:h})),(0,n.jsx)($.Z,Object.assign({},d.downloadDialogProps))]}):(0,n.jsx)(a.Z,{text:(0,G.Iu)("Loading messages",s,T.jv.COMMON)})}))}),((e,t)=>e.messages===t.messages))}}]);
2
- //# sourceMappingURL=317.bd64d61cd69d32cc9ce8.chunk.js.map
1
+ "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[317],{34378:(e,t,s)=>{s.d(t,{Z:()=>a});var n=s(87537),o=s.n(n),r=s(23645),i=s.n(r)()(o());i.push([e.id,".message-section {\n flex: 1;\n overflow-y: auto;\n}\n\n.message-list .date.divider i {\n margin-right: 5px;\n}\n\n.message-list .item .text .highlight.link {\n color: #4183c4;\n}\n\n.message-list .item .text .highlight.bold {\n font-weight: bold;\n}\n\n.message-list .item .text .table.dropdown,\n.message-list .item .text .table.dropdown .popup.trigger {\n max-width: 100%;\n}\n\n.message-list .item .text .table.dropdown .caption {\n overflow: hidden;\n}\n","",{version:3,sources:["webpack://./src/components/messages/messages.css"],names:[],mappings:"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".message-section {\n flex: 1;\n overflow-y: auto;\n}\n\n.message-list .date.divider i {\n margin-right: 5px;\n}\n\n.message-list .item .text .highlight.link {\n color: #4183c4;\n}\n\n.message-list .item .text .highlight.bold {\n font-weight: bold;\n}\n\n.message-list .item .text .table.dropdown,\n.message-list .item .text .table.dropdown .popup.trigger {\n max-width: 100%;\n}\n\n.message-list .item .text .table.dropdown .caption {\n overflow: hidden;\n}\n"],sourceRoot:""}]);const a=i},58317:(e,t,s)=>{s.d(t,{Z:()=>se});var n=s(85893),o=s(67294),r=s(94184),i=s.n(r),a=s(54883),l=s(99311),d=s(20867),c=s(45697),h=s.n(c);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},p.apply(this,arguments)}const g=new Map,m=new WeakMap;let u=0;function b(e,t,s={},n=undefined){if(void 0===window.IntersectionObserver&&void 0!==n){const o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof s.threshold?s.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:r,elements:i}=function(e){let t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(s=e.root,s?(m.has(s)||(u+=1,m.set(s,u.toString())),m.get(s)):"0"):e[t]}`;var s})).toString()}(e),s=g.get(t);if(!s){const n=new Map;let o;const r=new IntersectionObserver((t=>{t.forEach((t=>{var s;const r=t.isIntersecting&&o.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(s=n.get(t.target))||s.forEach((e=>{e(r,t)}))}))}),e);o=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),s={id:t,observer:r,elements:n},g.set(t,s)}return s}(s);let a=i.get(e)||[];return i.has(e)||i.set(e,a),a.push(t),r.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(i.delete(e),r.unobserve(e)),0===i.size&&(r.disconnect(),g.delete(o))}}const f=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function y(e){return"function"!=typeof e.children}class v extends o.Component{constructor(e){super(e),this.node=null,this._unobserveCb=null,this.handleNode=e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()},this.handleChange=(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),y(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)},this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:o,fallbackInView:r}=this.props;this._unobserveCb=b(this.node,this.handleChange,{threshold:e,root:t,rootMargin:s,trackVisibility:n,delay:o},r)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!y(this.props)){const{inView:e,entry:t}=this.state;return this.props.children({inView:e,entry:t,ref:this.handleNode})}const e=this.props,{children:t,as:s}=e,n=function(e,t){if(null==e)return{};var s,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)s=r[n],t.indexOf(s)>=0||(o[s]=e[s]);return o}(e,f);return o.createElement(s||"div",p({ref:this.handleNode},n),t)}}var O=s(84613),w=s(4333),j=s(2445);const x=({time:e})=>(0,n.jsx)("div",Object.assign({className:"time"},{children:(0,j.i$)(e)}));var A=s(94656);const C=e=>{var{emojify:t,message:s,user:o,label:r}=e,i=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["emojify","message","user","label"]);return(0,n.jsxs)("div",Object.assign({className:"text"},{children:[!!r&&(0,n.jsx)("span",Object.assign({className:"label"},{children:`${r}: `})),(0,n.jsx)(A.h,Object.assign({emojify:t,text:s.text,highlights:s.highlights,user:o},i))]}))};const E=({message:e,dropdownContext:t})=>(0,n.jsxs)("div",Object.assign({className:"header author"},{children:[e.third_person&&(0,n.jsx)("span",{children:"*"}),(0,n.jsx)(O.Ie,{contextElement:t,triggerIcon:null,user:e.from,direction:"downward",remoteMenuId:w.Z.HUB_USER,entityId:e.from.hub_session_id})]}));class I extends o.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,dropdownContext:s,menuProps:o}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message","dropdownContext","menuProps"]);return(0,n.jsxs)(v,Object.assign({className:"ui item chat "+t.from.flags.join(" ")},r,{children:[(0,n.jsx)(x,{time:t.time}),(0,n.jsxs)("div",Object.assign({className:"left "+(t.third_person?"third-person":"normal")},{children:[(0,n.jsx)(E,{message:t,dropdownContext:s}),(0,n.jsx)(C,{message:t,emojify:!0,user:t.from,menuProps:o})]}))]}))}}I.propTypes={message:h().object.isRequired,dropdownContext:h().string.isRequired};var N=s(35936),P=s(48117),_=s(76249);const R=e=>{switch(e){case _.m4.VERBOSE:return P.Z.VERBOSE;case _.m4.INFO:return P.Z.INFO+" circle";case _.m4.WARNING:return P.Z.WARNING;case _.m4.ERROR:return P.Z.ERROR;default:return""}};class k extends o.Component{shouldComponentUpdate(){return!1}render(){const e=this.props,{message:t,menuProps:s}=e,o=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message","menuProps"]);return(0,n.jsxs)(v,Object.assign({className:i()("ui item status",t.severity,t.type)},o,{children:[(0,n.jsx)(N.Z,{icon:R(t.severity)}),t.time>0&&(0,n.jsx)(x,{time:t.time}),(0,n.jsx)(C,{label:t.label,message:t,emojify:!1,menuProps:s})]}))}}k.propTypes={message:h().object.isRequired};const V=e=>{var{message:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["message"]);return t.chat_message?(0,n.jsx)(I,Object.assign({message:t.chat_message,dropdownContext:".chat.session"},s)):t.log_message?(0,n.jsx)(k,Object.assign({message:t.log_message},s)):null};var M=s(91072);const S=e=>{const t=e.chat_message?e.chat_message:e.log_message;return t&&new Date(1e3*t.time).getDate()},B=e=>!!e.log_message&&e.log_message.type===_._Z.HISTORY,Z=({time:e})=>{const{t}=(0,M.$G)();return(0,n.jsxs)("div",Object.assign({className:"ui horizontal date divider"},{children:[(0,n.jsx)(N.Z,{icon:P.Z.DATE}),(0,j._s)(e,t)]}),`divider${e}`)},D=({entityId:e,onMessageVisibilityChanged:t,addDownload:s,highlightRemoteMenuId:o},r,i,a,l)=>{if(((e,t)=>{const s=t[e];return 0===e||1===e&&B(t[e-1])?S(s)!==(new Date).getDate()&&!B(s):S(t[e-1])!==S(s)})(a,l)){const e=i.chat_message?i.chat_message:i.log_message;e&&r.push((0,n.jsx)(Z,{time:e.time},`divider${e.id}`))}const c=(0,d.oi)(i);return r.push((0,n.jsx)(V,{id:(0,d.or)(c),onChange:e=>{t(c,e)},threshold:.4,message:i,menuProps:{addDownload:s,entityId:e,remoteMenuId:o,boundary:".message-section"}},c)),r};var G=s(8717),$=s(62285),T=s(32347),U=s(93379),H=s.n(U),W=s(7795),q=s.n(W),F=s(90569),z=s.n(F),L=s(3565),Y=s.n(L),J=s(19216),K=s.n(J),Q=s(44589),X=s.n(Q),ee=s(34378),te={};te.styleTagTransform=X(),te.setAttributes=Y(),te.insert=z().bind(null,"head"),te.domAPI=q(),te.insertStyleElement=K(),H()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;const se=o.memo((function(e){var{className:t,t:s}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}(e,["className","t"]);const d=(c=r.session,(0,o.useMemo)((()=>{const e={},t=t=>{const s=e[t];if(!s)throw new Error("Download was not found");return s};return{downloadDialogProps:{downloadHandler:(e,s,n,o)=>t(e.id).downloadHandler(e,s,n,o),userGetter:(e,s)=>{const n=t(e).userGetter;return n?n(e,s):void 0},itemDataGetter:(e,s)=>t(e).itemDataGetter(e,s),session:c},addDownloadItem:(t,s)=>{e[t]=s}}}),[]));var c;const{messageNodes:h,visibleItems:p}=(({highlightRemoteMenuId:e,messages:t,session:s},n)=>{const r=(0,o.useMemo)((()=>new Set),[s]),i=(e,t)=>{t?r.add(e):r.delete(e)};return{messageNodes:(0,o.useMemo)((()=>t?t.reduce(D.bind(null,{highlightRemoteMenuId:e,entityId:s?s.id:void 0,onMessageVisibilityChanged:i,addDownload:n.addDownloadItem}),[]):null),[t]),visibleItems:r}})(r,d),g=(0,l.Hc)(r,p);return(0,n.jsx)("div",Object.assign({ref:g,className:i()("message-section",t)},{children:h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",Object.assign({className:"ui list message-list"},{children:h})),(0,n.jsx)($.Z,Object.assign({},d.downloadDialogProps))]}):(0,n.jsx)(a.Z,{text:(0,G.Iu)("Loading messages",s,T.jv.COMMON)})}))}),((e,t)=>e.messages===t.messages))}}]);
2
+ //# sourceMappingURL=317.4554e76168bdea543f39.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/317.bd64d61cd69d32cc9ce8.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,qdAAsd,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wJAAwJ,eAAiB,CAAC,sdAAsd,WAAa,MAEjvC,S,uICLA,SAASC,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,GAG3B,CAEA,OAAOL,CACT,EAEOH,EAASY,MAAMC,KAAMR,UAC9B,CAiBA,MAAMS,EAAc,IAAIC,IAClBC,EAAU,IAAIC,QACpB,IAAIC,EAAS,EAsFb,SAASC,EAAQC,EAASC,EAAUC,EAAU,CAAC,EAAGC,EArF9CC,WAsFF,QAA2C,IAAhCC,OAAOC,2BAA2DC,IAAnBJ,EAA8B,CACtF,MAAMK,EAASR,EAAQS,wBAUvB,OATAR,EAASE,EAAgB,CACvBO,eAAgBP,EAChBpB,OAAQiB,EACRW,kBAAgD,iBAAtBT,EAAQU,UAAyBV,EAAQU,UAAY,EAC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,gBAClCC,EACAnE,EACAoE,EACAC,GAGJC,WAAY,CAACR,EAAQ/F,KACnB,MAAMuG,EAAaT,EAAgBC,GAAQQ,WAC3C,OAASA,EAAaA,EAAWR,EAAQ/F,QAAS5C,CAAS,EAE7DoJ,eAAgB,CAACT,EAAQU,IAChBX,EAAgBC,GAAQS,eAAeT,EAAQU,GAExDd,WAEFe,gBAAiB,CAACX,EAAQY,KACxBd,EAAUE,GAAUY,CAAmB,EAIjC,GACT,KA3CiC,IAIpChB,EDYE,MAAM,aAAEiB,EAAY,aAAEC,GF+CK,GAC3BhC,wBAAuBiC,WAAUnB,WACnCD,KAEA,MAAMmB,GAAe,IAAAjB,UAAQ,IAAM,IAAImB,KAAe,CAACpB,IAEjDhB,EAA6B,CAACnJ,EAAYwD,KACzCA,EAKH6H,EAAaG,IAAIxL,GAHjBqL,EAAanH,OAAOlE,E,EAyBxB,MAAO,CACLoL,cAjBmB,IAAAhB,UAAQ,IACtBkB,EAIEA,EAASG,OACdvC,EAAsBwC,KAAK,KAAM,CAC/BrC,wBACA7B,SAAU2C,EAAUA,EAAQnK,QAAK4B,EACjCuH,6BACAC,YAAac,EAAgBgB,kBAE/B,IAVO,MAYR,CAACI,IAIFD,eACD,EEpFwCM,CAAgBhF,EAAOuD,GAExD0B,GAAgB,QAA2BjF,EAAO0E,GAExD,OACE,8BAAKvF,IAAK8F,EAAevF,UAAW,IAAW,kBAAmBA,IAAU,UACvE+E,GACD,iCACE,8BAAK/E,UAAU,wBAAsB,UAAE+E,MACvC,SAACS,EAAA,EAAc,iBAAK3B,EAAgBQ,0BAGtC,SAACoB,EAAA,EAAM,CAACjF,MAAM,QAAU,mBAAoBoC,EAAG,iBAIvD,IACA,CAACxD,EAAWsG,IACHtG,EAAU6F,WAAaS,EAAUT,U","sources":["webpack://airdcpp-webui/./src/components/messages/messages.css","webpack://airdcpp-webui/./node_modules/react-intersection-observer/react-intersection-observer.modern.mjs","webpack://airdcpp-webui/./src/components/messages/message/Timestamp.tsx","webpack://airdcpp-webui/./src/components/messages/message/MessageText.tsx","webpack://airdcpp-webui/./src/components/messages/message/ChatMessage.tsx","webpack://airdcpp-webui/./src/components/messages/message/StatusMessage.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListItem.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListDateDivider.tsx","webpack://airdcpp-webui/./src/components/messages/effects/MessageNodeManager.tsx","webpack://airdcpp-webui/./src/components/messages/messages.css?1e0d","webpack://airdcpp-webui/./src/components/messages/MessageView.tsx","webpack://airdcpp-webui/./src/effects/ItemDownloadManager.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-section {\\n flex: 1;\\n overflow-y: auto;\\n}\\n\\n.message-list .date.divider i {\\n margin-right: 5px;\\n}\\n\\n.message-list .item .text .highlight.link {\\n color: #4183c4;\\n}\\n\\n.message-list .item .text .highlight.bold {\\n font-weight: bold;\\n}\\n\\n.message-list .item .text .table.dropdown,\\n.message-list .item .text .table.dropdown .popup.trigger {\\n max-width: 100%;\\n}\\n\\n.message-list .item .text .table.dropdown .caption {\\n overflow: hidden;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/messages/messages.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB\",\"sourcesContent\":[\".message-section {\\n flex: 1;\\n overflow-y: auto;\\n}\\n\\n.message-list .date.divider i {\\n margin-right: 5px;\\n}\\n\\n.message-list .item .text .highlight.link {\\n color: #4183c4;\\n}\\n\\n.message-list .item .text .highlight.bold {\\n font-weight: bold;\\n}\\n\\n.message-list .item .text .table.dropdown,\\n.message-list .item .text .table.dropdown .popup.trigger {\\n max-width: 100%;\\n}\\n\\n.message-list .item .text .table.dropdown .caption {\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n","import * as React from 'react';\n\nimport { formatTimestamp } from 'utils/ValueFormat';\n\ninterface TimeStampProps {\n time: number;\n}\n\nexport const TimeStamp: React.FC<TimeStampProps> = ({ time }) => (\n <div className=\"time\">{formatTimestamp(time)}</div>\n);\n","import * as React from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport { HighlightedText } from '../../text/HighlightedText';\n\ninterface MessageTextProps {\n message: API.Message;\n emojify: boolean;\n user?: API.HubUser;\n label?: string;\n menuProps: UI.MessageActionMenuData;\n}\n\nexport const MessageText: React.FC<MessageTextProps> = ({\n emojify,\n message,\n user,\n label,\n ...other\n}) => (\n <div className=\"text\">\n {!!label && <span className=\"label\">{`${label}: `}</span>}\n <HighlightedText\n emojify={emojify}\n text={message.text}\n highlights={message.highlights}\n user={user}\n {...other}\n />\n </div>\n);\n","import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { InView } from 'react-intersection-observer';\n\nimport { UserMenu } from 'components/action-menu';\n\nimport * as API from 'types/api';\n\nimport MenuConstants from 'constants/MenuConstants';\nimport { CommonMessageProps } from '../types';\nimport { TimeStamp } from './Timestamp';\nimport { MessageText } from './MessageText';\n\ninterface AuthorProps {\n message: API.ChatMessage;\n dropdownContext: string;\n}\n\n// Message sections\nconst Author: React.FC<AuthorProps> = ({ message, dropdownContext }) => (\n <div className=\"header author\">\n {message.third_person && <span>*</span>}\n <UserMenu\n contextElement={dropdownContext}\n triggerIcon={null}\n user={message.from}\n direction=\"downward\"\n remoteMenuId={MenuConstants.HUB_USER}\n entityId={message.from.hub_session_id}\n />\n </div>\n);\n\n/*Author.propTypes = {\n message: PropTypes.object.isRequired,\n dropdownContext: PropTypes.string.isRequired,\n};*/\n\ninterface ChatMessageProps extends CommonMessageProps {\n message: API.ChatMessage;\n dropdownContext: string;\n}\n\n// Main message types\nclass ChatMessage extends React.Component<ChatMessageProps> {\n static propTypes = {\n message: PropTypes.object.isRequired,\n dropdownContext: PropTypes.string.isRequired,\n };\n\n shouldComponentUpdate() {\n return false;\n }\n\n render() {\n const { message, dropdownContext, menuProps, ...other } = this.props;\n\n return (\n <InView className={'ui item chat ' + message.from.flags.join(' ')} {...other}>\n <TimeStamp time={message.time} />\n <div className={'left ' + (message.third_person ? 'third-person' : 'normal')}>\n <Author message={message} dropdownContext={dropdownContext} />\n <MessageText\n message={message}\n emojify={true}\n user={message.from}\n menuProps={menuProps}\n />\n </div>\n </InView>\n );\n }\n}\n\nexport { ChatMessage };\n","import PropTypes from 'prop-types';\n\nimport classNames from 'classnames';\nimport { Component } from 'react';\nimport { InView } from 'react-intersection-observer';\n\nimport Icon from 'components/semantic/Icon';\nimport IconConstants from 'constants/IconConstants';\n\nimport * as API from 'types/api';\n\nimport { CommonMessageProps } from '../types';\nimport { MessageText } from './MessageText';\nimport { TimeStamp } from './Timestamp';\n\nconst getSeverityIcon = (severity: API.SeverityEnum) => {\n switch (severity) {\n case API.SeverityEnum.VERBOSE:\n return IconConstants.VERBOSE;\n case API.SeverityEnum.INFO:\n return IconConstants.INFO + ' circle';\n case API.SeverityEnum.WARNING:\n return IconConstants.WARNING;\n case API.SeverityEnum.ERROR:\n return IconConstants.ERROR;\n default:\n return '';\n }\n};\n\ninterface StatusMessageProps extends CommonMessageProps {\n message: API.StatusMessage;\n}\n\nclass StatusMessage extends Component<StatusMessageProps> {\n static propTypes = {\n message: PropTypes.object.isRequired,\n };\n\n shouldComponentUpdate() {\n return false;\n }\n\n render() {\n const { message, menuProps, ...other } = this.props;\n return (\n <InView\n className={classNames('ui item status', message.severity, message.type)}\n {...other}\n >\n <Icon icon={getSeverityIcon(message.severity)} />\n {message.time > 0 && <TimeStamp time={message.time} />}\n <MessageText\n label={message.label}\n message={message}\n emojify={false}\n menuProps={menuProps}\n />\n </InView>\n );\n }\n}\n\nexport { StatusMessage };\n","import * as React from 'react';\n\nimport { ChatMessage, StatusMessage } from '../message';\n\nimport * as UI from 'types/ui';\nimport { CommonMessageProps } from '../types';\n\ninterface MessageListItemProps extends CommonMessageProps {\n id: string;\n message: UI.MessageListItem;\n}\n\nexport const MessageListItem: React.FC<MessageListItemProps> = ({\n message,\n ...other\n}) => {\n if (message.chat_message) {\n return (\n <ChatMessage\n message={message.chat_message}\n dropdownContext=\".chat.session\"\n {...other}\n />\n );\n } else if (message.log_message) {\n return <StatusMessage message={message.log_message} {...other} />;\n }\n\n return null;\n};\n","//import PropTypes from 'prop-types';\nimport * as React from 'react';\n\nimport { formatCalendarTime } from 'utils/ValueFormat';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport Icon from 'components/semantic/Icon';\nimport IconConstants from 'constants/IconConstants';\nimport { useTranslation } from 'react-i18next';\n\nconst getMessageDay = (listItem: UI.MessageListItem) => {\n const message = !!listItem.chat_message ? listItem.chat_message : listItem.log_message;\n return message && new Date(message.time * 1000).getDate();\n};\n\nconst isToday = (message: UI.MessageListItem) => {\n return getMessageDay(message) === new Date().getDate();\n};\n\nconst isHistoryItem = (listItem: UI.MessageListItem) => {\n if (listItem.log_message) {\n return listItem.log_message.type === API.StatusMessageTypeEnum.HISTORY;\n }\n\n return false;\n};\n\nexport const showDateDivider = (index: number, messageList: UI.MessageListItem[]) => {\n const currentMessage = messageList[index];\n\n // First message? History log won't count\n if (index === 0 || (index === 1 && isHistoryItem(messageList[index - 1]))) {\n // Don't show for message that were received today\n if (!isToday(currentMessage) && !isHistoryItem(currentMessage)) {\n return true;\n }\n\n return false;\n }\n\n return getMessageDay(messageList[index - 1]) !== getMessageDay(currentMessage);\n};\n\ninterface MessageListDateDividerProps {\n time: number;\n}\n\nexport const MessageListDateDivider: React.FC<MessageListDateDividerProps> = ({\n time,\n}) => {\n const { t } = useTranslation();\n return (\n <div key={`divider${time}`} className=\"ui horizontal date divider\">\n <Icon icon={IconConstants.DATE} />\n {formatCalendarTime(time, t)}\n </div>\n );\n};\n","import { useMemo } from 'react';\nimport * as React from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport { getListMessageId, getListMessageIdString } from 'utils/MessageUtils';\n\nimport { MessageListItem } from '../list/MessageListItem';\nimport { MessageListDateDivider, showDateDivider } from '../list/MessageListDateDivider';\n\nimport { ItemDownloadManager } from '../../../effects/ItemDownloadManager';\n\ninterface MessageItemData {\n entityId: API.IdType | undefined;\n onMessageVisibilityChanged: (id: number, inView: boolean) => void;\n addDownload: UI.AddItemDownload;\n highlightRemoteMenuId: string | undefined;\n}\n\nconst reduceMessageListItem = (\n {\n entityId,\n onMessageVisibilityChanged,\n addDownload,\n highlightRemoteMenuId,\n }: MessageItemData,\n reduced: React.ReactNode[],\n message: UI.MessageListItem,\n index: number,\n messageList: UI.MessageListItem[]\n) => {\n // Push a divider when the date was changed\n if (showDateDivider(index, messageList)) {\n const messageObj = !!message.chat_message\n ? message.chat_message\n : message.log_message;\n if (!!messageObj) {\n reduced.push(\n <MessageListDateDivider key={`divider${messageObj.id}`} time={messageObj.time} />\n );\n }\n }\n\n // Push message\n const id = getListMessageId(message)!;\n reduced.push(\n <MessageListItem\n key={id}\n id={getListMessageIdString(id)}\n onChange={(inView) => {\n onMessageVisibilityChanged(id, inView);\n }}\n threshold={0.4}\n message={message}\n menuProps={{\n addDownload,\n entityId,\n remoteMenuId: highlightRemoteMenuId,\n boundary: '.message-section',\n // Determining the position is somewhat complex since the number of remote menu items isn't known at this point\n // Only use the boundary for now, could be improved later...\n // position: index < 4 ? 'bottom left' : 'top left',\n }}\n />\n );\n\n return reduced;\n};\n\ninterface Props {\n messages: UI.MessageListItem[] | null;\n session?: UI.SessionItemBase;\n highlightRemoteMenuId?: string;\n}\n\nexport const useMessagesNode = (\n { highlightRemoteMenuId, messages, session }: Props,\n downloadManager: ItemDownloadManager<UI.DownloadableItemInfo, Props>\n) => {\n const visibleItems = useMemo(() => new Set<number>(), [session]);\n\n const onMessageVisibilityChanged = (id: number, inView: boolean) => {\n if (!inView) {\n // console.log(`Remove view item ${id}`);\n visibleItems.delete(id);\n } else {\n // console.log(`Add view item ${id}`);\n visibleItems.add(id);\n }\n\n // console.log(`Visible items ${Array.from(visibleItems)}`);\n };\n\n const messageNodes = useMemo(() => {\n if (!messages) {\n return null;\n }\n\n return messages.reduce(\n reduceMessageListItem.bind(null, {\n highlightRemoteMenuId,\n entityId: session ? session.id : undefined,\n onMessageVisibilityChanged,\n addDownload: downloadManager.addDownloadItem,\n }),\n []\n );\n }, [messages]);\n\n return {\n messageNodes,\n visibleItems,\n };\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n export default content && content.locals ? content.locals : undefined;\n","//import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport Loader from 'components/semantic/Loader';\n\nimport { useMessageViewScrollEffect } from 'effects';\nimport { useMessagesNode } from './effects/MessageNodeManager';\nimport { useItemDownloadManager } from '../../effects/ItemDownloadManager';\nimport { translate } from 'utils/TranslationUtils';\n\nimport DownloadDialog from 'components/download/DownloadDialog';\n\nimport * as UI from 'types/ui';\n\nimport './messages.css';\n\ninterface MessageViewProps {\n messages: UI.MessageListItem[] | null;\n session?: UI.SessionItemBase;\n className?: string;\n scrollPositionHandler: UI.ScrollPositionHandler;\n highlightRemoteMenuId?: string;\n t: UI.TranslateF;\n}\n\nconst MessageView: React.FC<MessageViewProps> = React.memo(\n function MessageView({ className, t, ...other }) {\n const downloadManager = useItemDownloadManager(other.session);\n const { messageNodes, visibleItems } = useMessagesNode(other, downloadManager);\n\n const scrollableRef = useMessageViewScrollEffect(other, visibleItems);\n\n return (\n <div ref={scrollableRef} className={classNames('message-section', className)}>\n {!!messageNodes ? (\n <>\n <div className=\"ui list message-list\">{messageNodes}</div>\n <DownloadDialog {...downloadManager.downloadDialogProps} />\n </>\n ) : (\n <Loader text={translate('Loading messages', t, UI.Modules.COMMON)} />\n )}\n </div>\n );\n },\n (prevProps, nextProps) => {\n return prevProps.messages === nextProps.messages;\n }\n);\n\nexport default MessageView;\n","import { useMemo } from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nexport interface ItemDownloadManager<\n ItemT extends UI.DownloadableItemInfo,\n PropsT extends object\n> {\n addDownloadItem: UI.AddItemDownload<ItemT, PropsT>;\n downloadDialogProps: UI.ItemDownloadHandler<ItemT, PropsT>;\n}\n\nexport const useItemDownloadManager = <\n ItemT extends UI.DownloadableItemInfo,\n PropsT extends object\n>(\n session: UI.SessionItemBase | undefined\n) => {\n const downloadManager = useMemo<ItemDownloadManager<ItemT, PropsT>>(() => {\n const downloads: { [key in string]: UI.ItemDownloadHandler<ItemT, PropsT> } = {};\n\n const getDownloadItem = (itemId: API.IdType) => {\n const item = downloads[itemId];\n if (!item) {\n throw new Error('Download was not found');\n }\n\n return item;\n };\n\n const ret: ItemDownloadManager<ItemT, PropsT> = {\n downloadDialogProps: {\n downloadHandler: (itemInfo, user, downloadData, downloadSession) => {\n return getDownloadItem(itemInfo.id).downloadHandler(\n itemInfo,\n user,\n downloadData,\n downloadSession\n );\n },\n userGetter: (itemId, props) => {\n const userGetter = getDownloadItem(itemId).userGetter;\n return !!userGetter ? userGetter(itemId, props) : undefined;\n },\n itemDataGetter: (itemId, socket) => {\n return getDownloadItem(itemId).itemDataGetter(itemId, socket);\n },\n session,\n },\n addDownloadItem: (itemId, itemDownloadHandler) => {\n downloads[itemId] = itemDownloadHandler;\n },\n };\n\n return ret;\n }, []);\n\n return downloadManager;\n};\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","rootId","observe","element","callback","options","fallbackInView","unsupportedValue","window","IntersectionObserver","undefined","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","keys","sort","filter","map","root","has","set","toString","get","optionsToId","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","TimeStamp","className","MessageText","emojify","message","user","label","other","HighlightedText","text","highlights","Author","dropdownContext","third_person","contextElement","triggerIcon","from","direction","remoteMenuId","MenuConstants","entityId","hub_session_id","ChatMessage","shouldComponentUpdate","menuProps","flags","join","propTypes","getSeverityIcon","severity","IconConstants","StatusMessage","Component","type","Icon","icon","MessageListItem","chat_message","log_message","getMessageDay","listItem","Date","getDate","isHistoryItem","MessageListDateDivider","t","reduceMessageListItem","onMessageVisibilityChanged","addDownload","highlightRemoteMenuId","reduced","index","messageList","currentMessage","showDateDivider","messageObj","boundary","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","downloadManager","session","useMemo","downloads","getDownloadItem","itemId","item","Error","downloadDialogProps","downloadHandler","itemInfo","downloadData","downloadSession","userGetter","itemDataGetter","socket","addDownloadItem","itemDownloadHandler","messageNodes","visibleItems","messages","Set","add","reduce","bind","useMessagesNode","scrollableRef","DownloadDialog","Loader","nextProps"],"sourceRoot":""}
1
+ {"version":3,"file":"js/317.4554e76168bdea543f39.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,qdAAsd,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wJAAwJ,eAAiB,CAAC,sdAAsd,WAAa,MAEjvC,S,uICLA,SAASC,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAA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wCM,CAAgBhF,EAAOuD,GAExD0B,GAAgB,QAA2BjF,EAAO0E,GAExD,OACE,8BAAKvF,IAAK8F,EAAevF,UAAW,IAAW,kBAAmBA,IAAU,UACvE+E,GACD,iCACE,8BAAK/E,UAAU,wBAAsB,UAAE+E,MACvC,SAACS,EAAA,EAAc,iBAAK3B,EAAgBQ,0BAGtC,SAACoB,EAAA,EAAM,CAACjF,MAAM,QAAU,mBAAoBoC,EAAG,iBAIvD,IACA,CAACxD,EAAWsG,IACHtG,EAAU6F,WAAaS,EAAUT,U","sources":["webpack://airdcpp-webui/./src/components/messages/messages.css","webpack://airdcpp-webui/./node_modules/react-intersection-observer/react-intersection-observer.modern.mjs","webpack://airdcpp-webui/./src/components/messages/message/Timestamp.tsx","webpack://airdcpp-webui/./src/components/messages/message/MessageText.tsx","webpack://airdcpp-webui/./src/components/messages/message/ChatMessage.tsx","webpack://airdcpp-webui/./src/components/messages/message/StatusMessage.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListItem.tsx","webpack://airdcpp-webui/./src/components/messages/list/MessageListDateDivider.tsx","webpack://airdcpp-webui/./src/components/messages/effects/MessageNodeManager.tsx","webpack://airdcpp-webui/./src/components/messages/messages.css?1e0d","webpack://airdcpp-webui/./src/components/messages/MessageView.tsx","webpack://airdcpp-webui/./src/effects/ItemDownloadManager.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-section {\\n flex: 1;\\n overflow-y: auto;\\n}\\n\\n.message-list .date.divider i {\\n margin-right: 5px;\\n}\\n\\n.message-list .item .text .highlight.link {\\n color: #4183c4;\\n}\\n\\n.message-list .item .text .highlight.bold {\\n font-weight: bold;\\n}\\n\\n.message-list .item .text .table.dropdown,\\n.message-list .item .text .table.dropdown .popup.trigger {\\n max-width: 100%;\\n}\\n\\n.message-list .item .text .table.dropdown .caption {\\n overflow: hidden;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/messages/messages.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,OAAO;EACP,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,gBAAgB;AAClB\",\"sourcesContent\":[\".message-section {\\n flex: 1;\\n overflow-y: auto;\\n}\\n\\n.message-list .date.divider i {\\n margin-right: 5px;\\n}\\n\\n.message-list .item .text .highlight.link {\\n color: #4183c4;\\n}\\n\\n.message-list .item .text .highlight.bold {\\n font-weight: bold;\\n}\\n\\n.message-list .item .text .table.dropdown,\\n.message-list .item .text .table.dropdown .popup.trigger {\\n max-width: 100%;\\n}\\n\\n.message-list .item .text .table.dropdown .caption {\\n overflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n","import * as React from 'react';\n\nimport { formatTimestamp } from 'utils/ValueFormat';\n\ninterface TimeStampProps {\n time: number;\n}\n\nexport const TimeStamp: React.FC<TimeStampProps> = ({ time }) => (\n <div className=\"time\">{formatTimestamp(time)}</div>\n);\n","import * as React from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport { HighlightedText } from '../../text/HighlightedText';\n\ninterface MessageTextProps {\n message: API.Message;\n emojify: boolean;\n user?: API.HubUser;\n label?: string;\n menuProps: UI.MessageActionMenuData;\n}\n\nexport const MessageText: React.FC<MessageTextProps> = ({\n emojify,\n message,\n user,\n label,\n ...other\n}) => (\n <div className=\"text\">\n {!!label && <span className=\"label\">{`${label}: `}</span>}\n <HighlightedText\n emojify={emojify}\n text={message.text}\n highlights={message.highlights}\n user={user}\n {...other}\n />\n </div>\n);\n","import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { InView } from 'react-intersection-observer';\n\nimport { UserMenu } from 'components/action-menu';\n\nimport * as API from 'types/api';\n\nimport MenuConstants from 'constants/MenuConstants';\nimport { CommonMessageProps } from '../types';\nimport { TimeStamp } from './Timestamp';\nimport { MessageText } from './MessageText';\n\ninterface AuthorProps {\n message: API.ChatMessage;\n dropdownContext: string;\n}\n\n// Message sections\nconst Author: React.FC<AuthorProps> = ({ message, dropdownContext }) => (\n <div className=\"header author\">\n {message.third_person && <span>*</span>}\n <UserMenu\n contextElement={dropdownContext}\n triggerIcon={null}\n user={message.from}\n direction=\"downward\"\n remoteMenuId={MenuConstants.HUB_USER}\n entityId={message.from.hub_session_id}\n />\n </div>\n);\n\n/*Author.propTypes = {\n message: PropTypes.object.isRequired,\n dropdownContext: PropTypes.string.isRequired,\n};*/\n\ninterface ChatMessageProps extends CommonMessageProps {\n message: API.ChatMessage;\n dropdownContext: string;\n}\n\n// Main message types\nclass ChatMessage extends React.Component<ChatMessageProps> {\n static propTypes = {\n message: PropTypes.object.isRequired,\n dropdownContext: PropTypes.string.isRequired,\n };\n\n shouldComponentUpdate() {\n return false;\n }\n\n render() {\n const { message, dropdownContext, menuProps, ...other } = this.props;\n\n return (\n <InView className={'ui item chat ' + message.from.flags.join(' ')} {...other}>\n <TimeStamp time={message.time} />\n <div className={'left ' + (message.third_person ? 'third-person' : 'normal')}>\n <Author message={message} dropdownContext={dropdownContext} />\n <MessageText\n message={message}\n emojify={true}\n user={message.from}\n menuProps={menuProps}\n />\n </div>\n </InView>\n );\n }\n}\n\nexport { ChatMessage };\n","import PropTypes from 'prop-types';\n\nimport classNames from 'classnames';\nimport { Component } from 'react';\nimport { InView } from 'react-intersection-observer';\n\nimport Icon from 'components/semantic/Icon';\nimport IconConstants from 'constants/IconConstants';\n\nimport * as API from 'types/api';\n\nimport { CommonMessageProps } from '../types';\nimport { MessageText } from './MessageText';\nimport { TimeStamp } from './Timestamp';\n\nconst getSeverityIcon = (severity: API.SeverityEnum) => {\n switch (severity) {\n case API.SeverityEnum.VERBOSE:\n return IconConstants.VERBOSE;\n case API.SeverityEnum.INFO:\n return IconConstants.INFO + ' circle';\n case API.SeverityEnum.WARNING:\n return IconConstants.WARNING;\n case API.SeverityEnum.ERROR:\n return IconConstants.ERROR;\n default:\n return '';\n }\n};\n\ninterface StatusMessageProps extends CommonMessageProps {\n message: API.StatusMessage;\n}\n\nclass StatusMessage extends Component<StatusMessageProps> {\n static propTypes = {\n message: PropTypes.object.isRequired,\n };\n\n shouldComponentUpdate() {\n return false;\n }\n\n render() {\n const { message, menuProps, ...other } = this.props;\n return (\n <InView\n className={classNames('ui item status', message.severity, message.type)}\n {...other}\n >\n <Icon icon={getSeverityIcon(message.severity)} />\n {message.time > 0 && <TimeStamp time={message.time} />}\n <MessageText\n label={message.label}\n message={message}\n emojify={false}\n menuProps={menuProps}\n />\n </InView>\n );\n }\n}\n\nexport { StatusMessage };\n","import * as React from 'react';\n\nimport { ChatMessage, StatusMessage } from '../message';\n\nimport * as UI from 'types/ui';\nimport { CommonMessageProps } from '../types';\n\ninterface MessageListItemProps extends CommonMessageProps {\n id: string;\n message: UI.MessageListItem;\n}\n\nexport const MessageListItem: React.FC<MessageListItemProps> = ({\n message,\n ...other\n}) => {\n if (message.chat_message) {\n return (\n <ChatMessage\n message={message.chat_message}\n dropdownContext=\".chat.session\"\n {...other}\n />\n );\n } else if (message.log_message) {\n return <StatusMessage message={message.log_message} {...other} />;\n }\n\n return null;\n};\n","//import PropTypes from 'prop-types';\nimport * as React from 'react';\n\nimport { formatCalendarTime } from 'utils/ValueFormat';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport Icon from 'components/semantic/Icon';\nimport IconConstants from 'constants/IconConstants';\nimport { useTranslation } from 'react-i18next';\n\nconst getMessageDay = (listItem: UI.MessageListItem) => {\n const message = !!listItem.chat_message ? listItem.chat_message : listItem.log_message;\n return message && new Date(message.time * 1000).getDate();\n};\n\nconst isToday = (message: UI.MessageListItem) => {\n return getMessageDay(message) === new Date().getDate();\n};\n\nconst isHistoryItem = (listItem: UI.MessageListItem) => {\n if (listItem.log_message) {\n return listItem.log_message.type === API.StatusMessageTypeEnum.HISTORY;\n }\n\n return false;\n};\n\nexport const showDateDivider = (index: number, messageList: UI.MessageListItem[]) => {\n const currentMessage = messageList[index];\n\n // First message? History log won't count\n if (index === 0 || (index === 1 && isHistoryItem(messageList[index - 1]))) {\n // Don't show for message that were received today\n if (!isToday(currentMessage) && !isHistoryItem(currentMessage)) {\n return true;\n }\n\n return false;\n }\n\n return getMessageDay(messageList[index - 1]) !== getMessageDay(currentMessage);\n};\n\ninterface MessageListDateDividerProps {\n time: number;\n}\n\nexport const MessageListDateDivider: React.FC<MessageListDateDividerProps> = ({\n time,\n}) => {\n const { t } = useTranslation();\n return (\n <div key={`divider${time}`} className=\"ui horizontal date divider\">\n <Icon icon={IconConstants.DATE} />\n {formatCalendarTime(time, t)}\n </div>\n );\n};\n","import { useMemo } from 'react';\nimport * as React from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nimport { getListMessageId, getListMessageIdString } from 'utils/MessageUtils';\n\nimport { MessageListItem } from '../list/MessageListItem';\nimport { MessageListDateDivider, showDateDivider } from '../list/MessageListDateDivider';\n\nimport { ItemDownloadManager } from '../../../effects/ItemDownloadManager';\n\ninterface MessageItemData {\n entityId: API.IdType | undefined;\n onMessageVisibilityChanged: (id: number, inView: boolean) => void;\n addDownload: UI.AddItemDownload;\n highlightRemoteMenuId: string | undefined;\n}\n\nconst reduceMessageListItem = (\n {\n entityId,\n onMessageVisibilityChanged,\n addDownload,\n highlightRemoteMenuId,\n }: MessageItemData,\n reduced: React.ReactNode[],\n message: UI.MessageListItem,\n index: number,\n messageList: UI.MessageListItem[]\n) => {\n // Push a divider when the date was changed\n if (showDateDivider(index, messageList)) {\n const messageObj = !!message.chat_message\n ? message.chat_message\n : message.log_message;\n if (!!messageObj) {\n reduced.push(\n <MessageListDateDivider key={`divider${messageObj.id}`} time={messageObj.time} />\n );\n }\n }\n\n // Push message\n const id = getListMessageId(message)!;\n reduced.push(\n <MessageListItem\n key={id}\n id={getListMessageIdString(id)}\n onChange={(inView) => {\n onMessageVisibilityChanged(id, inView);\n }}\n threshold={0.4}\n message={message}\n menuProps={{\n addDownload,\n entityId,\n remoteMenuId: highlightRemoteMenuId,\n boundary: '.message-section',\n // Determining the position is somewhat complex since the number of remote menu items isn't known at this point\n // Only use the boundary for now, could be improved later...\n // position: index < 4 ? 'bottom left' : 'top left',\n }}\n />\n );\n\n return reduced;\n};\n\ninterface Props {\n messages: UI.MessageListItem[] | null;\n session?: UI.SessionItemBase;\n highlightRemoteMenuId?: string;\n}\n\nexport const useMessagesNode = (\n { highlightRemoteMenuId, messages, session }: Props,\n downloadManager: ItemDownloadManager<UI.DownloadableItemInfo, Props>\n) => {\n const visibleItems = useMemo(() => new Set<number>(), [session]);\n\n const onMessageVisibilityChanged = (id: number, inView: boolean) => {\n if (!inView) {\n // console.log(`Remove view item ${id}`);\n visibleItems.delete(id);\n } else {\n // console.log(`Add view item ${id}`);\n visibleItems.add(id);\n }\n\n // console.log(`Visible items ${Array.from(visibleItems)}`);\n };\n\n const messageNodes = useMemo(() => {\n if (!messages) {\n return null;\n }\n\n return messages.reduce(\n reduceMessageListItem.bind(null, {\n highlightRemoteMenuId,\n entityId: session ? session.id : undefined,\n onMessageVisibilityChanged,\n addDownload: downloadManager.addDownloadItem,\n }),\n []\n );\n }, [messages]);\n\n return {\n messageNodes,\n visibleItems,\n };\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./messages.css\";\n export default content && content.locals ? content.locals : undefined;\n","//import PropTypes from 'prop-types';\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport Loader from 'components/semantic/Loader';\n\nimport { useMessageViewScrollEffect } from 'effects';\nimport { useMessagesNode } from './effects/MessageNodeManager';\nimport { useItemDownloadManager } from '../../effects/ItemDownloadManager';\nimport { translate } from 'utils/TranslationUtils';\n\nimport DownloadDialog from 'components/download/DownloadDialog';\n\nimport * as UI from 'types/ui';\n\nimport './messages.css';\n\ninterface MessageViewProps {\n messages: UI.MessageListItem[] | null;\n session?: UI.SessionItemBase;\n className?: string;\n scrollPositionHandler: UI.ScrollPositionHandler;\n highlightRemoteMenuId?: string;\n t: UI.TranslateF;\n}\n\nconst MessageView: React.FC<MessageViewProps> = React.memo(\n function MessageView({ className, t, ...other }) {\n const downloadManager = useItemDownloadManager(other.session);\n const { messageNodes, visibleItems } = useMessagesNode(other, downloadManager);\n\n const scrollableRef = useMessageViewScrollEffect(other, visibleItems);\n\n return (\n <div ref={scrollableRef} className={classNames('message-section', className)}>\n {!!messageNodes ? (\n <>\n <div className=\"ui list message-list\">{messageNodes}</div>\n <DownloadDialog {...downloadManager.downloadDialogProps} />\n </>\n ) : (\n <Loader text={translate('Loading messages', t, UI.Modules.COMMON)} />\n )}\n </div>\n );\n },\n (prevProps, nextProps) => {\n return prevProps.messages === nextProps.messages;\n }\n);\n\nexport default MessageView;\n","import { useMemo } from 'react';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\n\nexport interface ItemDownloadManager<\n ItemT extends UI.DownloadableItemInfo,\n PropsT extends object\n> {\n addDownloadItem: UI.AddItemDownload<ItemT, PropsT>;\n downloadDialogProps: UI.ItemDownloadHandler<ItemT, PropsT>;\n}\n\nexport const useItemDownloadManager = <\n ItemT extends UI.DownloadableItemInfo,\n PropsT extends object\n>(\n session: UI.SessionItemBase | undefined\n) => {\n const downloadManager = useMemo<ItemDownloadManager<ItemT, PropsT>>(() => {\n const downloads: { [key in string]: UI.ItemDownloadHandler<ItemT, PropsT> } = {};\n\n const getDownloadItem = (itemId: API.IdType) => {\n const item = downloads[itemId];\n if (!item) {\n throw new Error('Download was not found');\n }\n\n return item;\n };\n\n const ret: ItemDownloadManager<ItemT, PropsT> = {\n downloadDialogProps: {\n downloadHandler: (itemInfo, user, downloadData, downloadSession) => {\n return getDownloadItem(itemInfo.id).downloadHandler(\n itemInfo,\n user,\n downloadData,\n downloadSession\n );\n },\n userGetter: (itemId, props) => {\n const userGetter = getDownloadItem(itemId).userGetter;\n return !!userGetter ? userGetter(itemId, props) : undefined;\n },\n itemDataGetter: (itemId, socket) => {\n return getDownloadItem(itemId).itemDataGetter(itemId, socket);\n },\n session,\n },\n addDownloadItem: (itemId, itemDownloadHandler) => {\n downloads[itemId] = itemDownloadHandler;\n },\n };\n\n return ret;\n }, []);\n\n return downloadManager;\n};\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","observerMap","Map","RootIds","WeakMap","rootId","observe","element","callback","options","fallbackInView","unsupportedValue","window","IntersectionObserver","undefined","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","keys","sort","filter","map","root","has","set","toString","get","optionsToId","instance","thresholds","entries","forEach","entry","_elements$get","inView","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","delete","unobserve","size","disconnect","_excluded","isPlainChildren","props","children","InView","constructor","super","node","_unobserveCb","handleNode","triggerOnce","skip","setState","initialInView","observeNode","handleChange","onChange","state","componentDidUpdate","prevProps","rootMargin","delay","componentWillUnmount","render","ref","_this$props","as","excluded","sourceKeys","_objectWithoutPropertiesLoose","TimeStamp","className","MessageText","emojify","message","user","label","other","HighlightedText","text","highlights","Author","dropdownContext","third_person","contextElement","triggerIcon","from","direction","remoteMenuId","MenuConstants","entityId","hub_session_id","ChatMessage","shouldComponentUpdate","menuProps","flags","join","propTypes","getSeverityIcon","severity","IconConstants","StatusMessage","Component","type","Icon","icon","MessageListItem","chat_message","log_message","getMessageDay","listItem","Date","getDate","isHistoryItem","MessageListDateDivider","t","reduceMessageListItem","onMessageVisibilityChanged","addDownload","highlightRemoteMenuId","reduced","index","messageList","currentMessage","showDateDivider","messageObj","boundary","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","downloadManager","session","useMemo","downloads","getDownloadItem","itemId","item","Error","downloadDialogProps","downloadHandler","itemInfo","downloadData","downloadSession","userGetter","itemDataGetter","socket","addDownloadItem","itemDownloadHandler","messageNodes","visibleItems","messages","Set","add","reduce","bind","useMessagesNode","scrollableRef","DownloadDialog","Loader","nextProps"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[424],{1624:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),a=n(23645),o=n.n(a)()(r());o.push([e.id,"/* Generic table styles */\n.virtual-table {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.virtual-table .table-container-wrapper {\n width: 100%;\n flex: 1 1 auto;\n\n /* The table won't shrink properly without this */\n height: calc(100% - 50px);\n}\n\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\n cursor: pointer;\n}\n\n.virtual-table .fixedDataTableLayout_main {\n background-color: rgba(250, 250, 250, 0.8);\n}\n\n.virtual-table .fixedDataTableLayout_main:focus {\n outline: inherit;\n}\n\n.virtual-table .public_fixedDataTable_header a,\n.public_fixedDataTableCell_main a {\n color: black;\n}\n\n/* Common cell content styles */\n\n.virtual-table .cell-wrapper {\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n max-height: 50px;\n padding: 5px;\n}\n\n.virtual-table .cell-wrapper .plain.cell,\n.virtual-table .cell-wrapper .empty.dropdown {\n margin: 0px 3px;\n}\n\n.virtual-table .cell-wrapper .ui.progress .bar {\n height: 5px;\n}\n\n/* Footer */\n\n.table-footer {\n width: 100%;\n padding: 5px;\n background-color: #f6f7f8;\n background-image: -webkit-linear-gradient(#fff, #efefef);\n background-image: linear-gradient(#fff, #efefef);\n display: flex;\n align-items: center;\n}\n\n.table-footer .filter {\n margin-left: auto;\n display: flex;\n}\n\n.table-footer .count-info {\n margin-right: 0px;\n color: grey;\n}\n\n.table-footer .filter > div:last-child {\n margin-left: 10px;\n}\n\n.table-footer .filter .filter-method.dropdown.button {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.table-footer .filter .dropdown .trigger.icon {\n margin-right: 0px;\n}\n\n.table-footer .filter input {\n width: 90%;\n}\n\n/* Table dropdowns */\n.table-container-wrapper .dropdown .trigger {\n line-height: 21px;\n display: flex;\n align-items: flex-start;\n}\n\n.table-container-wrapper .dropdown .trigger:hover,\n.public_fixedDataTableCell_main a:hover {\n cursor: pointer;\n}\n\n.table-container-wrapper .dropdown .trigger:hover span,\n.public_fixedDataTableCell_main a:hover {\n text-decoration: underline;\n}\n\n.table-container-wrapper .dropdown .trigger i.angle.icon {\n margin: 0px;\n}\n\n.table-container-wrapper .dropdown .icon-caption .icon {\n width: inherit !important;\n}\n\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\n padding-left: 22px;\n}\n\n.table-container-wrapper .dropdown .trigger i {\n flex-shrink: 0;\n}\n\n.table-container-wrapper .dropdown .trigger span {\n flex: 1;\n}\n\n/* Table dropdown popup content */\n.popup.dropdown-content {\n padding: 5px 15px;\n overflow: hidden;\n}\n\n.popup.dropdown-content .ui.dropdown.item {\n margin: 0px 0px;\n}\n","",{version:3,sources:["webpack://./src/components/table/style.css"],names:[],mappings:"AAAA,yBAAyB;AACzB;EACE,YAAY;EACZ,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,cAAc;;EAEd,iDAAiD;EACjD,yBAAyB;AAC3B;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,0CAA0C;AAC5C;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,YAAY;AACd;;AAEA,+BAA+B;;AAE/B;EACE,kBAAkB;EAClB,QAAQ;EACR,2BAA2B;EAC3B,gBAAgB;EAChB,YAAY;AACd;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,WAAW;AACb;;AAEA,WAAW;;AAEX;EACE,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,wDAAwD;EACxD,gDAAgD;EAChD,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,iBAAiB;EACjB,WAAW;AACb;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,4BAA4B;EAC5B,6BAA6B;AAC/B;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,UAAU;AACZ;;AAEA,oBAAoB;AACpB;EACE,iBAAiB;EACjB,aAAa;EACb,uBAAuB;AACzB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;;EAEE,0BAA0B;AAC5B;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,OAAO;AACT;;AAEA,iCAAiC;AACjC;EACE,iBAAiB;EACjB,gBAAgB;AAClB;;AAEA;EACE,eAAe;AACjB",sourcesContent:["/* Generic table styles */\n.virtual-table {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.virtual-table .table-container-wrapper {\n width: 100%;\n flex: 1 1 auto;\n\n /* The table won't shrink properly without this */\n height: calc(100% - 50px);\n}\n\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\n cursor: pointer;\n}\n\n.virtual-table .fixedDataTableLayout_main {\n background-color: rgba(250, 250, 250, 0.8);\n}\n\n.virtual-table .fixedDataTableLayout_main:focus {\n outline: inherit;\n}\n\n.virtual-table .public_fixedDataTable_header a,\n.public_fixedDataTableCell_main a {\n color: black;\n}\n\n/* Common cell content styles */\n\n.virtual-table .cell-wrapper {\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n max-height: 50px;\n padding: 5px;\n}\n\n.virtual-table .cell-wrapper .plain.cell,\n.virtual-table .cell-wrapper .empty.dropdown {\n margin: 0px 3px;\n}\n\n.virtual-table .cell-wrapper .ui.progress .bar {\n height: 5px;\n}\n\n/* Footer */\n\n.table-footer {\n width: 100%;\n padding: 5px;\n background-color: #f6f7f8;\n background-image: -webkit-linear-gradient(#fff, #efefef);\n background-image: linear-gradient(#fff, #efefef);\n display: flex;\n align-items: center;\n}\n\n.table-footer .filter {\n margin-left: auto;\n display: flex;\n}\n\n.table-footer .count-info {\n margin-right: 0px;\n color: grey;\n}\n\n.table-footer .filter > div:last-child {\n margin-left: 10px;\n}\n\n.table-footer .filter .filter-method.dropdown.button {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.table-footer .filter .dropdown .trigger.icon {\n margin-right: 0px;\n}\n\n.table-footer .filter input {\n width: 90%;\n}\n\n/* Table dropdowns */\n.table-container-wrapper .dropdown .trigger {\n line-height: 21px;\n display: flex;\n align-items: flex-start;\n}\n\n.table-container-wrapper .dropdown .trigger:hover,\n.public_fixedDataTableCell_main a:hover {\n cursor: pointer;\n}\n\n.table-container-wrapper .dropdown .trigger:hover span,\n.public_fixedDataTableCell_main a:hover {\n text-decoration: underline;\n}\n\n.table-container-wrapper .dropdown .trigger i.angle.icon {\n margin: 0px;\n}\n\n.table-container-wrapper .dropdown .icon-caption .icon {\n width: inherit !important;\n}\n\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\n padding-left: 22px;\n}\n\n.table-container-wrapper .dropdown .trigger i {\n flex-shrink: 0;\n}\n\n.table-container-wrapper .dropdown .trigger span {\n flex: 1;\n}\n\n/* Table dropdown popup content */\n.popup.dropdown-content {\n padding: 5px 15px;\n overflow: hidden;\n}\n\n.popup.dropdown-content .ui.dropdown.item {\n margin: 0px 0px;\n}\n"],sourceRoot:""}]);const s=o},11508:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(10293),r=n.n(i),a=n(518),o=n(66883);const s=r().createActions([{setRange:{asyncResult:!0}},{setSort:{asyncResult:!0}},{close:{asyncResult:!0}},{pause:{asyncResult:!0}},{init:{asyncResult:!0}},"clear"]),l=(e,t,n)=>a.Z.post(t+"/settings",e).then((e=>n.completed(t,e))).catch((e=>n.failed(t,e)));s.close.listen((function(e,t){if(t&&o.Z.socketAuthenticated){const t=this;return a.Z.delete(e).then((n=>t.completed(e,n))).catch((t=>this.failed(e,t)))}return Promise.resolve()})),s.setSort.listen((function(e,t,n){l({sort_property:t,sort_ascending:n},e,this)})),s.setRange.listen((function(e,t,n){console.assert(n>0,"Invalid max rows"),l({range_start:t,max_count:n},e,this)})),s.pause.listen((function(e,t){l({paused:t},e,this)})),s.init.listen((function(e,t,n){n&&l({source_filter:n},e,this)}));const c=s},91780:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n(85893);n(67294),n(10696);const r=({item:e})=>(0,i.jsxs)("div",Object.assign({className:"ip flag"},{children:[(0,i.jsx)("i",{className:"ui flag "+e.country.toLowerCase()}),e.str]}))},68126:(e,t,n)=>{n.d(t,{$A:()=>y,CW:()=>m,DS:()=>b,Eh:()=>f,Ks:()=>C,LV:()=>v,M4:()=>A,Nq:()=>w,VL:()=>x,fI:()=>E,iK:()=>D,qN:()=>g,uL:()=>j,wn:()=>B});var i=n(85893),r=(n(67294),n(36959)),a=n(2445),o=n(99015),s=n(91780),l=n(70516),c=n(89519),d=n(35108),p=n(28553),h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const u=e=>"object"==typeof e?Array.isArray(e)?e.length:e.str:0===e?null:e,A=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain text cell"},{children:u(e)})),g=e=>{var{onClick:t,label:n,columnKey:r}=e,a=h(e,["onClick","label","columnKey"]);return(0,i.jsx)(d.Cell,Object.assign({},a,{children:(0,i.jsx)("a",Object.assign({onClick:t},{children:n}))}))},w=e=>{var{cellData:t,rowDataGetter:n,children:a}=e,s=h(e,["cellData","rowDataGetter","children"]);return(0,i.jsx)(r.B2,Object.assign({caption:(0,i.jsx)(o.Z,{typeInfo:n().type,caption:t}),itemData:n},s))},m=e=>{var{cellData:t,rowDataGetter:n}=e,a=h(e,["cellData","rowDataGetter"]);return(0,i.jsx)(r.B2,Object.assign({caption:t,itemData:n},a))},b=e=>{var{cellData:t,rowDataGetter:n,actions:r,actionId:a}=e,o=h(e,["cellData","rowDataGetter","actions","actionId"]);const s=r.actions[a];return(0,c.OE)(s,n())?(0,i.jsx)(p.h,{children:({onClickAction:e})=>(0,i.jsx)("a",Object.assign({className:"plain link cell",onClick:()=>e({actionId:a,action:s,moduleId:r.moduleId,itemData:n()})},{children:u(t)}))}):(0,i.jsx)(A,Object.assign({cellData:t},o))},f=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain size cell"},{children:(0,a.BU)(e,t)})),v=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain speed cell"},{children:(0,a.CY)(e,t)})),C=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain duration cell"},{children:(0,a.SY)(e)})),x=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain abbr-duration cell"},{children:(0,a.LO)(e)})),E=({cellData:e})=>(0,i.jsx)(s.Z,{item:e}),y=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain connection cell"},{children:(0,a.Nh)(e,t)})),j=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain decimal cell"},{children:(0,a.VG)(e)})),D=e=>{var{cellData:t,rowDataGetter:n,clickHandlerGetter:a,userGetter:s,downloadHandler:l}=e,c=h(e,["cellData","rowDataGetter","clickHandlerGetter","userGetter","downloadHandler"]);return(0,i.jsx)(r.As,Object.assign({caption:(0,i.jsx)(o.Z,{typeInfo:n().type,onClick:a?a(t,n):null,caption:t}),user:s(n()),linkCaption:!a,itemInfoGetter:n,downloadHandler:l},c))},B=e=>{var{cellData:t,rowDataGetter:n,onChange:r}=e,a=h(e,["cellData","rowDataGetter","onChange"]);return(0,i.jsx)(l.Z,Object.assign({checked:t,onChange:e=>r(e,n())},a))}},78230:(e,t,n)=>{n.d(t,{Z:()=>J});var i=n(85893),r=n(45697),a=n.n(r),o=n(67294),s=n(11508),l=n(1059),c=n(99005),d=n(98374),p=n(16630),h=n(76249),u=n(10606),A=n(8717),g=n(91072);const w=(e,t)=>{const n=(e=>{switch(e){case h.V3.REGEX:return"Regex";case h.V3.WILDCARD:return"Wildcard";case h.V3.EXACT:return"Exact";default:return"Partial"}})(e);return(0,A.Iu)(n,t,"table.filter")},m=(e,t)=>{let n=t("table.filter.filter","Filter");return e!==h.V3.PARTIAL&&(n+=` (${w(e,t).toLowerCase()})`),n+"..."};class b extends o.PureComponent{constructor(){super(...arguments),this.state={value:"",method:h.V3.PARTIAL},this.onFilterUpdated=()=>{const{value:e,method:t}=this.state;this.props.onFilterUpdated(e,t)},this.onTextChanged=e=>{this.setState({value:e.target.value}),clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.onFilterUpdated()}),200)},this.onMethodChanged=e=>{this.setState({method:e}),setTimeout((()=>this.onFilterUpdated())),this.input.focus()},this.getFilterMethod=(e,t)=>{const n=e===this.state.method;return(0,i.jsx)(d.Z,Object.assign({onClick:()=>this.onMethodChanged(e),active:n},{children:w(e,t)}),e)}}componentWillUnmount(){clearTimeout(this.timer)}render(){const{value:e,method:t}=this.state,{autoFocus:n}=this.props;return(0,i.jsx)(g.Wb,{children:r=>(0,i.jsx)("div",Object.assign({className:"text-filter"},{children:(0,i.jsxs)("div",Object.assign({className:"ui action input"},{children:[(0,i.jsx)("input",{ref:e=>this.input=e,placeholder:m(t,r),onChange:this.onTextChanged,value:e,type:"text",autoFocus:!(0,u.wd)()&&n}),(0,i.jsx)(l.Z,Object.assign({className:"filter-method right top pointing",button:!0,direction:"upward"},{children:(0,i.jsx)(c.Z,Object.assign({caption:(0,A.Iu)("Match type",r,"table.filter")},{children:Object.keys(h.V3).filter((e=>isNaN(Number(e)))).map((e=>this.getFilterMethod(h.V3[e],r)))}))}))]}))}))})}}b.defaultProps={autoFocus:!0};const f=(0,p.Z)(b);var v=n(35936),C=n(48117);const x=({store:e})=>{if(e.totalCount<0)return null;let t=e.totalCount;return e.totalCount!==e.rowCount&&(t=e.rowCount+"/"+e.totalCount),(0,i.jsxs)("div",Object.assign({className:"count-info"},{children:[(0,i.jsx)(v.Z,{icon:C.Z.FILTER}),t]}))},E=({store:e,customFilter:t,footerData:n,textFilterProps:r})=>(0,i.jsxs)("div",Object.assign({className:"table-footer"},{children:[n,(0,i.jsxs)("div",Object.assign({className:"filter item"},{children:[t?(0,i.jsx)(t,{store:e}):null,(0,i.jsx)(f,Object.assign({store:e},r)),(0,i.jsx)(x,{store:e})]}))]}));var y=n(35108),j=n(88699);class D extends o.Component{constructor(){super(...arguments),this.state={rowData:null},this.loadData=e=>this.props.dataLoader.updateRowData(e,this.onDataLoaded),this.rowDataGetter=()=>this.state.rowData,this.onDataLoaded=e=>{this.setState({rowData:e})}}componentDidMount(){this.loadData(this.props.rowIndex)}UNSAFE_componentWillReceiveProps(e){e.rowIndex!==this.props.rowIndex&&this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded),this.loadData(e.rowIndex)||this.setState({rowData:null})}componentWillUnmount(){this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded)}shouldComponentUpdate(e,t){return t.rowData!==this.state.rowData||e.width!==this.props.width}render(){const e=this.props,{columnKey:t,children:n,renderCondition:r,rowClassNameGetter:a}=e,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["columnKey","children","renderCondition","rowClassNameGetter"]),{rowData:l}=this.state;if(!l)return null;if(r&&!r(l[t],l))return null;let c=t;return a&&(c+=" "+a(l)),(0,i.jsx)("div",Object.assign({className:"cell-wrapper "+c},{children:o.cloneElement(n,Object.assign({cellData:l[t],rowDataGetter:this.rowDataGetter},s))}))}}D.propTypes={rowIndex:a().number,dataLoader:a().object.isRequired,width:a().number};const B=D;var _=n(68126),R=n(32347);const O=(e,t,n,i)=>{const{name:r,columnKey:a}=e.props;let o=i((0,A.GF)(a,[...(0,A.qo)(n),R.W9.TABLE]),r);{const e=t.sortAscending?" ↑":" ↓";o+=t.sortProperty===a?e:""}return o};class I extends o.Component{constructor(){super(...arguments),this.state={width:0,height:0,columnWidths:{},isColumnResizing:void 0},this.getInitialProps=()=>({rowClassNameGetter:null,entityId:null}),this.scrollPosition=0,this.setInitialScrollRow=!0,this.updateRowRange=()=>{const{store:e}=this.props,{height:t}=this.state,n=(i=this.scrollPosition,Math.max(Math.floor(i/50),0));var i;const r=function(e){return Math.ceil(e/50)}(t);e.DEBUG&&console.log(`Settings changed, start: ${n}, end: ${r}, height: ${t}`,e.viewName),console.assert(e.active,"Posting data for an inactive view"),s.Z.setRange(e.viewUrl,n,r)},this.onScrollStart=(e,t)=>{const{store:n}=this.props;n.DEBUG&&console.log(`Scrolling started: ${t}`,n.viewUrl),console.assert(n.active,"Sending pause for an inactive view"),s.Z.pause(n.viewUrl,!0)},this.onScrollEnd=(e,t)=>{const{store:n,viewId:i}=this.props;this.scrollPosition=t,console.assert(n.active,"Sending pause for an inactive view"),s.Z.pause(n.viewUrl,!1),clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(this.updateRowRange,500),this.setInitialScrollRow&&(this.setInitialScrollRow=!1,n.DEBUG&&console.log(`Disabling initial scroll (view ${i})`)),n.setScrollData(t,i),n.DEBUG&&console.log(`Scrolling ended: ${t}`,n.viewUrl)},this.onColumnClicked=e=>{const{store:t}=this.props;let n=!0;e===t.sortProperty&&t.sortAscending&&(n=!1),s.Z.setSort(this.props.store.viewUrl,e,n)},this.onColumnResizeEndCallback=(e,t)=>{this.setState((({columnWidths:n})=>({columnWidths:Object.assign(Object.assign({},n),{[t]:e}),isColumnResizing:!1})),(()=>{this.setState({isColumnResizing:void 0})}))},this.childToColumn=e=>{if(e.props.hideWidth&&e.props.hideWidth>this.state.width)return null;let{flexGrow:t,width:n}=e.props;const{cell:r,columnKey:a,renderCondition:s}=e.props,{store:l,rowClassNameGetter:c,moduleId:d,t:p}=this.props,h=(0,u.wd)();return h||a&&this.state.columnWidths[a]&&(n=this.state.columnWidths[a],t=void 0),o.cloneElement(e,{header:(0,i.jsx)(_.qN,{onClick:this.onColumnClicked.bind(null,a),label:O(e,l,d,p)}),flexGrow:t,width:n,isResizable:!h,allowCellsRecycling:!0,cell:(0,i.jsx)(B,Object.assign({dataLoader:this.props.dataLoader,renderCondition:s,rowClassNameGetter:c,t:p},{children:r||(0,i.jsx)(_.M4,{})}))})},this.onResizeView=e=>{if(!e.bounds)return;const{width:t,height:n}=e.entry?e.entry:e.bounds;this.setState({width:t,height:n})}}componentDidUpdate(e,t){t.height!==this.state.height?this.updateRowRange():e.entityId===this.props.entityId&&e.viewId===this.props.viewId||(this.props.store.DEBUG&&console.log(`Enabling initial scroll, entity/viewId changed (view ${this.props.viewId})`),this.setInitialScrollRow=!0,this.updateRowRange())}componentWillUnmount(){clearTimeout(this.scrollTimer)}render(){const e=o.Children.map(this.props.children,this.childToColumn),{width:t,height:n,isColumnResizing:r}=this.state,{store:a,viewId:s}=this.props;return(0,i.jsx)(j.Z,Object.assign({bounds:!0,onResize:this.onResizeView},{children:({measureRef:o})=>(0,i.jsx)("div",Object.assign({ref:o,className:"table-container-wrapper"},{children:(0,i.jsx)(y.Table,Object.assign({width:t,height:n,rowHeight:50,rowsCount:a.rowCount,headerHeight:50,isColumnResizing:r,onColumnResizeEndCallback:this.onColumnResizeEndCallback,touchScrollEnabled:!0,onScrollStart:this.onScrollStart,onScrollEnd:this.onScrollEnd,scrollTop:this.setInitialScrollRow?a.getScrollData(s):void 0},{children:e}))}))}))}}I.propTypes={store:a().object.isRequired,rowClassNameGetter:a().func,entityId:a().any,dataLoader:a().any.isRequired};const S=I;var U=n(518),T=n(7145),k=n.n(T),G=n(18446),N=n.n(G);var Z=n(93379),L=n.n(Z),P=n(7795),F=n.n(P),W=n(90569),q=n.n(W),$=n(3565),M=n.n($),z=n(19216),V=n.n(z),Y=n(44589),K=n.n(Y),H=n(1624),X={};X.styleTagTransform=K(),X.setAttributes=M(),X.insert=q().bind(null,"head"),X.domAPI=F(),X.insertStyleElement=V(),L()(H.Z,X),H.Z&&H.Z.locals&&H.Z.locals,n(60854);class Q extends o.PureComponent{constructor(){super(...arguments),this.dataLoader=new class{constructor(e,t){this._onDataLoad=t,this._store=e,this._data=[],this._pendingRequest={},this._initialDataReceived=!1}clear(){this._pendingRequest={},this._data=[]}updateItem(e,t,n){let i=this._data[n];return i===t||N()(this._data[n],t)?e:(this._data[n]=i?k()(i,{$merge:t}):k()(i,{$set:t}),e+1)}onItemsUpdated(e,t=0,n){let i=n<this._data.length;if(e&&0!==e.length){this._initialDataReceived=!0;for(let t=0;t<this._data.length;t++)e[t]||delete this._data[t];(e.reduce(this.updateItem.bind(this),0)>0||0!==t)&&(i=!0)}else this.clear(),i=!0,this._initialDataReceived=!1;i&&this._onDataLoad()}get rangeOffset(){const e=this._rangeOffset;return this._rangeOffset=0,e}getRowData(e){return this._data[e]}updateRowData(e,t){const n=this._data[e];return n?(t(n),!0):(this._initialDataReceived&&this._queueRequestFor(e,t),!1)}removePendingRequests(e){delete this._pendingRequest[e]}_queueRequestFor(e,t){const n=e-e%10,i=this._pendingRequest[e];if(i)return void i.push(t);if(this._pendingRequest[e]=[t],e!==n){if(this._pendingRequest[n])return;this._pendingRequest[n]=[]}const r=Math.min(n+10,this._store.rowCount);U.Z.get(this._store.viewUrl+"/items/"+n+"/"+r).then(this.onRowsReceived.bind(this,n)).catch((e=>{console.error("Failed to load data",e);for(let e=n;e<r;e++)this._pendingRequest[e]&&delete this._pendingRequest[e]}))}onRowsReceived(e,t){if(this._pendingRequest[e])for(let n=0;n<t.length;n++){const i=e+n;N()(this._data[i],t[n])||(this._data[i]=t[n],this._pendingRequest[i]&&this._pendingRequest[i].forEach((e=>e(t[n])))),delete this._pendingRequest[i]}}}(this.props.store,(()=>this.forceUpdate())),this.unsubscribe=this.props.store.listen(this.dataLoader.onItemsUpdated.bind(this.dataLoader)),this.moduleExists=e=>!e||!this.props.sessionStore||this.props.sessionStore.getSession(e),this.start=e=>{const{store:t,sourceFilter:n}=this.props;s.Z.init(t.viewUrl,e,n),s.Z.setSort(t.viewUrl,t.sortProperty,t.sortAscending)},this.close=e=>{s.Z.close(this.props.store.viewUrl,this.moduleExists(e))}}componentDidMount(){this.start(this.props.entityId)}componentWillUnmount(){this.close(this.props.entityId),this.unsubscribe()}componentDidUpdate(e){if(e.entityId!==this.props.entityId&&(this.close(e.entityId),this.start(this.props.entityId)),e.viewId!==this.props.viewId){const{store:e}=this.props;e.paused&&s.Z.pause(e.viewUrl,!1),s.Z.clear(e.viewUrl)}}render(){const e=this.props,{store:t,footerData:n,emptyRowsNodeGetter:r,customFilter:a,textFilterProps:o}=e,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["store","footerData","emptyRowsNodeGetter","customFilter","textFilterProps"]);return r&&-1===t.totalCount?(0,i.jsx)("div",{className:"virtual-table"}):r&&0===t.totalCount?r():(0,i.jsx)("div",Object.assign({className:"virtual-table"},{children:(0,i.jsx)(g.Wb,{children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S,Object.assign({},s,{dataLoader:this.dataLoader,store:t,t:e})),(0,i.jsx)(E,{store:t,customFilter:a,footerData:n,textFilterProps:o})]})})}))}}Q.propTypes={footerData:a().node,emptyRowsNodeGetter:a().func,viewId:a().any,sessionStore:a().object,customFilter:a().elementType,sourceFilter:a().object};const J=Q},16630:(e,t,n)=>{n.d(t,{Z:()=>l});var i=n(85893),r=n(67294),a=n(42090),o=n(518),s=n(76249);function l(e,t="any"){return(0,a.Z)((n=>(r.useLayoutEffect((()=>()=>{const{store:e,filter:t}=n;e.active&&o.Z.delete(`${e.viewUrl}/filter/${t.id}`).catch((e=>console.error("Failed to delete table filter",e)))}),[]),(0,i.jsx)(e,Object.assign({},n,{onFilterUpdated:(e,i=s.V3.PARTIAL)=>{const r={pattern:e,method:i,property:t},{store:a,filter:l}=n;o.Z.put(`${a.viewUrl}/filter/${l.id}`,r).catch((e=>console.error("Failed to add table filter",e)))}})))),{urls:{filter:({store:e},t)=>t.post(`${e.viewUrl}/filter`)},loaderText:null})}},93836:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(518),r=n(11508),a=n(41143),o=n.n(a);const s=(e,t=!0)=>{let n=!1,a=-1,s=0,l=0,c=[],d=null,p=!1,h=0,u=e,A=t;const g=()=>{c=[],l=0,s=0,a=-1};return{listenables:r.Z,onClose(e){e===this.viewUrl&&(this.DEBUG&&console.log(`Closing view ${this.viewUrl}`),this._removeMessageListener(),g(),n=!1,this.trigger())},onClear(e){e===this.viewUrl&&(g(),this.trigger())},onPause(e,t){e===this.viewUrl&&(p=t)},onInit(e,t){e===this.viewUrl&&(o()(!n,"Trying start an active table view"),d=t,this.addMessageListener(),this.DEBUG&&console.log(`Starting view ${this.viewUrl}`),n=!0)},onSetSort(e,t,n){e===this.viewUrl&&(u=t,A=n)},addMessageListener(){this._removeMessageListener=i.Z.addViewUpdateListener(this._viewName,this._handleUpdate,d)},get items(){return c},get viewUrl(){let e=this._apiUrl+"/";return d&&(e+=d+"/"),e+=this._viewName,e},get viewName(){return this._viewName},get rowCount(){return s},get totalCount(){return a},get active(){return n},get sortProperty(){return u},get sortAscending(){return A},get paused(){return p},setScrollData(e,t){this._sessionStore?this._sessionStore.scroll.setScrollData(e,d,t):(this.DEBUG&&console.log(`Setting scroll position ${e} for view ${this.viewUrl} (view ID ${t})`),h=e)},getScrollData(e){return this._sessionStore?this._sessionStore.scroll.getScrollData(d,e):(this.DEBUG&&console.log(`Getting scroll position ${h} for view ${this.viewUrl} (view ID ${e})`),h)},_handleUpdate(e){(e=>{var t;null!=e.range_start&&(l=e.range_start),null!=e.total_items&&(a=e.total_items),null!=e.matching_items&&(s=e.matching_items),null!=e.items&&(t=e.items,c=t.reduce(((e,t,n)=>{let i=(r=t.id,c.find((e=>!!e&&e.id===r))||{id:t.id});var r;return t.properties?i=Object.assign({},i,t.properties):1===Object.keys(i).length&&console.error("No properties were sent for a new view item",i.id),e[l+n]=i,e}),[]))})(e),this.trigger(c,e.range_offset,s)}}}}}]);
2
- //# sourceMappingURL=424.56553dccda41d0a74c27.chunk.js.map
1
+ "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[424],{1624:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(87537),r=n.n(i),a=n(23645),o=n.n(a)()(r());o.push([e.id,"/* Generic table styles */\n.virtual-table {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.virtual-table .table-container-wrapper {\n width: 100%;\n flex: 1 1 auto;\n\n /* The table won't shrink properly without this */\n height: calc(100% - 50px);\n}\n\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\n cursor: pointer;\n}\n\n.virtual-table .fixedDataTableLayout_main {\n background-color: rgba(250, 250, 250, 0.8);\n}\n\n.virtual-table .fixedDataTableLayout_main:focus {\n outline: inherit;\n}\n\n.virtual-table .public_fixedDataTable_header a,\n.public_fixedDataTableCell_main a {\n color: black;\n}\n\n/* Common cell content styles */\n\n.virtual-table .cell-wrapper {\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n max-height: 50px;\n padding: 5px;\n}\n\n.virtual-table .cell-wrapper .plain.cell,\n.virtual-table .cell-wrapper .empty.dropdown {\n margin: 0px 3px;\n}\n\n.virtual-table .cell-wrapper .ui.progress .bar {\n height: 5px;\n}\n\n/* Footer */\n\n.table-footer {\n width: 100%;\n padding: 5px;\n background-color: #f6f7f8;\n background-image: -webkit-linear-gradient(#fff, #efefef);\n background-image: linear-gradient(#fff, #efefef);\n display: flex;\n align-items: center;\n}\n\n.table-footer .filter {\n margin-left: auto;\n display: flex;\n}\n\n.table-footer .count-info {\n margin-right: 0px;\n color: grey;\n}\n\n.table-footer .filter > div:last-child {\n margin-left: 10px;\n}\n\n.table-footer .filter .filter-method.dropdown.button {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.table-footer .filter .dropdown .trigger.icon {\n margin-right: 0px;\n}\n\n.table-footer .filter input {\n width: 90%;\n}\n\n/* Table dropdowns */\n.table-container-wrapper .dropdown .trigger {\n line-height: 21px;\n display: flex;\n align-items: flex-start;\n}\n\n.table-container-wrapper .dropdown .trigger:hover,\n.public_fixedDataTableCell_main a:hover {\n cursor: pointer;\n}\n\n.table-container-wrapper .dropdown .trigger:hover span,\n.public_fixedDataTableCell_main a:hover {\n text-decoration: underline;\n}\n\n.table-container-wrapper .dropdown .trigger i.angle.icon {\n margin: 0px;\n}\n\n.table-container-wrapper .dropdown .icon-caption .icon {\n width: inherit !important;\n}\n\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\n padding-left: 22px;\n}\n\n.table-container-wrapper .dropdown .trigger i {\n flex-shrink: 0;\n}\n\n.table-container-wrapper .dropdown .trigger span {\n flex: 1;\n}\n\n/* Table dropdown popup content */\n.popup.dropdown-content {\n padding: 5px 15px;\n overflow: hidden;\n}\n\n.popup.dropdown-content .ui.dropdown.item {\n margin: 0px 0px;\n}\n","",{version:3,sources:["webpack://./src/components/table/style.css"],names:[],mappings:"AAAA,yBAAyB;AACzB;EACE,YAAY;EACZ,WAAW;EACX,aAAa;EACb,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,cAAc;;EAEd,iDAAiD;EACjD,yBAAyB;AAC3B;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,0CAA0C;AAC5C;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,YAAY;AACd;;AAEA,+BAA+B;;AAE/B;EACE,kBAAkB;EAClB,QAAQ;EACR,2BAA2B;EAC3B,gBAAgB;EAChB,YAAY;AACd;;AAEA;;EAEE,eAAe;AACjB;;AAEA;EACE,WAAW;AACb;;AAEA,WAAW;;AAEX;EACE,WAAW;EACX,YAAY;EACZ,yBAAyB;EACzB,wDAAwD;EACxD,gDAAgD;EAChD,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,iBAAiB;EACjB,WAAW;AACb;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,4BAA4B;EAC5B,6BAA6B;AAC/B;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,UAAU;AACZ;;AAEA,oBAAoB;AACpB;EACE,iBAAiB;EACjB,aAAa;EACb,uBAAuB;AACzB;;AAEA;;EAEE,eAAe;AACjB;;AAEA;;EAEE,0BAA0B;AAC5B;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,OAAO;AACT;;AAEA,iCAAiC;AACjC;EACE,iBAAiB;EACjB,gBAAgB;AAClB;;AAEA;EACE,eAAe;AACjB",sourcesContent:["/* Generic table styles */\n.virtual-table {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.virtual-table .table-container-wrapper {\n width: 100%;\n flex: 1 1 auto;\n\n /* The table won't shrink properly without this */\n height: calc(100% - 50px);\n}\n\n.virtual-table .public_fixedDataTable_bodyRow a i:hover {\n cursor: pointer;\n}\n\n.virtual-table .fixedDataTableLayout_main {\n background-color: rgba(250, 250, 250, 0.8);\n}\n\n.virtual-table .fixedDataTableLayout_main:focus {\n outline: inherit;\n}\n\n.virtual-table .public_fixedDataTable_header a,\n.public_fixedDataTableCell_main a {\n color: black;\n}\n\n/* Common cell content styles */\n\n.virtual-table .cell-wrapper {\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n max-height: 50px;\n padding: 5px;\n}\n\n.virtual-table .cell-wrapper .plain.cell,\n.virtual-table .cell-wrapper .empty.dropdown {\n margin: 0px 3px;\n}\n\n.virtual-table .cell-wrapper .ui.progress .bar {\n height: 5px;\n}\n\n/* Footer */\n\n.table-footer {\n width: 100%;\n padding: 5px;\n background-color: #f6f7f8;\n background-image: -webkit-linear-gradient(#fff, #efefef);\n background-image: linear-gradient(#fff, #efefef);\n display: flex;\n align-items: center;\n}\n\n.table-footer .filter {\n margin-left: auto;\n display: flex;\n}\n\n.table-footer .count-info {\n margin-right: 0px;\n color: grey;\n}\n\n.table-footer .filter > div:last-child {\n margin-left: 10px;\n}\n\n.table-footer .filter .filter-method.dropdown.button {\n padding-left: 0px !important;\n padding-right: 0px !important;\n}\n\n.table-footer .filter .dropdown .trigger.icon {\n margin-right: 0px;\n}\n\n.table-footer .filter input {\n width: 90%;\n}\n\n/* Table dropdowns */\n.table-container-wrapper .dropdown .trigger {\n line-height: 21px;\n display: flex;\n align-items: flex-start;\n}\n\n.table-container-wrapper .dropdown .trigger:hover,\n.public_fixedDataTableCell_main a:hover {\n cursor: pointer;\n}\n\n.table-container-wrapper .dropdown .trigger:hover span,\n.public_fixedDataTableCell_main a:hover {\n text-decoration: underline;\n}\n\n.table-container-wrapper .dropdown .trigger i.angle.icon {\n margin: 0px;\n}\n\n.table-container-wrapper .dropdown .icon-caption .icon {\n width: inherit !important;\n}\n\n.table-container-wrapper .empty.dropdown.filtered:not(.no-access) > div {\n padding-left: 22px;\n}\n\n.table-container-wrapper .dropdown .trigger i {\n flex-shrink: 0;\n}\n\n.table-container-wrapper .dropdown .trigger span {\n flex: 1;\n}\n\n/* Table dropdown popup content */\n.popup.dropdown-content {\n padding: 5px 15px;\n overflow: hidden;\n}\n\n.popup.dropdown-content .ui.dropdown.item {\n margin: 0px 0px;\n}\n"],sourceRoot:""}]);const s=o},11508:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(10293),r=n.n(i),a=n(518),o=n(66883);const s=r().createActions([{setRange:{asyncResult:!0}},{setSort:{asyncResult:!0}},{close:{asyncResult:!0}},{pause:{asyncResult:!0}},{init:{asyncResult:!0}},"clear"]),l=(e,t,n)=>a.Z.post(t+"/settings",e).then((e=>n.completed(t,e))).catch((e=>n.failed(t,e)));s.close.listen((function(e,t){if(t&&o.Z.socketAuthenticated){const t=this;return a.Z.delete(e).then((n=>t.completed(e,n))).catch((t=>this.failed(e,t)))}return Promise.resolve()})),s.setSort.listen((function(e,t,n){l({sort_property:t,sort_ascending:n},e,this)})),s.setRange.listen((function(e,t,n){console.assert(n>0,"Invalid max rows"),l({range_start:t,max_count:n},e,this)})),s.pause.listen((function(e,t){l({paused:t},e,this)})),s.init.listen((function(e,t,n){n&&l({source_filter:n},e,this)}));const c=s},91780:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n(85893);n(67294),n(10696);const r=({item:e})=>(0,i.jsxs)("div",Object.assign({className:"ip flag"},{children:[(0,i.jsx)("i",{className:"ui flag "+e.country.toLowerCase()}),e.str]}))},68126:(e,t,n)=>{n.d(t,{$A:()=>y,CW:()=>m,DS:()=>b,Eh:()=>f,Ks:()=>C,LV:()=>v,M4:()=>A,Nq:()=>w,VL:()=>x,fI:()=>E,iK:()=>D,qN:()=>g,uL:()=>j,wn:()=>B});var i=n(85893),r=(n(67294),n(84613)),a=n(2445),o=n(99015),s=n(91780),l=n(70516),c=n(89519),d=n(35108),p=n(28553),h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const u=e=>"object"==typeof e?Array.isArray(e)?e.length:e.str:0===e?null:e,A=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain text cell"},{children:u(e)})),g=e=>{var{onClick:t,label:n,columnKey:r}=e,a=h(e,["onClick","label","columnKey"]);return(0,i.jsx)(d.Cell,Object.assign({},a,{children:(0,i.jsx)("a",Object.assign({onClick:t},{children:n}))}))},w=e=>{var{cellData:t,rowDataGetter:n,children:a}=e,s=h(e,["cellData","rowDataGetter","children"]);return(0,i.jsx)(r.B2,Object.assign({caption:(0,i.jsx)(o.Z,{typeInfo:n().type,caption:t}),itemData:n},s))},m=e=>{var{cellData:t,rowDataGetter:n}=e,a=h(e,["cellData","rowDataGetter"]);return(0,i.jsx)(r.B2,Object.assign({caption:t,itemData:n},a))},b=e=>{var{cellData:t,rowDataGetter:n,actions:r,actionId:a}=e,o=h(e,["cellData","rowDataGetter","actions","actionId"]);const s=r.actions[a];return(0,c.OE)(s,n())?(0,i.jsx)(p.h,{children:({onClickAction:e})=>(0,i.jsx)("a",Object.assign({className:"plain link cell",onClick:()=>e({actionId:a,action:s,moduleId:r.moduleId,itemData:n()})},{children:u(t)}))}):(0,i.jsx)(A,Object.assign({cellData:t},o))},f=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain size cell"},{children:(0,a.BU)(e,t)})),v=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain speed cell"},{children:(0,a.CY)(e,t)})),C=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain duration cell"},{children:(0,a.SY)(e)})),x=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain abbr-duration cell"},{children:(0,a.LO)(e)})),E=({cellData:e})=>(0,i.jsx)(s.Z,{item:e}),y=({cellData:e,t})=>(0,i.jsx)("span",Object.assign({className:"plain connection cell"},{children:(0,a.Nh)(e,t)})),j=({cellData:e})=>(0,i.jsx)("span",Object.assign({className:"plain decimal cell"},{children:(0,a.VG)(e)})),D=e=>{var{cellData:t,rowDataGetter:n,clickHandlerGetter:a,userGetter:s,downloadHandler:l}=e,c=h(e,["cellData","rowDataGetter","clickHandlerGetter","userGetter","downloadHandler"]);return(0,i.jsx)(r.As,Object.assign({caption:(0,i.jsx)(o.Z,{typeInfo:n().type,onClick:a?a(t,n):null,caption:t}),user:s(n()),linkCaption:!a,itemInfoGetter:n,downloadHandler:l},c))},B=e=>{var{cellData:t,rowDataGetter:n,onChange:r}=e,a=h(e,["cellData","rowDataGetter","onChange"]);return(0,i.jsx)(l.Z,Object.assign({checked:t,onChange:e=>r(e,n())},a))}},78230:(e,t,n)=>{n.d(t,{Z:()=>J});var i=n(85893),r=n(45697),a=n.n(r),o=n(67294),s=n(11508),l=n(1059),c=n(99005),d=n(98374),p=n(16630),h=n(76249),u=n(10606),A=n(8717),g=n(91072);const w=(e,t)=>{const n=(e=>{switch(e){case h.V3.REGEX:return"Regex";case h.V3.WILDCARD:return"Wildcard";case h.V3.EXACT:return"Exact";default:return"Partial"}})(e);return(0,A.Iu)(n,t,"table.filter")},m=(e,t)=>{let n=t("table.filter.filter","Filter");return e!==h.V3.PARTIAL&&(n+=` (${w(e,t).toLowerCase()})`),n+"..."};class b extends o.PureComponent{constructor(){super(...arguments),this.state={value:"",method:h.V3.PARTIAL},this.onFilterUpdated=()=>{const{value:e,method:t}=this.state;this.props.onFilterUpdated(e,t)},this.onTextChanged=e=>{this.setState({value:e.target.value}),clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.onFilterUpdated()}),200)},this.onMethodChanged=e=>{this.setState({method:e}),setTimeout((()=>this.onFilterUpdated())),this.input.focus()},this.getFilterMethod=(e,t)=>{const n=e===this.state.method;return(0,i.jsx)(d.Z,Object.assign({onClick:()=>this.onMethodChanged(e),active:n},{children:w(e,t)}),e)}}componentWillUnmount(){clearTimeout(this.timer)}render(){const{value:e,method:t}=this.state,{autoFocus:n}=this.props;return(0,i.jsx)(g.Wb,{children:r=>(0,i.jsx)("div",Object.assign({className:"text-filter"},{children:(0,i.jsxs)("div",Object.assign({className:"ui action input"},{children:[(0,i.jsx)("input",{ref:e=>this.input=e,placeholder:m(t,r),onChange:this.onTextChanged,value:e,type:"text",autoFocus:!(0,u.wd)()&&n}),(0,i.jsx)(l.Z,Object.assign({className:"filter-method right top pointing",button:!0,direction:"upward"},{children:(0,i.jsx)(c.Z,Object.assign({caption:(0,A.Iu)("Match type",r,"table.filter")},{children:Object.keys(h.V3).filter((e=>isNaN(Number(e)))).map((e=>this.getFilterMethod(h.V3[e],r)))}))}))]}))}))})}}b.defaultProps={autoFocus:!0};const f=(0,p.Z)(b);var v=n(35936),C=n(48117);const x=({store:e})=>{if(e.totalCount<0)return null;let t=e.totalCount;return e.totalCount!==e.rowCount&&(t=e.rowCount+"/"+e.totalCount),(0,i.jsxs)("div",Object.assign({className:"count-info"},{children:[(0,i.jsx)(v.Z,{icon:C.Z.FILTER}),t]}))},E=({store:e,customFilter:t,footerData:n,textFilterProps:r})=>(0,i.jsxs)("div",Object.assign({className:"table-footer"},{children:[n,(0,i.jsxs)("div",Object.assign({className:"filter item"},{children:[t?(0,i.jsx)(t,{store:e}):null,(0,i.jsx)(f,Object.assign({store:e},r)),(0,i.jsx)(x,{store:e})]}))]}));var y=n(35108),j=n(88699);class D extends o.Component{constructor(){super(...arguments),this.state={rowData:null},this.loadData=e=>this.props.dataLoader.updateRowData(e,this.onDataLoaded),this.rowDataGetter=()=>this.state.rowData,this.onDataLoaded=e=>{this.setState({rowData:e})}}componentDidMount(){this.loadData(this.props.rowIndex)}UNSAFE_componentWillReceiveProps(e){e.rowIndex!==this.props.rowIndex&&this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded),this.loadData(e.rowIndex)||this.setState({rowData:null})}componentWillUnmount(){this.props.dataLoader.removePendingRequests(this.props.rowIndex,this.onDataLoaded)}shouldComponentUpdate(e,t){return t.rowData!==this.state.rowData||e.width!==this.props.width}render(){const e=this.props,{columnKey:t,children:n,renderCondition:r,rowClassNameGetter:a}=e,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["columnKey","children","renderCondition","rowClassNameGetter"]),{rowData:l}=this.state;if(!l)return null;if(r&&!r(l[t],l))return null;let c=t;return a&&(c+=" "+a(l)),(0,i.jsx)("div",Object.assign({className:"cell-wrapper "+c},{children:o.cloneElement(n,Object.assign({cellData:l[t],rowDataGetter:this.rowDataGetter},s))}))}}D.propTypes={rowIndex:a().number,dataLoader:a().object.isRequired,width:a().number};const B=D;var _=n(68126),R=n(32347);const O=(e,t,n,i)=>{const{name:r,columnKey:a}=e.props;let o=i((0,A.GF)(a,[...(0,A.qo)(n),R.W9.TABLE]),r);{const e=t.sortAscending?" ↑":" ↓";o+=t.sortProperty===a?e:""}return o};class I extends o.Component{constructor(){super(...arguments),this.state={width:0,height:0,columnWidths:{},isColumnResizing:void 0},this.getInitialProps=()=>({rowClassNameGetter:null,entityId:null}),this.scrollPosition=0,this.setInitialScrollRow=!0,this.updateRowRange=()=>{const{store:e}=this.props,{height:t}=this.state,n=(i=this.scrollPosition,Math.max(Math.floor(i/50),0));var i;const r=function(e){return Math.ceil(e/50)}(t);e.DEBUG&&console.log(`Settings changed, start: ${n}, end: ${r}, height: ${t}`,e.viewName),console.assert(e.active,"Posting data for an inactive view"),s.Z.setRange(e.viewUrl,n,r)},this.onScrollStart=(e,t)=>{const{store:n}=this.props;n.DEBUG&&console.log(`Scrolling started: ${t}`,n.viewUrl),console.assert(n.active,"Sending pause for an inactive view"),s.Z.pause(n.viewUrl,!0)},this.onScrollEnd=(e,t)=>{const{store:n,viewId:i}=this.props;this.scrollPosition=t,console.assert(n.active,"Sending pause for an inactive view"),s.Z.pause(n.viewUrl,!1),clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(this.updateRowRange,500),this.setInitialScrollRow&&(this.setInitialScrollRow=!1,n.DEBUG&&console.log(`Disabling initial scroll (view ${i})`)),n.setScrollData(t,i),n.DEBUG&&console.log(`Scrolling ended: ${t}`,n.viewUrl)},this.onColumnClicked=e=>{const{store:t}=this.props;let n=!0;e===t.sortProperty&&t.sortAscending&&(n=!1),s.Z.setSort(this.props.store.viewUrl,e,n)},this.onColumnResizeEndCallback=(e,t)=>{this.setState((({columnWidths:n})=>({columnWidths:Object.assign(Object.assign({},n),{[t]:e}),isColumnResizing:!1})),(()=>{this.setState({isColumnResizing:void 0})}))},this.childToColumn=e=>{if(e.props.hideWidth&&e.props.hideWidth>this.state.width)return null;let{flexGrow:t,width:n}=e.props;const{cell:r,columnKey:a,renderCondition:s}=e.props,{store:l,rowClassNameGetter:c,moduleId:d,t:p}=this.props,h=(0,u.wd)();return h||a&&this.state.columnWidths[a]&&(n=this.state.columnWidths[a],t=void 0),o.cloneElement(e,{header:(0,i.jsx)(_.qN,{onClick:this.onColumnClicked.bind(null,a),label:O(e,l,d,p)}),flexGrow:t,width:n,isResizable:!h,allowCellsRecycling:!0,cell:(0,i.jsx)(B,Object.assign({dataLoader:this.props.dataLoader,renderCondition:s,rowClassNameGetter:c,t:p},{children:r||(0,i.jsx)(_.M4,{})}))})},this.onResizeView=e=>{if(!e.bounds)return;const{width:t,height:n}=e.entry?e.entry:e.bounds;this.setState({width:t,height:n})}}componentDidUpdate(e,t){t.height!==this.state.height?this.updateRowRange():e.entityId===this.props.entityId&&e.viewId===this.props.viewId||(this.props.store.DEBUG&&console.log(`Enabling initial scroll, entity/viewId changed (view ${this.props.viewId})`),this.setInitialScrollRow=!0,this.updateRowRange())}componentWillUnmount(){clearTimeout(this.scrollTimer)}render(){const e=o.Children.map(this.props.children,this.childToColumn),{width:t,height:n,isColumnResizing:r}=this.state,{store:a,viewId:s}=this.props;return(0,i.jsx)(j.Z,Object.assign({bounds:!0,onResize:this.onResizeView},{children:({measureRef:o})=>(0,i.jsx)("div",Object.assign({ref:o,className:"table-container-wrapper"},{children:(0,i.jsx)(y.Table,Object.assign({width:t,height:n,rowHeight:50,rowsCount:a.rowCount,headerHeight:50,isColumnResizing:r,onColumnResizeEndCallback:this.onColumnResizeEndCallback,touchScrollEnabled:!0,onScrollStart:this.onScrollStart,onScrollEnd:this.onScrollEnd,scrollTop:this.setInitialScrollRow?a.getScrollData(s):void 0},{children:e}))}))}))}}I.propTypes={store:a().object.isRequired,rowClassNameGetter:a().func,entityId:a().any,dataLoader:a().any.isRequired};const S=I;var U=n(518),T=n(7145),k=n.n(T),G=n(18446),N=n.n(G);var Z=n(93379),L=n.n(Z),P=n(7795),F=n.n(P),W=n(90569),q=n.n(W),$=n(3565),M=n.n($),z=n(19216),V=n.n(z),Y=n(44589),K=n.n(Y),H=n(1624),X={};X.styleTagTransform=K(),X.setAttributes=M(),X.insert=q().bind(null,"head"),X.domAPI=F(),X.insertStyleElement=V(),L()(H.Z,X),H.Z&&H.Z.locals&&H.Z.locals,n(60854);class Q extends o.PureComponent{constructor(){super(...arguments),this.dataLoader=new class{constructor(e,t){this._onDataLoad=t,this._store=e,this._data=[],this._pendingRequest={},this._initialDataReceived=!1}clear(){this._pendingRequest={},this._data=[]}updateItem(e,t,n){let i=this._data[n];return i===t||N()(this._data[n],t)?e:(this._data[n]=i?k()(i,{$merge:t}):k()(i,{$set:t}),e+1)}onItemsUpdated(e,t=0,n){let i=n<this._data.length;if(e&&0!==e.length){this._initialDataReceived=!0;for(let t=0;t<this._data.length;t++)e[t]||delete this._data[t];(e.reduce(this.updateItem.bind(this),0)>0||0!==t)&&(i=!0)}else this.clear(),i=!0,this._initialDataReceived=!1;i&&this._onDataLoad()}get rangeOffset(){const e=this._rangeOffset;return this._rangeOffset=0,e}getRowData(e){return this._data[e]}updateRowData(e,t){const n=this._data[e];return n?(t(n),!0):(this._initialDataReceived&&this._queueRequestFor(e,t),!1)}removePendingRequests(e){delete this._pendingRequest[e]}_queueRequestFor(e,t){const n=e-e%10,i=this._pendingRequest[e];if(i)return void i.push(t);if(this._pendingRequest[e]=[t],e!==n){if(this._pendingRequest[n])return;this._pendingRequest[n]=[]}const r=Math.min(n+10,this._store.rowCount);U.Z.get(this._store.viewUrl+"/items/"+n+"/"+r).then(this.onRowsReceived.bind(this,n)).catch((e=>{console.error("Failed to load data",e);for(let e=n;e<r;e++)this._pendingRequest[e]&&delete this._pendingRequest[e]}))}onRowsReceived(e,t){if(this._pendingRequest[e])for(let n=0;n<t.length;n++){const i=e+n;N()(this._data[i],t[n])||(this._data[i]=t[n],this._pendingRequest[i]&&this._pendingRequest[i].forEach((e=>e(t[n])))),delete this._pendingRequest[i]}}}(this.props.store,(()=>this.forceUpdate())),this.unsubscribe=this.props.store.listen(this.dataLoader.onItemsUpdated.bind(this.dataLoader)),this.moduleExists=e=>!e||!this.props.sessionStore||this.props.sessionStore.getSession(e),this.start=e=>{const{store:t,sourceFilter:n}=this.props;s.Z.init(t.viewUrl,e,n),s.Z.setSort(t.viewUrl,t.sortProperty,t.sortAscending)},this.close=e=>{s.Z.close(this.props.store.viewUrl,this.moduleExists(e))}}componentDidMount(){this.start(this.props.entityId)}componentWillUnmount(){this.close(this.props.entityId),this.unsubscribe()}componentDidUpdate(e){if(e.entityId!==this.props.entityId&&(this.close(e.entityId),this.start(this.props.entityId)),e.viewId!==this.props.viewId){const{store:e}=this.props;e.paused&&s.Z.pause(e.viewUrl,!1),s.Z.clear(e.viewUrl)}}render(){const e=this.props,{store:t,footerData:n,emptyRowsNodeGetter:r,customFilter:a,textFilterProps:o}=e,s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["store","footerData","emptyRowsNodeGetter","customFilter","textFilterProps"]);return r&&-1===t.totalCount?(0,i.jsx)("div",{className:"virtual-table"}):r&&0===t.totalCount?r():(0,i.jsx)("div",Object.assign({className:"virtual-table"},{children:(0,i.jsx)(g.Wb,{children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S,Object.assign({},s,{dataLoader:this.dataLoader,store:t,t:e})),(0,i.jsx)(E,{store:t,customFilter:a,footerData:n,textFilterProps:o})]})})}))}}Q.propTypes={footerData:a().node,emptyRowsNodeGetter:a().func,viewId:a().any,sessionStore:a().object,customFilter:a().elementType,sourceFilter:a().object};const J=Q},16630:(e,t,n)=>{n.d(t,{Z:()=>l});var i=n(85893),r=n(67294),a=n(42090),o=n(518),s=n(76249);function l(e,t="any"){return(0,a.Z)((n=>(r.useLayoutEffect((()=>()=>{const{store:e,filter:t}=n;e.active&&o.Z.delete(`${e.viewUrl}/filter/${t.id}`).catch((e=>console.error("Failed to delete table filter",e)))}),[]),(0,i.jsx)(e,Object.assign({},n,{onFilterUpdated:(e,i=s.V3.PARTIAL)=>{const r={pattern:e,method:i,property:t},{store:a,filter:l}=n;o.Z.put(`${a.viewUrl}/filter/${l.id}`,r).catch((e=>console.error("Failed to add table filter",e)))}})))),{urls:{filter:({store:e},t)=>t.post(`${e.viewUrl}/filter`)},loaderText:null})}},93836:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(518),r=n(11508),a=n(41143),o=n.n(a);const s=(e,t=!0)=>{let n=!1,a=-1,s=0,l=0,c=[],d=null,p=!1,h=0,u=e,A=t;const g=()=>{c=[],l=0,s=0,a=-1};return{listenables:r.Z,onClose(e){e===this.viewUrl&&(this.DEBUG&&console.log(`Closing view ${this.viewUrl}`),this._removeMessageListener(),g(),n=!1,this.trigger())},onClear(e){e===this.viewUrl&&(g(),this.trigger())},onPause(e,t){e===this.viewUrl&&(p=t)},onInit(e,t){e===this.viewUrl&&(o()(!n,"Trying start an active table view"),d=t,this.addMessageListener(),this.DEBUG&&console.log(`Starting view ${this.viewUrl}`),n=!0)},onSetSort(e,t,n){e===this.viewUrl&&(u=t,A=n)},addMessageListener(){this._removeMessageListener=i.Z.addViewUpdateListener(this._viewName,this._handleUpdate,d)},get items(){return c},get viewUrl(){let e=this._apiUrl+"/";return d&&(e+=d+"/"),e+=this._viewName,e},get viewName(){return this._viewName},get rowCount(){return s},get totalCount(){return a},get active(){return n},get sortProperty(){return u},get sortAscending(){return A},get paused(){return p},setScrollData(e,t){this._sessionStore?this._sessionStore.scroll.setScrollData(e,d,t):(this.DEBUG&&console.log(`Setting scroll position ${e} for view ${this.viewUrl} (view ID ${t})`),h=e)},getScrollData(e){return this._sessionStore?this._sessionStore.scroll.getScrollData(d,e):(this.DEBUG&&console.log(`Getting scroll position ${h} for view ${this.viewUrl} (view ID ${e})`),h)},_handleUpdate(e){(e=>{var t;null!=e.range_start&&(l=e.range_start),null!=e.total_items&&(a=e.total_items),null!=e.matching_items&&(s=e.matching_items),null!=e.items&&(t=e.items,c=t.reduce(((e,t,n)=>{let i=(r=t.id,c.find((e=>!!e&&e.id===r))||{id:t.id});var r;return t.properties?i=Object.assign({},i,t.properties):1===Object.keys(i).length&&console.error("No properties were sent for a new view item",i.id),e[l+n]=i,e}),[]))})(e),this.trigger(c,e.range_offset,s)}}}}}]);
2
+ //# sourceMappingURL=424.8412d40847801f1f9167.chunk.js.map