@ytsaurus/ui 2.5.0 → 2.6.0

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 (55) hide show
  1. package/dist/public/build/assets-manifest.json +37 -37
  2. package/dist/public/build/css/{9030.30b67fe6.chunk.css → 3792.a5336147.chunk.css} +1 -1
  3. package/dist/public/build/css/{9030.30b67fe6.chunk.css.map → 3792.a5336147.chunk.css.map} +1 -1
  4. package/dist/public/build/js/2142.9a9a44af.chunk.js +2 -0
  5. package/dist/public/build/js/2142.9a9a44af.chunk.js.map +1 -0
  6. package/dist/public/build/js/3225.0ca5646d.chunk.js +2 -0
  7. package/dist/public/build/js/3225.0ca5646d.chunk.js.map +1 -0
  8. package/dist/public/build/js/{9030.200c7642.chunk.js → 3792.1af8dc36.chunk.js} +2 -2
  9. package/dist/public/build/js/{9030.200c7642.chunk.js.map → 3792.1af8dc36.chunk.js.map} +1 -1
  10. package/dist/public/build/js/3848.db687afa.chunk.js +2 -0
  11. package/dist/public/build/js/3848.db687afa.chunk.js.map +1 -0
  12. package/dist/public/build/js/{9361.4389c6e7.chunk.js → 9361.632ac658.chunk.js} +3 -3
  13. package/dist/public/build/js/9361.632ac658.chunk.js.map +1 -0
  14. package/dist/public/build/js/acl.86dde5b4.chunk.js +2 -0
  15. package/dist/public/build/js/acl.86dde5b4.chunk.js.map +1 -0
  16. package/dist/public/build/js/{chart-kit.6c826f92.chunk.js → chart-kit.bc706a72.chunk.js} +2 -2
  17. package/dist/public/build/js/{chart-kit.6c826f92.chunk.js.map → chart-kit.bc706a72.chunk.js.map} +1 -1
  18. package/dist/public/build/js/{cluster-page-wrapper.24759f54.chunk.js → cluster-page-wrapper.69410672.chunk.js} +2 -2
  19. package/dist/public/build/js/{cluster-page-wrapper.24759f54.chunk.js.map → cluster-page-wrapper.69410672.chunk.js.map} +1 -1
  20. package/dist/public/build/js/{dashboard.5baf76be.chunk.js → dashboard.705aef5e.chunk.js} +2 -2
  21. package/dist/public/build/js/{dashboard.5baf76be.chunk.js.map → dashboard.705aef5e.chunk.js.map} +1 -1
  22. package/dist/public/build/js/{incarnations.db35d3e7.chunk.js → incarnations.b6c8305d.chunk.js} +2 -2
  23. package/dist/public/build/js/incarnations.b6c8305d.chunk.js.map +1 -0
  24. package/dist/public/build/js/main.2691b74a.js +3 -0
  25. package/dist/public/build/js/main.2691b74a.js.map +1 -0
  26. package/dist/public/build/js/navigation.b95d53a4.chunk.js +2 -0
  27. package/dist/public/build/js/navigation.b95d53a4.chunk.js.map +1 -0
  28. package/dist/public/build/js/{runtime.3d99db5c.js → runtime.cd2507d5.js} +2 -2
  29. package/dist/public/build/js/{runtime.3d99db5c.js.map → runtime.cd2507d5.js.map} +1 -1
  30. package/dist/public/build/js/{yt-df-dialog.3c75c1c6.chunk.js → yt-df-dialog.d8b77493.chunk.js} +3 -3
  31. package/dist/public/build/js/yt-df-dialog.d8b77493.chunk.js.map +1 -0
  32. package/dist/public/build/js/yt-queries-list.9b028808.chunk.js +2 -0
  33. package/dist/public/build/js/yt-queries-list.9b028808.chunk.js.map +1 -0
  34. package/dist/public/build/manifest.json +32 -32
  35. package/package.json +2 -2
  36. package/dist/public/build/js/2142.e3f4501e.chunk.js +0 -2
  37. package/dist/public/build/js/2142.e3f4501e.chunk.js.map +0 -1
  38. package/dist/public/build/js/3225.1bafd8e7.chunk.js +0 -2
  39. package/dist/public/build/js/3225.1bafd8e7.chunk.js.map +0 -1
  40. package/dist/public/build/js/3792.87728e87.chunk.js +0 -2
  41. package/dist/public/build/js/3792.87728e87.chunk.js.map +0 -1
  42. package/dist/public/build/js/9361.4389c6e7.chunk.js.map +0 -1
  43. package/dist/public/build/js/acl.ad72cb19.chunk.js +0 -2
  44. package/dist/public/build/js/acl.ad72cb19.chunk.js.map +0 -1
  45. package/dist/public/build/js/incarnations.db35d3e7.chunk.js.map +0 -1
  46. package/dist/public/build/js/main.10db4a06.js +0 -3
  47. package/dist/public/build/js/main.10db4a06.js.map +0 -1
  48. package/dist/public/build/js/navigation.dd0f8fc8.chunk.js +0 -2
  49. package/dist/public/build/js/navigation.dd0f8fc8.chunk.js.map +0 -1
  50. package/dist/public/build/js/yt-df-dialog.3c75c1c6.chunk.js.map +0 -1
  51. package/dist/public/build/js/yt-queries-list.e40d766e.chunk.js +0 -2
  52. package/dist/public/build/js/yt-queries-list.e40d766e.chunk.js.map +0 -1
  53. /package/dist/public/build/js/{9361.4389c6e7.chunk.js.LICENSE.txt → 9361.632ac658.chunk.js.LICENSE.txt} +0 -0
  54. /package/dist/public/build/js/{main.10db4a06.js.LICENSE.txt → main.2691b74a.js.LICENSE.txt} +0 -0
  55. /package/dist/public/build/js/{yt-df-dialog.3c75c1c6.chunk.js.LICENSE.txt → yt-df-dialog.d8b77493.chunk.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
- /*! For license information please see 9361.4389c6e7.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[9361],{256:(e,t,n)=>{"use strict";n.d(t,{u_:()=>Z,RU:()=>J,dt:()=>K,ID:()=>G,p3:()=>ee,in:()=>te,vl:()=>X,sS:()=>Y});var r=n(53775),i=n(18801),o=n(28407),a=n(40319),s=n(55984),u=n(47001),l=n(48971),c=n(29746),d=n(97019),f=n(27859),h=n(44639),v=n(10720),p=n(68175),m=n(3659),y=n(2796),g=n(66030),x=n(58860),A=n(52797),w=n(88187),b=["columns"];function E(e){return _.apply(this,arguments)}function _(){return(_=(0,o.A)((0,r.A)().mark((function e(t){var n,o,s,u,c,d,h,v,E,_,C,j,k,S,T,N,O,R,I;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,o=t.path,s=t.login,u=t.schema,c=t.keyColumns,d=t.limit,h=t.output_format,v=u.map((function(e){return e.name})),e.next=4,(0,l.fI)(f.Qq.checkPermission(f.Vu.dynTableCheckPerm,{setup:{proxy:(0,A.v9)(n),JSONSerializer:x.b},parameters:{columns:v,permission:"read",user:s,path:o}}),{skipSuccessToast:!0,toasterName:"query_navigation_node_permissions",errorTitle:"Navigation node get attributes failure"});case 4:if(E=e.sent,Array.isArray(E.columns)){e.next=7;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table columns is not array")));case 7:if(_=E.columns.reduce((function(e,t,n){return"allow"===t.action?e.availableColumns.push(v[n]):(e.omittedColumns.push(v[n]),c.includes(v[n])&&e.deniedKeyColumns.push((0,p.A)({},v[n],t.action))),e}),{availableColumns:[],omittedColumns:[],deniedKeyColumns:[]}),C=_.availableColumns,j=_.omittedColumns,0===_.deniedKeyColumns.length){e.next=10;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table has denied key columns")));case 10:return k=C.map(m.A.decode),S={query:y.A.prepareQuery({aColumns:k,path:o,keyColumns:c,offset:0,limit:d}),output_format:h,dump_error_into_response:!0},T={proxy:(0,A.v9)(n),JSONSerializer:x.b},e.next=15,(0,l.fI)((0,w.S)({setup:T,parameters:S}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 15:return N=e.sent,O=N.columns,R=(0,i.A)(N,b),I=u.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,g._)(O,j,I)},R));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var C=n(96500),j=["columns","omittedColumns"];function k(e){return S.apply(this,arguments)}function S(){return(S=(0,o.A)((0,r.A)().mark((function e(t){var n,o,s,u,c,d,f,h,v,p,m,y;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.path,o=t.clusterConfig,s=t.schema,u=t.limit,c=t.output_format,d={proxy:(0,A.v9)(o),JSONSerializer:x.b},f={path:n+"[#0:#"+u+"]",output_format:c,table_reader:{workload_descriptor:{category:"user_interactive"}}},e.next=5,(0,l.fI)((0,C.B)({setup:d,parameters:f}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 5:return h=e.sent,v=h.columns,p=h.omittedColumns,m=(0,i.A)(h,j),y=s.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,g._)(v,p,y)},m));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var T=n(13724),N=n(21594),O=n(19314),R=n(97583),I=n(27723),P=n(73800),L=n(30996),M=n(52142),D=n(29970),z=n(6640),$=n(79329),F=n(54744),U=n(22290),q=n(9178),H=n(59028),V=n(87410),B=["target_path"],W=new v.I,Y=function(e){return function(t,n){var r=n(),i=(0,u.rS)(r),o=(0,u.mk)(r);if(i){var l=(0,N.HL)(i,O.dK.LOCAL);t((0,T.Mb)(e,l));var c=o.map((function(t){return t.path===e?(0,a.A)((0,a.A)({},t),{},{isFavorite:!t.isFavorite}):t}));t((0,s.CU)(c))}}},K=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,o){var d,h,v,p,m;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d=o(),h=(0,u.$D)(d),v=(0,u.WS)(d),h){t.next=5;break}return t.abrupt("return");case 5:return n((0,s.r1)(!0)),t.next=8,(0,l.fI)(f.Qq.list(f.Vu.navigationListNodes,{setup:{proxy:(0,A.v9)(h),JSONSerializer:x.b},parameters:{path:e,attributes:["type","broken","dynamic","sorted","target_path"]}}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node open failure"}).finally((function(){n((0,s.r1)(!1))}));case 8:p=t.sent,m=p.map((function(t){var n=c.A.getValue(t),r=e+"/"+n,o=c.A.getAttributes(t),s=o.target_path,u=(0,i.A)(o,B);return(0,a.A)((0,a.A)({name:n},u),{},{path:r,targetPath:s,isFavorite:v.includes(r)})})).sort((function(e,t){return e.name.localeCompare(t.name)})),n((0,s.R6)("")),n((0,s.SO)(e)),n((0,s.VR)(s.Dh.Tree)),n((0,s.CU)(m));case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},G=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,i){var o,a,l,f,v,p,m,y,g,x,w,b,_,C,j,S,T;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i(),a=(0,u.$D)(o),l=(0,U.GN)(),f=l.cellSize,v=l.pageSize,p=(0,$.fN)(o),m=(0,F.t5)(o),y=(0,A.ID)(o),a){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,P.M)(e,a);case 10:return g=t.sent,x=c.A.getValue(g.schema),w=(0,z.m3)(x.map((function(e){return e.name})),f,y,p,m),b=g.dynamic?E:k,t.prev=14,t.next=17,b({login:o.global.login,path:e,clusterConfig:a,schema:x,keyColumns:g.key_columns,limit:v,output_format:w});case 17:_=t.sent,C=_.columns,j=_.rows,S=_.yqlTypes,T={name:g.key,meta:(0,d.UQ)({cluster:a.id,attributes:g,tableType:(0,h.H)(g.dynamic,g),isDynamic:g.dynamic}),rows:j,schema:x,columns:C,yqlTypes:S},n((0,s.SO)(e)),n((0,s.tQ)(T)),n((0,s.VR)(s.Dh.Table)),t.next=30;break;case 27:t.prev=27,t.t0=t.catch(14),W.add({theme:"danger",autoHiding:!1,name:"Load table data error",title:t.t0?t.t0.message:"Can't load table data"});case 30:case"end":return t.stop()}}),t,null,[[14,27]])})));return function(e,n){return t.apply(this,arguments)}}()},Q=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i){var o;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i((0,s.l5)(t.id)),i((0,s.SO)(e)),n.next=5,f.Qq.get(f.Vu.navigationGetType,{setup:{proxy:(0,A.v9)(t),JSONSerializer:x.b},parameters:{path:"".concat(e,"/@type")}});case 5:if(o=n.sent,!(0,R.h)(o)){n.next=11;break}return n.next=9,i(G(e));case 9:n.next=17;break;case 11:if(!(0,I.R)(o)){n.next=16;break}return n.next=14,i(K(e));case 14:n.next=17;break;case 16:throw new Error("Сan't open this type of node");case 17:n.next=23;break;case 19:n.prev=19,n.t0=n.catch(0),i((0,s.Nh)(n.t0)),i((0,s.VR)(s.Dh.Error));case 23:case"end":return n.stop()}}),n,null,[[0,19]])})));return function(e){return n.apply(this,arguments)}}()},X=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n){return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n((0,s.l5)(e)),n((0,s.SO)("/")),t.next=4,n(K("/"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},J=function(){return function(){var e=(0,o.A)((0,r.A)().mark((function e(t,n){var i,o,a;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n(),o=(0,u.$D)(i),a=(0,u.I7)(i),o){e.next=5;break}return e.abrupt("return");case 5:a&&t((0,s.VR)(s.Dh.Loading)),t(Q(a,o));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},Z=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,i){var o;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i(),(0,u.rS)(o)){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.clipboard.writeText(e);case 7:W.add({theme:"success",name:"copy_navigation_path",title:"Path copied"}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),W.add({theme:"danger",name:"copy_navigation_path",title:"Can't copy path",content:t.t0.message,autoHiding:!1});case 13:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,n){return t.apply(this,arguments)}}()},ee=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i,o){var a;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(0,u.$D)(o())){n.next=3;break}return n.abrupt("return");case 3:t===L.d.CHYT&&i((0,M.TI)(t,a.id)),i((0,M.kR)(a.id,e,t));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()},te=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i,o){var a,l,c,d,f,h,v;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=o(),l=(0,D.sh)(a),c=l.settings,d=(0,u.oz)(a),f=t||(null==c?void 0:c.cluster)){n.next=6;break}return n.abrupt("return");case 6:if(h=d[f]){n.next=9;break}return n.abrupt("return");case 9:return v=e.replace(/\/+$/,""),n.next=12,i((0,H.rw)("global::queryTracker::queriesListSidebarVisibilityMode",!0));case 12:i((0,V.MP)(q.e8.Navigation)),i((0,s.VR)(s.Dh.Loading)),i(Q(v,h));case 15:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},1701:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM8.75 6.75a.75.75 0 0 0-1.5 0v1.5h-1.5a.75.75 0 0 0 0 1.5h1.5v1.5a.75.75 0 0 0 1.5 0v-1.5h1.5a.75.75 0 0 0 0-1.5h-1.5z",clipRule:"evenodd"})}))}},3035:(e,t,n)=>{"use strict";n.d(t,{t:()=>d});var r=n(9736),i=n(77810),o=n(15647),a=n(51194),s=n(29970),u=n(57018),l=n(61525),c=n(52142),d=function(){var e=(0,a._)(),t=(0,o.d4)(s.Ry),n=(0,o.d4)(s.q9),d=(0,o.d4)(u.kz),f=(0,o.d4)(u.rE),h=(0,o.d4)(u.HP),v=(0,i.useState)(!1),p=(0,r.A)(v,2),m=p[0],y=p[1],g=(0,i.useCallback)((function(t){var n=t.aco,r=t.query_id;if(!r)throw new Error("query_id is empty");return y(!0),e((0,c.s_)({aco:n,query_id:r})).finally((function(){return y(!1)}))}),[e]);return{selectACOOptions:d,currentQueryACO:t,changeDraftQueryACO:(0,i.useCallback)((function(t){var n=t.aco;return y(!0),e((0,c.Tk)({aco:n})).finally((function(){return y(!1)}))}),[e]),changeCurrentQueryACO:g,currentDraftQueryACO:n,trackerInfo:h,loadQueryTrackerInfo:function(){e((0,l.N)())},isFlight:m||f,isQueryTrackerInfoLoading:f}}},4123:(e,t,n)=>{"use strict";n.d(t,{_:()=>c}),n(77810);var r=n(76872),i=n(89648),o=n(73748),a=n(3082),s=n(64922),u=(0,r.A)("query-cluster-item"),l=(0,r.A)("query-cluster-icon"),c=function(e){var t=e.id,n=e.name,r=e.environment,c=e.className,d=(0,a.O)(t);return(0,s.jsxs)("div",{className:u(null,c),"data-qa":"query-cluster-item",children:[(0,s.jsx)(o.A,{name:n,className:l(null,d)}),(0,s.jsxs)("div",{className:u("info"),children:[(0,s.jsx)("span",{"data-qa":"query-cluster-item-name",children:n}),(0,s.jsx)(i.E,{color:"secondary",className:u("environment"),children:r})]})]})}},5166:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,f:()=>p});var r=n(9736),i=n(77810),o=n(15647),a=n(6542),s=n(32235),u=n(11960),l=n(29970),c=n(1701),d=n(19314),f=n(52797),h=n(64922),v=function(e){return(0,h.jsx)(u.A,{title:"New query",content:"All the changes will be lost. Are you sure you want to reset query?",onCancel:e.cancel,onConfirm:e.confirm,onOutsideClick:e.cancel,visible:e.visible})},p=function(e){var t=e.onClick,n=e.hideText,u=(0,o.d4)(l.Py),p=(0,i.useState)(!1),m=(0,r.A)(p,2),y=m[0],g=m[1],x=(0,o.d4)(f.dB);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsxs)(a.$,{qa:"new-query-btn",view:"action",size:"l",title:"New query",href:"/".concat(x,"/").concat(d.YW.QUERIES),onClick:function(e){e.preventDefault(),u?g(!0):t()},children:[(0,h.jsx)(s.I,{data:c.A,size:16}),!n&&"New"]}),(0,h.jsx)(v,{confirm:function(){t(),g(!1)},cancel:function(){g(!1)},visible:y})]})}},12094:(e,t,n)=>{"use strict";n.d(t,{y:()=>A});var r=n(77810),i=n(30996),o=n(76872),a=n(70243),s=n(46747),u=n(89648),l=n(64922),c=(0,o.A)("query-clique-item"),d=function(e){var t=e.alias,n=e.id,r=e.active,i=e.showStatus,o=!r&&i;return(0,l.jsxs)(a.s,{direction:"column",gap:1,className:c(),children:[(0,l.jsxs)(a.s,{alignItems:"center",gap:2,children:[(0,l.jsx)("div",{children:t}),o&&(0,l.jsx)(s.J,{theme:"danger",children:"inactive"})]}),(0,l.jsx)(u.E,{color:"secondary",children:n})]})},f=n(73004),h=n(30627),v=function(e){var t=e.cliqueList,n=e.value,i=e.placeholder,o=void 0===i?"Clique alias":i,s=e.loading,u=e.showStatus,c=e.onChange,v=(0,r.useMemo)((function(){var e=t.map((function(e){var t=e.alias,n=e.yt_operation_id,r=e.state,i=e.health;return{alias:t,id:n,active:"active"===r&&"good"===i}}));return u?e.sort((function(e,t){return Number(t.active)-Number(e.active)})):e}),[t,u]);return(0,l.jsx)(f.y,{size:"l",placeholder:o,filterPlaceholder:"Search",hasClear:!0,items:v,value:n,loading:s,onChange:c,getOptionHeight:function(){return 58},disabled:s&&!v.length,renderEmptyOptions:function(){return(0,l.jsx)(a.s,{justifyContent:"center",children:"No access clique"})},popupWidth:285,children:function(e){return e.map((function(e){var t=e.alias,n=e.active,r=e.id;return(0,l.jsx)(h.l.Option,{value:t,children:(0,l.jsx)(d,{alias:t,id:r,active:n,showStatus:u})},t)}))}})},p=n(15647),m=n(29970),y=n(52142),g=n(57018),x=(0,o.A)("yt-query-selector-by-engine"),A=function(){var e=(0,p.wA)(),t=(0,p.d4)(m.K7),n=(0,p.d4)(m.ox),o=(0,p.d4)(m.sh),a=o.settings,s=void 0===a?{}:a,u=o.engine,c=(0,p.d4)(g.m6),d=(0,p.d4)(g.Qo),f=null==s?void 0:s.cluster,A=(0,r.useMemo)((function(){return c.map((function(e){return{value:e,content:e}}))}),[c]);(0,r.useEffect)((function(){u!==i.d.CHYT&&u!==i.d.SPYT||!f||e((0,y.TI)(u,f))}),[u,f,e]);var w=s.cluster&&s.cluster in t?t[s.cluster]:{},b=u in w?w[u]:[];if(u===i.d.YQL&&c.length){var E=(null==s?void 0:s.yql_version)||d;return(0,l.jsx)(h.l,{className:x("version"),size:"l",options:A,value:E?[E]:void 0,onUpdate:function(t){e((0,y.Fz)(t[0]))}})}if(u===i.d.CHYT||u===i.d.SPYT){var _=u===i.d.CHYT;return(0,l.jsx)(v,{loading:n,cliqueList:b,value:_?s.clique:s.discovery_group,onChange:_?function(t){e((0,y.EO)(t))}:function(t){e((0,y.i5)(t))},showStatus:_,placeholder:_?void 0:"Discovery path"})}return null}},14855:(e,t,n)=>{"use strict";n.d(t,{s:()=>v});var r=n(77810),i=n(15647),o=n(30627),a=n(57018),s=n(73004),u=n(4123),l=n(33547),c=n(29970),d=n(45033),f=n(52142),h=n(64922),v=function(e){var t=e.className,n=(0,i.wA)(),v=(0,i.d4)(a.EP),p=(0,i.d4)(c.HF),m=(0,i.d4)(d.Dy),y=(0,i.d4)(c.sh).settings,g=(0,l._)(),x=r.useMemo((function(){if(null==v||!v.length)return m;var e;if(l.YT.isLocalCluster)return null!==(e=null==v?void 0:v.map((function(e){return{id:e,name:e,environment:"localmode"}})))&&void 0!==e?e:[];var t=new Set(v);return m.filter((function(e){return t.has(e.id)}))}),[m,v,l.YT.isLocalCluster]);return g?(0,h.jsx)(s.y,{size:"l",className:t,disabled:p,placeholder:"Cluster",filterPlaceholder:"Search",items:x,onChange:function(e){n((0,f.jF)(e))},value:null==y?void 0:y.cluster,getOptionHeight:function(){return 52},qa:"query-cluster-selector",popupWidth:200,renderSelectedOption:function(e){var t=e.children.props.name;return(0,h.jsx)(h.Fragment,{children:t})},children:function(e){return e.map((function(e){var t=e.id,n=e.name,r=e.environment;return(0,h.jsx)(o.l.Option,{value:t,children:(0,h.jsx)(u._,{id:t,name:n,environment:r})},t)}))}}):null}},16538:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"})}))}},19904:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(77810),i=n(82785),o=function(){var e=(0,r.useContext)(i.P);return{setEditor:function(t,n){e.set(t,n)},getEditor:function(t){return e.get(t)}}}},23069:(e,t,n)=>{"use strict";n.d(t,{g:()=>N});var r=n(40319),i=n(9736),o=n(6542),a=n(32235),s=n(89648),u=n(76872),l=n(77810),c=n(60111),d=n(64922);const f=function(e){return(0,d.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,d.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",children:[(0,d.jsx)("path",{fill:"currentColor",d:"M7.199 2A.2.2 0 0 0 7 2.199c0 1.808-1.958 2.939-3.524 2.034a.2.2 0 0 0-.272.073l-.8 1.388a.2.2 0 0 0 .072.271c1.566.905 1.566 3.165 0 4.07a.2.2 0 0 0-.073.271l.801 1.388a.2.2 0 0 0 .272.073C5.042 10.862 7 11.993 7 13.8c0 .11.089.199.199.199H8.8c.11 0 .199-.089.199-.199 0-1.808 1.958-2.939 3.524-2.034a.2.2 0 0 0 .271-.073l.802-1.388a.2.2 0 0 0-.073-.271c-1.303-.753-1.516-2.434-.665-3.5a.75.75 0 0 1 1.172.936.852.852 0 0 0 .243 1.265 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .938-.76 1.699-1.699 1.699H7.2c-.938 0-1.699-.76-1.699-1.699a.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.472 1.7 1.7 0 0 1-.622-2.32l.801-1.388a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2c0-.94.76-1.7 1.699-1.7H9.3a.75.75 0 1 1 0 1.5zm.8 7.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6"}),(0,d.jsx)("path",{fill:"#F33",d:"M12.5 5.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4"})]})}))};var h=n(87446),v=n(27117),p=n(79988),m=n(24893),y=n(30469),g=n(82662),x=(0,u.A)("settings-item-form"),A=function(e){var t=e.name,n=e.value,r=e.validator,s=e.onCancel,u=e.onSave,c=e.className,f=e.config,h=(0,l.useState)(void 0),v=(0,i.A)(h,2),p=v[0],A=v[1],w=(0,l.useRef)({name:t,value:n}),b=(0,l.useCallback)((function(){var e=r(t,w.current.name,w.current.value);A(e),e.name||e.value||u({oldName:t,name:w.current.name,value:w.current.value})}),[t,u,r]),E=(0,l.useCallback)((function(e){"Enter"===e.key&&b(),"Escape"===e.key&&s()}),[b,s]);return(0,d.jsxs)("div",{className:x(null,c),children:[(0,d.jsxs)("div",{className:x("form"),children:[(0,d.jsx)(m.k,{defaultValue:t,onChange:function(e){A(void 0),w.current.name=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.name,size:"l",disabled:!!f&&!f.name}),(0,d.jsx)(m.k,{defaultValue:n,onChange:function(e){A(void 0),w.current.value=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.value,size:"l",disabled:!!f&&!f.value})]}),(0,d.jsxs)("div",{className:x("actions"),children:[(0,d.jsx)(o.$,{view:"normal",onClick:b,size:"l",children:(0,d.jsx)(a.I,{data:g.A,size:16})}),(0,d.jsx)(o.$,{view:"flat",onClick:s,size:"l",children:(0,d.jsx)(a.I,{data:y.A,size:16})})]})]})},w=(0,u.A)("settings-item"),b=function(e){var t=e.name,n=e.value,r=e.canEdit,u=e.canRemove,f=e.onDelete,m=e.validator,y=e.onChange,g=(0,l.useState)(!1),x=(0,i.A)(g,2),b=x[0],E=x[1],_=function(){E((function(e){return!e}))};return b?(0,d.jsx)("div",{className:w({edit:!0}),children:(0,d.jsx)(A,{name:t,value:n,onSave:function(e){y(e),E(!1)},onCancel:_,validator:m,config:r})}):(0,d.jsxs)("div",{className:w(),children:[(0,d.jsxs)("div",{className:w("info"),children:[(0,d.jsx)(a.I,{className:w("icon"),data:c.A,size:16}),(0,d.jsx)(s.E,{variant:"subheader-2",ellipsis:!0,children:t}),(0,d.jsx)(s.E,{className:w("value"),ellipsis:!0,children:n})]}),(0,d.jsxs)("div",{className:w("actions"),children:[r&&(0,d.jsx)(h.m,{content:"Edit",placement:"top",children:(0,d.jsx)(o.$,{onClick:_,view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:v.A,size:16})})}),u&&(0,d.jsx)(h.m,{content:"Remove",placement:"top",children:(0,d.jsx)(o.$,{onClick:function(){f(t)},view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:p.A,size:16})})})]})]})},E=n(16538),_=(0,u.A)("settings-add-form"),C=function(e){var t=e.validator,n=e.onAdd,r=(0,l.useState)(!1),s=(0,i.A)(r,2),u=s[0],c=s[1],f=(0,l.useCallback)((function(){c((function(e){return!e}))}),[]),h=(0,l.useCallback)((function(e){n(e),c(!1)}),[n]);return(0,d.jsxs)("div",{className:_(),children:[u&&(0,d.jsx)(A,{name:"",value:"",onCancel:f,onSave:h,validator:t,className:_("add-form")}),(0,d.jsxs)(o.$,{className:_("button"),onClick:f,disabled:u,size:"l",children:[(0,d.jsx)(a.I,{data:E.A,size:16}),"Add setting"]})]})},j=n(59241),k=n(52041),S=["cluster","clique"],T=(0,u.A)("query-settings-popup"),N=function(e){var t=e.settings,n=e.className,u=e.popupClassName,h=e.onChange,v=(0,l.useState)(!1),p=(0,i.A)(v,2),m=p[0],y=p[1],g=(0,l.useRef)(null),x=(0,l.useCallback)((function(){y(!m)}),[y,m]),A=(0,l.useMemo)((function(){return t?Object.keys(t).length:0}),[t]),w=(0,l.useCallback)((function(e){var n=(0,r.A)({},t);e in n&&delete n[e],h(n)}),[h,t]),E=(0,l.useCallback)((function(e){var n=e.name,i=e.value,o=(0,r.A)({},t);o[n]=i,h(o)}),[h,t]),_=(0,l.useCallback)((function(e){var n=e.oldName,i=e.name,o=e.value,a=(0,r.A)({},t);n!==i&&delete a[n],a[i]=o,h(a)}),[h,t]),N=(0,l.useCallback)((function(e,n,r){var i=(0,k.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=k.j.NAME_ALREADY_EXIST}return i}),[t]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.$,{className:n,onClick:x,ref:g,view:m?"outlined-info":"outlined",selected:m,size:"l",children:(0,d.jsx)(a.I,{data:A?f:c.A,size:16})}),(0,d.jsxs)(j.x,{anchorRef:g,open:m,className:T(null,u),onClose:x,children:[(0,d.jsxs)("div",{className:T("header"),children:[(0,d.jsx)(s.E,{variant:"subheader-3",children:"Settings "}),A>0&&(0,d.jsx)(s.E,{variant:"subheader-3",color:"secondary",children:A})]}),(0,d.jsx)("div",{className:T("body"),children:Object.entries(t||{}).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return(0,d.jsx)(b,{name:n,value:r,canEdit:S.includes(n)?void 0:{name:!0,value:!0},canRemove:"cluster"!==n,validator:N,onDelete:w,onChange:_},n)}))}),(0,d.jsx)(C,{onAdd:E,validator:N})]})]})}},24567:function(e,t,n){!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={exports:{}},a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||function(){return this}()||Function("return this")(),u=function(e){try{return!!e()}catch(e){return!0}},l=!u((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),c=l,d=Function.prototype,f=d.apply,h=d.call,v="object"==typeof Reflect&&Reflect.apply||(c?h.bind(f):function(){return h.apply(f,arguments)}),p=l,m=Function.prototype,y=m.call,g=p&&m.bind.bind(y,y),x=p?g:function(e){return function(){return y.apply(e,arguments)}},A=x,w=A({}.toString),b=A("".slice),E=function(e){return b(w(e),8,-1)},_=E,C=x,j=function(e){if("Function"===_(e))return C(e)},k="object"==typeof document&&document.all,S={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},T=S.all,N=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},O={},R=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=l,P=Function.prototype.call,L=I?P.bind(P):function(){return P.apply(P,arguments)},M={},D={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,$=z&&!D.call({1:2},1);M.f=$?function(e){var t=z(this,e);return!!t&&t.enumerable}:D;var F,U,q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},H=u,V=E,B=Object,W=x("".split),Y=H((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?W(e,""):B(e)}:B,K=function(e){return null==e},G=K,Q=TypeError,X=function(e){if(G(e))throw Q("Can't call method on "+e);return e},J=Y,Z=X,ee=function(e){return J(Z(e))},te=N,ne=S.all,re=S.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:te(e)||e===ne}:function(e){return"object"==typeof e?null!==e:te(e)},ie={},oe=ie,ae=s,se=N,ue=function(e){return se(e)?e:void 0},le=function(e,t){return arguments.length<2?ue(oe[e])||ue(ae[e]):oe[e]&&oe[e][t]||ae[e]&&ae[e][t]},ce=x({}.isPrototypeOf),de="undefined"!=typeof navigator&&String(navigator.userAgent)||"",fe=s,he=de,ve=fe.process,pe=fe.Deno,me=ve&&ve.versions||pe&&pe.version,ye=me&&me.v8;ye&&(U=(F=ye.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&he&&(!(F=he.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=he.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ge=U,xe=ge,Ae=u,we=!!Object.getOwnPropertySymbols&&!Ae((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xe&&xe<41})),be=we&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=le,_e=N,Ce=ce,je=Object,ke=be?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return _e(t)&&Ce(t.prototype,je(e))},Se=String,Te=function(e){try{return Se(e)}catch(e){return"Object"}},Ne=N,Oe=Te,Re=TypeError,Ie=function(e){if(Ne(e))return e;throw Re(Oe(e)+" is not a function")},Pe=Ie,Le=K,Me=function(e,t){var n=e[t];return Le(n)?void 0:Pe(n)},De=L,ze=N,$e=re,Fe=TypeError,Ue={exports:{}},qe=s,He=Object.defineProperty,Ve="__core-js_shared__",Be=s[Ve]||function(e,t){try{He(qe,e,{value:t,configurable:!0,writable:!0})}catch(n){qe[e]=t}return t}(Ve,{}),We=Be;(Ue.exports=function(e,t){return We[e]||(We[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ye=Ue.exports,Ke=X,Ge=Object,Qe=function(e){return Ge(Ke(e))},Xe=Qe,Je=x({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return Je(Xe(e),t)},et=x,tt=0,nt=Math.random(),rt=et(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++tt+nt,36)},ot=Ye,at=Ze,st=it,ut=we,lt=be,ct=s.Symbol,dt=ot("wks"),ft=lt?ct.for||ct:ct&&ct.withoutSetter||st,ht=function(e){return at(dt,e)||(dt[e]=ut&&at(ct,e)?ct[e]:ft("Symbol."+e)),dt[e]},vt=L,pt=re,mt=ke,yt=Me,gt=TypeError,xt=ht("toPrimitive"),At=function(e,t){if(!pt(e)||mt(e))return e;var n,r=yt(e,xt);if(r){if(void 0===t&&(t="default"),n=vt(r,e,t),!pt(n)||mt(n))return n;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;if(ze(n=e.valueOf)&&!$e(r=De(n,e)))return r;if("string"!==t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;throw Fe("Can't convert object to primitive value")}(e,t)},wt=ke,bt=function(e){var t=At(e,"string");return wt(t)?t:t+""},Et=re,_t=s.document,Ct=Et(_t)&&Et(_t.createElement),jt=function(e){return Ct?_t.createElement(e):{}},kt=jt,St=!R&&!u((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Tt=R,Nt=L,Ot=M,Rt=q,It=ee,Pt=bt,Lt=Ze,Mt=St,Dt=Object.getOwnPropertyDescriptor;O.f=Tt?Dt:function(e,t){if(e=It(e),t=Pt(t),Mt)try{return Dt(e,t)}catch(e){}if(Lt(e,t))return Rt(!Nt(Ot.f,e,t),e[t])};var zt=u,$t=N,Ft=/#|\.prototype\./,Ut=function(e,t){var n=Ht[qt(e)];return n==Bt||n!=Vt&&($t(t)?zt(t):!!t)},qt=Ut.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Ht=Ut.data={},Vt=Ut.NATIVE="N",Bt=Ut.POLYFILL="P",Wt=Ut,Yt=Ie,Kt=l,Gt=j(j.bind),Qt=function(e,t){return Yt(e),void 0===t?e:Kt?Gt(e,t):function(){return e.apply(t,arguments)}},Xt={},Jt=R&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=re,en=String,tn=TypeError,nn=function(e){if(Zt(e))return e;throw tn(en(e)+" is not an object")},rn=R,on=St,an=Jt,sn=nn,un=bt,ln=TypeError,cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,fn="enumerable",hn="configurable",vn="writable";Xt.f=rn?an?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&vn in n&&!n[vn]){var r=dn(e,t);r&&r[vn]&&(e[t]=n.value,n={configurable:hn in n?n[hn]:r[hn],enumerable:fn in n?n[fn]:r[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=un(t),sn(n),on)try{return cn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw ln("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pn=Xt,mn=q,yn=R?function(e,t,n){return pn.f(e,t,mn(1,n))}:function(e,t,n){return e[t]=n,e},gn=s,xn=v,An=j,wn=N,bn=O.f,En=Wt,_n=ie,Cn=Qt,jn=yn,kn=Ze,Sn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return xn(e,this,arguments)};return t.prototype=e.prototype,t},Tn=function(e,t){var n,r,i,o,a,s,u,l,c,d=e.target,f=e.global,h=e.stat,v=e.proto,p=f?gn:h?gn[d]:(gn[d]||{}).prototype,m=f?_n:_n[d]||jn(_n,d,{})[d],y=m.prototype;for(o in t)r=!(n=En(f?o:d+(h?".":"#")+o,e.forced))&&p&&kn(p,o),s=m[o],r&&(u=e.dontCallGetSet?(c=bn(p,o))&&c.value:p[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(l=e.bind&&r?Cn(a,gn):e.wrap&&r?Sn(a):v&&wn(a)?An(a):a,(e.sham||a&&a.sham||s&&s.sham)&&jn(l,"sham",!0),jn(m,o,l),v&&(kn(_n,i=d+"Prototype")||jn(_n,i,{}),jn(_n[i],o,a),e.real&&y&&(n||!y[o])&&jn(y,o,a)))},Nn=Tn,On=R,Rn=Xt.f;Nn({target:"Object",stat:!0,forced:Object.defineProperty!==Rn,sham:!On},{defineProperty:Rn});var In=ie.Object,Pn=o.exports=function(e,t,n){return In.defineProperty(e,t,n)};In.defineProperty.sham&&(Pn.sham=!0);var Ln=o.exports,Mn=Ln,Dn=i(Mn),zn=E,$n=Array.isArray||function(e){return"Array"==zn(e)},Fn=Math.ceil,Un=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Un:Fn)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:qn(t)},Vn=Hn,Bn=Math.min,Wn=function(e){return function(e){return e>0?Bn(Vn(e),9007199254740991):0}(e.length)},Yn=TypeError,Kn=function(e){if(e>9007199254740991)throw Yn("Maximum allowed index exceeded");return e},Gn=bt,Qn=Xt,Xn=q,Jn=function(e,t,n){var r=Gn(t);r in e?Qn.f(e,r,Xn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=N,rr=E,ir=ht("toStringTag"),or=Object,ar="Arguments"==rr(function(){return arguments}()),sr=tr?rr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=or(e),ir))?n:ar?rr(t):"Object"==(r=rr(t))&&nr(t.callee)?"Arguments":r},ur=N,lr=Be,cr=x(Function.toString);ur(lr.inspectSource)||(lr.inspectSource=function(e){return cr(e)});var dr=lr.inspectSource,fr=x,hr=u,vr=N,pr=sr,mr=dr,yr=function(){},gr=[],xr=le("Reflect","construct"),Ar=/^\s*(?:class|function)\b/,wr=fr(Ar.exec),br=!Ar.exec(yr),Er=function(e){if(!vr(e))return!1;try{return xr(yr,gr,e),!0}catch(e){return!1}},_r=function(e){if(!vr(e))return!1;switch(pr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return br||!!wr(Ar,mr(e))}catch(e){return!0}};_r.sham=!0;var Cr=!xr||hr((function(){var e;return Er(Er.call)||!Er(Object)||!Er((function(){e=!0}))||e}))?_r:Er,jr=$n,kr=Cr,Sr=re,Tr=ht("species"),Nr=Array,Or=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(kr(t)&&(t===Nr||jr(t.prototype))||Sr(t)&&null===(t=t[Tr]))&&(t=void 0)),void 0===t?Nr:t}(e))(0===t?0:t)},Rr=u,Ir=ge,Pr=ht("species"),Lr=function(e){return Ir>=51||!Rr((function(){var t=[];return(t.constructor={})[Pr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Mr=Tn,Dr=u,zr=$n,$r=re,Fr=Qe,Ur=Wn,qr=Kn,Hr=Jn,Vr=Or,Br=Lr,Wr=ge,Yr=ht("isConcatSpreadable"),Kr=Wr>=51||!Dr((function(){var e=[];return e[Yr]=!1,e.concat()[0]!==e})),Gr=function(e){if(!$r(e))return!1;var t=e[Yr];return void 0!==t?!!t:zr(e)};Mr({target:"Array",proto:!0,arity:1,forced:!Kr||!Br("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Vr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Gr(o=-1===t?a:arguments[t]))for(i=Ur(o),qr(u+i),n=0;n<i;n++,u++)n in o&&Hr(s,u,o[n]);else qr(u+1),Hr(s,u++,o);return s.length=u,s}});var Qr=sr,Xr=String,Jr=function(e){if("Symbol"===Qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Xr(e)},Zr={},ei=Hn,ti=Math.max,ni=Math.min,ri=function(e,t){var n=ei(e);return n<0?ti(n+t,0):ni(n,t)},ii=ee,oi=ri,ai=Wn,si=function(e){return function(t,n,r){var i,o=ii(t),a=ai(o),s=oi(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ui={includes:si(!0),indexOf:si(!1)},li={},ci=Ze,di=ee,fi=ui.indexOf,hi=li,vi=x([].push),pi=function(e,t){var n,r=di(e),i=0,o=[];for(n in r)!ci(hi,n)&&ci(r,n)&&vi(o,n);for(;t.length>i;)ci(r,n=t[i++])&&(~fi(o,n)||vi(o,n));return o},mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yi=pi,gi=mi,xi=Object.keys||function(e){return yi(e,gi)},Ai=R,wi=Jt,bi=Xt,Ei=nn,_i=ee,Ci=xi;Zr.f=Ai&&!wi?Object.defineProperties:function(e,t){Ei(e);for(var n,r=_i(t),i=Ci(t),o=i.length,a=0;o>a;)bi.f(e,n=i[a++],r[n]);return e};var ji,ki=le("document","documentElement"),Si=it,Ti=Ye("keys"),Ni=function(e){return Ti[e]||(Ti[e]=Si(e))},Oi=nn,Ri=Zr,Ii=mi,Pi=li,Li=ki,Mi=jt,Di="prototype",zi="script",$i=Ni("IE_PROTO"),Fi=function(){},Ui=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Ui("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hi=function(){try{ji=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Hi="undefined"!=typeof document?document.domain&&ji?qi(ji):(t=Mi("iframe"),n="java"+zi+":",t.style.display="none",Li.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):qi(ji);for(var r=Ii.length;r--;)delete Hi[Di][Ii[r]];return Hi()};Pi[$i]=!0;var Vi=Object.create||function(e,t){var n;return null!==e?(Fi[Di]=Oi(e),n=new Fi,Fi[Di]=null,n[$i]=e):n=Hi(),void 0===t?n:Ri.f(n,t)},Bi={},Wi=pi,Yi=mi.concat("length","prototype");Bi.f=Object.getOwnPropertyNames||function(e){return Wi(e,Yi)};var Ki={},Gi=ri,Qi=Wn,Xi=Jn,Ji=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Qi(e),i=Gi(t,r),o=Gi(void 0===n?r:n,r),a=Ji(Zi(o-i,0)),s=0;i<o;i++,s++)Xi(a,s,e[i]);return a.length=s,a},to=E,no=ee,ro=Bi.f,io=eo,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ki.f=function(e){return oo&&"Window"==to(e)?function(e){try{return ro(e)}catch(e){return io(oo)}}(e):ro(no(e))};var ao={};ao.f=Object.getOwnPropertySymbols;var so=yn,uo=function(e,t,n,r){return r&&r.enumerable?e[t]=n:so(e,t,n),e},lo=Xt,co=function(e,t,n){return lo.f(e,t,n)},fo={},ho=ht;fo.f=ho;var vo,po,mo,yo=ie,go=Ze,xo=fo,Ao=Xt.f,wo=function(e){var t=yo.Symbol||(yo.Symbol={});go(t,e)||Ao(t,e,{value:xo.f(e)})},bo=L,Eo=le,_o=ht,Co=uo,jo=function(){var e=Eo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_o("toPrimitive");t&&!t[r]&&Co(t,r,(function(e){return bo(n,this)}),{arity:1})},ko=sr,So=er?{}.toString:function(){return"[object "+ko(this)+"]"},To=er,No=Xt.f,Oo=yn,Ro=Ze,Io=So,Po=ht("toStringTag"),Lo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ro(i,Po)||No(i,Po,{configurable:!0,value:t}),r&&!To&&Oo(i,"toString",Io)}},Mo=N,Do=s.WeakMap,zo=Mo(Do)&&/native code/.test(String(Do)),$o=s,Fo=re,Uo=yn,qo=Ze,Ho=Be,Vo=Ni,Bo=li,Wo="Object already initialized",Yo=$o.TypeError,Ko=$o.WeakMap;if(zo||Ho.state){var Go=Ho.state||(Ho.state=new Ko);Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,vo=function(e,t){if(Go.has(e))throw Yo(Wo);return t.facade=e,Go.set(e,t),t},po=function(e){return Go.get(e)||{}},mo=function(e){return Go.has(e)}}else{var Qo=Vo("state");Bo[Qo]=!0,vo=function(e,t){if(qo(e,Qo))throw Yo(Wo);return t.facade=e,Uo(e,Qo,t),t},po=function(e){return qo(e,Qo)?e[Qo]:{}},mo=function(e){return qo(e,Qo)}}var Xo={set:vo,get:po,has:mo,enforce:function(e){return mo(e)?po(e):vo(e,{})},getterFor:function(e){return function(t){var n;if(!Fo(t)||(n=po(t)).type!==e)throw Yo("Incompatible receiver, "+e+" required");return n}}},Jo=Qt,Zo=Y,ea=Qe,ta=Wn,na=Or,ra=x([].push),ia=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,d){for(var f,h,v=ea(u),p=Zo(v),m=Jo(l,c),y=ta(p),g=0,x=d||na,A=t?x(u,y):n||a?x(u,0):void 0;y>g;g++)if((s||g in p)&&(h=m(f=p[g],g,v),e))if(t)A[g]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:ra(A,f)}else switch(e){case 4:return!1;case 7:ra(A,f)}return o?-1:r||i?i:A}},oa={forEach:ia(0),map:ia(1),filter:ia(2),some:ia(3),every:ia(4),find:ia(5),findIndex:ia(6),filterReject:ia(7)},aa=Tn,sa=s,ua=L,la=x,ca=R,da=we,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ya=bt,ga=Jr,xa=q,Aa=Vi,wa=xi,ba=Bi,Ea=Ki,_a=ao,Ca=O,ja=Xt,ka=Zr,Sa=M,Ta=uo,Na=co,Oa=Ye,Ra=li,Ia=it,Pa=ht,La=fo,Ma=wo,Da=jo,za=Lo,$a=Xo,Fa=oa.forEach,Ua=Ni("hidden"),qa="Symbol",Ha="prototype",Va=$a.set,Ba=$a.getterFor(qa),Wa=Object[Ha],Ya=sa.Symbol,Ka=Ya&&Ya[Ha],Ga=sa.TypeError,Qa=sa.QObject,Xa=Ca.f,Ja=ja.f,Za=Ea.f,es=Sa.f,ts=la([].push),ns=Oa("symbols"),rs=Oa("op-symbols"),is=Oa("wks"),os=!Qa||!Qa[Ha]||!Qa[Ha].findChild,as=ca&&fa((function(){return 7!=Aa(Ja({},"a",{get:function(){return Ja(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Xa(Wa,t);r&&delete Wa[t],Ja(e,t,n),r&&e!==Wa&&Ja(Wa,t,r)}:Ja,ss=function(e,t){var n=ns[e]=Aa(Ka);return Va(n,{type:qa,tag:e,description:t}),ca||(n.description=t),n},us=function(e,t,n){e===Wa&&us(rs,t,n),pa(e);var r=ya(t);return pa(n),ha(ns,r)?(n.enumerable?(ha(e,Ua)&&e[Ua][r]&&(e[Ua][r]=!1),n=Aa(n,{enumerable:xa(0,!1)})):(ha(e,Ua)||Ja(e,Ua,xa(1,{})),e[Ua][r]=!0),as(e,r,n)):Ja(e,r,n)},ls=function(e,t){pa(e);var n=ma(t),r=wa(n).concat(hs(n));return Fa(r,(function(t){ca&&!ua(cs,n,t)||us(e,t,n[t])})),e},cs=function(e){var t=ya(e),n=ua(es,this,t);return!(this===Wa&&ha(ns,t)&&!ha(rs,t))&&(!(n||!ha(this,t)||!ha(ns,t)||ha(this,Ua)&&this[Ua][t])||n)},ds=function(e,t){var n=ma(e),r=ya(t);if(n!==Wa||!ha(ns,r)||ha(rs,r)){var i=Xa(n,r);return!i||!ha(ns,r)||ha(n,Ua)&&n[Ua][r]||(i.enumerable=!0),i}},fs=function(e){var t=Za(ma(e)),n=[];return Fa(t,(function(e){ha(ns,e)||ha(Ra,e)||ts(n,e)})),n},hs=function(e){var t=e===Wa,n=Za(t?rs:ma(e)),r=[];return Fa(n,(function(e){!ha(ns,e)||t&&!ha(Wa,e)||ts(r,ns[e])})),r};da||(Ya=function(){if(va(Ka,this))throw Ga("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ga(arguments[0]):void 0,t=Ia(e),n=function(e){this===Wa&&ua(n,rs,e),ha(this,Ua)&&ha(this[Ua],t)&&(this[Ua][t]=!1),as(this,t,xa(1,e))};return ca&&os&&as(Wa,t,{configurable:!0,set:n}),ss(t,e)},Ta(Ka=Ya[Ha],"toString",(function(){return Ba(this).tag})),Ta(Ya,"withoutSetter",(function(e){return ss(Ia(e),e)})),Sa.f=cs,ja.f=us,ka.f=ls,Ca.f=ds,ba.f=Ea.f=fs,_a.f=hs,La.f=function(e){return ss(Pa(e),e)},ca&&Na(Ka,"description",{configurable:!0,get:function(){return Ba(this).description}})),aa({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:Ya}),Fa(wa(is),(function(e){Ma(e)})),aa({target:qa,stat:!0,forced:!da},{useSetter:function(){os=!0},useSimple:function(){os=!1}}),aa({target:"Object",stat:!0,forced:!da,sham:!ca},{create:function(e,t){return void 0===t?Aa(e):ls(Aa(e),t)},defineProperty:us,defineProperties:ls,getOwnPropertyDescriptor:ds}),aa({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:fs}),Da(),za(Ya,qa),Ra[Ua]=!0;var vs=we&&!!Symbol.for&&!!Symbol.keyFor,ps=Tn,ms=le,ys=Ze,gs=Jr,xs=Ye,As=vs,ws=xs("string-to-symbol-registry"),bs=xs("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!As},{for:function(e){var t=gs(e);if(ys(ws,t))return ws[t];var n=ms("Symbol")(t);return ws[t]=n,bs[n]=t,n}});var Es=Tn,_s=Ze,Cs=ke,js=Te,ks=vs,Ss=Ye("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(_s(Ss,e))return Ss[e]}});var Ts=x([].slice),Ns=$n,Os=N,Rs=E,Is=Jr,Ps=x([].push),Ls=Tn,Ms=le,Ds=v,zs=L,$s=x,Fs=u,Us=N,qs=ke,Hs=Ts,Vs=we,Bs=String,Ws=Ms("JSON","stringify"),Ys=$s(/./.exec),Ks=$s("".charAt),Gs=$s("".charCodeAt),Qs=$s("".replace),Xs=$s(1..toString),Js=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!Vs||Fs((function(){var e=Ms("Symbol")();return"[null]"!=Ws([e])||"{}"!=Ws({a:e})||"{}"!=Ws(Object(e))})),nu=Fs((function(){return'"\\udf06\\ud834"'!==Ws("\udf06\ud834")||'"\\udead"'!==Ws("\udead")})),ru=function(e,t){var n=Hs(arguments),r=function(e){if(Os(e))return e;if(Ns(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ps(n,i):"number"!=typeof i&&"Number"!=Rs(i)&&"String"!=Rs(i)||Ps(n,Is(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ns(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(Us(r)&&(t=zs(r,this,Bs(e),t)),!qs(t))return t},Ds(Ws,null,n)},iu=function(e,t,n){var r=Ks(n,t-1),i=Ks(n,t+1);return Ys(Zs,e)&&!Ys(eu,i)||Ys(eu,e)&&!Ys(Zs,r)?"\\u"+Xs(Gs(e,0),16):e};Ws&&Ls({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Hs(arguments),i=Ds(tu?ru:Ws,null,r);return nu&&"string"==typeof i?Qs(i,Js,iu):i}});var ou=ao,au=Qe;Tn({target:"Object",stat:!0,forced:!we||u((function(){ou.f(1)}))},{getOwnPropertySymbols:function(e){var t=ou.f;return t?t(au(e)):[]}}),wo("asyncIterator"),wo("hasInstance"),wo("isConcatSpreadable"),wo("iterator"),wo("match"),wo("matchAll"),wo("replace"),wo("search"),wo("species"),wo("split");var su=jo;wo("toPrimitive"),su();var uu=le,lu=Lo;wo("toStringTag"),lu(uu("Symbol"),"Symbol"),wo("unscopables"),Lo(s.JSON,"JSON",!0);var cu,du,fu,hu=ie.Symbol,vu={},pu=R,mu=Ze,yu=Function.prototype,gu=pu&&Object.getOwnPropertyDescriptor,xu=mu(yu,"name"),Au={EXISTS:xu,PROPER:xu&&"something"===function(){}.name,CONFIGURABLE:xu&&(!pu||pu&&gu(yu,"name").configurable)},wu=!u((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),bu=Ze,Eu=N,_u=Qe,Cu=wu,ju=Ni("IE_PROTO"),ku=Object,Su=ku.prototype,Tu=Cu?ku.getPrototypeOf:function(e){var t=_u(e);if(bu(t,ju))return t[ju];var n=t.constructor;return Eu(n)&&t instanceof n?n.prototype:t instanceof ku?Su:null},Nu=u,Ou=N,Ru=re,Iu=Vi,Pu=Tu,Lu=uo,Mu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Pu(Pu(fu)))!==Object.prototype&&(cu=du):Du=!0);var zu=!Ru(cu)||Nu((function(){var e={};return cu[Mu].call(e)!==e}));Ou((cu=zu?{}:Iu(cu))[Mu])||Lu(cu,Mu,(function(){return this}));var $u={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},Fu=$u.IteratorPrototype,Uu=Vi,qu=q,Hu=Lo,Vu=vu,Bu=function(){return this},Wu=x,Yu=Ie,Ku=N,Gu=String,Qu=TypeError,Xu=nn,Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return Wu(Yu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Xu(n),function(e){if("object"==typeof e||Ku(e))return e;throw Qu("Can't set "+Gu(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Tn,el=L,tl=Tu,nl=Lo,rl=uo,il=vu,ol=Au.PROPER,al=$u.BUGGY_SAFARI_ITERATORS,sl=ht("iterator"),ul="keys",ll="values",cl="entries",dl=function(){return this},fl=function(e,t,n,r,i,o,a){!function(e,t,n,r){var i=t+" Iterator";e.prototype=Uu(Fu,{next:qu(+!r,n)}),Hu(e,i,!1,!0),Vu[i]=Bu}(n,t,r);var s,u,l,c=function(e){if(e===i&&p)return p;if(!al&&e in h)return h[e];switch(e){case ul:case ll:case cl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,v=h[sl]||h["@@iterator"]||i&&h[i],p=!al&&v||c(i),m="Array"==t&&h.entries||v;if(m&&(s=tl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,d,!0,!0),il[d]=dl),ol&&i==ll&&v&&v.name!==ll&&(f=!0,p=function(){return el(v,this)}),i)if(u={values:c(ll),keys:o?p:c(ul),entries:c(cl)},a)for(l in u)(al||f||!(l in h))&&rl(h,l,u[l]);else Zu({target:t,proto:!0,forced:al||f},u);return a&&h[sl]!==p&&rl(h,sl,p,{name:i}),il[t]=p,u},hl=function(e,t){return{value:e,done:t}},vl=ee,pl=vu,ml=Xo;Xt.f;var yl=fl,gl=hl,xl="Array Iterator",Al=ml.set,wl=ml.getterFor(xl);yl(Array,"Array",(function(e,t){Al(this,{type:xl,target:vl(e),index:0,kind:t})}),(function(){var e=wl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gl(void 0,!0)):gl("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),pl.Arguments=pl.Array;var bl=s,El=sr,_l=yn,Cl=vu,jl=ht("toStringTag");for(var kl in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Sl=bl[kl],Tl=Sl&&Sl.prototype;Tl&&El(Tl)!==jl&&_l(Tl,jl,kl),Cl[kl]=Cl.Array}var Nl=hu;wo("dispose");var Ol=Nl;wo("asyncDispose");var Rl=Tn,Il=x,Pl=le("Symbol"),Ll=Pl.keyFor,Ml=Il(Pl.prototype.valueOf);Rl({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Ll(Ml(e))}catch(e){return!1}}});for(var Dl=Tn,zl=Ye,$l=le,Fl=x,Ul=ke,ql=ht,Hl=$l("Symbol"),Vl=Hl.isWellKnown,Bl=$l("Object","getOwnPropertyNames"),Wl=Fl(Hl.prototype.valueOf),Yl=zl("wks"),Kl=0,Gl=Bl(Hl),Ql=Gl.length;Kl<Ql;Kl++)try{var Xl=Gl[Kl];Ul(Hl[Xl])&&ql(Xl)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Vl&&Vl(e))return!0;try{for(var t=Wl(e),n=0,r=Bl(Yl),i=r.length;n<i;n++)if(Yl[r[n]]==t)return!0}catch(e){}return!1}}),wo("matcher"),wo("metadataKey"),wo("observable"),wo("metadata"),wo("patternMatch"),wo("replaceAll");var Jl=Ol,Zl=i(Jl),ec=x,tc=Hn,nc=Jr,rc=X,ic=ec("".charAt),oc=ec("".charCodeAt),ac=ec("".slice),sc=function(e){return function(t,n){var r,i,o=nc(rc(t)),a=tc(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=oc(o,a))<55296||r>56319||a+1===s||(i=oc(o,a+1))<56320||i>57343?e?ic(o,a):r:e?ac(o,a,a+2):i-56320+(r-55296<<10)+65536}},uc=(sc(!1),sc(!0)),lc=Jr,cc=Xo,dc=fl,fc=hl,hc="String Iterator",vc=cc.set,pc=cc.getterFor(hc);dc(String,"String",(function(e){vc(this,{type:hc,string:lc(e),index:0})}),(function(){var e,t=pc(this),n=t.string,r=t.index;return r>=n.length?fc(void 0,!0):(e=uc(n,r),t.index+=e.length,fc(e,!1))}));var mc=fo.f("iterator"),yc=mc,gc=i(yc);function xc(e){return xc="function"==typeof Zl&&"symbol"==typeof gc?function(e){return typeof e}:function(e){return e&&"function"==typeof Zl&&e.constructor===Zl&&e!==Zl.prototype?"symbol":typeof e},xc(e)}var Ac=i(fo.f("toPrimitive"));function wc(e){var t=function(e,t){if("object"!==xc(e)||null===e)return e;var n=e[Ac];if(void 0!==n){var r=n.call(e,"string");if("object"!==xc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xc(t)?t:String(t)}function bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(e,wc(r.key),r)}}function Ec(e,t,n){return t&&bc(e.prototype,t),n&&bc(e,n),Dn(e,"prototype",{writable:!1}),e}function _c(e,t,n){return(t=wc(t))in e?Dn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cc=x,jc=Ie,kc=re,Sc=Ze,Tc=Ts,Nc=l,Oc=Function,Rc=Cc([].concat),Ic=Cc([].join),Pc={},Lc=Nc?Oc.bind:function(e){var t=jc(this),n=t.prototype,r=Tc(arguments,1),i=function(){var n=Rc(r,Tc(arguments));return this instanceof i?function(e,t,n){if(!Sc(Pc,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Pc[t]=Oc("C,a","return new C("+Ic(r,",")+")")}return Pc[t](e,n)}(t,n.length,n):t.apply(e,n)};return kc(n)&&(i.prototype=n),i},Mc=Lc;Tn({target:"Function",proto:!0,forced:Function.bind!==Mc},{bind:Mc});var Dc=ie,zc=function(e){return Dc[e+"Prototype"]},$c=zc("Function").bind,Fc=ce,Uc=$c,qc=Function.prototype,Hc=function(e){var t=e.bind;return e===qc||Fc(qc,e)&&t===qc.bind?Uc:t},Vc=i(Hc),Bc=Ie,Wc=Qe,Yc=Y,Kc=Wn,Gc=TypeError,Qc=function(e){return function(t,n,r,i){Bc(n);var o=Wc(t),a=Yc(o),s=Kc(o),u=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw Gc("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},Xc={left:Qc(!1),right:Qc(!0)},Jc=u,Zc=function(e,t){var n=[][e];return!!n&&Jc((function(){n.call(null,t||function(){return 1},1)}))},ed="undefined"!=typeof process&&"process"==E(process),td=Xc.left;Tn({target:"Array",proto:!0,forced:!ed&&ge>79&&ge<83||!Zc("reduce")},{reduce:function(e){var t=arguments.length;return td(this,e,t,t>1?arguments[1]:void 0)}});var nd=zc("Array").reduce,rd=ce,id=nd,od=Array.prototype,ad=i((function(e){var t=e.reduce;return e===od||rd(od,e)&&t===od.reduce?id:t})),sd=oa.filter;Tn({target:"Array",proto:!0,forced:!Lr("filter")},{filter:function(e){return sd(this,e,arguments.length>1?arguments[1]:void 0)}});var ud=zc("Array").filter,ld=ce,cd=ud,dd=Array.prototype,fd=i((function(e){var t=e.filter;return e===dd||ld(dd,e)&&t===dd.filter?cd:t})),hd=oa.map;Tn({target:"Array",proto:!0,forced:!Lr("map")},{map:function(e){return hd(this,e,arguments.length>1?arguments[1]:void 0)}});var vd=zc("Array").map,pd=ce,md=vd,yd=Array.prototype,gd=i((function(e){var t=e.map;return e===yd||pd(yd,e)&&t===yd.map?md:t})),xd=$n,Ad=Wn,wd=Kn,bd=Qt,Ed=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&bd(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],o>0&&xd(u)?(l=Ad(u),c=Ed(e,t,u,l,c,o-1)-1):(wd(c+1),e[c]=u),c++),d++;return c},_d=Ed,Cd=Ie,jd=Qe,kd=Wn,Sd=Or;Tn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=kd(n);return Cd(e),(t=Sd(n,0)).length=_d(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Td=zc("Array").flatMap,Nd=ce,Od=Td,Rd=Array.prototype,Id=i((function(e){var t=e.flatMap;return e===Rd||Nd(Rd,e)&&t===Rd.flatMap?Od:t})),Pd=function(){function e(n,r,i){var o,a,s;t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",void 0),_c(this,"_target",void 0),_c(this,"_listeners",{add:Vc(o=this._add).call(o,this),remove:Vc(a=this._remove).call(a,this),update:Vc(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Ec(e,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(e){var t;return ad(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:"_add",value:function(e,t){null!=t&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:"_update",value:function(e,t){null!=t&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:"_remove",value:function(e,t){null!=t&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),Ld=function(){function e(n){t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",[]),this._source=n}return Ec(e,[{key:"filter",value:function(e){return this._transformers.push((function(t){return fd(t).call(t,e)})),this}},{key:"map",value:function(e){return this._transformers.push((function(t){return gd(t).call(t,e)})),this}},{key:"flatMap",value:function(e){return this._transformers.push((function(t){return Id(t).call(t,e)})),this}},{key:"to",value:function(e){return new Pd(this._source,this._transformers,e)}}]),e}(),Md=L,Dd=nn,zd=Me,$d=function(e,t,n){var r,i;Dd(e);try{if(!(r=zd(e,"return"))){if("throw"===t)throw n;return n}r=Md(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Dd(r),n},Fd=nn,Ud=$d,qd=vu,Hd=ht("iterator"),Vd=Array.prototype,Bd=function(e){return void 0!==e&&(qd.Array===e||Vd[Hd]===e)},Wd=sr,Yd=Me,Kd=K,Gd=vu,Qd=ht("iterator"),Xd=function(e){if(!Kd(e))return Yd(e,Qd)||Yd(e,"@@iterator")||Gd[Wd(e)]},Jd=L,Zd=Ie,ef=nn,tf=Te,nf=Xd,rf=TypeError,of=function(e,t){var n=arguments.length<2?nf(e):t;if(Zd(n))return ef(Jd(n,e));throw rf(tf(e)+" is not iterable")},af=Qt,sf=L,uf=Qe,lf=function(e,t,n,r){try{return r?t(Fd(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},cf=Bd,df=Cr,ff=Wn,hf=Jn,vf=of,pf=Xd,mf=Array,yf=ht("iterator"),gf=!1;try{var xf=0,Af={next:function(){return{done:!!xf++}},return:function(){gf=!0}};Af[yf]=function(){return this},Array.from(Af,(function(){throw 2}))}catch(e){}var wf=function(e,t){if(!t&&!gf)return!1;var n=!1;try{var r={};r[yf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n};Tn({target:"Array",stat:!0,forced:!wf((function(e){Array.from(e)}))},{from:function(e){var t=uf(e),n=df(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=af(i,r>2?arguments[2]:void 0));var a,s,u,l,c,d,f=pf(t),h=0;if(!f||this===mf&&cf(f))for(a=ff(t),s=n?new this(a):mf(a);a>h;h++)d=o?i(t[h],h):t[h],hf(s,h,d);else for(c=(l=vf(t,f)).next,s=n?new this:[];!(u=sf(c,l)).done;h++)d=o?lf(l,i,[u.value,h],!0):u.value,hf(s,h,d);return s.length=h,s}});var bf=ie.Array.from,Ef=i(bf),_f=i(Xd),Cf=i(ie.Object.getOwnPropertySymbols),jf={exports:{}},kf=Tn,Sf=u,Tf=ee,Nf=O.f,Of=R;kf({target:"Object",stat:!0,forced:!Of||Sf((function(){Nf(1)})),sham:!Of},{getOwnPropertyDescriptor:function(e,t){return Nf(Tf(e),t)}});var Rf=ie.Object,If=jf.exports=function(e,t){return Rf.getOwnPropertyDescriptor(e,t)};Rf.getOwnPropertyDescriptor.sham&&(If.sham=!0);var Pf=i(jf.exports),Lf=le,Mf=Bi,Df=ao,zf=nn,$f=x([].concat),Ff=Lf("Reflect","ownKeys")||function(e){var t=Mf.f(zf(e)),n=Df.f;return n?$f(t,n(e)):t},Uf=Ff,qf=ee,Hf=O,Vf=Jn;Tn({target:"Object",stat:!0,sham:!R},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qf(e),i=Hf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Vf(a,t,n);return a}});var Bf=i(ie.Object.getOwnPropertyDescriptors),Wf={exports:{}},Yf=Tn,Kf=R,Gf=Zr.f;Yf({target:"Object",stat:!0,forced:Object.defineProperties!==Gf,sham:!Kf},{defineProperties:Gf});var Qf=ie.Object,Xf=Wf.exports=function(e,t){return Qf.defineProperties(e,t)};Qf.defineProperties.sham&&(Xf.sham=!0);var Jf=i(Wf.exports),Zf=i(Ln);Tn({target:"Array",stat:!0},{isArray:$n});var eh=ie.Array.isArray,th=i(eh),nh=Tn,rh=$n,ih=Cr,oh=re,ah=ri,sh=Wn,uh=ee,lh=Jn,ch=ht,dh=Ts,fh=Lr("slice"),hh=ch("species"),vh=Array,ph=Math.max;nh({target:"Array",proto:!0,forced:!fh},{slice:function(e,t){var n,r,i,o=uh(this),a=sh(o),s=ah(e,a),u=ah(void 0===t?a:t,a);if(rh(o)&&(n=o.constructor,(ih(n)&&(n===vh||rh(n.prototype))||oh(n)&&null===(n=n[hh]))&&(n=void 0),n===vh||void 0===n))return dh(o,s,u);for(r=new(void 0===n?vh:n)(ph(u-s,0)),i=0;s<u;s++,i++)s in o&&lh(r,i,o[s]);return r.length=i,r}});var mh=zc("Array").slice,yh=ce,gh=mh,xh=Array.prototype,Ah=function(e){var t=e.slice;return e===xh||yh(xh,e)&&t===xh.slice?gh:t},wh=Ah,bh=i(wh),Eh=i(bf);function _h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ch(e,t){var n;if(e){if("string"==typeof e)return _h(e,t);var r=bh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Eh(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(e,t):void 0}}function jh(e,t){return function(e){if(th(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Zl&&_f(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Ch(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kh(e){return function(e){if(th(e))return _h(e)}(e)||function(e){if(void 0!==Zl&&null!=_f(e)||null!=e["@@iterator"])return Eh(e)}(e)||Ch(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Sh=i(Nl),Th=zc("Array").concat,Nh=ce,Oh=Th,Rh=Array.prototype,Ih=i((function(e){var t=e.concat;return e===Rh||Nh(Rh,e)&&t===Rh.concat?Oh:t})),Ph=i(Ah);Tn({target:"Reflect",stat:!0},{ownKeys:Ff});var Lh=i(ie.Reflect.ownKeys),Mh=i(eh),Dh=Qe,zh=xi;Tn({target:"Object",stat:!0,forced:u((function(){zh(1)}))},{keys:function(e){return zh(Dh(e))}});var $h=i(ie.Object.keys),Fh=oa.forEach,Uh=Zc("forEach")?[].forEach:function(e){return Fh(this,e,arguments.length>1?arguments[1]:void 0)};Tn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var qh=zc("Array").forEach,Hh=sr,Vh=Ze,Bh=ce,Wh=qh,Yh=Array.prototype,Kh={DOMTokenList:!0,NodeList:!0},Gh=function(e){var t=e.forEach;return e===Yh||Bh(Yh,e)&&t===Yh.forEach||Vh(Kh,Hh(e))?Wh:t},Qh=i(Gh),Xh=Tn,Jh=$n,Zh=x([].reverse),ev=[1,2];Xh({target:"Array",proto:!0,forced:String(ev)===String(ev.reverse())},{reverse:function(){return Jh(this)&&(this.length=this.length),Zh(this)}});var tv=zc("Array").reverse,nv=ce,rv=tv,iv=Array.prototype,ov=function(e){var t=e.reverse;return e===iv||nv(iv,e)&&t===iv.reverse?rv:t},av=i(ov),sv=R,uv=$n,lv=TypeError,cv=Object.getOwnPropertyDescriptor,dv=sv&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),fv=Te,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Tn,mv=Qe,yv=ri,gv=Hn,xv=Wn,Av=dv?function(e,t){if(uv(e)&&!cv(e,"length").writable)throw lv("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wv=Kn,bv=Or,Ev=Jn,_v=vv,Cv=Lr("splice"),jv=Math.max,kv=Math.min;pv({target:"Array",proto:!0,forced:!Cv},{splice:function(e,t){var n,r,i,o,a,s,u=mv(this),l=xv(u),c=yv(e,l),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=l-c):(n=d-2,r=kv(jv(gv(t),0),l-c)),wv(l+n-r),i=bv(u,r),o=0;o<r;o++)(a=c+o)in u&&Ev(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:_v(u,s);for(o=l;o>l-r+n;o--)_v(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:_v(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Av(u,l-r+n),i}});var Sv=zc("Array").splice,Tv=ce,Nv=Sv,Ov=Array.prototype,Rv=i((function(e){var t=e.splice;return e===Ov||Tv(Ov,e)&&t===Ov.splice?Nv:t})),Iv=R,Pv=x,Lv=L,Mv=u,Dv=xi,zv=ao,$v=M,Fv=Qe,Uv=Y,qv=Object.assign,Hv=Object.defineProperty,Vv=Pv([].concat),Bv=!qv||Mv((function(){if(Iv&&1!==qv({b:1},qv(Hv({},"a",{enumerable:!0,get:function(){Hv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=qv({},e)[n]||Dv(qv({},t)).join("")!=r}))?function(e,t){for(var n=Fv(e),r=arguments.length,i=1,o=zv.f,a=$v.f;r>i;)for(var s,u=Uv(arguments[i++]),l=o?Vv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Iv&&!Lv(a,u,s)||(n[s]=u[s]);return n}:qv,Wv=Bv;Tn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wv},{assign:Wv});var Yv=i(ie.Object.assign),Kv=Qe,Gv=Tu,Qv=wu;Tn({target:"Object",stat:!0,forced:u((function(){Gv(1)})),sham:!Qv},{getPrototypeOf:function(e){return Gv(Kv(e))}});var Xv=ie.Object.getPrototypeOf;Tn({target:"Object",stat:!0,sham:!R},{create:Vi});var Jv=ie.Object,Zv=function(e,t){return Jv.create(e,t)},ep=i(Zv),tp=ie,np=v;tp.JSON||(tp.JSON={stringify:JSON.stringify});var rp=i((function(e,t,n){return np(tp.JSON.stringify,null,arguments)})),ip="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,op=TypeError,ap=function(e,t){if(e<t)throw op("Not enough arguments");return e},sp=s,up=v,lp=N,cp=ip,dp=de,fp=Ts,hp=ap,vp=sp.Function,pp=/MSIE .\./.test(dp)||cp&&function(){var e=sp.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),mp=function(e,t){var n=t?2:1;return pp?function(r,i){var o=hp(arguments.length,1)>n,a=lp(r)?r:vp(r),s=o?fp(arguments,n):[],u=o?function(){up(a,this,s)}:a;return t?e(u,i):e(u)}:e},yp=Tn,gp=s,xp=mp(gp.setInterval,!0);yp({global:!0,bind:!0,forced:gp.setInterval!==xp},{setInterval:xp});var Ap=Tn,wp=s,bp=mp(wp.setTimeout,!0);Ap({global:!0,bind:!0,forced:wp.setTimeout!==bp},{setTimeout:bp});var Ep=i(ie.setTimeout),_p={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(_p);var Cp,jp=i(_p.exports);function kp(){return kp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kp.apply(this,arguments)}function Sp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Tp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Cp="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var Np,Op=Cp,Rp=["","webkit","Moz","MS","ms","o"],Ip="undefined"==typeof document?{style:{}}:document.createElement("div"),Pp=Math.round,Lp=Math.abs,Mp=Date.now;function Dp(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o<Rp.length;){if((r=(n=Rp[o])?n+i:t)in e)return r;o++}}Np="undefined"==typeof window?{}:window;var zp=Dp(Ip.style,"touchAction"),$p=void 0!==zp,Fp="compute",Up="auto",qp="manipulation",Hp="none",Vp="pan-x",Bp="pan-y",Wp=function(){if(!$p)return!1;var e={},t=Np.CSS&&Np.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Np.CSS.supports("touch-action",n)})),e}(),Yp="ontouchstart"in Np,Kp=void 0!==Dp(Np,"PointerEvent"),Gp=Yp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Qp="touch",Xp="mouse",Jp=25,Zp=1,em=4,tm=8,nm=1,rm=2,im=4,om=8,am=16,sm=rm|im,um=om|am,lm=sm|um,cm=["x","y"],dm=["clientX","clientY"];function fm(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function hm(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function vm(e,t){return e.indexOf(t)>-1}var pm=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Fp&&(e=this.compute()),$p&&this.manager.element.style&&Wp[e]&&(this.manager.element.style[zp]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fm(this.manager.recognizers,(function(t){hm(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(vm(e,Hp))return Hp;var t=vm(e,Vp),n=vm(e,Bp);return t&&n?Hp:t||n?t?Vp:Bp:vm(e,qp)?qp:Up}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=vm(r,Hp)&&!Wp[Hp],o=vm(r,Bp)&&!Wp[Bp],a=vm(r,Vp)&&!Wp[Vp];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&n&sm||a&&n&um?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function mm(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ym(e){var t=e.length;if(1===t)return{x:Pp(e[0].clientX),y:Pp(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Pp(n/t),y:Pp(r/t)}}function gm(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Pp(e.pointers[n].clientX),clientY:Pp(e.pointers[n].clientY)},n++;return{timeStamp:Mp(),pointers:t,center:ym(t),deltaX:e.deltaX,deltaY:e.deltaY}}function xm(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Am(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function wm(e,t){return e===t?nm:Lp(e)>=Lp(t)?e<0?rm:im:t<0?om:am}function bm(e,t,n){return{x:t/e||0,y:n/e||0}}function Em(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=t&Zp&&r-i==0,a=t&(em|tm)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=gm(t)),i>1&&!n.firstMultiple?n.firstMultiple=gm(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=ym(r);t.timeStamp=Mp(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=Am(s,u),t.distance=xm(s,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Zp&&o.eventType!==em||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=wm(t.deltaX,t.deltaY);var l,c,d=bm(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Lp(d.x)>Lp(d.y)?d.x:d.y,t.scale=a?(l=a.pointers,xm((c=r)[0],c[1],dm)/xm(l[0],l[1],dm)):1,t.rotation=a?function(e,t){return Am(t[1],t[0],dm)+Am(e[1],e[0],dm)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(t.eventType!==tm&&(s>Jp||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=bm(s,u,l);r=c.x,i=c.y,n=Lp(c.x)>Lp(c.y)?c.x:c.y,o=wm(u,l),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var f,h=e.element,v=t.srcEvent;mm(f=v.composedPath?v.composedPath()[0]:v.path?v.path[0]:v.target,h)&&(h=f),t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _m(e){return e.trim().split(/\s+/g)}function Cm(e,t,n){fm(_m(t),(function(t){e.addEventListener(t,n,!1)}))}function jm(e,t,n){fm(_m(t),(function(t){e.removeEventListener(t,n,!1)}))}function km(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Sm=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){hm(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Cm(this.element,this.evEl,this.domHandler),this.evTarget&&Cm(this.target,this.evTarget,this.domHandler),this.evWin&&Cm(km(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&jm(this.element,this.evEl,this.domHandler),this.evTarget&&jm(this.target,this.evTarget,this.domHandler),this.evWin&&jm(km(this.element),this.evWin,this.domHandler)},e}();function Tm(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Nm={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Om={2:Qp,3:"pen",4:Xp,5:"kinect"},Rm="pointerdown",Im="pointermove pointerup pointercancel";Np.MSPointerEvent&&!Np.PointerEvent&&(Rm="MSPointerDown",Im="MSPointerMove MSPointerUp MSPointerCancel");var Pm=function(e){function t(){var n,r=t.prototype;return r.evEl=Rm,r.evWin=Im,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return Sp(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Nm[r],o=Om[e.pointerType]||e.pointerType,a=o===Qp,s=Tm(t,e.pointerId,"pointerId");i&Zp&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(em|tm)&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(Sm);function Lm(e){return Array.prototype.slice.call(e,0)}function Mm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Tm(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var Dm={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},zm=function(e){function t(){var n;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).targetIds={},n}return Sp(t,e),t.prototype.handler=function(e){var t=Dm[e.type],n=$m.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Qp,srcEvent:e})},t}(Sm);function $m(e,t){var n,r,i=Lm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Lm(e.changedTouches),s=[],u=this.target;if(r=i.filter((function(e){return mm(e.target,u)})),t===Zp)for(n=0;n<r.length;)o[r[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),t&(em|tm)&&delete o[a[n].identifier],n++;return s.length?[Mm(r.concat(s),"identifier",!0),s]:void 0}var Fm={mousedown:Zp,mousemove:2,mouseup:em},Um=function(e){function t(){var n,r=t.prototype;return r.evEl="mousedown",r.evWin="mousemove mouseup",(n=e.apply(this,arguments)||this).pressed=!1,n}return Sp(t,e),t.prototype.handler=function(e){var t=Fm[e.type];t&Zp&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=em),this.pressed&&(t&em&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Xp,srcEvent:e}))},t}(Sm),qm=2500;function Hm(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),qm)}}function Vm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Hm.call(this,t)):e&(em|tm)&&Hm.call(this,t)}function Bm(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}var Wm=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===Qp,o=n.pointerType===Xp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Vm.call(Tp(Tp(r)),t,n);else if(o&&Bm.call(Tp(Tp(r)),n))return;r.callback(e,t,n)}},r.touch=new zm(r.manager,r.handler),r.mouse=new Um(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return Sp(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Sm);function Ym(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Km=32,Gm=1;function Qm(e,t){var n=t.manager;return n?n.get(e):e}function Xm(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Jm=function(){function e(e){void 0===e&&(e={}),this.options=kp({enable:!0},e),this.id=Gm++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Op(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Ym(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Qm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Ym(e,"dropRecognizeWith",this)||(e=Qm(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Ym(e,"requireFailure",this))return this;var t=this.requireFail;return-1===Tm(t,e=Qm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Ym(e,"dropRequireFailure",this))return this;e=Qm(e,this);var t=Tm(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Xm(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Xm(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Km},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Op({},e);if(!hm(this.options.enable,[this,t]))return this.reset(),void(this.state=Km);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Zm=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[qp]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&Zp&&0===this.count)return this.failTimeout();if(i&&o&&r){if(e.eventType!==em)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||xm(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Km},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Km}),this.options.interval),Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Jm),ey=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({pointers:1},t))||this}Sp(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&tm||!i)?16|t:r||i?n&em?8|t:2&t?4|t:2:Km},t}(Jm);function ty(e){return e===am?"down":e===om?"up":e===rm?"left":e===im?"right":""}var ny=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"pan",threshold:10,pointers:1,direction:lm},t))||this).pX=null,n.pY=null,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sm&&t.push(Bp),e&um&&t.push(Vp),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(t.direction&sm?(i=0===o?nm:o<0?rm:im,n=o!==this.pX,r=Math.abs(e.deltaX)):(i=0===a?nm:a<0?om:am,n=a!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return ey.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=ty(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(ey),ry=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return ny.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(sm|um)?n=t.overallVelocity:r&sm?n=t.overallVelocityX:r&um&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Lp(n)>this.options.velocity&&t.eventType&em},n.emit=function(e){var t=ty(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(ey),iy=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"pinch",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(ey),oy=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"rotate",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(ey),ay=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Up]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(em|tm)&&!o)this.reset();else if(e.eventType&Zp)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&em)return 8;return Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&em?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Mp(),this.manager.emit(this.options.event,this._input)))},t}(Jm),sy={domEvents:!1,touchAction:Fp,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},uy=[[oy,{enable:!1}],[iy,{enable:!1},["rotate"]],[ry,{direction:sm}],[ny,{direction:sm},["swipe"]],[Zm],[Zm,{event:"doubletap",taps:2},["tap"]],[ay]];function ly(e,t){var n,r=e.element;r.style&&(fm(e.options.cssProps,(function(i,o){n=Dp(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var cy=function(){function e(e,t){var n=this;this.options=Op({},sy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(Kp?Pm:Gp?zm:Yp?Wm:Um))(this,Em),this.touchAction=new pm(this,this.options.touchAction),ly(this,!0),fm(this.options.recognizers,(function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Op(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),o++}},t.get=function(e){if(e instanceof Jm)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Ym(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Ym(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Tm(n,t);-1!==r&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return fm(_m(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return fm(_m(e),(function(e){t?n[e]&&n[e].splice(Tm(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&ly(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),dy={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},fy=function(e){function t(){var n,r=t.prototype;return r.evTarget="touchstart",r.evWin="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).started=!1,n}return Sp(t,e),t.prototype.handler=function(e){var t=dy[e.type];if(t===Zp&&(this.started=!0),this.started){var n=hy.call(this,e,t);t&(em|tm)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Qp,srcEvent:e})}},t}(Sm);function hy(e,t){var n=Lm(e.touches),r=Lm(e.changedTouches);return t&(em|tm)&&(n=Mm(n.concat(r),"identifier",!0)),[n,r]}function vy(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var py=vy((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&void 0===e[r[i]])&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),my=vy((function(e,t){return py(e,t,!0)}),"merge","Use `assign`.");function yy(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&Op(r,n)}function gy(e,t){return function(){return e.apply(t,arguments)}}var xy=function(){var e=function(e,t){return void 0===t&&(t={}),new cy(e,kp({recognizers:uy.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=lm,e.DIRECTION_DOWN=am,e.DIRECTION_LEFT=rm,e.DIRECTION_RIGHT=im,e.DIRECTION_UP=om,e.DIRECTION_HORIZONTAL=sm,e.DIRECTION_VERTICAL=um,e.DIRECTION_NONE=nm,e.DIRECTION_DOWN=am,e.INPUT_START=Zp,e.INPUT_MOVE=2,e.INPUT_END=em,e.INPUT_CANCEL=tm,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Km,e.Manager=cy,e.Input=Sm,e.TouchAction=pm,e.TouchInput=zm,e.MouseInput=Um,e.PointerEventInput=Pm,e.TouchMouseInput=Wm,e.SingleTouchInput=fy,e.Recognizer=Jm,e.AttrRecognizer=ey,e.Tap=Zm,e.Pan=ny,e.Swipe=ry,e.Pinch=iy,e.Rotate=oy,e.Press=ay,e.on=Cm,e.off=jm,e.each=fm,e.merge=my,e.extend=py,e.bindFn=gy,e.assign=Op,e.inherit=yy,e.bindFn=gy,e.prefixed=Dp,e.toArray=Lm,e.inArray=Tm,e.uniqueArray=Mm,e.splitStr=_m,e.boolOrFn=hm,e.hasParent=mm,e.addEventListeners=Cm,e.removeEventListeners=jm,e.defaults=Op({},sy,{preset:uy}),e}();function Ay(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return wy(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wy(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var by=Sh("DELETE");function Ey(){var e=_y.apply(void 0,arguments);return jy(e),e}function _y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)return t[0];var r;if(t.length>2)return _y.apply(void 0,Ih(r=[Ey(t[0],t[1])]).call(r,kh(Ph(t).call(t,2))));var i,o=t[0],a=t[1],s=Ay(Lh(a));try{for(s.s();!(i=s.n()).done;){var u=i.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===by?delete o[u]:null===o[u]||null===a[u]||"object"!==xc(o[u])||"object"!==xc(a[u])||Mh(o[u])||Mh(a[u])?o[u]=Cy(a[u]):o[u]=_y(o[u],a[u]))}}catch(e){s.e(e)}finally{s.f()}return o}function Cy(e){return Mh(e)?gd(e).call(e,(function(e){return Cy(e)})):"object"===xc(e)&&null!==e?_y({},e):e}function jy(e){for(var t=0,n=$h(e);t<n.length;t++){var r=n[t];e[r]===by?delete e[r]:"object"===xc(e[r])&&null!==e[r]&&jy(e[r])}}var ky="undefined"!=typeof window?window.Hammer||xy:function(){return function(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}()};function Sy(e){var t,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}));var r=ky(this._dom.overlay);r.on("tap",Vc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Qh(i).call(i,(function(e){r.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(t){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(t.target,e)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",n._onClick)}))),this._escListener=function(e){("key"in e?"Escape"===e.key:27===e.keyCode)&&n.deactivate()}}jp(Sy.prototype),Sy.current=null,Sy.prototype.destroy=function(){var e,t;this.deactivate();var n,r=Ay(av(e=Rv(t=this._cleanupQueue).call(t,0)).call(e));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(e){r.e(e)}finally{r.f()}},Sy.prototype.activate=function(){Sy.current&&Sy.current.deactivate(),Sy.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},Sy.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},Sy.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Ty=Cr,Ny=Te,Oy=TypeError,Ry=function(e){if(Ty(e))return e;throw Oy(Ny(e)+" is not a constructor")},Iy=Tn,Py=v,Ly=Lc,My=Ry,Dy=nn,zy=re,$y=Vi,Fy=u,Uy=le("Reflect","construct"),qy=Object.prototype,Hy=[].push,Vy=Fy((function(){function e(){}return!(Uy((function(){}),[],e)instanceof e)})),By=!Fy((function(){Uy((function(){}))})),Wy=Vy||By;Iy({target:"Reflect",stat:!0,forced:Wy,sham:Wy},{construct:function(e,t){My(e),Dy(t);var n=arguments.length<3?e:My(arguments[2]);if(By&&!Vy)return Uy(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Py(Hy,r,t),new(Py(Ly,e,r))}var i=n.prototype,o=$y(zy(i)?i:qy),a=Py(e,o,t);return zy(a)?a:o}});var Yy=i(ie.Reflect.construct);function Ky(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gy=Zv,Qy=i(Gy);Tn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Xy=ie.Object.setPrototypeOf,Jy=i(Xy),Zy=i(Hc);function eg(e,t){var n;return eg=Jy?Zy(n=Jy).call(n):function(e,t){return e.__proto__=t,e},eg(e,t)}function tg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qy(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Dn(e,"prototype",{writable:!1}),t&&eg(e,t)}function ng(e,t){if(t&&("object"===xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ky(e)}var rg=Xv,ig=i(rg);function og(e){var t;return og=Jy?Zy(t=ig).call(t):function(e){return e.__proto__||ig(e)},og(e)}var ag={exports:{}},sg={exports:{}};!function(e){var t=Jl,n=yc;function r(i){return e.exports=r="function"==typeof t&&"symbol"==typeof n?function(e){return typeof e}:function(e){return e&&"function"==typeof t&&e.constructor===t&&e!==t.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(sg);var ug=sg.exports,lg=Gh,cg=Ze,dg=Ff,fg=O,hg=Xt,vg=re,pg=yn,mg=Error,yg=x("".replace),gg=String(mg("zxcasd").stack),xg=/\n\s*at [^:]*:[^\n]*/,Ag=xg.test(gg),wg=q,bg=!u((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",wg(1,7)),7!==e.stack)})),Eg=yn,_g=bg,Cg=Error.captureStackTrace,jg=Qt,kg=L,Sg=nn,Tg=Te,Ng=Bd,Og=Wn,Rg=ce,Ig=of,Pg=Xd,Lg=$d,Mg=TypeError,Dg=function(e,t){this.stopped=e,this.result=t},zg=Dg.prototype,$g=function(e,t,n){var r,i,o,a,s,u,l,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),p=jg(t,c),m=function(e){return r&&Lg(r,"normal",e),new Dg(!0,e)},y=function(e){return d?(Sg(e),v?p(e[0],e[1],m):p(e[0],e[1])):v?p(e,m):p(e)};if(f)r=e.iterator;else if(h)r=e;else{if(!(i=Pg(e)))throw Mg(Tg(e)+" is not iterable");if(Ng(i)){for(o=0,a=Og(e);a>o;o++)if((s=y(e[o]))&&Rg(zg,s))return s;return new Dg(!1)}r=Ig(e,i)}for(u=f?e.next:r.next;!(l=kg(u,r)).done;){try{s=y(l.value)}catch(e){Lg(r,"throw",e)}if("object"==typeof s&&s&&Rg(zg,s))return s}return new Dg(!1)},Fg=Jr,Ug=Tn,qg=ce,Hg=Tu,Vg=Ju,Bg=Vi,Wg=yn,Yg=q,Kg=function(e,t,n,r){_g&&(Cg?Cg(e,t):Eg(e,"stack",function(e,t){if(Ag&&"string"==typeof e&&!mg.prepareStackTrace)for(;t--;)e=yg(e,xg,"");return e}(n,r)))},Gg=$g,Qg=ht("toStringTag"),Xg=Error,Jg=[].push,Zg=function(e,t){var n,r=qg(ex,this);Vg?n=Vg(Xg(),r?Hg(this):ex):(n=r?this:Bg(ex),Wg(n,Qg,"Error")),void 0!==t&&Wg(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Fg(e)}(t)),Kg(n,Zg,n.stack,1),arguments.length>2&&function(e,t){vg(t)&&"cause"in t&&pg(e,"cause",t.cause)}(n,arguments[2]);var i=[];return Gg(e,Jg,{that:i}),Wg(n,"errors",i),n};Vg?Vg(Zg,Xg):function(e,t,n){for(var r=dg(t),i=hg.f,o=fg.f,a=0;a<r.length;a++){var s=r[a];cg(e,s)||n&&cg(n,s)||i(e,s,o(t,s))}}(Zg,Xg,{name:!0});var ex=Zg.prototype=Bg(Xg.prototype,{constructor:Yg(1,Zg),message:Yg(1,""),name:Yg(1,"AggregateError")});Ug({global:!0,constructor:!0,arity:2},{AggregateError:Zg});var tx,nx,rx,ix,ox=le,ax=co,sx=R,ux=ht("species"),lx=function(e){var t=ox(e);sx&&t&&!t[ux]&&ax(t,ux,{configurable:!0,get:function(){return this}})},cx=ce,dx=TypeError,fx=function(e,t){if(cx(t,e))return e;throw dx("Incorrect invocation")},hx=nn,vx=Ry,px=K,mx=ht("species"),yx=function(e,t){var n,r=hx(e).constructor;return void 0===r||px(n=hx(r)[mx])?t:vx(n)},gx=/(?:ipad|iphone|ipod).*applewebkit/i.test(de),xx=s,Ax=v,wx=Qt,bx=N,Ex=Ze,_x=u,Cx=ki,jx=Ts,kx=jt,Sx=ap,Tx=gx,Nx=ed,Ox=xx.setImmediate,Rx=xx.clearImmediate,Ix=xx.process,Px=xx.Dispatch,Lx=xx.Function,Mx=xx.MessageChannel,Dx=xx.String,zx=0,$x={},Fx="onreadystatechange";_x((function(){tx=xx.location}));var Ux=function(e){if(Ex($x,e)){var t=$x[e];delete $x[e],t()}},qx=function(e){return function(){Ux(e)}},Hx=function(e){Ux(e.data)},Vx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Ox&&Rx||(Ox=function(e){Sx(arguments.length,1);var t=bx(e)?e:Lx(e),n=jx(arguments,1);return $x[++zx]=function(){Ax(t,void 0,n)},nx(zx),zx},Rx=function(e){delete $x[e]},Nx?nx=function(e){Ix.nextTick(qx(e))}:Px&&Px.now?nx=function(e){Px.now(qx(e))}:Mx&&!Tx?(ix=(rx=new Mx).port2,rx.port1.onmessage=Hx,nx=wx(ix.postMessage,ix)):xx.addEventListener&&bx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!_x(Vx)?(nx=Vx,xx.addEventListener("message",Hx,!1)):nx=Fx in kx("script")?function(e){Cx.appendChild(kx("script"))[Fx]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(qx(e),0)});var Bx={set:Ox,clear:Rx},Wx=function(){this.head=null,this.tail=null};Wx.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Yx,Kx,Gx,Qx,Xx,Jx=Wx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eA=/web0s(?!.*chrome)/i.test(de),tA=s,nA=Qt,rA=O.f,iA=Bx.set,oA=Jx,aA=gx,sA=Zx,uA=eA,lA=ed,cA=tA.MutationObserver||tA.WebKitMutationObserver,dA=tA.document,fA=tA.process,hA=tA.Promise,vA=rA(tA,"queueMicrotask"),pA=vA&&vA.value;if(!pA){var mA=new oA,yA=function(){var e,t;for(lA&&(e=fA.domain)&&e.exit();t=mA.get();)try{t()}catch(e){throw mA.head&&Yx(),e}e&&e.enter()};aA||lA||uA||!cA||!dA?!sA&&hA&&hA.resolve?((Qx=hA.resolve(void 0)).constructor=hA,Xx=nA(Qx.then,Qx),Yx=function(){Xx(yA)}):lA?Yx=function(){fA.nextTick(yA)}:(iA=nA(iA,tA),Yx=function(){iA(yA)}):(Kx=!0,Gx=dA.createTextNode(""),new cA(yA).observe(Gx,{characterData:!0}),Yx=function(){Gx.data=Kx=!Kx}),pA=function(e){mA.head||Yx(),mA.add(e)}}var gA=pA,xA=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},AA=s.Promise,wA="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,bA=!wA&&!ed&&"object"==typeof window&&"object"==typeof document,EA=s,_A=AA,CA=N,jA=Wt,kA=dr,SA=ht,TA=bA,NA=wA,OA=ge,RA=_A&&_A.prototype,IA=SA("species"),PA=!1,LA=CA(EA.PromiseRejectionEvent),MA=jA("Promise",(function(){var e=kA(_A),t=e!==String(_A);if(!t&&66===OA)return!0;if(!RA.catch||!RA.finally)return!0;if(!OA||OA<51||!/native code/.test(e)){var n=new _A((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[IA]=r,!(PA=n.then((function(){}))instanceof r))return!0}return!t&&(TA||NA)&&!LA})),DA={CONSTRUCTOR:MA,REJECTION_EVENT:LA,SUBCLASSING:PA},zA={},$A=Ie,FA=TypeError,UA=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw FA("Bad Promise constructor");t=e,n=r})),this.resolve=$A(t),this.reject=$A(n)};zA.f=function(e){return new UA(e)};var qA,HA,VA=Tn,BA=ed,WA=s,YA=L,KA=uo,GA=Lo,QA=lx,XA=Ie,JA=N,ZA=re,ew=fx,tw=yx,nw=Bx.set,rw=gA,iw=xA,ow=Jx,aw=Xo,sw=AA,uw=zA,lw="Promise",cw=DA.CONSTRUCTOR,dw=DA.REJECTION_EVENT,fw=aw.getterFor(lw),hw=aw.set,vw=sw&&sw.prototype,pw=sw,mw=vw,yw=WA.TypeError,gw=WA.document,xw=WA.process,Aw=uw.f,ww=Aw,bw=!!(gw&&gw.createEvent&&WA.dispatchEvent),Ew="unhandledrejection",_w=function(e){var t;return!(!ZA(e)||!JA(t=e.then))&&t},Cw=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Nw(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(yw("Promise-chain cycle")):(r=_w(n))?YA(r,n,u,l):u(n)):l(o)}catch(e){c&&!i&&c.exit(),l(e)}},jw=function(e,t){e.notified||(e.notified=!0,rw((function(){for(var n,r=e.reactions;n=r.get();)Cw(n,e);e.notified=!1,t&&!e.rejection&&Sw(e)})))},kw=function(e,t,n){var r,i;bw?((r=gw.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),WA.dispatchEvent(r)):r={promise:t,reason:n},!dw&&(i=WA["on"+e])?i(r):e===Ew&&function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},Sw=function(e){YA(nw,WA,(function(){var t,n=e.facade,r=e.value;if(Tw(e)&&(t=iw((function(){BA?xw.emit("unhandledRejection",r,n):kw(Ew,n,r)})),e.rejection=BA||Tw(e)?2:1,t.error))throw t.value}))},Tw=function(e){return 1!==e.rejection&&!e.parent},Nw=function(e){YA(nw,WA,(function(){var t=e.facade;BA?xw.emit("rejectionHandled",t):kw("rejectionhandled",t,e.value)}))},Ow=function(e,t,n){return function(r){e(t,r,n)}},Rw=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,jw(e,!0))},Iw=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw yw("Promise can't be resolved itself");var r=_w(t);r?rw((function(){var n={done:!1};try{YA(r,t,Ow(Iw,n,e),Ow(Rw,n,e))}catch(t){Rw(n,t,e)}})):(e.value=t,e.state=1,jw(e,!1))}catch(t){Rw({done:!1},t,e)}}};cw&&(mw=(pw=function(e){ew(this,mw),XA(e),YA(qA,this);var t=fw(this);try{e(Ow(Iw,t),Ow(Rw,t))}catch(e){Rw(t,e)}}).prototype,(qA=function(e){hw(this,{type:lw,done:!1,notified:!1,parent:!1,reactions:new ow,rejection:!1,state:0,value:void 0})}).prototype=KA(mw,"then",(function(e,t){var n=fw(this),r=Aw(tw(this,pw));return n.parent=!0,r.ok=!JA(e)||e,r.fail=JA(t)&&t,r.domain=BA?xw.domain:void 0,0==n.state?n.reactions.add(r):rw((function(){Cw(r,n)})),r.promise})),HA=function(){var e=new qA,t=fw(e);this.promise=e,this.resolve=Ow(Iw,t),this.reject=Ow(Rw,t)},uw.f=Aw=function(e){return e===pw||void 0===e?new HA(e):ww(e)}),VA({global:!0,constructor:!0,wrap:!0,forced:cw},{Promise:pw}),GA(pw,lw,!1,!0),QA(lw);var Pw=AA,Lw=DA.CONSTRUCTOR||!wf((function(e){Pw.all(e).then(void 0,(function(){}))})),Mw=L,Dw=Ie,zw=zA,$w=xA,Fw=$g;Tn({target:"Promise",stat:!0,forced:Lw},{all:function(e){var t=this,n=zw.f(t),r=n.resolve,i=n.reject,o=$w((function(){var n=Dw(t.resolve),o=[],a=0,s=1;Fw(e,(function(e){var u=a++,l=!1;s++,Mw(n,t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Uw=Tn,qw=DA.CONSTRUCTOR;AA&&AA.prototype,Uw({target:"Promise",proto:!0,forced:qw,real:!0},{catch:function(e){return this.then(void 0,e)}});var Hw=L,Vw=Ie,Bw=zA,Ww=xA,Yw=$g;Tn({target:"Promise",stat:!0,forced:Lw},{race:function(e){var t=this,n=Bw.f(t),r=n.reject,i=Ww((function(){var i=Vw(t.resolve);Yw(e,(function(e){Hw(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Kw=L,Gw=zA;Tn({target:"Promise",stat:!0,forced:DA.CONSTRUCTOR},{reject:function(e){var t=Gw.f(this);return Kw(t.reject,void 0,e),t.promise}});var Qw=nn,Xw=re,Jw=zA,Zw=function(e,t){if(Qw(e),Xw(t)&&t.constructor===e)return t;var n=Jw.f(e);return(0,n.resolve)(t),n.promise},eb=Tn,tb=AA,nb=DA.CONSTRUCTOR,rb=Zw,ib=le("Promise"),ob=!nb;eb({target:"Promise",stat:!0,forced:!0},{resolve:function(e){return rb(ob&&this===ib?tb:this,e)}});var ab=L,sb=Ie,ub=zA,lb=xA,cb=$g;Tn({target:"Promise",stat:!0,forced:Lw},{allSettled:function(e){var t=this,n=ub.f(t),r=n.resolve,i=n.reject,o=lb((function(){var n=sb(t.resolve),i=[],o=0,a=1;cb(e,(function(e){var s=o++,u=!1;a++,ab(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var db=L,fb=Ie,hb=le,vb=zA,pb=xA,mb=$g,yb="No one promise resolved";Tn({target:"Promise",stat:!0,forced:Lw},{any:function(e){var t=this,n=hb("AggregateError"),r=vb.f(t),i=r.resolve,o=r.reject,a=pb((function(){var r=fb(t.resolve),a=[],s=0,u=1,l=!1;mb(e,(function(e){var c=s++,d=!1;u++,db(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[c]=e,--u||o(new n(a,yb)))}))})),--u||o(new n(a,yb))}));return a.error&&o(a.value),r.promise}});var gb=Tn,xb=AA,Ab=u,wb=le,bb=N,Eb=yx,_b=Zw,Cb=xb&&xb.prototype;gb({target:"Promise",proto:!0,real:!0,forced:!!xb&&Ab((function(){Cb.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Eb(this,wb("Promise")),n=bb(e);return this.then(n?function(n){return _b(t,e()).then((function(){return n}))}:e,n?function(n){return _b(t,e()).then((function(){throw n}))}:e)}});var jb=ie.Promise,kb=zA,Sb=xA;Tn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=kb.f(this),n=Sb(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Tb=jb,Nb=ov;!function(e){var t=ug.default,n=Mn,r=Jl,i=Gy,o=rg,a=lg,s=Xy,u=Tb,l=Nb,c=wh;function d(){e.exports=d=function(){return f},e.exports.__esModule=!0,e.exports.default=e.exports;var f={},h=Object.prototype,v=h.hasOwnProperty,p=n||function(e,t,n){e[t]=n.value},m="function"==typeof r?r:{},y=m.iterator||"@@iterator",g=m.asyncIterator||"@@asyncIterator",x=m.toStringTag||"@@toStringTag";function A(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{A({},"")}catch(e){A=function(e,t,n){return e[t]=n}}function w(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,a=i(o.prototype),s=new M(r||[]);return p(a,"_invoke",{value:R(e,n,s)}),a}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}f.wrap=w;var E={};function _(){}function C(){}function j(){}var k={};A(k,y,(function(){return this}));var S=o&&o(o(D([])));S&&S!==h&&v.call(S,y)&&(k=S);var T=j.prototype=_.prototype=i(k);function N(e){var t;a(t=["next","throw","return"]).call(t,(function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,n){function r(i,o,a,s){var u=b(e[i],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==t(c)&&v.call(c,"__await")?n.resolve(c.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):n.resolve(c).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;p(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,i){r(e,t,n,i)}))}return i=i?i.then(o,o):o()}})}function R(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===E)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=b(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===E)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function I(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),E;var i=b(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,E;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,E):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,E)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],a(e).call(e,P,this),this.reset(!0)}function D(e){if(e){var t=e[y];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:z}}function z(){return{value:void 0,done:!0}}return C.prototype=j,p(T,"constructor",{value:j,configurable:!0}),p(j,"constructor",{value:C,configurable:!0}),C.displayName=A(j,x,"GeneratorFunction"),f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return s?s(e,j):(e.__proto__=j,A(e,x,"GeneratorFunction")),e.prototype=i(T),e},f.awrap=function(e){return{__await:e}},N(O.prototype),A(O.prototype,g,(function(){return this})),f.AsyncIterator=O,f.async=function(e,t,n,r,i){void 0===i&&(i=u);var o=new O(w(e,t,n,r),i);return f.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},N(T),A(T,x,"Generator"),A(T,y,(function(){return this})),A(T,"toString",(function(){return"[object Generator]"})),f.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return l(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},f.values=D,M.prototype={constructor:M,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,a(t=this.tryEntries).call(t,L),!e)for(var n in this)"t"===n.charAt(0)&&v.call(this,n)&&!isNaN(+c(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),s=v.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,E):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),E}},f}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}(ag);var Ob=(0,ag.exports)(),Rb=Ob;try{regeneratorRuntime=Ob}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ob:Function("r","regeneratorRuntime = r")(Ob)}var Ib=i(Rb),Pb={exports:{}},Lb=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Mb=u,Db=re,zb=E,$b=Lb,Fb=Object.isExtensible,Ub=Mb((function(){Fb(1)}))||$b?function(e){return!!Db(e)&&(!$b||"ArrayBuffer"!=zb(e))&&(!Fb||Fb(e))}:Fb,qb=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hb=Tn,Vb=x,Bb=li,Wb=re,Yb=Ze,Kb=Xt.f,Gb=Bi,Qb=Ki,Xb=Ub,Jb=qb,Zb=!1,eE=it("meta"),tE=0,nE=function(e){Kb(e,eE,{value:{objectID:"O"+tE++,weakData:{}}})},rE=Pb.exports={enable:function(){rE.enable=function(){},Zb=!0;var e=Gb.f,t=Vb([].splice),n={};n[eE]=1,e(n).length&&(Gb.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===eE){t(r,i,1);break}return r},Hb({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Qb.f}))},fastKey:function(e,t){if(!Wb(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Yb(e,eE)){if(!Xb(e))return"F";if(!t)return"E";nE(e)}return e[eE].objectID},getWeakData:function(e,t){if(!Yb(e,eE)){if(!Xb(e))return!0;if(!t)return!1;nE(e)}return e[eE].weakData},onFreeze:function(e){return Jb&&Zb&&Xb(e)&&!Yb(e,eE)&&nE(e),e}};Bb[eE]=!0;var iE=Pb.exports,oE=Tn,aE=s,sE=iE,uE=u,lE=yn,cE=$g,dE=fx,fE=N,hE=re,vE=Lo,pE=Xt.f,mE=oa.forEach,yE=R,gE=Xo.set,xE=Xo.getterFor,AE=function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=aE[e],u=s&&s.prototype,l={};if(yE&&fE(s)&&(o||u.forEach&&!uE((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){gE(dE(t,c),{type:e,collection:new s}),null!=n&&cE(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=xE(e);mE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||lE(c,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!hE(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||pE(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),sE.enable();return vE(r,e,!1,!0),l[e]=r,oE({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r},wE=uo,bE=Vi,EE=co,_E=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:wE(e,r,t[r],n);return e},CE=Qt,jE=fx,kE=K,SE=$g,TE=fl,NE=hl,OE=lx,RE=R,IE=iE.fastKey,PE=Xo.set,LE=Xo.getterFor,ME={getConstructor:function(e,t,n,r){var i=e((function(e,i){jE(e,o),PE(e,{type:t,index:bE(null),first:void 0,last:void 0,size:0}),RE||(e.size=0),kE(i)||SE(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=LE(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=IE(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),RE?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=IE(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return _E(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,RE?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),RE?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=CE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),_E(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),RE&&EE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=LE(t),o=LE(r);TE(e,t,(function(e,t){PE(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?NE("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,NE(void 0,!0))}),n?"entries":"values",!n,!0),OE(t)}};AE("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),ME);var DE=i(ie.Map),zE=oa.some;Tn({target:"Array",proto:!0,forced:!Zc("some")},{some:function(e){return zE(this,e,arguments.length>1?arguments[1]:void 0)}});var $E=zc("Array").some,FE=ce,UE=$E,qE=Array.prototype,HE=i((function(e){var t=e.some;return e===qE||FE(qE,e)&&t===qE.some?UE:t})),VE=zc("Array").keys,BE=sr,WE=Ze,YE=ce,KE=VE,GE=Array.prototype,QE={DOMTokenList:!0,NodeList:!0},XE=i((function(e){var t=e.keys;return e===GE||YE(GE,e)&&t===GE.keys||WE(QE,BE(e))?KE:t})),JE=eo,ZE=Math.floor,e_=function(e,t){var n=e.length,r=ZE(n/2);return n<8?t_(e,t):n_(e,e_(JE(e,0,r),t),e_(JE(e,r),t),t)},t_=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},n_=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},r_=e_,i_=de.match(/firefox\/(\d+)/i),o_=!!i_&&+i_[1],a_=/MSIE|Trident/.test(de),s_=de.match(/AppleWebKit\/(\d+)\./),u_=!!s_&&+s_[1],l_=Tn,c_=x,d_=Ie,f_=Qe,h_=Wn,v_=vv,p_=Jr,m_=u,y_=r_,g_=Zc,x_=o_,A_=a_,w_=ge,b_=u_,E_=[],__=c_(E_.sort),C_=c_(E_.push),j_=m_((function(){E_.sort(void 0)})),k_=m_((function(){E_.sort(null)})),S_=g_("sort"),T_=!m_((function(){if(w_)return w_<70;if(!(x_&&x_>3)){if(A_)return!0;if(b_)return b_<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)E_.push({k:t+r,v:n})}for(E_.sort((function(e,t){return t.v-e.v})),r=0;r<E_.length;r++)t=E_[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));l_({target:"Array",proto:!0,forced:j_||!k_||!S_||!T_},{sort:function(e){void 0!==e&&d_(e);var t=f_(this);if(T_)return void 0===e?__(t):__(t,e);var n,r,i=[],o=h_(t);for(r=0;r<o;r++)r in t&&C_(i,t[r]);for(y_(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:p_(t)>p_(n)?1:-1}}(e)),n=h_(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)v_(t,r++);return t}});var N_=zc("Array").sort,O_=ce,R_=N_,I_=Array.prototype,P_=i((function(e){var t=e.sort;return e===I_||O_(I_,e)&&t===I_.sort?R_:t})),L_=zc("Array").values,M_=sr,D_=Ze,z_=ce,$_=L_,F_=Array.prototype,U_={DOMTokenList:!0,NodeList:!0},q_=i((function(e){var t=e.values;return e===F_||z_(F_,e)&&t===F_.values||D_(U_,M_(e))?$_:t})),H_=i(mc),V_=zc("Array").entries,B_=sr,W_=Ze,Y_=ce,K_=V_,G_=Array.prototype,Q_={DOMTokenList:!0,NodeList:!0},X_=i((function(e){var t=e.entries;return e===G_||Y_(G_,e)&&t===G_.entries||W_(Q_,B_(e))?K_:t}));let J_;const Z_=new Uint8Array(16);function eC(){if(!J_&&(J_="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!J_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J_(Z_)}const tC=[];for(let e=0;e<256;++e)tC.push((e+256).toString(16).slice(1));var nC={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rC(e,t,n){if(nC.randomUUID&&!t&&!e)return nC.randomUUID();const r=(e=e||{}).random||(e.rng||eC)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return tC[e[t+0]]+tC[e[t+1]]+tC[e[t+2]]+tC[e[t+3]]+"-"+tC[e[t+4]]+tC[e[t+5]]+"-"+tC[e[t+6]]+tC[e[t+7]]+"-"+tC[e[t+8]]+tC[e[t+9]]+"-"+tC[e[t+10]]+tC[e[t+11]]+tC[e[t+12]]+tC[e[t+13]]+tC[e[t+14]]+tC[e[t+15]]}(r)}function iC(e){return"string"==typeof e||"number"==typeof e}var oC=function(){function e(n){t(this,e),_c(this,"delay",void 0),_c(this,"max",void 0),_c(this,"_queue",[]),_c(this,"_timeout",null),_c(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ec(e,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:"replace",value:function(e,t){var n=this,r=e[t];if(!r)throw new Error("Method "+t+" undefined");e[t]=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.queue({args:t,fn:r,context:this})}}},{key:"queue",value:function(e){"function"==typeof e?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Ep((function(){e.flush()}),this.delay))}},{key:"flush",value:function(){var e,t;Qh(e=Rv(t=this._queue).call(t,0)).call(e,(function(e){e.fn.apply(e.context||e.fn,e.args||[])}))}}],[{key:"extend",value:function(t,n){var r=new e(n);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){r.flush()};var i=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;o<n.replace.length;o++){var a=n.replace[o];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}}]),e}(),aC=function(){function e(){t(this,e),_c(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),_c(this,"subscribe",e.prototype.on),_c(this,"unsubscribe",e.prototype.off)}return Ec(e,[{key:"_trigger",value:function(e,t,n){var r,i;if("*"===e)throw new Error("Cannot trigger event *");Qh(r=Ih(i=[]).call(i,kh(this._subscribers[e]),kh(this._subscribers["*"]))).call(r,(function(r){r(e,t,null!=n?n:null)}))}},{key:"on",value:function(e,t){"function"==typeof t&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var n;this._subscribers[e]=fd(n=this._subscribers[e]).call(n,(function(e){return e!==t}))}}]),e}();AE("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),ME);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return dC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function dC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}sC=H_;var fC=function(){function e(n){t(this,e),_c(this,"_pairs",void 0),this._pairs=n}return Ec(e,[{key:sC,value:Ib.mark((function e(){var t,n,r,i,o;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:Ib.mark((function e(){var t,n,r,i,o;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"keys",value:Ib.mark((function e(){var t,n,r,i;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:Ib.mark((function e(){var t,n,r,i;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var e;return gd(e=kh(this._pairs)).call(e,(function(e){return e[0]}))}},{key:"toItemArray",value:function(){var e;return gd(e=kh(this._pairs)).call(e,(function(e){return e[1]}))}},{key:"toEntryArray",value:function(){return kh(this._pairs)}},{key:"toObjectMap",value:function(){var e,t=ep(null),n=cC(this._pairs);try{for(n.s();!(e=n.n()).done;){var r=jh(e.value,2),i=r[0],o=r[1];t[i]=o}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toMap",value:function(){return new DE(this._pairs)}},{key:"toIdSet",value:function(){return new uC(this.toIdArray())}},{key:"toItemSet",value:function(){return new uC(this.toItemArray())}},{key:"cache",value:function(){return new e(kh(this._pairs))}},{key:"distinct",value:function(e){var t,n=new uC,r=cC(this._pairs);try{for(r.s();!(t=r.n()).done;){var i=jh(t.value,2),o=i[0],a=i[1];n.add(e(a,o))}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"filter",value:function(t){var n=this._pairs;return new e(_c({},H_,Ib.mark((function e(){var r,i,o,a,s;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=10;break}if(o=jh(i.value,2),a=o[0],s=o[1],!t(s,a)){e.next=8;break}return e.next=8,[a,s];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),r.e(e.t0);case 15:return e.prev=15,r.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))))}},{key:"forEach",value:function(e){var t,n=cC(this._pairs);try{for(n.s();!(t=n.n()).done;){var r=jh(t.value,2),i=r[0];e(r[1],i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"map",value:function(t){var n=this._pairs;return new e(_c({},H_,Ib.mark((function e(){var r,i,o,a,s;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=9;break}return o=jh(i.value,2),a=o[0],s=o[1],e.next=7,[a,t(s,a)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),r.e(e.t0);case 14:return e.prev=14,r.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))))}},{key:"max",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u>i&&(i=u,r=s)}return r}},{key:"min",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u<i&&(i=u,r=s)}return r}},{key:"reduce",value:function(e,t){var n,r=cC(this._pairs);try{for(r.s();!(n=r.n()).done;){var i=jh(n.value,2),o=i[0];t=e(t,i[1],o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"sort",value:function(t){var n=this;return new e(_c({},H_,(function(){var e;return lC(P_(e=kh(n._pairs)).call(e,(function(e,n){var r=jh(e,2),i=r[0],o=r[1],a=jh(n,2),s=a[0],u=a[1];return t(o,u,i,s)})))})))}}]),e}();function hC(e,t){var n=$h(e);if(Cf){var r=Cf(e);t&&(r=fd(r).call(r,(function(t){return Pf(e,t).enumerable}))),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Qh(n=hC(Object(i),!0)).call(n,(function(t){_c(e,t,i[t])})):Bf?Jf(e,Bf(i)):Qh(r=hC(Object(i))).call(r,(function(t){Zf(e,t,Pf(i,t))}))}return e}function pC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return mC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function mC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yC=function(e){tg(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Yy)return!1;if(Yy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Yy(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}(r);function r(e,i){var o;return t(this,r),_c(Ky(o=n.call(this)),"flush",void 0),_c(Ky(o),"length",void 0),_c(Ky(o),"_options",void 0),_c(Ky(o),"_data",void 0),_c(Ky(o),"_idProp",void 0),_c(Ky(o),"_queue",null),e&&!Mh(e)&&(i=e,e=[]),o._options=i||{},o._data=new DE,o.length=0,o._idProp=o._options.fieldId||"id",e&&e.length&&o.add(e),o.setOptions(i),o}return Ec(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(e){e&&void 0!==e.queue&&(!1===e.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=oC.extend(this,{replace:["add","update","remove"]})),e.queue&&"object"===xc(e.queue)&&this._queue.setOptions(e.queue)))}},{key:"add",value:function(e,t){var n,r=this,i=[];if(Mh(e)){var o=gd(e).call(e,(function(e){return e[r._idProp]}));if(HE(o).call(o,(function(e){return r._data.has(e)})))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=e.length;a<s;a++)n=this._addItem(e[a]),i.push(n)}else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");n=this._addItem(e),i.push(n)}return i.length&&this._trigger("add",{items:i},t),i}},{key:"update",value:function(e,t){var n=this,r=[],i=[],o=[],a=[],s=this._idProp,u=function(e){var t=e[s];if(null!=t&&n._data.has(t)){var u=e,l=Yv({},n._data.get(t)),c=n._updateItem(u);i.push(c),a.push(u),o.push(l)}else{var d=n._addItem(e);r.push(d)}};if(Mh(e))for(var l=0,c=e.length;l<c;l++)e[l]&&"object"===xc(e[l])?u(e[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");u(e)}if(r.length&&this._trigger("add",{items:r},t),i.length){var d={items:i,oldData:o,data:a};this._trigger("update",d,t)}return Ih(r).call(r,i)}},{key:"updateOnly",value:function(e,t){var n,r=this;Mh(e)||(e=[e]);var i=gd(n=gd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(null==t)throw new Error("Updating non-existent items is not allowed.");return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],o=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Ey.apply(void 0,Ih(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,o),{id:i,oldData:t,updatedData:o}}));if(i.length){var o={items:gd(i).call(i,(function(e){return e.id})),oldData:gd(i).call(i,(function(e){return e.oldData})),data:gd(i).call(i,(function(e){return e.updatedData}))};return this._trigger("update",o,t),o.items}return[]}},{key:"get",value:function(e,t){var n=void 0,r=void 0,i=void 0;iC(e)?(n=e,i=t):Mh(e)?(r=e,i=t):i=e;var o,a=i&&"Object"===i.returnType?"Object":"Array",s=i&&fd(i),u=[],l=void 0,c=void 0,d=void 0;if(null!=n)(l=this._data.get(n))&&s&&!s(l)&&(l=void 0);else if(null!=r)for(var f=0,h=r.length;f<h;f++)null==(l=this._data.get(r[f]))||s&&!s(l)||u.push(l);else for(var v,p=0,m=(c=kh(XE(v=this._data).call(v))).length;p<m;p++)d=c[p],null==(l=this._data.get(d))||s&&!s(l)||u.push(l);if(i&&i.order&&null==n&&this._sort(u,i.order),i&&i.fields){var y=i.fields;if(null!=n&&null!=l)l=this._filterFields(l,y);else for(var g=0,x=u.length;g<x;g++)u[g]=this._filterFields(u[g],y)}if("Object"==a){for(var A={},w=0,b=u.length;w<b;w++){var E=u[w];A[E[this._idProp]]=E}return A}return null!=n?null!==(o=l)&&void 0!==o?o:null:u}},{key:"getIds",value:function(e){var t=this._data,n=e&&fd(e),r=e&&e.order,i=kh(XE(t).call(t)),o=[];if(n)if(r){for(var a=[],s=0,u=i.length;s<u;s++){var l=i[s],c=this._data.get(l);null!=c&&n(c)&&a.push(c)}this._sort(a,r);for(var d=0,f=a.length;d<f;d++)o.push(a[d][this._idProp])}else for(var h=0,v=i.length;h<v;h++){var p=i[h],m=this._data.get(p);null!=m&&n(m)&&o.push(m[this._idProp])}else if(r){for(var y=[],g=0,x=i.length;g<x;g++){var A=i[g];y.push(t.get(A))}this._sort(y,r);for(var w=0,b=y.length;w<b;w++)o.push(y[w][this._idProp])}else for(var E=0,_=i.length;E<_;E++){var C=i[E],j=t.get(C);null!=j&&o.push(j[this._idProp])}return o}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(e,t){var n=t&&fd(t),r=this._data,i=kh(XE(r).call(r));if(t&&t.order)for(var o=this.get(t),a=0,s=o.length;a<s;a++){var u=o[a];e(u,u[this._idProp])}else for(var l=0,c=i.length;l<c;l++){var d=i[l],f=this._data.get(d);null==f||n&&!n(f)||e(f,d)}}},{key:"map",value:function(e,t){for(var n=t&&fd(t),r=[],i=this._data,o=kh(XE(i).call(i)),a=0,s=o.length;a<s;a++){var u=o[a],l=this._data.get(u);null==l||n&&!n(l)||r.push(e(l,u))}return t&&t.order&&this._sort(r,t.order),r}},{key:"_filterFields",value:function(e,t){var n;return e?ad(n=Mh(t)?t:$h(t)).call(n,(function(t,n){return t[n]=e[n],t}),{}):e}},{key:"_sort",value:function(e,t){if("string"==typeof t){var n=t;P_(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");P_(e).call(e,t)}}},{key:"remove",value:function(e,t){for(var n=[],r=[],i=Mh(e)?e:[e],o=0,a=i.length;o<a;o++){var s=this._remove(i[o]);if(s){var u=s[this._idProp];null!=u&&(n.push(u),r.push(s))}}return n.length&&this._trigger("remove",{items:n,oldData:r},t),n}},{key:"_remove",value:function(e){var t;if(iC(e)?t=e:e&&"object"===xc(e)&&(t=e[this._idProp]),null!=t&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:"clear",value:function(e){for(var t,n=kh(XE(t=this._data).call(t)),r=[],i=0,o=n.length;i<o;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger("remove",{items:n,oldData:r},e),n}},{key:"max",value:function(e){var t,n,r=null,i=null,o=pC(q_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s>i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"min",value:function(e){var t,n,r=null,i=null,o=pC(q_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s<i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"distinct",value:function(e){for(var t=this._data,n=kh(XE(t).call(t)),r=[],i=0,o=0,a=n.length;o<a;o++){for(var s=n[o],u=t.get(s)[e],l=!1,c=0;c<i;c++)if(r[c]==u){l=!0;break}l||void 0===u||(r[i]=u,i++)}return r}},{key:"_addItem",value:function(e){var t=function(e,t){return null==e[t]&&(e[t]=rC()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw new Error("Cannot add item: item with id "+n+" already exists");return this._data.set(n,t),++this.length,n}},{key:"_updateItem",value:function(e){var t=e[this._idProp];if(null==t)throw new Error("Cannot update item: item has no id (item: "+rp(e)+")");var n=this._data.get(t);if(!n)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,vC(vC({},n),e)),t}},{key:"stream",value:function(e){if(e){var t=this._data;return new fC(_c({},H_,Ib.mark((function n(){var r,i,o,a;return Ib.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=pC(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(o=i.value,null==(a=t.get(o))){n.next=9;break}return n.next=9,[o,a];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case"end":return n.stop()}}),n,null,[[1,13,16,19]])}))))}var n;return new fC(_c({},H_,Vc(n=X_(this._data)).call(n,this._data)))}}]),r}(aC);function gC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xC=function(e){tg(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Yy)return!1;if(Yy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Yy(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}(r);function r(e,i){var o,a;return t(this,r),_c(Ky(a=n.call(this)),"length",0),_c(Ky(a),"_listener",void 0),_c(Ky(a),"_data",void 0),_c(Ky(a),"_ids",new uC),_c(Ky(a),"_options",void 0),a._options=i||{},a._listener=Vc(o=a._onEvent).call(o,Ky(a)),a.setData(e),a}return Ec(r,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(e){if(this._data){this._data.off&&this._data.off("*",this._listener);var t=this._data.getIds({filter:fd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:n})}if(null!=e){this._data=e;for(var r=this._data.getIds({filter:fd(this._options)}),i=0,o=r.length;i<o;i++){var a=r[i];this._ids.add(a)}this.length=r.length,this._trigger("add",{items:r})}else this._data=new yC;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var e=this._data.getIds({filter:fd(this._options)}),t=kh(this._ids),n={},r=[],i=[],o=[],a=0,s=e.length;a<s;a++){var u=e[a];n[u]=!0,this._ids.has(u)||(r.push(u),this._ids.add(u))}for(var l=0,c=t.length;l<c;l++){var d=t[l],f=this._data.get(d);null==f?console.error("If you see this, report it please."):n[d]||(i.push(d),o.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger("add",{items:r}),i.length&&this._trigger("remove",{items:i,oldData:o})}},{key:"get",value:function(e,t){if(null==this._data)return null;var n,r=null;iC(e)||Mh(e)?(r=e,n=t):n=e;var i=Yv({},this._options,n),o=fd(this._options),a=n&&fd(n);return o&&a&&(i.filter=function(e){return o(e)&&a(e)}),null==r?this._data.get(i):this._data.get(r,i)}},{key:"getIds",value:function(e){if(this._data.length){var t,n=fd(this._options),r=null!=e?fd(e):null;return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:"forEach",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);r=o?i?function(e){return i(e)&&o(e)}:o:i,Qh(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:"map",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);return r=o?i?function(e){return i(e)&&o(e)}:o:i,gd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(e){var t;return this._data.stream(e||_c({},H_,Vc(t=XE(this._ids)).call(t,this._ids)))}},{key:"dispose",value:function(){var e;null!==(e=this._data)&&void 0!==e&&e.off&&this._data.off("*",this._listener);var t,n="This data view has already been disposed of.",i={get:function(){throw new Error(n)},set:function(){throw new Error(n)},configurable:!1},o=function(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return gC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Lh(r.prototype));try{for(o.s();!(t=o.n()).done;){var a=t.value;Zf(this,a,i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"_onEvent",value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],o=[],a=[],s=[],u=[],l=[];switch(e){case"add":for(var c=0,d=r.length;c<d;c++){var f=r[c];this.get(f)&&(this._ids.add(f),i.push(f))}break;case"update":for(var h=0,v=r.length;h<v;h++){var p=r[h];this.get(p)?this._ids.has(p)?(o.push(p),u.push(t.data[h]),s.push(t.oldData[h])):(this._ids.add(p),i.push(p)):this._ids.has(p)&&(this._ids.delete(p),a.push(p),l.push(t.oldData[h]))}break;case"remove":for(var m=0,y=r.length;m<y;m++){var g=r[m];this._ids.has(g)&&(this._ids.delete(g),a.push(g),l.push(t.oldData[m]))}}this.length+=i.length-a.length,i.length&&this._trigger("add",{items:i},n),o.length&&this._trigger("update",{items:o,oldData:s,data:u},n),a.length&&this._trigger("remove",{items:a,oldData:l},n)}}}]),r}(aC);function AC(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof t.add&&"function"==typeof t.clear&&"function"==typeof t.distinct&&"function"==typeof Qh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof gd(t)&&"function"==typeof t.max&&"function"==typeof t.min&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.remove&&"function"==typeof t.setOptions&&"function"==typeof t.stream&&"function"==typeof t.update&&"function"==typeof t.updateOnly}e.DELETE=by,e.DataSet=yC,e.DataStream=fC,e.DataView=xC,e.Queue=oC,e.createNewDataPipeFrom=function(e){return new Ld(e)},e.isDataSetLike=AC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Qh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof gd(t)&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.stream&&AC(e,t.getDataSet())}}(t)},24686:(e,t,n)=>{"use strict";n.d(t,{CG:()=>u,M7:()=>s,gU:()=>o,xK:()=>a});var r=n(18472),i=n(29970),o=function(e){return e.queryTracker.queryFilesModal.fileEditor},a=function(e){return e.queryTracker.queryFilesModal.deletedFiles},s=(0,r.Mz)([o,i._M,a],(function(e,t,n){var r="file"===e.fileType?t:n;return{fileEditor:e,file:r.find((function(t){return t.id===e.fileId}))}})),u=(0,r.Mz)([i._M,a,function(e){return e.queryTracker.queryFilesModal.addForm}],(function(e,t,n){return{files:e,deletedFiles:t,addFormOpen:n.isOpen,addFormType:n.type,showTabs:e.length>0||t.length>0||n.isOpen}}))},27117:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.423 1A3.577 3.577 0 0 1 15 4.577c0 .27-.108.53-.3.722l-.528.529-1.971 1.971-5.059 5.059a3 3 0 0 1-1.533.82l-2.638.528a1 1 0 0 1-1.177-1.177l.528-2.638a3 3 0 0 1 .82-1.533l5.059-5.059 2.5-2.5c.191-.191.451-.299.722-.299m-2.31 4.009-4.91 4.91a1.5 1.5 0 0 0-.41.766l-.38 1.903 1.902-.38a1.5 1.5 0 0 0 .767-.41l4.91-4.91a2.08 2.08 0 0 0-1.88-1.88m3.098.658a3.6 3.6 0 0 0-1.878-1.879l1.28-1.28c.995.09 1.788.884 1.878 1.88z",clipRule:"evenodd"})}))}},27723:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r=function(e){return!!e&&["map_node","scheduler_pool_tree_map","topmost_transaction_map","transaction_map","link","rootstock","portal_entrance"].includes(e)}},28099:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.5 3h-7A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3m-7-1.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-7a3 3 0 0 0-3-3z",clipRule:"evenodd"})}))}},34199:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})}))}},35788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v,o:()=>h});var r=n(77810),i=n(53775),o=n(28407),a=n(29121),s=n(12937),u=n(18309),l=function(){return(0,s.A)((function e(t){var n=this;(0,a.A)(this,e),this.intervaTime=1e3,this.watchedQueries=new Map,this.intervalKey=void 0,this.loading=!1,this.requestQueryList=void 0,this.run=(0,o.A)((0,i.A)().mark((function e(){var t,r;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(t=Array.from(n.watchedQueries.keys()))&&t.length){e.next=4;break}return n.intervalKey=void 0,e.abrupt("return");case 4:return n.loading=!0,e.prev=5,e.next=8,n.requestQueryList(t);case 8:null==(r=e.sent)||r.forEach((function(e){var t=n.watchedQueries.get(e.id);null==t||t.forEach((function(t){return t([e])})),(0,u.KO)(e)||n.unsubscribe(e.id)})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.error(e.t0);case 15:return e.prev=15,n.loading=!1,n.intervalKey=void 0,n.start(),e.finish(15);case 20:case"end":return e.stop()}}),e,null,[[5,12,15,20]])}))),this.requestQueryList=t}),[{key:"watch",value:function(e,t){var n=this,r=e.map((function(e){if(n.watchedQueries.has(e.id)){var r=n.watchedQueries.get(e.id);null==r||r.add(t)}else n.subscribe(e.id,t);return function(){return n.removeHandler(e.id,t)}}));return function(){r.forEach((function(e){return e()}))}}},{key:"start",value:function(){this.intervalKey||this.loading||(this.intervalKey=Number(setTimeout(this.run,this.intervaTime)))}},{key:"stop",value:function(){clearTimeout(this.intervalKey),this.intervalKey=void 0}},{key:"subscribe",value:function(e,t){this.watchedQueries.set(e,new Set([t])),this.start()}},{key:"unsubscribe",value:function(e){this.watchedQueries.delete(e),0===this.watchedQueries.size&&this.stop()}},{key:"removeHandler",value:function(e,t){var n=this.watchedQueries.get(e);n&&n.delete(t)}}])}(),c=n(63058),d=n(51194),f=n(64922),h=(0,r.createContext)(new l((function(){return Promise.resolve([])}))),v=function(e){var t=e.children,n=(0,d._)(),i=(0,r.useMemo)((function(){return new l((function(e){return n((0,c.Am)(e))}))}),[n]);return(0,f.jsx)(h.Provider,{value:i,children:t})}},36197:(e,t,n)=>{"use strict";n.d(t,{g:()=>N});var r=n(9736),i=n(77810),o=n(76872),a=n(73384),s=n(6542),u=n(72890),l=n(32235),c=n(4564),d=n(65986),f=n(37338);const h=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),v=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),p=(0,f.N)({en:h,ru:v},`${d.C}item-selector`),m=(0,d.o)("item-selector");class y extends i.Component{constructor(){super(...arguments),this.renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)},this.renderItem=(e,t)=>i.createElement("div",{className:m("item",{active:t})},i.createElement("span",{className:m("item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("item-select"),onClick:this.onAddItem.bind(this,e)},p("button_select"))),this.filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)},this.renderValueItem=(e,t)=>i.createElement("div",{className:m("value-item",{active:t})},i.createElement("span",{className:m("value-item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("value-item-remove"),onClick:()=>this.onRemoveItem(e)},i.createElement(l.I,{data:u.A,size:16}))),this.onAddItem=e=>{const{getItemId:t,value:n}=this.props,r=t(e),i=new Set(n).has(r)?n:[...n,r];setTimeout((()=>{this.onUpdate(i)}),0)},this.onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)},this.onErase=()=>{this.onUpdate([])},this.onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)},this.onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(c.B.moveListElement(n,e,t))}},this.onUpdate=e=>{this.props.onUpdate(e)}}getActualItems(){const{items:e,value:t,hideSelected:n,getItemId:r}=this.props,i=[],o=new Array(t.length),a=new Map(t.map(((e,t)=>[e,t])));for(const t of e){const e=a.get(r(t));void 0!==e&&(o[e]=t),n&&void 0!==e||i.push(t)}return[i,o]}render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,filterItem:r=this.filterItem,hideSelectAllButton:o}=this.props,[a,u]=this.getActualItems();return i.createElement("div",{className:m()},i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},t),!o&&i.createElement(s.$,{view:"flat",size:"s",disabled:0===a.length,onClick:this.onSelectAll},p("button_select-all"))),i.createElement(c.B,{items:a,renderItem:n,filterItem:r,filterPlaceholder:p("placeholder_search"),itemsHeight:196})),i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},`${p("label_selected")}: ${e.length}`),i.createElement(s.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase},p("button_deselect-all"))),i.createElement(c.B,{items:u,renderItem:this.renderValueItem,filterItem:r,filterPlaceholder:p("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})))}}y.defaultProps={hideSelected:!0,selectorTitle:"",getItemId:function(e){return`${e}`}};var g=n(3659),x=n(40319),A=n(64922);const w=function(e){return(0,A.jsx)("svg",(0,x.A)((0,x.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,A.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var b=(0,o.A)("yc-selector-control");function E(e){var t=e.value,n=e.placeholder;return t.length>0?(0,A.jsx)("span",{className:b("value"),children:t.join(", ")}):(0,A.jsx)("span",{className:b("placeholder"),children:n})}function _(e){var t=e.size,n=void 0===t?"s":t,r=e.width,o=e.label,a=e.focused,s=e.disabled,u=e.displayArrow,c=e.value,d=e.icon,f=e.badgeFocused,h=e.badgeRef,v=e.onBadgeClick,p=e.onClick,m=e.placeholder,y={};r&&(y.width=r);var g=i.useRef(null);return c?(0,A.jsxs)("div",{ref:g,className:b({size:n,focused:a,disabled:s}),style:y,onClick:p,children:[Boolean(o)&&(0,A.jsx)("span",{className:b("label"),children:o}),Boolean(d)&&(0,A.jsx)("div",{className:b("selected-item-icon"),children:d}),E({value:c,placeholder:m}),Boolean(c.length>0)&&(0,A.jsx)("div",{ref:h,className:b("badge",{focused:f}),onClick:v,children:c.length}),u&&(0,A.jsx)("div",{className:b("arrow"),children:(0,A.jsx)(l.I,{data:w})})]}):null}var C=n(92611);const j=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}'),k=(0,C.Kc)("yt:yc-column-selector",{en:j});var S=(0,o.A)("yc-column-selector"),T=["bottom-start","bottom-end","top-start","top-end"];function N(e){var t,n=e.className,o=e.switcher,u=e.disabled,l=e.controlWidth,c=e.items,d=e.value,f=e.onUpdate,h=e.renderItem,v=e.renderItemValue,p=e.getItemId,m=e.filterItem,x=e.popupPlacement,w=void 0===x?T:x,b=i.useRef(null),E=i.useState(!1),C=(0,r.A)(E,2),j=C[0],N=C[1],O=i.useState(!1),R=(0,r.A)(O,2),I=R[0],P=R[1],L=i.useState(),M=(0,r.A)(L,2),D=M[0],z=M[1];i.useEffect((function(){z(void 0)}),[c,d]),i.useEffect((function(){u&&(N(!1),z(void 0))}),[u]);var $=i.useCallback((function(e){z(e)}),[]),F=i.useCallback((function(){N(!1)}),[]),U=i.useCallback((function(){N(!1),z(void 0)}),[]),q=i.useCallback((function(){N(!1),z(void 0),D&&d!==D&&f(D)}),[D,f,d]);return(0,A.jsxs)("div",{className:S(null,n),children:[(0,A.jsx)("div",{className:S("control"),ref:b,onClick:function(){u||(N((function(e){return!e})),z(void 0),I||P(!0))},children:o||(0,A.jsx)(_,{displayArrow:!0,disabled:u,placeholder:k("label_placeholder"),value:(null==d||null===(t=d.map)||void 0===t?void 0:t.call(d,(function(e){return g.A.decode(e)})))||[],focused:j,width:l})}),I&&(0,A.jsxs)(a.z,{anchorRef:b,placement:w,open:j,onClose:F,children:[(0,A.jsx)(y,{selectorTitle:k("label_columns"),items:c,value:null!=D?D:d,onUpdate:$,getItemId:p,filterItem:m,renderItem:h,renderItemValue:v}),(0,A.jsxs)("div",{className:S("controls"),children:[(0,A.jsx)(s.$,{view:"flat",className:S("control"),onClick:U,children:k("button_cancel")}),(0,A.jsx)(s.$,{view:"action",className:S("control"),onClick:q,children:k("button_apply")})]})]})]})}},36612:(e,t,n)=>{"use strict";n.d(t,{y:()=>Q});var r=n(13322),i=n(9736),o=n(77810),a=n(76872),s=n(6542),u=n(32235),l=n(89648),c=n(88150),d=n(52041),f=n(59241),h=n(40319),v=n(64922);const p=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 6.53a.75.75 0 0 1 1.06 1.061l-.727.727a2.743 2.743 0 0 0 3.879 3.879l.727-.727a.75.75 0 0 1 1.06 1.06l-.726.727a4.243 4.243 0 0 1-6-6zm8 1.879a.75.75 0 0 0 1.06 1.06l.727-.726a4.243 4.243 0 0 0-6-6l-.727.727a.75.75 0 0 0 1.061 1.06l.727-.727a2.743 2.743 0 0 1 3.879 3.879zm-.94-1.879a.75.75 0 1 0-1.06-1.06l-4 4a.75.75 0 1 0 1.06 1.06z",clipRule:"evenodd"})}))};var m=n(53775),y=n(28407),g=n(1701),x=n(48971),A=n(50266),w=function(){var e=(0,y.A)((0,m.A)().mark((function e(t){return(0,m.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.onerror=function(){return n(r.error)},r.readAsText(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(e){var t=e.disabled,n=e.onLoad,r=(0,o.useState)(!1),a=(0,i.A)(r,2),l=a[0],c=a[1],d=(0,o.useRef)(null),f=function(){var e=(0,y.A)((0,m.A)().mark((function e(t){var r,i,o;return(0,m.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.target,i=r.files&&r.files[0]){e.next=4;break}return e.abrupt("return");case 4:return c(!0),e.prev=5,e.next=8,(0,x.fI)(w(i),{toasterName:"add_query_file"+i.name,skipSuccessToast:!0,errorTitle:"Failed to load file"});case 8:o=e.sent,n({name:i.name,content:o,type:"raw_inline_data",id:(0,A.A)()});case 10:return e.prev=10,c(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[5,,10,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{width:"auto",onClick:function(){var e;null===(e=d.current)||void 0===e||e.click()},size:"l",loading:l,disabled:t,children:[(0,v.jsx)(u.I,{data:g.A,size:16}),"Add file"]}),(0,v.jsx)("input",{ref:d,type:"file",style:{display:"none"},onChange:f})]})},E=n(24893),_=n(30469),C=n(82662),j=(0,a.A)("file-item-form"),k=function(e){var t=e.file,n=e.validator,r=e.onCancel,a=e.onSave,l=e.className,c=(0,o.useState)(void 0),d=(0,i.A)(c,2),f=d[0],p=d[1],m=(0,o.useRef)((0,h.A)({},t)),y="url"===t.type,g=(0,o.useCallback)((function(){var e=n(t.name,m.current);p(e),e.name||e.content||a(m.current)}),[t.name,a,n]),x=(0,o.useCallback)((function(e){"Enter"===e.key&&g(),"Escape"===e.key&&r()}),[g,r]);return(0,v.jsxs)("div",{className:j(null,l),children:[(0,v.jsxs)("div",{className:j(y?"link-form":"form"),children:[(0,v.jsx)(E.k,{defaultValue:t.name,onChange:function(e){p(void 0),m.current.name=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.name,size:"l"}),y&&(0,v.jsx)(E.k,{defaultValue:t.content,onChange:function(e){p(void 0),m.current.content=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.content,size:"l"})]}),(0,v.jsxs)("div",{className:j("actions"),children:[(0,v.jsx)(s.$,{view:"normal",onClick:g,size:"l",children:(0,v.jsx)(u.I,{data:C.A,size:16})}),(0,v.jsx)(s.$,{view:"flat",onClick:r,size:"l",children:(0,v.jsx)(u.I,{data:_.A,size:16})})]})]})},S=(0,a.A)("files-add-form"),T=function(e){var t=e.validator,n=e.addFormOpen,r=e.addFormType,i=e.onFormToggle,a=e.onAddFile,l=(0,o.useCallback)((function(e){a(e)}),[a]),c=(0,o.useCallback)((function(e){var t=e.name,n=e.content;a({name:t,content:n,type:"raw_inline_data",id:(0,A.A)()})}),[a]),d=(0,o.useCallback)((function(){i({isOpen:!0,type:"raw_inline_data"})}),[i]),f=(0,o.useCallback)((function(){i({isOpen:!0,type:"url"})}),[i]),h=(0,o.useCallback)((function(){i({isOpen:!1})}),[i]);return(0,v.jsxs)("div",{className:S(),children:[n&&(0,v.jsx)(k,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:S("buttons"),children:[(0,v.jsx)(b,{disabled:n,onLoad:c}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:d,disabled:n,children:[(0,v.jsx)(u.I,{data:g.A,size:16}),"New file"]}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:f,disabled:n,children:[(0,v.jsx)(u.I,{data:p,size:16}),"Add URL"]})]})]})},N=n(62167),O=n(87446),R=n(57660);const I=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 1 0 6.445 7.348.75.75 0 1 0-1.487-.194A5.001 5.001 0 1 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5",clipRule:"evenodd"})}))};var P=n(76091),L=(0,a.A)("deleted-file-item"),M=function(e){var t=e.file,n=e.onEditFile,r=e.onRestore,i="raw_inline_data"===t.type;return(0,v.jsxs)("div",{className:L(),children:[(0,v.jsxs)("div",{className:L("info"),children:[(0,v.jsx)(u.I,{data:i?R.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:t.name})]}),(0,v.jsxs)("div",{className:L("actions"),children:[i&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){n(t.id,"deletedFile")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P.A,size:16})})}),(0,v.jsx)(O.m,{content:"Restore",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){r(t.id)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:I,size:16})})})]})]})},D=n(79988),z=n(27117),$=(0,a.A)("file-item"),F=function(e){var t=e.file,n=e.validator,r=e.onChange,a=e.onEditFile,c=e.onDelete,d=(0,o.useState)(!1),f=(0,i.A)(d,2),h=f[0],m=f[1],y=t.id,g=t.name,x=t.content,A="raw_inline_data"===t.type,w=function(){m((function(e){return!e}))};return h?(0,v.jsx)("div",{className:$({edit:!0}),children:(0,v.jsx)(k,{file:t,onSave:function(e){r(e),m(!1)},onCancel:w,validator:n})}):(0,v.jsxs)("div",{className:$(),children:[(0,v.jsxs)("div",{className:$("info"),children:[(0,v.jsx)(u.I,{className:$("icon"),data:A?R.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:g}),!A&&(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:x})]}),(0,v.jsxs)("div",{className:$("actions"),children:[A&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){a(y,"file")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P.A,size:16})})}),(0,v.jsx)(O.m,{content:"Edit file name",placement:"top",children:(0,v.jsx)(s.$,{onClick:w,view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:z.A,size:16})})}),(0,v.jsx)(O.m,{content:"Remove",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){c(y)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:D.A,size:16})})})]})]})},U=(0,a.A)("files-tabs"),q=function(e){return e.Current="current",e.Deleted="deleted",e}(q||{}),H=function(e){var t=e.files,n=e.deletedFiles,r=e.deletedFilesCounter,a=e.validator,s=e.onDeleteFile,u=e.onChangeFile,l=e.onRestoreFile,c=e.onEditFile,d=e.className,f=(0,o.useState)(q.Current),h=(0,i.A)(f,2),p=h[0],m=h[1],y=(0,o.useMemo)((function(){return t.map((function(e){return(0,v.jsx)(F,{file:e,onDelete:s,onChange:u,onEditFile:c,validator:a},e.id)}))}),[t,s,u,c,a]),g=(0,o.useMemo)((function(){return n.map((function(e){return(0,v.jsx)(M,{file:e,onRestore:l,onEditFile:c},e.id)}))}),[n,c,l]);return(0,v.jsxs)("div",{className:U(null,d),children:[(0,v.jsx)(N.t,{activeTab:p,items:[{id:q.Current,title:"Current",counter:t.length,disabled:!t.length},{id:q.Deleted,title:"Deleted",counter:r,disabled:!r}],onSelectTab:m}),(0,v.jsx)("div",{className:U("list"),children:p===q.Current?y:g})]})},V=n(15647),B=n(87575),W=n(24686),Y=n(61033),K=n(52142),G=(0,a.A)("query-files-popup"),Q=function(e){var t=e.popupClassName,n=(0,V.wA)(),a=(0,V.d4)(W.CG),h=a.files,p=a.deletedFiles,m=a.addFormOpen,y=a.addFormType,g=a.showTabs,x=(0,o.useState)(new Map),A=(0,i.A)(x,2),w=A[0],b=A[1],E=(0,o.useState)(!1),_=(0,i.A)(E,2),C=_[0],j=_[1],k=(0,o.useRef)(null);(0,o.useEffect)((function(){b(new Map(h.map((function(e){return[e.name,e]}))))}),[h]);var S=(0,o.useCallback)((function(){j((function(e){return!e}))}),[]),N=(0,o.useCallback)((function(e){n((0,Y.Ro)(e))}),[n]),O=(0,o.useCallback)((function(e){n((0,Y.ek)(e))}),[n]),R=(0,o.useCallback)((function(e){n((0,Y.pk)(e))}),[n]),I=(0,o.useCallback)((function(e){n((0,K.Bn)({files:[].concat((0,r.A)(h),[e])})),n((0,B.M3)({isOpen:!1}))}),[n,h]),P=(0,o.useCallback)((function(e){n((0,B.M3)(e))}),[n]),L=(0,o.useCallback)((function(e,t){n((0,B.QH)({fileId:e,fileType:t,isOpen:!0,isFullWidth:!1})),j(!1)}),[n]),M=(0,o.useCallback)((function(e,t){var n={};return t.name||(n.name=d.j.NAME_REQUIRED),w.has(t.name)&&e!==t.name&&(n.name=d.j.NAME_ALREADY_EXIST),"url"!==t.type||t.content||(n.content=d.j.VALUE_REQUIRED),n}),[w]);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{ref:k,onClick:S,view:C?"outlined-info":"outlined",selected:C,size:"l",children:[(0,v.jsx)(u.I,{data:c.A,size:16}),h.length>0?" ".concat(h.length):void 0]}),(0,v.jsxs)(f.x,{anchorRef:k,open:C,onClose:S,className:G(null,t),children:[(0,v.jsx)("div",{className:G("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:"Attachments"})}),g&&(0,v.jsx)(H,{className:G("body"),files:h,deletedFiles:p,deletedFilesCounter:p.length,validator:M,onDeleteFile:O,onChangeFile:N,onRestoreFile:R,onEditFile:L}),(0,v.jsx)(T,{validator:M,addFormOpen:m,addFormType:y,onAddFile:I,onFormToggle:P})]})]})}},37068:(e,t,n)=>{"use strict";n.d(t,{u:()=>v});var r=n(9736),i=n(77810),o=n(15647),a=n(29970),s=n(52142),u=n(11960),l=n(87604),c=n(30627),d=n(76872),f=n(64922),h=(0,d.A)("yt-query-engine-selector"),v=function(e){var t=e.isDesktop,n=e.className,d=e.onChange,v=(0,o.wA)(),p=(0,o.d4)(a.ln),m=(0,o.d4)(a.u8),y=(0,o.d4)(a.Py),g=(0,o.d4)(a.xy),x=(0,o.d4)(a.HF),A=(0,o.d4)(a.Jg),w=A.cluster,b=A.path,E=Boolean((y||g)&&w&&b),_=(0,i.useState)(!1),C=(0,r.A)(_,2),j=C[0],k=C[1],S=(0,i.useState)(void 0),T=(0,r.A)(S,2),N=T[0],O=T[1],R=(0,i.useCallback)((function(e){v(w&&b?(0,s.I2)(e,w,b):(0,s.Bn)({engine:e})),null==d||d(e)}),[w,v,d,b]),I=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e;O(t),E?k(!0):R(t)}),[R,E]),P=(0,i.useCallback)((function(){O(void 0),k(!1)}),[]),L=(0,i.useCallback)((function(){O(void 0),N&&R(N),k(!1)}),[N,R]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:h(),children:t?(0,f.jsx)(l.A,{className:n,value:p,size:"l",items:m,disabled:x,onUpdate:I}):(0,f.jsx)(c.l,{className:h("select",n),value:[p],size:"l",options:m,disabled:x,onUpdate:I})}),(0,f.jsx)(u.g,{title:"Switching engine",content:"All the changes will be lost. Are you sure you want to switch the engine?",visible:j,onCancel:P,onConfirm:L,onOutsideClick:P})]})}},41347:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"})}))}},44304:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var r=n(77810);const i={top:0,right:0,bottom:0,left:0};function o(e={}){const{rect:t,contextElement:n}=e,o=r.useRef(i),a=r.useRef({contextElement:n,getBoundingClientRect(){const{top:e,right:t,bottom:n,left:r}=o.current;return{top:e,right:t,bottom:n,left:r,width:t-r,height:n-e}}});if(a.current.contextElement=n,t){const{top:e=0,left:n=0,right:r=n,bottom:i=e}=t;o.current={top:e,right:r,bottom:i,left:n}}else o.current=i;return a}},47378:(e,t,n)=>{"use strict";n.d(t,{H:()=>d});var r=n(9736),i=n(77810),o=n(75299),a=n(76872),s=n(56796),u=n(58313),l=n(64922),c=(0,a.A)("yt-collapsed-string"),d=function(e){var t=e.value,n=e.limit,a=void 0===n?200:n,d=(0,o.A)(!1),f=(0,r.A)(d,2),h=f[0],v=f[1],p=t.length>a,m=(0,i.useMemo)((function(){return h||t.length<=a?t:t.slice(0,a-1)+"…"}),[h,a,t]);return(0,l.jsxs)("div",{className:c(),children:[m,p&&(0,l.jsx)(s.S,{className:c("toggle"),onClick:v,children:h?(0,u.A)("show-less"):(0,u.A)("show-more")})]})}},52041:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,j:()=>r});var r={NAME_REQUIRED:"Name is required field",NAME_ALREADY_EXIST:"This name is already in use, please type some another",VALUE_REQUIRED:"Values is required field"},i=function(e,t){var n={};return e||(n.name=r.NAME_REQUIRED),t||(n.value=r.VALUE_REQUIRED),n}},59241:(e,t,n)=>{"use strict";n.d(t,{x:()=>c}),n(77810);var r=n(76872),i=n(73384),o=n(6542),a=n(32235),s=n(30469),u=n(64922),l=(0,r.A)("popup-with-close-button"),c=function(e){var t=e.anchorRef,n=e.open,r=e.onClose,c=e.children,d=e.className;return(0,u.jsxs)(i.z,{anchorRef:t,open:n,className:l(null,d),onOutsideClick:r,placement:"bottom",hasArrow:!0,children:[(0,u.jsx)(o.$,{view:"flat",className:l("close-button"),onClick:r,children:(0,u.jsx)(a.I,{data:s.A})}),c]})}},60111:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0",clipRule:"evenodd"})}))}},61033:(e,t,n)=>{"use strict";n.d(t,{Ro:()=>d,ek:()=>h,pk:()=>f});var r=n(9736),i=n(13322),o=n(29970),a=n(52142),s=n(87575),u=n(24686),l=new(n(10720).I),c=function(e,t){var n=e.findIndex(t);return n<0?null:[e[n],[].concat((0,i.A)(e.slice(0,n)),(0,i.A)(e.slice(n+1)))]},d=function(e){return function(t,n){var r=n(),s=(0,o._M)(r),u=s.findIndex((function(t){return t.id===e.id}));if(!(u<0)){var l=(0,i.A)(s);l[u]=e,t((0,a.Bn)({files:l}))}}},f=function(e){return function(t,n){var d=n(),f=(0,u.xK)(d),h=(0,o._M)(d),v=c(f,(function(t){return t.id===e}));if(null!==v){var p=(0,r.A)(v,2),m=p[0],y=p[1];h.some((function(e){return e.name===m.name}))?l.add({name:"restore_query_file",theme:"danger",title:"The file could not be restored. The file name already exists in the list of active files.",autoHiding:!1}):(t((0,a.Bn)({files:[].concat((0,i.A)(h),[m])})),t((0,s.pB)(y)))}}},h=function(e){return function(t,n){var l=n(),d=(0,u.xK)(l),f=(0,o._M)(l),h=c(f,(function(t){return t.id===e}));if(null!==h){var v=(0,r.A)(h,2),p=v[0],m=v[1];t((0,a.Bn)({files:m})),t((0,s.pB)([].concat((0,i.A)(d),[p])))}}}},61525:(e,t,n)=>{"use strict";n.d(t,{C:()=>f,N:()=>d});var r=n(53775),i=n(28407),o=n(10720),a=n(27859),s=n(29970),u=n(48971),l=n(88169),c=n(59028),d=function(){return function(e,t){var n=t(),r=(0,s.C3)(n).stage;return e({type:l.O.REQUEST}),a.$S.getQueryTrackerInfo(a.Vu.getQueryTrackerInfo,{setup:{transformError:function(e){var t,n,r=e.parsedData,i=e.rawError;if(404===(null==i||null===(t=i.response)||void 0===t?void 0:t.status))throw{data:r,status:null==i||null===(n=i.response)||void 0===n?void 0:n.status};throw r}},parameters:{stage:r}}).then((function(t){return e({type:l.O.SUCCESS,data:{data:t}}),t})).catch((function(t){404!==(null==t?void 0:t.status)&&(new o.I).add({name:"aco",theme:"danger",title:"Failed to load ACO",content:null==t?void 0:t.message,actions:[{label:" Details",onClick:function(){return(0,u.eW)(t)}}]}),e({type:l.O.FAILURE})}))}};function f(e){return function(){var t=(0,i.A)((0,r.A)().mark((function t(n,i){var o,a;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i(),a=(0,s.cm)(o),t.next=4,n((0,c.rw)("qt-stage::".concat(a,"::queryTracker::defaultACO"),e));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,o:()=>o});var r=n(29717);const i="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:i,e:"__",m:"_",v:"_"}))},69641:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ne});var r=n(40319),i=n(9736),o=n(77810),a=n(30513),s=n(76872),u=n(89648),l=n(6542),c=n(98115),d=n(64922),f=(0,s.A)("node-details-info");function h(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,d.jsxs)("div",{className:f(),children:[t&&(0,d.jsx)(c.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,d.jsx)("div",{className:f("streams"),children:Object.keys(t).map((function(e){return(0,d.jsx)(v,{name:e,data:t[e]},e)}))})}),(0,d.jsx)(m,{data:n,title:"InputColumns"}),(0,d.jsx)(m,{data:r,title:"InputKeyFilterColumns"})]})}function v(e){var t=e.name,n=e.data;return(0,d.jsxs)("div",{className:f("entry"),children:[(0,d.jsx)("div",{className:f("entry-name"),children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("entry-items"),children:n.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))})]})}function p(e){var t=e.Name,n=e.Children;return(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)(u.E,{className:f("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("item-children"),children:n.map((function(e,t){return(0,d.jsx)("div",{className:f("item-group"),children:e.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))},t)}))})]})}function m(e){var t,n=e.data,r=e.title;return n?function(e){return Array.isArray(e)&&e.some((function(e){return Array.isArray(e)}))}(n)?(0,d.jsx)(o.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,d.jsx)(c.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,d.jsx)(y,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,d.jsx)(c.A,{name:r,size:"ns",collapsed:!1,children:(0,d.jsx)(y,{items:t,limit:20})})):null}function y(e){var t,n=e.items,r=e.limit,a=e.className,s=o.useState(!1),c=(0,i.A)(s,2),h=c[0],v=c[1],p=r&&!h?Math.min(n.length,r):n.length,m=n.length-p,y=0===p,g=m>0?n.slice(0,p):n;return(0,d.jsxs)("div",{className:f("columns",a),children:[g.map((function(e,t){return(0,d.jsx)("div",{className:f("columns-column"),children:(0,d.jsx)(u.E,{color:"complementary",children:e})},t)})),Boolean(m)&&(0,d.jsx)(l.$,{className:f("columns-expand"),onClick:function(e){e.stopPropagation(),v(!0)},children:(t=m,"Show ".concat(t," more items"))}),y&&(0,d.jsx)("div",{className:f("columns-empty"),children:"Empty list"})]})}var g=n(66944),x=(0,s.A)("node-jobs"),A=[{name:"status",header:"Status",sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,d.jsxs)("div",{className:x("item"),children:[(0,d.jsx)("div",{className:x("item-color",{status:t.status.toLowerCase()})}),(0,d.jsx)(u.E,{className:x("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:"Quantity",align:g.Ay.RIGHT,sortable:!1}];function w(e){var t=e.running,n=void 0===t?0:t,r=e.completed,i=void 0===r?0:r,o=e.failed,a=void 0===o?0:o,s=e.aborted,u=void 0===s?0:s,l=e.total,c=void 0===l?0:l,f=[];return f.push({status:"Pending",count:c-n-i-a-u}),f.push({status:"Running",count:n}),f.push({status:"Completed",count:i}),f.push({status:"Failed",count:a}),f.push({status:"Aborted",count:u}),(0,d.jsx)("div",{className:x(),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",columns:A,data:f,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var b=n(32235),E=n(18801),_=n(13322),C=n(71291),j=n.n(C),k=n(31470),S=n.n(k),T=n(67981),N=n.n(T),O="StructType",R="ListType",I="StreamType",P="TupleType",L="DictType",M="DataType",D="VariantType",z="OptionalType",$="TaggedType",F="VoidType",U="NullType",q="EmptyDictType",H="EmptyListType",V=["Void","Yson","Json","Null"],B=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],W=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],Y=["String","Utf8","Json"];function K(e){return B.indexOf(e)>=0}function G(e){return W.indexOf(e)>=0}function Q(e){return Y.indexOf(e)>=0}function X(e){return Array.isArray(e)&&e[0]===R&&Array.isArray(e[1])}function J(e){return Array.isArray(e)&&e[0]===P&&Array.isArray(e[1])}function Z(e){return Array.isArray(e)&&e[0]===O&&Array.isArray(e[1])}function ee(e){for(var t=e;t[0]===z;)t=t[1];if(t[0]===O){var n=j()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===R&&n.Bins[1][0]===O&&S()(N().apply(void 0,(0,_.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function te(e){return"Struct"===e.name}function ne(e){return"Variant"===e.name}function re(e){return Boolean(e.complex)}function ie(e){switch(e[0]){case M:return{name:e[1],simple:(n=e[1],V.indexOf(n)<0),numeric:K(e[1]),dateTime:G(e[1]),string:Q(e[1]),params:e.slice(2)};case z:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(ie(e[1]));case $:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(ie(e[2]),e[1]);case L:return e[2][0]===F?{name:"Set",complex:!0,type:ie(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(ie)};case R:return{name:"List",complex:!0,type:ie(e[1])};case q:return{name:"EmptyDict"};case H:return{name:"EmptyList"};case I:return{name:"Stream",complex:!0,type:ie(e[1])};case P:return{name:"Tuple",complex:!0,type:e[1].map(ie)};case O:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:ie(e[1])}}))};case D:var t=function(e){var t=ie(e);switch(t.name){case"Tuple":return t.type.map((function(e,t){return{key:t,type:e}}));case"Struct":return t.struct;default:throw new Error("Invalid type in Variant type: ".concat(t.name))}}(e[1]);return t.every((function(e){return"Void"===e.type.name}))?{name:"Enum",complex:!0,type:t.map((function(e){return{name:e.key}}))}:{name:"Variant",complex:!0,struct:t};case F:return{name:"Void"};case U:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var oe=["level","defaultExpanded"],ae=(0,s.A)("data-type"),se=function(e){var t=e.entry,n=e.level;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:ae("struct-key"),children:t.key},"key")," : ",(0,d.jsx)(ue,(0,r.A)({level:n},t.type),"type")]})};function ue(e){var t=e.level,n=void 0===t?0:t,a=e.defaultExpanded,s=(0,E.A)(e,oe),u=o.useState(void 0===a?n<2:a),l=(0,i.A)(u,2),c=l[0],f=l[1],h=s.optional,v=s.optionalLevel,p=s.name,m=s.tagged,y=s.tags,g=s.params,x=s.complex;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("span",{className:ae({optional:h,complex:x,"optional-multilevel":(null!=v?v:0)>0}),"data-optional":v?"optional × ".concat(v):void 0,onClick:function(){return f((function(e){return!e}))},children:[p,Array.isArray(g)&&g.length>0&&"(".concat(g.join(", "),")"),m&&y?y.map((function(e){return(0,d.jsx)("span",{className:ae("tag"),children:e},e)})):null]},"name"),re(s)?(0,d.jsxs)("div",{className:ae("subtype",{expanded:c}),children:[(0,d.jsx)("span",{className:ae("ellipsis"),onClick:function(){return f((function(e){return!e}))}}),c&&(0,d.jsx)("div",{className:ae("content",{expanded:c}),children:te(s)||ne(s)?s.struct.map((function(e,t){return(0,d.jsx)(se,{level:n+1,entry:e},t)})):(Array.isArray(s.type)?s.type:[s.type]).map((function(e,t){return(0,d.jsx)(ue,(0,r.A)({level:n+1},e),t)}))})]},"subtype"):(0,d.jsx)("br",{},"separator")]})}const le=function(e){return(0,d.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,d.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12.75c0 .414.336.75.75.75h12.5a.75.75 0 0 0 0-1.5H1.75a.75.75 0 0 0-.75.75M1 8c0 .414.336.75.75.75h8.5a.75.75 0 0 0 0-1.5h-8.5A.75.75 0 0 0 1 8m.75-4a.75.75 0 0 1 0-1.5h2.5a.75.75 0 0 1 0 1.5z",clipRule:"evenodd"})}))};var ce=n(10559),de=n(88150),fe=n(56796),he=(0,s.A)("yql-schema-table"),ve=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,d.jsxs)(fe.S,{color:"primary",className:he("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,d.jsx)(b.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name}),(0,d.jsx)(b.I,{className:he("insert-icon"),data:de.A,size:16})]})}return(0,d.jsxs)("span",{className:he("item"),children:[t.sort&&(0,d.jsx)(b.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,d.jsx)(ue,(0,r.A)({},t.type))}}];function pe(e){var t=e.className,n=e.schemaFields;return(0,d.jsx)("div",{className:he(null,t),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",columns:ve,data:n,startIndex:1})})}var me=["key"],ye=function(e){return Boolean(e.type.simple)},ge=function(e){return Boolean(e.type.simple)};function xe(e){if(function(e){return!!J(e)&&e[1].length>0&&e[1].every((function(e){return ee(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!X(e)&&ee(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!Z(e)&&e[1].length>0&&e[1].every((function(e){return ee(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===D&&(Z(n[1])||J(n[1]))){var t=e[1];if(J(t))return[D,[t[0],t[1].map((function(e){return xe(e)}))]];if(Z(t))return[D,[t[0],t[1].map((function(e){return ee(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return ee(e)?["HistogramType",e]:e}function Ae(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=ie(e),i=function(e){return"List"===e.name}(n)?n.type:n,o=e;return X(o)&&(o=o[1]),Z(o)&&(o=o[1]),function(e){return Array.isArray(e)&&e[0]===z&&Array.isArray(e[1])}(o)&&(o=o[1]),te(i)&&Array.isArray(o)?{optional:Boolean(i.optional),resultType:X(e)?"table":"row",scheme:null!==(t=i.struct.map((function(e,t){var n=e.key,i=(0,E.A)(e,me);return(0,r.A)((0,r.A)({},i),{},{index:t,name:"".concat(n),downloadable:ye(e),sortable:ge(e)})})))&&void 0!==t?t:[],columns:o.map((function(e){return xe(e[1])}))}:function(e){return"EmptyList"===e.name}(i)&&Array.isArray(o)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:e}}var we=(0,s.A)("yql-node-schemas");function be(e){var t=e.className,n=e.schemas;return(0,d.jsxs)("div",{className:we(null,t),children:[n.inputs.length>0&&(0,d.jsx)(Ee,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,d.jsx)(Ee,{title:"Outputs",schemas:n.outputs})]})}function Ee(e){var t=e.title,n=e.schemas;return(0,d.jsx)(c.A,{className:we("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,d.jsx)("div",{children:n.map((function(e){var t=e.name,r=Ae(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,d.jsx)(c.A,{className:we("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,d.jsx)("div",{children:(0,d.jsx)(pe,{schemaFields:i})},t)},t):null}))})})}var _e=n(51238),Ce=(0,s.A)("node-stages"),je=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:g.Ay.RIGHT,sortable:!1,width:115}];function ke(e){var t=e.stages,n=function(e,t,n){var r=[],o=Object.keys(e).length;if(!o)return r;for(var a=(0,i.A)(Object.entries(e[0])[0],2),s=a[0],u=a[1],l=u,c=1;c<o;c++){var d=(0,i.A)(Object.entries(e[c])[0],2),f=d[0],h=d[1];r.push({stage:s,duration:(0,_e.p0)(u,h)}),s=f,u=h}var v=(0,_e.sj)(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:(0,_e.p0)(u,v)}),r.push({stage:"Total",duration:(0,_e.p0)(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,d.jsx)("div",{className:Ce(),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",rowClassName:Se,columns:je,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Se(e,t,n,r){return Ce(r?"header":n?"footer":"row")}var Te=(0,s.A)("operation-node-info");function Ne(e){var t,n=e.progress,s=e.details,u=e.schemas,l=e.containerRef,c=e.radioWidth,f=e.className,v=[];(0,_e.eg)(n)&&v.push({value:"stages",content:"Stages"}),(0,_e.b_)(s)&&v.push({value:"details",content:"Details"}),(0,_e.pv)(n)&&v.push({value:"jobs",content:"Jobs"}),u&&v.push({value:"schemas",content:"Schemas"});var p=o.useState(null===(t=v[0])||void 0===t?void 0:t.value),m=(0,i.A)(p,2),y=m[0],g=m[1];return(0,d.jsxs)("div",{ref:l,className:Te(null,f),children:[v.length>1&&(0,d.jsx)(a.a,{className:Te("selector"),value:y,options:v,onUpdate:g,width:c}),"stages"===y&&(0,d.jsx)(ke,(0,r.A)({},n)),"details"===y&&(0,d.jsx)(h,(0,r.A)({},s)),"jobs"===y&&(0,d.jsx)(w,(0,r.A)({},n)),"schemas"===y&&u&&(0,d.jsx)(be,{className:Te("schema"),schemas:u})]})}},73004:(e,t,n)=>{"use strict";n.d(t,{y:()=>h});var r=n(40319),i=n(18801),o=(n(77810),n(30627)),a=n(24893),s=n(76872),u=n(64922),l=["size","items","children","className","popupClassName","onChange","value"],c=["onChange"],d=(0,s.A)("yt-query-selector-control"),f=(0,s.A)("yt-query-selector-popup"),h=function(e){var t=e.size,n=e.items,s=e.children,h=e.className,v=e.popupClassName,p=e.onChange,m=e.value,y=(0,i.A)(e,l);return(0,u.jsx)(o.l,(0,r.A)((0,r.A)({size:t,filterable:!0,className:d(null,h),popupClassName:f(null,v),value:m?[m]:[],onUpdate:function(e){p(e.length?e[0]:"")},renderFilter:function(e){var n=e.onChange,o=(0,i.A)(e,c);return(0,u.jsx)("div",{className:f("filter"),children:(0,u.jsx)(a.k,(0,r.A)((0,r.A)({},o),{},{size:t,onChange:function(e){return n(e.target.value)}}))})}},y),{},{children:s(n)}))}},76091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.169 6.331a3 3 0 0 0-.833 1.6l-.338 1.912a1 1 0 0 0 1.159 1.159l1.912-.338a3 3 0 0 0 1.6-.833l3.07-3.07 2-2A.9.9 0 0 0 15 4.13 3.13 3.13 0 0 0 11.87 1a.9.9 0 0 0-.632.262l-2 2zm3.936-1.814L7.229 7.392a1.5 1.5 0 0 0-.416.8L6.6 9.4l1.208-.213.057-.01a1.5 1.5 0 0 0 .743-.406l2.875-2.876a1.63 1.63 0 0 0-1.378-1.378m2.558.199a3.14 3.14 0 0 0-1.379-1.38l.82-.82a1.63 1.63 0 0 1 1.38 1.38zM8 2.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3V8.75a.75.75 0 0 0-1.5 0v2.75a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 11.5v-7A1.5 1.5 0 0 1 4.5 3h2.75A.75.75 0 0 0 8 2.25",clipRule:"evenodd"})}))}},82077:(e,t,n)=>{"use strict";n.d(t,{w:()=>ns});var r=n(68175),i=n(9736),o=n(77810),a=n(76872),s=n(5865),u=n(15647),l=n(29970),c=n(40295),d=n(35788),f=n(57018),h=n(18309),v=n(92354),p=n(34206),m=n(19610),y=n(3035),g=n(73822),x=n(53246),A=n(80886),w=n(62167),b=n(89648),E=n(6542),_=n(32235),C=n(64772),j=n(37267),k=n(13395),S=n(73817),T=n(52142),N=n(64922),O=(0,a.A)("query-meta-info"),R=o.memo((function(e){var t=e.query,n=e.className,r=(0,o.useMemo)((function(){return t&&(0,h.lq)(t)}),[t]),i=(0,u.wA)(),a=(0,o.useCallback)((function(){i((0,T.ib)())}),[i]);return(0,N.jsxs)("div",{className:O(null,n),children:[(0,N.jsx)(S.C,{className:O("item"),mode:"both",status:t.state}),(0,N.jsx)(j.H,{query:t,className:O("item",O("duration"))}),(0,N.jsx)(b.E,{className:O("item",O("start-time")),children:C.A.DateTime(t.start_time,{format:"short"})}),(0,N.jsxs)(b.E,{className:O("item"),color:"secondary",children:["by ",t.user]}),r&&(0,N.jsxs)(E.$,{size:"s",onClick:a,children:[(0,N.jsx)(_.I,{data:k.A}),"Stop"]})]})})),I=n(74360),P=n(78519),L=n(63366),M=n(44131),D=(0,a.A)("query-meta-table"),z=D("title"),$=D("value"),F=["query","access_control_object"];function U(e){var t=e.query,n=e.className,r=(0,o.useState)(null),a=(0,i.A)(r,2),s=a[0],u=a[1],l=(0,o.useState)(!1),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useMemo)((function(){return Object.entries(t).filter((function(e){var t=(0,i.A)(e,1)[0];return!F.includes(t)})).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1],o="object"===(0,I.A)(r),a=r;return o&&(a=(0,N.jsx)(E.$,{view:"outlined",onClick:function(){u(r),f(!0)},children:"View details"})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("dl",{className:D(null,n),children:h.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("dt",{className:z,children:g.A.format.Readable(e.title)}),t.map((function(t,n){return(0,N.jsxs)("dd",{className:$,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,N.jsx)(M.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,N.jsx)(L.A,{visible:d,disableBodyScrollLock:!0,onOutsideClick:function(){return f(!1)},onCancel:function(){return f(!1)},children:s&&(0,N.jsx)(P.A,{value:s,settings:{}})})]})}var q=n(40319),H=n(30513),V=n(22290);const B=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fillRule:"evenodd",d:"M1.5 3.5a1 1 0 0 1 1-1h1.96a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H2.5a1 1 0 0 1-1-1zm12-1a1 1 0 0 1 1 1v2.05a1 1 0 0 1-1 1H7.59a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1zm0 5.33c.2-.2.56-.14.68.11.21.42.34.87.32 1.38 0 1.6-1.3 2.87-2.85 2.87h-2.8v.87c0 .4-.47.58-.72.31l-1.41-1.45a.4.4 0 0 1 0-.6l1.41-1.45c.27-.3.73-.1.73.29v.87h2.8c.93 0 1.7-.76 1.7-1.7.02-.3-.05-.55-.15-.79a.46.46 0 0 1 .09-.49l.08-.09a1 1 0 0 0 .13-.13z",clipRule:"evenodd"})}))};var W=n(83755),Y=n(81039),K=n(36197),G=o.memo((function(e){var t=e.allColumns,n=e.columns,r=e.className,i=e.onChange,a=(0,o.useCallback)((function(e){i(e)}),[i]),s=(0,o.useMemo)((function(){return n||t.map((function(e){return e.name}))}),[t,n]),u=n&&s.length!==(null==n?void 0:n.length)?"action":"normal";return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(K.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,N.jsxs)(E.$,{size:"m",title:"Choose result columns",view:u,children:[(0,N.jsx)(_.I,{data:Y.A}),"Columns ",(0,N.jsx)(b.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:a})})})),Q=n(53775),X=n(28407),J=n(29121),Z=n(12937),ee=n(66134),te=n(10785),ne=n(97691),re=n.n(ne),ie=n(52797),oe=n(35198),ae=n(63058),se=n(51194),ue=n(29081),le=n(14475),ce=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"getDownloadParams",value:function(){var e=this.getOutputFormat(),t=e.value,n=e.error,r={output_format:t,dump_error_into_response:!0};return"schemaful_dsv"!==this.state.format&&(r.columns=this.prepareColumnsForColumnMode(!1)),{query:re().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var e=this.props,t=e.getDownloadBaseUrl,n=e.cluster,r=e.queryId,i=e.resultIndex,o=this.state,a=o.rowsMode,s=o.startRow,u=o.numRows,l=o.format,c=o.number_precision_mode,d=this.getDownloadParams(),f=d.query,h=d.error;if("excel"===l){var v="".concat((0,ue.t1)({cluster:n}),"/").concat(n,"/api/export-query-result"),p=new URLSearchParams({number_precision_mode:c,result_index:i,query_id:r});"range"===a&&(p.append("lower_row_index",s.toString()),p.append("upper_row_index",(s+u).toString()));var m=this.prepareColumnsForColumnMode(!1),y=m?"&"+m.map((function(e){return"columns=".concat(e)})).join("&"):"";return{url:"".concat(v,"?").concat(p).concat(y),error:h}}var g=t("range"===a?{start:s,end:s+u}:void 0);return{url:"".concat(g,"&").concat(f),error:h}}}])}(oe.q),de=o.memo((function(e){var t,n,r=e.queryId,a=e.resultIndex,s=e.allColumns,l=e.visibleColumns,c=e.className,d=(0,u.d4)(ie.dB),f=(0,u.d4)((function(e){return(0,V.iI)(e,r,a)})),h=(0,se._)(),v=null!=f&&f.resultReady&&(null==f?void 0:f.page)*(null==f||null===(t=f.settings)||void 0===t?void 0:t.pageSize)||0,p=(0,o.useMemo)((function(){return s.map((function(e){return{name:e.displayName,checked:!l||(null==l?void 0:l.includes(e.name))}}))}),[s,l]),m=(0,o.useState)(!1),y=(0,i.A)(m,2),g=y[0],x=y[1],A=function(){var e=(0,X.A)((0,Q.A)().mark((function e(t,n){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,le.P)(t,n));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){var e=(0,X.A)((0,Q.A)().mark((function e(t,n){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,le.P)(t,n,!0));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,N.jsx)(ce,{getDownloadBaseUrl:function(e){return h((0,ae.BK)(d,r,a,e))},proxy:"",externalProxy:"",toggleVisible:function(){},transaction_id:void 0,queryId:r,resultIndex:a,className:c,cluster:d,rowCount:null!=f&&f.resultReady?null==f?void 0:f.meta.data_statistics.row_count:0,allColumns:p,srcColumns:p,columns:p,pageSize:null!=f&&f.resultReady&&(null==f||null===(n=f.settings)||void 0===n?void 0:n.pageSize)||50,showDecoded:!1,loading:!1,path:"",visible:g,handleShow:function(){return x(!0)},handleClose:function(){return x(!1)},offsetValue:v,isSchematicTable:!0,downloadFile:A,downloadToClipboard:w})})),fe=(0,a.A)("query-result-actions"),he=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function ve(e){var t,n,r,i,a,s=e.query,l=e.resultIndex,c=(0,u.wA)(),d=(0,u.d4)((function(e){return(0,V.iI)(e,s.id,l)})),f=(0,o.useCallback)((function(){var e;c({type:p.NJ,data:{queryId:s.id,index:l,settings:{transposed:!(null!=d&&null!==(e=d.settings)&&void 0!==e&&e.transposed)}}})}),[null==d?void 0:d.settings,c]),h=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:{viewMode:e}}})}),[null==d?void 0:d.settings,c]),v=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:(0,q.A)((0,q.A)({},null==d?void 0:d.settings),{},{visibleColumns:e})}})}),[null==d?void 0:d.settings,c]);return!0===(null==d?void 0:d.resultReady)?(0,N.jsxs)("div",{className:fe(),children:[(null==d||null===(t=d.settings)||void 0===t?void 0:t.viewMode)===W.F.Table&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(E.$,{className:fe("item"),onClick:f,view:null!=d&&null!==(n=d.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,N.jsx)(_.I,{data:B,width:16})}),(0,N.jsx)(G,{className:fe("item"),allColumns:d.columns,columns:null===(r=d.settings)||void 0===r?void 0:r.visibleColumns,onChange:v}),(0,N.jsx)(de,{queryId:s.id,resultIndex:l,className:fe("item"),allColumns:d.columns,visibleColumns:null===(i=d.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,N.jsx)(H.a,{className:fe("item"),options:he,value:null==d||null===(a=d.settings)||void 0===a?void 0:a.viewMode,onUpdate:h})]}):null}var pe=n(62835),me=n(10795);function ye(){var e=(0,u.d4)(l.VQ);return e?(0,N.jsx)(me.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function ge(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,N.jsx)(o.Suspense,{fallback:i,children:(0,N.jsx)(xe,{freeze:t,children:n})})}function xe(e){var t,n,r=e.freeze,i=e.children,a=o.useRef({});if(r&&!a.current.promise)throw a.current.promise=new Promise((function(e){a.current.resolve=e})),a.current.promise;if(r)throw a.current.promise;return a.current.promise&&(null===(t=(n=a.current).resolve)||void 0===t||t.call(n),a.current.promise=void 0),(0,N.jsx)(o.Fragment,{children:i})}var Ae=(0,a.A)("not-render-until-first-visible");function we(e){var t=e.hide,n=e.className,r=e.children,a=o.useState(Boolean(t)),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var e=requestAnimationFrame((function(){l(Boolean(t))}));return function(){cancelAnimationFrame(e)}}),[t]),(0,N.jsx)("div",{style:u?{display:"none"}:void 0,className:Ae(null,n),children:(0,N.jsx)(ge,{freeze:u,children:r})})}var be=n(92603);function Ee(){var e=(0,be.gi)(),t=(0,be.Bf)(),n=(0,be.IQ)();return(0,N.jsx)(H.a,{options:t,value:e,onUpdate:function(e){n(e)}})}var _e=n(32151),Ce=n(70243),je=n(70724),ke=n(41347),Se=n(86255),Te=n(8208),Ne=n(76662),Oe=n(13322),Re=n(24966),Ie=n(20410),Pe=n(66944),Le=n(20686),Me=n(27814),De=n(85560),ze=(0,a.A)("data-type-popup");function $e(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,N.jsx)(Le.A,{className:ze(null,i),tooltipClassName:ze("tooltip"),content:n?(0,N.jsx)("div",{className:ze("tooltip-container"),children:(0,N.jsx)(De.A,(0,q.A)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,N.jsxs)("span",{className:ze("container"),children:[t,!r&&(0,N.jsx)(_.I,{className:ze("icon"),data:Me.A,size:12})]})}):(0,N.jsx)("span",{className:ze(null,i),children:t})}var Fe=n(81379),Ue=n(56796),qe=n(66133),He=(0,a.A)("yql-result-table"),Ve=Symbol("__index__");function Be(e,t){return n=e,r=Ve,"object"===(0,I.A)(n)&&n&&Reflect.has(n,r)?e[Ve]:t;var n,r}function We(){window.dispatchEvent(new Event("resize"))}var Ye={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ne.zQ,stickyTop:0,syncHeadOnResize:!0},Ke=(0,q.A)((0,q.A)({},Ye),{},{displayIndices:!1}),Ge=[];function Qe(e){var t=e.className,n=e.header,a=void 0===n?Ge:n,s=e.rows,u=void 0===s?Ge:s,l=e.totals,c=void 0===l?Ge:l,d=e.showColumns,f=void 0===d?Ge:d,h=e.theme,v=void 0===h?"yandex-cloud":h,p=e.format,m=e.formatterSettings,y=e.defaultNumberAlign,g=void 0===y?Pe.Ay.RIGHT:y,x=e.resultType,A=e.emptyDataMessage,w=e.message,E=e.isError,_=e.transpose,C=void 0!==_&&_,j=e.page,k=void 0===j?1:j,S=e.pageSize,T=void 0===S?u.length:S,O=e.startIndex,R=e.sortOrder,I=e.onSort,P=e.showFullValueInDialog,L=e.containerRef,M=e.onShowPreview,D="function"==typeof I,z=o.useMemo((function(){var e=a.map((function(e){var t=e.name,n=e.displayName,r=e.type,i=void 0===r?{}:r;return{name:t,header:(0,N.jsx)($e,{type:i,children:null!=n?n:t}),className:e.key||e.sort?"is-key":void 0,accessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t]},sortable:D&&Boolean(i.simple),sortAccessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t].$sortValue},render:function(n){var r,i;if("function"==typeof e.render)return e.render(n);var a,s=n,u=s.value,l=s.index;if(!u)return(0,N.jsx)("span",{className:"unipika",children:"<unsupported data type>"});a=Object.prototype.hasOwnProperty.call(u,"$formattedValue")?u.$formattedValue:p(u,m);var c,d=function(e){return"string"==typeof e&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}(null!==(r=u.$rawValue)&&void 0!==r?r:u.$value),f=null!==(i=u.$fullFormattedValue)&&void 0!==i?i:a;if("yql.string"===u.$type&&a.startsWith('<span class="quote">'))c=a;else{var h=a.split("\n");c=h.length>8?h.slice(0,5).join("\n"):a}var v=c!==f,y=u.$additions?(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("br",{}),(0,N.jsx)(b.E,{color:"light-hint",children:u.$additions})]}):null,g=u.$incomplete,x=u.$tagValue,A=function(){return M(t,l,x)};return v?(0,N.jsxs)(et,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[P?(0,N.jsx)(o.Fragment,{children:(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,N.jsx)(Je,{onClick:We,strippedDown:c,formattedValue:f}),y]}):(0,N.jsxs)(et,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:a}}),y]})},align:i.numeric?g:void 0}}));return e}),[a,D,g,p,m,P,M]),$=(k-1)*T,F=D?1:null!=O?O:$+1,U=o.useMemo((function(){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e.map((function(e,t){return(0,q.A)((0,r.A)({},Ve,i+t),e)}));if(!n)return o;var a=(Array.isArray(n)?n:[n]).reduce((function(e,t){var n=t.columnId,r=t.order;return e[n]=r,e}),{}),s={};t.forEach((function(e){a[e.name]&&(s[e.name]=function(e,t){var n=t;return function(t,r){var i,o;return"function"==typeof e.sortAccessor&&(i=e.sortAccessor(t),o=e.sortAccessor(r)),Number.isNaN(i)&&!Number.isNaN(o)?Number(n):Number.isNaN(o)&&!Number.isNaN(i)||null==i&&null!=o?Number(-n):null==o&&null!=i?Number(n):i<o?Number(-n):i>o?Number(n):0}}(e,a[e.name]))}));var u=Object.keys(a).map((function(e){return s[e]})).filter(Boolean);return u.length&&o.sort((function(e,t){var n=0;return u.some((function(r){return n=r(e,t),Boolean(n)})),n||e[Ve]-t[Ve]})),o}(u,z,R,F)}),[u,z,R,F]),H=o.useMemo((function(){var e=f.map((function(e){return z.find((function(t){return t.name===e}))})).filter(Boolean),t=U.slice($,$+T);if(!C)return[e,t,c];var n=t.map((function(e,t){return{name:String($+t),header:Xe(e),render:function(t){var n=t.value;return n.column.render({value:n.data,row:e})}}})).concat(c.map((function(e,t){var n=e.footerIndex;return{name:"footer".concat(t),header:String(n||t),render:function(e){var t=e.value;return t.column.render({value:t.data,footer:!0})}}}))),r=e.map((function(e){for(var t={name:e.name},n=$;n<$+T&&n!==U.length;n++)t[String(n)]={column:e,data:U[n][e.name]};return c.forEach((function(n,r){t["footer".concat(r)]={column:e,data:n[e.name]}})),t}));return[[{name:"name",header:"Name"}].concat((0,Oe.A)(n)),r,[]]}),[f,U,$,T,C,c,z]),V=(0,i.A)(H,3),B=V[0],W=V[1],Y=V[2];return"table"===x?(0,N.jsx)("div",{ref:L,className:He(null,t),children:(0,N.jsx)(Fe.Ay,{columns:B,data:W,footerData:0===Y.length?void 0:Y,settings:C?Ke:Ye,startIndex:F,emptyDataMessage:A,theme:v,rowKey:Be,sortOrder:R,onSort:I,visibleRowIndex:C?void 0:Xe})}):"cell"===x||"untyped"===x?(0,N.jsx)("div",{ref:L,className:He({mode:x},t),children:(0,N.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):w?(0,N.jsx)("div",{className:He("message",{error:E}),children:w}):null}function Xe(e){return g.A.format.Number(e[Ve])}function Je(e){var t=e.formattedValue,n=e.strippedDown,r=e.onClick,a=o.useState(!1),s=(0,i.A)(a,2),u=s[0],l=s[1];return(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,N.jsx)("br",{}),(0,N.jsx)(Ue.S,{onClick:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){l((function(e){return!e})),null==r||r()})),children:u?"Show less":"Show more"})]})}var Ze=He("cell-action");function et(e){var t=e.children,n=e.rawValue,r=e.onPreviewClick,a=e.isTruncated,s=e.tag,u=o.useRef(null),l=o.useState(!1),c=(0,i.A)(l,2),d=c[0],f=c[1];o.useEffect((function(){var e,t=null===(e=u.current)||void 0===e?void 0:e.parentElement;function n(){f(!0)}function r(e){null!=t&&t.contains(e.relatedTarget)||f(!1)}return null==t||t.addEventListener("mouseover",n),null==t||t.addEventListener("mouseout",r),function(){null==t||t.removeEventListener("mouseover",n),null==t||t.removeEventListener("mouseout",r)}}),[]);var h=Boolean(s&&a),v=o.useState(!1),p=(0,i.A)(v,2),m=p[0],y=p[1];return(0,N.jsxs)("span",{ref:u,children:[h?(0,N.jsx)(qe.A,{theme:"warning",text:"Incomplete '".concat(s,"' type")}):(0,N.jsx)("span",{className:He("cell-content"),children:t}),(d||h)&&(0,N.jsxs)(N.Fragment,{children:[n&&!a&&(0,N.jsx)(Ie.b,{className:Ze,text:n,size:"s"}),a&&(0,N.jsx)(E.$,{className:Ze,view:"flat-secondary",size:"s",loading:m,onClick:(0,X.A)((0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,y(!0),m){e.next=5;break}return e.next=5,r();case 5:return e.prev=5,y(!1),e.finish(5);case 8:case"end":return e.stop()}}),e,null,[[0,,5,8]])}))),qa:"query:reqult:show-preview",children:(0,N.jsx)(_.I,{data:Re.A,size:"12"})})]})]})}var tt=n(83648),nt=n(31470),rt=n.n(nt),it={escapeWhitespace:!1,decodeUTF8:!0,showDecoded:!1,binaryAsHex:!0,escapeYQLStrings:!0,stringAsJSON:!1,omitStructNull:!0,maxStringSize:void 0,customNumberFormatter:{numberFormatDigitSpaces:!0,numberFormatDisableExponential:!0,numberFormatPrecision:void 0}},ot=o.memo((function(e){var t=e.result,n=e.onShowPreview,r=function(e){var t,n,r=(0,o.useState)(void 0),a=(0,i.A)(r,2),s=a[0],u=a[1];(0,o.useEffect)((function(){var t=setTimeout((function(){u(e)}),0);return function(){clearTimeout(t)}}),[e]);var l=(0,o.useMemo)((function(){var t,n;return null!==(t=e.settings)&&void 0!==t&&t.visibleColumns?null===(n=e.settings)||void 0===n?void 0:n.visibleColumns:e.columns.map((function(e){return e.name}))}),[null===(t=e.settings)||void 0===t?void 0:t.visibleColumns,s]),c=(0,o.useMemo)((function(){return 1+(e.page?e.page*e.settings.pageSize:0)}),[e.page,e.settings.pageSize]);return[e.results,e.columns,l,Boolean(null===(n=e.settings)||void 0===n?void 0:n.transposed),c]}(t),a=(0,i.A)(r,5),s=a[0],u=a[1],l=a[2],c=a[3],d=a[4];return(0,N.jsx)(Qe,{format:tt.ew,formatterSettings:it,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"left",startIndex:d,theme:Ne.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&rt()(null===(n=e.result.settings)||void 0===n?void 0:n.visibleColumns,null===(r=t.result.settings)||void 0===r?void 0:r.visibleColumns)&&(null===(i=e.result.settings)||void 0===i?void 0:i.transposed)===(null===(o=t.result.settings)||void 0===o?void 0:o.transposed)})),at=(0,a.A)("query-result-scheme"),st={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ne.zQ,stickyTop:0},ut=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,N.jsx)("span",{className:at("item"),children:(0,N.jsx)("span",{className:at("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,N.jsx)(De.A,(0,q.A)({},t.type))}}],lt=o.memo((function(e){var t=e.result;return(0,N.jsx)(Pe.Ay,{theme:"yandex-cloud",columns:ut,data:t.columns,startIndex:1,settings:st})}));function ct(e){var t=e.result,n=e.className;return(0,N.jsxs)("div",{className:at(null,n),children:[(0,N.jsx)(b.E,{variant:"subheader-2",as:"div",className:at("title"),children:"Scheme"}),(0,N.jsx)("div",{className:at("table-wrap"),children:(0,N.jsx)(lt,{result:t})})]})}var dt=n(30627),ft=n(98364),ht=(0,a.A)("query-result-paginator"),vt=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function pt(e){var t=e.queryId,n=e.resultIndex,r=e.className,a=(0,u.wA)(),s=function(e,t){var n=(0,o.useState)({lastPage:0,pageSize:0}),r=(0,i.A)(n,2),a=r[0],s=r[1],l=(0,u.d4)((function(n){return(0,V.iI)(n,e,t)}));return(0,o.useEffect)((function(){if(null!=l&&l.resultReady){var e=Math.ceil(((null==l?void 0:l.meta.data_statistics.row_count)||0)/((null==l?void 0:l.settings.pageSize)||1))-1;s({pageSize:(null==l?void 0:l.settings.pageSize)||0,lastPage:e})}}),[l]),[(null==l?void 0:l.page)||0,a]}(t,n),l=(0,i.A)(s,2),c=l[0],d=l[1],f=d.pageSize,h=d.lastPage,v=(0,o.useCallback)((function(e){var r=(0,i.A)(e,1)[0];a((0,_e.iN)(t,n,{pageSize:Number(r)}))}),[a]),p=(0,o.useCallback)((function(e){a((0,_e.vj)(t,n,e))}),[t]);return(0,N.jsxs)("div",{className:ht(null,r),children:[(0,N.jsx)(dt.l,{className:ht("control"),value:[f.toString()],options:vt,onUpdate:v}),(0,N.jsx)(ft.A,{className:ht("control"),value:c,min:0,max:h,onChange:p,step:1})]})}var mt=n(75566),yt=n(76365),gt=n(54522),xt=function(e,t,n,r){return function(){var i=(0,X.A)((0,Q.A)().mark((function i(o){var a,s,l,c,d,f,h,v,p,m,y,g,x,A,w;return(0,Q.A)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=n.columnName,l=n.rowIndex,c=n.page,d=n.pageSize,r?r.onStartLoading({columnName:s,rowIndex:l}):(0,u.vA)((function(){o({type:gt.w.REQUEST,data:{}}),o((0,mt.ZD)())})),f=null!==(a=null==r?void 0:r.saveCancellation)&&void 0!==a?a:mt.Be.removeAllAndSave,i.prev=3,h=c*d+l,i.next=7,o((0,ae.BH)(e,t,{start:h,end:h+1},[s],{cellsSize:gt.F,stringLimit:Math.round(gt.F/10)},f));case 7:if(v=i.sent,!r){i.next=12;break}return i.next=11,r.onSuccess({columnName:s,rowIndex:l,data:v});case 11:return i.abrupt("return",i.sent);case 12:p=v.rows[0][s][0],m=v.rows[0][s][1],y=v.yql_type_registry[Number(m)],g=(0,tt.$5)(p,y,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),x=g.$type,A=g.$tag,w=g.$value,o({type:gt.w.SUCCESS,data:{data:{$value:A?w.$value:w,$type:x,$tag:A}}}),i.next=22;break;case 19:i.prev=19,i.t0=i.catch(3),(0,yt.m)(i.t0)||(r?null==r||r.onError({columnName:s,rowIndex:l,error:i.t0}):o({type:gt.w.FAILURE,data:{error:i.t0}}));case 22:case"end":return i.stop()}}),i,null,[[3,19]])})));return function(e){return i.apply(this,arguments)}}()},At=(0,a.A)("query-result-table");function wt(e){var t,n=e.result,r=e.onShowPreview,i=null==n||null===(t=n.settings)||void 0===t?void 0:t.viewMode,o=function(e){var t=e.meta.data_statistics.row_count,n=e.meta.is_truncated,r=e.settings.pageSize;return{start:r*e.page+1,end:Math.min(r*e.page+r,t),total:t,truncated:n}}(n),a=o.start,s=o.end,u=o.total,l=o.truncated,c=n.meta.full_result;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(we,{hide:i!==W.F.Scheme,children:(0,N.jsx)(ct,{result:n})}),(0,N.jsxs)(we,{hide:i!==W.F.Table,children:[(0,N.jsxs)(Ce.s,{alignItems:"center",gap:2,className:At("result-info"),children:[(0,N.jsxs)(b.E,{children:["Rows ",a,"-",s," of ",u,"".concat(l?" (truncated)":"")]}),c&&(0,N.jsx)(je.N,{href:"/".concat(c.cluster,"/navigation?path=//").concat(c.table_path),target:"_blank",children:(0,N.jsxs)(Ce.s,{alignItems:"center",gap:1,children:[(0,N.jsx)(_.I,{data:ke.A,size:16})," View full result"]})})]}),(0,N.jsx)(ot,{result:n,onShowPreview:r})]})]})}var bt=o.memo((function(e){var t=e.query,n=e.index,r=(0,u.d4)((function(e){return(0,V.iI)(e,t.id,n)})),i=null==r?void 0:r.page,a=(0,u.d4)((function(e){return(0,V.JO)(e,t.id,n)})).pageSize,l=function(e){var t=e.queryId,n=e.resultIndex,r=e.page,i=e.pageSize,a=(0,u.wA)(),s=o.useMemo((function(){var e=new yt.A,o={onStartLoading:function(){},onSuccess:function(e){var r=e.columnName,i=e.rowIndex,o=e.data;a((0,_e.E6)({queryId:t,resultIndex:n,columnName:r,rowIndex:i,data:o}))},onError:Se.O,cancelHelper:e,saveCancellation:function(t){e.saveCancelToken(t)},page:r,pageSize:i},s=function(){var e=(0,X.A)((0,Q.A)().mark((function e(r,i,s){var u,l,c;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(0,Se.g)(s),l=o.page,c=o.pageSize,e.next=4,a(xt(t,n,{columnName:r,rowIndex:i,page:l,pageSize:c},u?o:void 0));case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();return{dataHandler:o,onShowPreview:s}}),[t,n,r,i,a]),l=s.dataHandler,c=s.onShowPreview;return o.useEffect((function(){return function(){l.cancelHelper.removeAllRequests()}}),[l]),{onShowPreview:c}}({queryId:t.id,resultIndex:n,page:i,pageSize:a}),c=l.onShowPreview;return(0,N.jsxs)("div",{className:At(),children:[((null==r?void 0:r.state)===W.t.Init||(null==r?void 0:r.state)===W.t.Loading)&&(0,N.jsx)("div",{className:At("loading"),children:(0,N.jsx)(s.a,{size:"m"})}),(null==r?void 0:r.resultReady)&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(wt,{result:r,onShowPreview:c}),r.settings.viewMode===W.F.Table&&(0,N.jsx)(pt,{className:At("pagination"),queryId:t.id,resultIndex:n})]}),(null==r?void 0:r.state)===W.t.Error&&(0,N.jsx)(Te.z,{error:r.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),Et=function(e){var t=e.query,n=e.activeResultParams,r=(0,u.wA)();return(0,o.useEffect)((function(){n&&r((0,_e.WR)(n.queryId,n.resultIndex))}),[n,r]),(0,N.jsx)(bt,{query:t,index:(null==n?void 0:n.resultIndex)||0})},_t=n(7787),Ct=function(e){var t,n=e.query,r=e.resultIndex,i=(0,u.wA)();return(0,o.useEffect)((function(){i((0,_e.WR)(n.id,r))}),[i,n.id,r]),(null===(t=_t.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},jt=function(e){return(e+1)%1e6};function kt(){return(0,o.useReducer)(jt,0)[1]}var St=n(24567),Tt=n(44304),Nt=n(73384),Ot=n(18305),Rt=n(92225),It=n(59994),Pt=n(60150),Lt=o.createContext(void 0);function Mt(e){var t=e.children,n=e.container,r=(0,It.i)(),a=o.useState((function(){return Dt(n)})),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(e){var t=Dt(n);return rt()(e,t)?e:t}))}),[r,n]),(0,N.jsx)(Lt.Provider,{value:u,children:t})}function Dt(e){var t=function(t){return(0,Pt.LB)(t,{container:e})};return{operation:{new:t("--yql-graph-color-operation-new"),newBorder:t("--yql-graph-color-operation-new-border"),newBackground:t("--yql-graph-color-operation-new-background"),pending:t("--yql-graph-color-operation-pending"),completed:t("--yql-graph-color-operation-completed"),completedBorder:t("--yql-graph-color-operation-completed-border"),completedBackground:t("--yql-graph-color-operation-completed-background"),aborted:t("--yql-graph-color-operation-aborted"),abortedBorder:t("--yql-graph-color-operation-aborted-border"),abortedBackground:t("--yql-graph-color-operation-aborted-background"),failed:t("--yql-graph-color-operation-failed"),failedBorder:t("--yql-graph-color-operation-failed-border"),failedBackground:t("--yql-graph-color-operation-failed-background"),running:t("--yql-graph-color-operation-running"),runningBorder:t("--yql-graph-color-operation-running-border"),runningBackground:t("--yql-graph-color-operation-running-background"),started:t("--yql-graph-color-operation-started"),startedBorder:t("--yql-graph-color-operation-started-border"),startedBackground:t("--yql-graph-color-operation-started-background")},table:{fill1:t("--yql-graph-color-table-fill1"),fill2:t("--yql-graph-color-table-fill2")},edge:{color:t("--yql-graph-color-edge"),highlight:t("--yql-graph-color-edge-highlight")},text:{label:t("--yql-graph-color-text-label"),link:t("--yql-graph-color-text-link"),operationCount:t("--yql-graph-color-text-operation-count")}}}function zt(){var e=o.useContext(Lt);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var $t=n(69641),Ft=n(51238),Ut=n(34199),qt=n(30469),Ht=(0,a.A)("legend");function Vt(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=(0,Ft.GE)(r);return(0,N.jsxs)("div",{className:Ht({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,N.jsxs)("div",{className:Ht("item"),children:[(0,N.jsx)("div",{className:Ht("item-color",{state:t.toLowerCase()})}),(0,N.jsxs)(b.E,{className:Ht("item-title"),color:"complementary",children:[n,r?(0,N.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function Bt(e){var t=e.className,n=e.nodes,r=o.useState("collapsed"),a=(0,i.A)(r,2),s=a[0],u=a[1];return(0,N.jsx)("div",{className:t,children:"collapsed"===s?(0,N.jsx)(E.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,N.jsx)(_.I,{data:Ut.A,size:16})}):(0,N.jsx)(Vt,{nodes:n,children:(0,N.jsx)(E.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,N.jsx)(_.I,{data:qt.A})})})})}var Wt=n(84099),Yt=(0,a.A)("vis-network");function Kt(e){var t=e.nodes,r=e.edges,a=e.options,s=e.className,u=e.getNetwork,l=o.useRef(null),c=o.useState(),d=(0,i.A)(c,2),f=d[0],h=d[1];return o.useEffect((function(){var e;return n.e(502).then(n.t.bind(n,18275,23)).then((function(t){var n=t.Network;e=new n(l.current,{}),h(e)})),function(){var t;null===(t=e)||void 0===t||t.destroy()}}),[]),o.useEffect((function(){f&&(f.setData({nodes:t,edges:r}),f.once("afterDrawing",(function(){f.fit()})))}),[t,r,f]),o.useEffect((function(){f&&f.setOptions(a)}),[a,f]),o.useEffect((function(){f&&"function"==typeof u&&u(f)}),[u,f]),(0,N.jsx)("div",{ref:l,className:Yt(null,s)})}var Gt=(0,a.A)("yql-plan-minimap");function Qt(e){var t=e.network,n=e.nodes,r=e.edges,a=e.options,s=e.className,u=function(e){return o.useMemo((function(){return(0,q.A)((0,q.A)({},e),{},{edges:(0,q.A)((0,q.A)({},e.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[e])}(a),l=o.useState(),c=(0,i.A)(l,2),d=c[0],f=c[1],h=o.useRef(!1);!function(e){var t=e.network,n=e.minimap,r=e.nodes;o.useEffect((function(){var e=function(e){var i=e.edge,o=(0,Ft.ry)(t,r,i);null==n||n.selectEdges((0,Oe.A)(o))},i=function(){null==n||n.unselectAll()},o=function(e){var i=e.node;if(i&&r.get(i)){var o=(0,Ft.AX)(t,r,i);null==n||n.selectEdges((0,Oe.A)(o))}},a=function(){null==n||n.unselectAll()};return t.on("hoverEdge",e),t.on("blurEdge",i),t.on("hoverNode",o),t.on("blurNode",a),function(){t.off("hoverEdge",e),t.off("blurEdge",i),t.off("hoverNode",o),t.off("blurNode",a)}}),[t,n,r])}({network:t,minimap:d,nodes:n});var v=function(e){var t=e.network,n=e.minimap,r=o.useRef(null);return o.useEffect((function(){var e=function(){n&&r.current&&function(e,t,n){var r=n.body.container,i=r.clientWidth,o=r.clientHeight,a=n.getScale(),s=t.getScale(),u=n.getViewPosition(),l=t.canvasToDOM(u);e.style.transform="translate(calc(".concat(l.x,"px - 50%), calc(").concat(l.y,"px - 50%))"),e.style.width="".concat(i/a*s,"px"),e.style.height="".concat(o/a*s,"px")}(r.current,n,t)};return t.on("afterDrawing",e),function(){t.off("afterDrawing",e)}}),[t,n]),r}({network:t,minimap:d});return o.useEffect((function(){var e=function(){h.current=!1};return window.addEventListener("mouseup",e),function(){window.removeEventListener("mouseup",e)}}),[]),o.useEffect((function(){d&&d.fit()}),[d]),(0,N.jsxs)(Wt.Z,{className:Gt(null,s),type:"action",children:[(0,N.jsx)(Kt,{nodes:n,edges:r,options:u,className:Gt("minimap"),getNetwork:f}),(0,N.jsx)("div",{className:Gt("wrapper"),onMouseDown:function(e){if(d){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n}),h.current=!0}},onMouseMove:function(e){if(d&&h.current){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n})}}}),(0,N.jsx)("div",{ref:v,className:Gt("radar")})]})}var Xt=n(70353);function Jt(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,Xt.A)(e);try{for(u.s();!(r=u.n()).done;){var l=r.value;n="innerNodeId_".concat(s++);var c=o[l.level];c||(o[l.level]=c=new Set),c.add(n),a.set(l.id,n),i[n]={node:(0,q.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,Xt.A)(t);try{for(f.s();!(d=f.n()).done;){var h=d.value,v=a.get(h.from),p=a.get(h.to);void 0!==v&&void 0!==p&&(i[v].out.push(p),i[p].in.push(v))}}catch(e){f.e(e)}finally{f.f()}return{graph:i,layering:o.filter(Boolean),levels:o.map((function(e,t){return e?t:-1})).filter((function(e){return-1!==e}))}}function Zt(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,Xt.A)(a);try{for(u.s();!(o=u.n()).done;){var l=o.value,c=e[l];if(c.rank=i,i!==t.length-1)for(var d=0;d<c.out.length;d++){var f=c.out[d];if(!s.has(f)){var h="".concat(f,"_").concat(r++),v={id:h,shape:"dot",size:0,level:n[i]};e[h]={node:v,in:[l],out:[],virtual:!0},s.add(h),c.out[d]=h,e[h].out.push(f),e[f].in[e[f].in.indexOf(l)]=h}}}}catch(e){u.e(e)}finally{u.f()}}}function en(e,t,n){var r,i=n.reduce((function(e,t,n){return e[t]=n,e}),{}),o=[],a=(0,Xt.A)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,Oe.A)(e[s].out.map((function(e){return i[e]})).sort((function(e,t){return e-t}))))}}catch(e){a.e(e)}finally{a.f()}for(var u=1;u<n.length;)u*=2;var l=2*u-1;u-=1;var c=new Array(l).fill(0),d=0;return o.forEach((function(e){var t=e+u;for(c[t]++;t>0;)t%2&&(d+=c[t+1]),c[t=t-1>>1]++})),d}function tn(e,t){for(var n=0,r=1;r<t.length;++r)n+=en(e,t[r-1],t[r]);return n}function nn(e,t){var n=t.reduce((function(t,n,r){return e.includes(n)&&t.push(r),t}),[]);if(0===n.length)return-1;var r=n.length>>1;if(n.length%2==1)return n[r];if(2===n.length)return(n[0]+n[1])/2;var i=n[r-1]-n[0],o=n[n.length-1]-n[r];return(n[r-1]*o+n[r]*i)/(i+o)}function rn(e,t){for(var n=e.filter((function(e){return-1!==t[e]})).sort((function(e,n){return t[e]-t[n]})),r=0,i=0;i<n.length;r++)-1!==t[e[r]]&&(e[r]=n[i++])}function on(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,Xt.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=nn(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}rn(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,Xt.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=nn(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}rn(t[u],c)}}function an(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function sn(e,t,n){var r=0;return n>0&&(r+=en(e,t[n-1],t[n])),n<t.length-1&&(r+=en(e,t[n],t[n+1])),r}function un(e,t){for(var n=!0,r=0;n&&r++<10;){n=!1;for(var i=0;i<t.length;i++)for(var o=t[i],a=sn(e,t,i),s=0;s<o.length-1;s++){an(o,s,s+1);var u=sn(e,t,i);a>u?(n=!0,a=u):an(o,s,s+1)}}}function ln(e,t,n){for(var r=function(e,t){for(var n=(0,Oe.A)(t[0]),r=[],i=new Set(n);n.length>0;){var o=n.shift();if(void 0===o)break;var a=e[o],s=r[a.rank];s||(r[a.rank]=s=[]),s.push(o);var u,l=(0,Xt.A)(a.out);try{for(l.s();!(u=l.n()).done;){var c=u.value;i.has(c)||(i.add(c),n.push(c))}}catch(e){l.e(e)}finally{l.f()}}return r}(e,t),i=r.map((function(e){return(0,Oe.A)(e)})),o=tn(e,r),a=0,s=0;s<4&&a<24;a++,s++){on(e,r,a),n||un(e,r);var u=tn(e,r);o>u&&(o=u,i=r.map((function(e){return(0,Oe.A)(e)})),s=0)}return i.forEach((function(t){t.forEach((function(t,n){e[t].order=n}))})),i}function cn(e,t,n){var r=e[t];r||(e[t]=r=new Set),r.add(n)}function dn(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function fn(e,t,n,r,i){var o={},a=Object.keys(e).reduce((function(e,t){return e[t]=t,e}),{}),s=Object.keys(e).reduce((function(e,t){return e[t]=Number.POSITIVE_INFINITY,e}),{});function u(l){if(void 0===o[l]){o[l]=0;var c=l;do{var d=i?t.length-e[c].rank-1:e[c].rank,f=t[d].indexOf(c);if(f>0){var h=n[t[d][f-1]];u(h),a[l]===l&&(a[l]=a[h]),a[l]===a[h]?o[l]=Math.max(o[l],o[h]+100):s[a[h]]=Math.min(s[a[h]],o[l]-o[h]-100)}c=r[c]}while(c!==l)}}return Object.keys(e).forEach((function(e){n[e]===e&&u(e)})),Object.keys(e).forEach((function(e){o[e]=o[n[e]],s[a[n[e]]]<Number.POSITIVE_INFINITY&&(o[e]=o[e]+s[a[n[e]]])})),o}function hn(e,t){var n,r=function(e,t){var n={};return Object.entries(e).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){cn(n,r,e)}))})),Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){cn(n,r,e)}))})),n}(function(e,t){var n={};return t.reduce((function(t,r){var i=0,o=0,a=t.length,s=r[r.length-1];return r.forEach((function(t,u){var l=function(e,t){if(e[t].virtual)return e[t].in.find((function(t){return e[t].virtual}))}(e,t),c=l?e[l].order:a;(l||t===s)&&(r.slice(o,u+1).forEach((function(t){e[t].in.forEach((function(r){var o=e[r],a=o.order;!(a<i||c<a)||o.virtual&&e[t].virtual||cn(n,r,t)}))})),o=u+1,i=c)})),r})),n}(e,t),function(e,t){var n={};function r(t,r,i,o,a){for(var s=function(){var r=t[u];e[r].virtual&&e[r].in.forEach((function(t){var i=e[t];i.virtual&&(i.order<o||i.order>a)&&cn(n,t,r)}))},u=r;u<i;u++)s()}return t.reduce((function(t,n){var i,o=-1,a=0;return n.forEach((function(s,u){if(e[s].virtual){var l=e[s].in;l.length&&(i=e[l[0]].order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,t.length)})),n})),n}(e,t)),o={};["u","d"].forEach((function(i){n="u"===i?t:(0,Oe.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,Oe.A)(e).reverse()})));var a=function(e,t,n,r){var i={},o={},a={};return t.forEach((function(e){e.forEach((function(e,t){i[e]=e,o[e]=e,a[e]=t}))})),t.forEach((function(t){var s=-1;t.forEach((function(t){var u=e[t][r];if(u.length){u.sort((function(e,t){return a[e]-a[t]}));for(var l=(u.length-1)/2,c=Math.floor(l),d=Math.ceil(l);c<=d;c++){var f=u[c];o[t]===t&&s<a[f]&&!dn(n,t,f)&&(o[f]=t,o[t]=i[t]=i[f],s=a[f])}}}))})),{root:i,align:o}}(e,n,r,"u"===i?"in":"out"),s=a.root,u=a.align,l=fn(e,n,s,u,"d"===i);"r"===t&&Object.keys(l).forEach((function(e){l[e]=-l[e]})),o[i+t]=l}))}));var a=function(e,t){return Object.values(t).reduce((function(e,t){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),o=(t[0],t[1]);n=Math.max(o+50,n),r=Math.min(o-50,r)}));var o=n-r;return e.min>o?{min:o,align:t}:e}),{min:Number.POSITIVE_INFINITY}).align}(0,o);return function(e,t){var n=Object.values(t),r=n.reduce((function(e,t){return Math.min(e,t)})),i=n.reduce((function(e,t){return Math.max(e,t)}));["u","d"].forEach((function(n){["l","r"].forEach((function(o){var a=e[n+o];if(a!==t){var s=Object.values(a),u="l"===o?r-s.reduce((function(e,t){return Math.min(e,t)})):i-s.reduce((function(e,t){return Math.max(e,t)}));u&&Object.keys(a).forEach((function(e){a[e]+=u}))}}))}))}(o,a),function(e,t){return Object.keys(e.ul).reduce((function(t,n){var r=Object.values(e).map((function(e){return e[n]})).sort((function(e,t){return e-t}));return t[n]=(r[1]+r[2])/2,t}),{})}(o)}function vn(e,t){var n=hn(e,t);Object.keys(n).forEach((function(t){e[t].node.y=n[t]}));var r=Object.values(n),i=1.7*Math.max(100,(r.reduce((function(e,t){return Math.max(e,t)}))-r.reduce((function(e,t){return Math.min(e,t)})))/t.length),o=0;t.forEach((function(t){t.forEach((function(t){e[t].node.x=o})),o+=i}))}function pn(e){var t=[],n=[];return Object.values(e).forEach((function(r){var i=r.node;if(r.virtual){if(!e[r.in[0]].virtual){var o=r.out[0];if(e[o].virtual)for(;e[e[o].out[0]].virtual;)o=e[o].out[0];var a=e[r.in[0]].node,s=e[o].node;if(e[o].virtual){var u=e[e[o].out[0]].node;a.y===i.y?s.y===u.y?n.push({from:a.id,to:u.id}):(t.push(s),n.push({from:a.id,to:s.id,arrows:{to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}})):s.y===u.y?(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:u.id,arrows:{from:!1}})):(t.push(i),t.push(s),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1,to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}}))}else a.y===i.y&&i.y===s.y?n.push({from:a.id,to:s.id}):(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1}}))}}else t.push(i),r.out.forEach((function(t){if(!e[t].virtual){var r={from:i.id,to:e[t].node.id};n.push(r)}}))})),{nodes:t,edges:n}}function mn(e){return yn.apply(this,arguments)}function yn(){return(yn=(0,X.A)((0,Q.A)().mark((function e(t){var n,r,i,o,a,s,u,l;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.nodes,r=t.edges,i=n.length>700||r.length>3e3,o=Jt(n,r),a=o.graph,s=o.layering,u=o.levels,Zt(a,s,u),l=ln(a,s,i),vn(a,l),e.abrupt("return",pn(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gn=n(48971);const xn=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8",clipRule:"evenodd"})}))};var An=n(16538);const wn=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m0-4.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8m0-3a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))};var bn=(0,a.A)("graph"),En="".concat(bn(),"_show-tooltip");function _n(e){var t=o.useRef(e);return t.current=e,t}var Cn=(0,Ft.SV)((function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}}));function jn(e){var t=e.isActive,n=e.className,r=e.graph,a=e.showMinimap,s=e.prepareNode,u=o.useState(),l=(0,i.A)(u,2),c=l[0],d=l[1],f=o.useState(null),h=(0,i.A)(f,2),v=h[0],p=h[1],m=zt(),y=function(e){return o.useMemo((function(){return{width:"100%",height:"100%",autoResize:!1,configure:!1,edges:{arrows:{from:{enabled:!0,type:"circle",scaleFactor:.1},to:!0},arrowStrikethrough:!1,smooth:{enabled:!0,type:"cubicBezier",forceDirection:"horizontal",roundness:.5},color:{color:e.edge.color,highlight:e.edge.highlight,inherit:!1,opacity:1},hoverWidth:.5,width:1,selectionWidth:.5,selfReference:{size:80}},nodes:{font:{color:e.text.label,size:16}},layout:{hierarchical:!1},interaction:{dragNodes:!1,navigationButtons:!1,hover:!0,hoverConnectedEdges:!1,selectable:!1,zoomSpeed:.5},physics:!1}}),[e])}(m),g=(0,be.wE)(),x=o.useState((function(){return new St.DataSet})),A=(0,i.A)(x,1)[0],w=o.useState((function(){return new St.DataSet})),C=(0,i.A)(w,1)[0],j=o.useState(!0),k=(0,i.A)(j,2),S=k[0],T=k[1],O=kt(),R=o.useState(),I=(0,i.A)(R,2),P=I[0],L=I[1],M=o.useRef(null),D=o.useState(),z=(0,i.A)(D,2),$=z[0],F=z[1],U=(0,Tt.m)($?{rect:{top:$.position.y,left:$.position.x}}:void 0);o.useEffect((function(){var e=function(e){var t;null!==(t=M.current)&&void 0!==t&&t.contains(e.target)||F(void 0)};return $&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[$]);var H=o.useRef();o.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){c&&S&&(c.fit(),T(!1))}))),t||F(void 0),function(){cancelAnimationFrame(e)}}),[t,c,S]);var V=_n(m),B=_n(g),W=_n(s);o.useEffect((function(){var e=!1;function t(){return(t=(0,X.A)((0,Q.A)().mark((function e(){var t,n,i,o;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mn(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new St.DataSet(n),B.current&&(0,Ft.DW)(o,B.current),(0,Ft.Ml)(o,V.current),W.current&&(0,Ft.ZG)(o,W.current),T(A.length!==o.length||C.length!==i.length),A.clear(),A.add(o.get()),C.clear(),C.add(i),O();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return function(){return t.apply(this,arguments)}().catch((function(t){e||L(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,C,A,O]),o.useEffect((function(){g&&((0,Ft.DW)(A,g,W.current,V.current),O())}),[g,A,O]),o.useEffect((function(){"function"==typeof s&&((0,Ft.ZG)(A,s),O())}),[s,A,O]),o.useEffect((function(){(0,Ft.Ml)(A,m)}),[A,m]);var Y=o.useRef(!0);return o.useLayoutEffect((function(){if(v&&c){var e=new Rt.default((function(){Cn(c,Y.current)}));return e.observe(v),function(){e.unobserve(v)}}}),[v,c]),o.useEffect((function(){if(c){var e=function(e){var t=e.edge,n=(0,Ft.ry)(c,A,t);c.selectEdges((0,Oe.A)(n))},t=function(){c.unselectAll()},n=function(e){var t=e.node;if(t){var n=A.get(t);if(H.current=null!=n?n:void 0,n){var r=(0,Ft.AX)(c,A,t);if(c.selectEdges((0,Oe.A)(r)),n.url&&(null==v||v.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==v||v.classList.add(En),(0,Ft.lt)(n)){var i=c.getPosition(t),o=i.x,a=i.y,s=c.canvasToDOM({x:o+15,y:a}),u=c.canvasToDOM({x:o-15,y:a}),l=s,d="right";if(v){var f=v.getBoundingClientRect(),h=f.x,p=f.y,m=f.width;l.x+330>m&&(l=u,d="left"),l.x+=h,l.y+=p}F({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:d})}}}},r=function(){null==v||v.classList.remove(En),null==v||v.style.removeProperty("cursor"),c.unselectAll(),F(void 0),H.current=void 0},i=function(){if(H.current){var e=H.current;e.url&&(0,gn.V3)(e.url)}},o=function(){Y.current=!1};return c.on("hoverEdge",e),c.on("blurEdge",t),c.on("hoverNode",n),c.on("blurNode",r),c.on("click",i),c.on("zoom",o),function(){c.off("hoverEdge",e),c.off("blurEdge",t),c.off("hoverNode",n),c.off("blurNode",r),c.off("click",i),c.off("zoom",o)}}}),[c,A,v]),P?(0,N.jsx)(b.E,{color:"danger",children:"".concat(P)}):(0,N.jsx)("div",{ref:p,className:bn(null,n),children:0===A.length?(0,N.jsx)(Ot.A,{size:"m",local:!0}):(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)(Kt,{nodes:A,edges:C,options:y,className:bn("graph"),getNetwork:d}),c&&a?(0,N.jsx)(Qt,{className:bn("minimap-wrapper"),network:c,nodes:A,edges:C,options:y}):null,(0,N.jsxs)("div",{className:bn("toolbar"),children:[(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:1.1*c.getScale()}),Y.current=!1)},children:(0,N.jsx)(_.I,{data:An.A,size:16})}),(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:c.getScale()/1.1}),Y.current=!1)},children:(0,N.jsx)(_.I,{data:xn,size:16})}),(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){null==c||c.fit(),Y.current=!0},children:(0,N.jsx)(_.I,{data:wn,size:16})}),(0,N.jsx)(Bt,{nodes:A,className:bn("toolbar-button",bn("legend"))})]}),$&&t?(0,N.jsx)(Nt.z,{anchorRef:U,open:!0,placement:$.placement,children:(0,N.jsx)($t.A,(0,q.A)((0,q.A)({},$),{},{containerRef:M}))}):null]})})}var kn=n(24893),Sn=n(75414),Tn=n.n(Sn),Nn=n(30380),On=36e5,Rn=24*On,In=30*Rn,Pn=365*Rn,Ln=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function Mn(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=Kn.resolveCssValue(Kn.COUNTER_FONT_COLOR),e.fillText(o,n,r+Kn.COUNTER_FONT_CENTER_OFFSET))}var Dn=function(e){return e.INFO="INFO",e.QUEUED="QUEUED",e.DEPRECATED="DEPRECATED",e.OK="OK",e.WARNING="WARNING",e.DANGER="DANGER",e.MUTED="MUTED",e.DELETED="DELETED",e}({}),zn="#333",$n="#777",Fn="#FFF",Un="#08F",qn="#3D5",Hn="#D30",Vn="#F80",Bn="#A5A",Wn=globalThis.document.body,Yn=window.getComputedStyle(Wn),Kn={ZOOM_MIN:5e3,ZOOM_MAX:2*In,PRIMARY_BACKGROUND_COLOR:Fn,BOUNDARY_MARK_COLOR:zn,PRIMARY_MARK_COLOR:$n,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:qn,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:$n,RULER_TEXT_OUTLINE_COLOR:Fn,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:zn,RULER_WEEKEND_COLOR:Hn,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:Un,SELECTION_BG_COLOR:Un,SELECTION_OUTLINE_THICKNESS:5,COUNTER_FONT:"12px monospace",COUNTER_FONT_CENTER_OFFSET:4,COUNTER_FONT_COLOR:"#111",COUNTER_PADDING:5,WHEEL_PAN_SPEED:25e-5,MAX_TRACKS:5,LINE_HEIGHT:25,TRACK_HEIGHT:25,OVERLAPPING_THRESHOLD:8,SKIP_OVERLAPPING:!1,GRID_STROKE_WIDTH:1,eventStatusColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Dn.INFO,Un),Dn.QUEUED,Bn),Dn.DEPRECATED,Vn),Dn.OK,qn),Dn.WARNING,Vn),Dn.DANGER,Hn),Dn.MUTED,$n),Dn.DELETED,Hn),groupStatusColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Dn.INFO,Un),Dn.QUEUED,Bn),Dn.DEPRECATED,Vn),Dn.OK,qn),Dn.WARNING,Vn),Dn.DANGER,Hn),Dn.MUTED,$n),Dn.DELETED,Hn),regionStateColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Ln.CREATED,Un),Ln.PROCESSING,"#fe5"),Ln.PROCESSED,qn),Ln.FAILED,Hn),resolveCssValue:function(e){if("string"!=typeof e||!e)return e;if(e.startsWith("var(")&&e.endsWith(")")){var t,n=e.substring(4,e.length-1),r=(null===(t=globalThis.document)||void 0===t?void 0:t.documentElement).style.getPropertyValue(n);if(""!==r)return r;var i=Yn.getPropertyValue(n);return""!==i?i:n}return e}},Gn=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.host=void 0,this.canvasApi=void 0,this.host=t,this.canvasApi=t.getCanvasApiUnsafe()}),[{key:"render",value:function(e){}},{key:"hostConnected",value:function(){}}])}();function Qn(){return-1!==navigator.userAgent.indexOf("Mac OS")}function Xn(e){return Qn()?e.metaKey:e.ctrlKey}var Jn=function(){},Zn=n(18801);function er(e,t,n){return e>=t&&e<=n}function tr(e,t,n,r){return t-e>r-n?er(n,e,t)||er(r,e,t):er(e,n,r)||er(t,n,r)}function nr(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){return e},a=Math.abs(i-r),s=function(e,t,n){var r=Math.abs(n-t);return t<n?(e-t)/r:(e-n)/r}(e,t,n);return r<i?r+o(s)*a:i+o(1-s)*a}function rr(e,t,n){return e>n?n:e<t?t:e}function ir(e,t){return e-e%t}function or(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var ar=n(48495),sr=n.n(ar),ur=function(){return(0,Z.A)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,J.A)(this,e),this._axes=[],this._sortedAxes=void 0,this._axesById=void 0,this.axes=t,n&&n.identityFunction&&(this.getIdentity=n.identityFunction)}),[{key:"getIdentity",value:function(e){return e.id}},{key:"axes",get:function(){return this._axes},set:function(e){e!==this._axes&&(this._axes=e,this._sortedAxes=void 0,this._axesById=void 0)}},{key:"sortedAxes",get:function(){return this._sortedAxes||(this._sortedAxes=this._axes.slice().sort((function(e,t){return e.top-t.top}))),this._sortedAxes}},{key:"axesById",get:function(){var e=this;return this._axesById||(this._axesById=this._axes.reduce((function(t,n){return t[e.getIdentity(n)]=n,t}),{})),this._axesById}}])}(),lr=n(7059),cr=n.n(lr),dr=function(e){function t(){var e;(0,J.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,ee.A)(this,t,[].concat(r))).height=Kn.RULER_HEADER_HEIGHT,e}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){e.useStaticTransform();var t=e.ctx,n=e.start,r=e.end,i=e.canvas,o=e.pixelRatio;t.fillStyle=Kn.resolveCssValue(Kn.PRIMARY_BACKGROUND_COLOR),t.fillRect(0,0,i.width,this.height);var a=[0,0,t.canvas.width/o,this.height],s=a[0],u=a[1],l=a[2],c=a[3];function d(e){return nr(+e,n,r,0,l)}function f(e){return nr(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=Kn.resolveCssValue(Kn.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(e);+s<n;s=r.step(s)){var u=cr()(s).format(r.format),c=d(s);c>10&&c<l&&(a||(a=s),t.fillStyle=r.color&&r.color(s)||o,t.strokeText(u,c,i),t.fillText(u,c,i))}var h=f(10),v=cr()(h).format(r.format),p=rr(10,-1/0,d(a||n)-t.measureText(v).width-5);t.fillStyle=r.color&&r.color(h)||o,t.strokeText(v,p,i),t.fillText(v,p,i)}t.font=Kn.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,y=0,g=vr.length;y<g;y+=1)if(!(m>vr[y].domain)){for(var x=0,A=cr()(0);+A<m;A=vr[y].step(A))nr(+A,0,m,u,u+l)>0&&(x+=Kn.RULER_LABEL_SPACING);if(!(x>l)){p=(v=vr[y]).sup||vr[y+1];break}}v&&h(n,r,v,s+Kn.RULER_LABEL_POS,Kn.resolveCssValue(Kn.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+Kn.RULER_SUP_LABEL_POS,Kn.resolveCssValue(Kn.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=Kn.resolveCssValue(Kn.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}])}(Gn),fr={start:function(e){return cr()(e).startOf("hour")},step:function(e){return cr()(e).add(1,"hour")},format:"HH"},hr={start:function(e){return cr()(e).startOf("day")},step:function(e){return cr()(e).add(1,"day")},color:function(e){var t=cr()(e).day();return 6===t||0===t?Kn.resolveCssValue(Kn.RULER_WEEKEND_COLOR):null},format:"MMM D"},vr=[{domain:1e3,start:function(e){return cr()(e).startOf("millisecond")},step:function(e){return cr()(e).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(e){return cr()(e).startOf("second")},step:function(e){return cr()(e).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(e){return cr()(e).startOf("second")},step:function(e){return cr()(e).add(1,"second")},format:"ss[′′]",sup:{start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return cr()(e).add(5,"minute")},format:"mm[′]"}},{domain:On,start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return cr()(e).add(5,"minute")},format:"mm[′]",sup:fr},{domain:Rn,start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return cr()(e).add(15,"minute")},format:"mm[′]",sup:fr},{domain:Rn,start:function(e){return cr()(e).startOf("hour")},step:function(e){return cr()(e).add(1,"hour")},format:"HH",sup:hr},{domain:In,start:function(e){var t=cr()(e).startOf("hour");return t.subtract(t.hour()%4,"hour")},step:function(e){return cr()(e).add(4,"hour")},format:"HH",sup:hr},{domain:In,start:function(e){return cr()(e).startOf("day")},step:function(e){return cr()(e).add(1,"day")},color:function(e){var t=cr()(e).day();return 6===t||0===t?Kn.resolveCssValue(Kn.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")},format:"MMM YYYY"}},{domain:6*In,start:function(e){return cr()(e).startOf("week").add(1,"day")},step:function(e){return cr()(e).add(1,"week")},format:"D"},{domain:Pn,start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")},format:"MMM",sup:{start:function(e){return cr()(e).startOf("year")},step:function(e){return cr()(e).add(1,"year")},format:"YYYY"}},{domain:10*Pn,start:function(e){var t=cr()(e).startOf("month");return t.subtract(t.month()%3,"month")},step:function(e){return cr()(e).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(e){return cr()(e).startOf("year")},step:function(e){return cr()(e).add(1,"year")},format:"YYYY"}],pr=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),mr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).trackHeight=Kn.TRACK_HEIGHT,n.lineHeight=Kn.LINE_HEIGHT,n.strokeMode=pr.STRAIGHT,n.axesIndex=void 0,Object.assign(n,r),n.axesIndex=new ur([],{identityFunction:r.identityFunction}),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e}},{key:"axesById",get:function(){return this.axesIndex.axesById}},{key:"getAxisTrackPosition",value:function(e,t){var n=rr(t,0,e.tracksCount-1);return e.top+this.trackHeight*n+this.trackHeight/2}},{key:"render",value:function(e){var t,n=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===pr.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,Xt.A)(this.axesIndex.sortedAxes);try{for(a.s();!(o=a.n()).done;)for(var s=o.value,u=0;u<s.tracksCount;u+=1){var l=this.getAxisTrackPosition(s,u);r.moveTo(0,l),r.lineTo(i,l)}}catch(e){a.e(e)}finally{a.f()}r.stroke(),r.setLineDash([0,0])}}])}(Gn),yr=(0,Z.A)((function e(){(0,J.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),gr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount)e.beginPath(),e.fillStyle=Kn.resolveCssValue(Kn.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=Kn.resolveCssValue(Kn.groupStatusColors[t.status]),e.beginPath(),e.arc(r,o,6,Math.PI/2,3*Math.PI/2),e.arc(i,o,6,3*Math.PI/2,Math.PI/2),e.closePath(),n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,Kn.COUNTER_PADDING);Mn(e,t,a,o,i-a)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t-6,this.hitboxResult.right=n+6,this.hitboxResult}}])}(yr),xr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount){var a=o-3,s=Math.max(i-r,5);n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=Kn.resolveCssValue(Kn.eventStatusColors[t.status]),e.fillRect(r,a,s,6)}else if(t.eventsCount>1){var u=o-6,l=Math.max(i-r,5);n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=Kn.resolveCssValue(Kn.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+Kn.COUNTER_PADDING,Kn.COUNTER_PADDING);Mn(e,t,c,o,i-c)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,5),this.hitboxResult}}])}(yr),Ar=["renderers"],wr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).eventHitboxPadding=Kn.EVENT_HITBOX_PADDING,n.eventCounterFont=Kn.COUNTER_FONT,n.allowMultipleSelection=!0,n.activeEvent=null,n.handleCanvasMouseup=function(e){var t=n.getEventsAtPoint(e.offsetX,e.offsetY);t.length>0?n.selectEvents(t,{append:Xn(e),toggle:!0}):n.selectEvents([])},n.handleCanvasContextmenu=function(e){e.preventDefault();var t=n.getEventsAtPoint(e.offsetX,e.offsetY),r=t.length>0?t[0]:void 0;n.host.dispatchEvent(new CustomEvent("openContextmenu",{detail:{event:r,relativeX:e.clientX,relativeY:e.clientY}}))},n.handleCanvasMousemove=function(e){e.preventDefault();var t=n.getEventsAtPoint(e.offsetX,e.offsetY),r=t.length>0?t[0]:void 0;if(!n.activeEvent||n.activeEvent===r&&r||n.host.dispatchEvent(new CustomEvent("leftEvent",{detail:{event:n.activeEvent}})),r){var i=n.canvasApi;n.activeEvent=r,n.host.dispatchEvent(new CustomEvent("hoverEvent",{detail:{events:t,time:i.positionToTime(e.offsetX),offset:{x:e.offsetX,y:e.offsetY}}}))}else n.activeEvent=null},n.getEventIdentity=function(e){return"".concat(e.renderType,":").concat(e.axisId,":").concat(e.from,"-").concat(e.to)},n.renderers=new Map([["event",new gr],["process",new xr]]),n.maxIndexTreeWidth=16,n.index=new(sr())(n.maxIndexTreeWidth),n._selectedEvents=new Set,n._events=[];var i=r.renderers,o=(0,Zn.A)(r,Ar);if(Object.assign(n,o),i)for(var a in i)n.registerRenderer(a,i[a]);return n.canvasApi.canvas.addEventListener("mouseup",n.handleCanvasMouseup),n.canvasApi.canvas.addEventListener("contextmenu",n.handleCanvasContextmenu),n.canvasApi.canvas.addEventListener("mousemove",n.handleCanvasMousemove),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"events",get:function(){return this._events},set:function(e){this._events=e,this.rebuildIndex()}},{key:"registerRenderer",value:function(e,t){this.renderers.set(e,t)}},{key:"getRenderer",value:function(e){return this.renderers.get(e)}},{key:"getEventsAt",value:function(e){var t,n=this.canvasApi,r=-((null===(t=n.getComponent(dr))||void 0===t?void 0:t.height)||0)+n.canvasScrollTop;return this.index.search({minX:n.positionToTime(e.left-this.eventHitboxPadding),maxX:n.positionToTime(e.right+this.eventHitboxPadding),minY:e.top+r-this.eventHitboxPadding,maxY:e.bottom+r+this.eventHitboxPadding}).map((function(e){return e.event}))}},{key:"getEventsAtPoint",value:function(e,t){return this.getEventsAt(new DOMRect(e-3,t-3,6,6))}},{key:"selectedEvents",get:function(){var e=this;return this.events.filter((function(t){return e.isSelectedEvent(t)}))},set:function(e){this._selectedEvents=new Set(e)}},{key:"isSelectedEvent",value:function(e){if(!e)return!1;var t=this.getEventIdentity(e);return this._selectedEvents.has(t)}},{key:"selectEvents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._selectedEvents;t.append||n.clear();var r=t.toggle?function(e){n.has(e)?n.delete(e):n.add(e)}:function(e){return n.add(e)};if(this.allowMultipleSelection){var i,o=(0,Xt.A)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;r(this.getEventIdentity(a))}}catch(e){o.e(e)}finally{o.f()}}else e.length>0&&(n.size>0&&!n.has(e[0])&&n.clear(),e.length>0&&r(this.getEventIdentity(e[0])));this.host.dispatchEvent(new CustomEvent("eventsSelected",{detail:{events:this.selectedEvents}})),this.host.scheduleTimelineRender()}},{key:"selectEventsAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.selectEvents(this.getEventsAt(e),t)}},{key:"render",value:function(e){var t,n=e.getComponent(mr),r=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0;if(n){var i=n.axesById;e.useScrollTransform();var o=e.ctx,a=function(t){return e.timeToPosition(t)};o.translate(0,r),o.font=this.eventCounterFont,o.lineWidth=2;for(var s=0,u=this.events.length;s<u;s+=1){var l=this.events[s],c=i[l.axisId];if(c){var d=n.getAxisTrackPosition(c,l.trackIndex);if(c&&tr(e.start,e.end,l.from,l.to)){var f=e.timeToPosition(l.from),h=e.timeToPosition(l.to);this.runRenderer(o,l,this.isSelectedEvent(l),f,h,d,c.height,a)}}}}}},{key:"runRenderer",value:function(e,t,n,r,i,o,a,s,u){var l;null===(l=this.renderers)||void 0===l||null===(l=l.get(t.renderType))||void 0===l||l.render(e,t,n,r,i,o,a,s,u)}},{key:"rebuildIndex",value:function(){var e=this.canvasApi.getComponent(mr),t=this._events.map((function(t){var n=e.axesById[t.axisId],r=e.getAxisTrackPosition(n,t.trackIndex),i=t.from;return{minX:i,maxX:t.to?t.to:i+1,minY:r-e.lineHeight/2,maxY:r+e.lineHeight/2,event:t}}));this.index.clear(),this.index.load(t)}}])}(Gn),br=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).borderColor=Kn.SELECTION_OUTLINE_COLOR,n.innerColor=Kn.SELECTION_BG_COLOR,n.handleCanvasMousedown=function(e){if(Xn(e)){e.stopPropagation(),e.stopImmediatePropagation();var t=n.canvasApi.canvas.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,o=function(e){var o=e.clientX-t.left,a=e.clientY-t.top;Math.sqrt(Math.pow(o-r,2)+Math.pow(a-i,2))>3&&(n.area=new DOMRect(r,i,o-r,a-i),n.host.scheduleTimelineRender())},a=function(){n.area&&(n.onSelected(n.area),n.area=void 0,n.host.scheduleTimelineRender()),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}},n.area=void 0,n.onSelected=function(e){var t=n.canvasApi.getComponent(wr);t&&t.selectEventsAt(e)},Object.assign(n,r),n.canvasApi.canvas.addEventListener("mousedown",n.handleCanvasMousedown),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){if(this.area){var t=this.area,n=e.ctx;e.useStaticTransform(),n.strokeStyle=Kn.resolveCssValue(this.borderColor),n.fillStyle=Kn.resolveCssValue(this.innerColor),n.lineWidth=2,n.beginPath(),n.strokeRect(t.x,t.y,t.width,t.height);var r=n.globalAlpha;n.globalAlpha=.1,n.fillRect(t.x,t.y,t.width,t.height),n.globalAlpha=r}}}])}(Gn),Er=n(24503),_r=n.n(Er),Cr=function(){function e(t,n){(0,J.A)(this,e),this.from=t,this.to=n}return(0,Z.A)(e,[{key:"set",value:function(e,t){return this.from=e,this.to=t,this}},{key:"align",value:function(e){return this.from=ir(this.from,e),this.to=ir(this.to,e),this}},{key:"contain",value:function(t){return new e(Math.min(this.from,t.from),Math.max(this.to,t.to))}},{key:"subtract",value:function(){for(var t=[this],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s,u=a[o],l=[],c=(0,Xt.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;tr(d.from,d.to,u.from,u.to)?(d.from<u.from&&l.push(new e(d.from,u.from)),d.to>u.to&&l.push(new e(u.to,d.to))):l.push(d)}}catch(e){c.e(e)}finally{c.f()}t=l}return t.sort((function(e,t){return e.from-t.from}))}},{key:"clone",value:function(){return new e(this.from,this.to)}},{key:"length",get:function(){return this.to-this.from}},{key:"equals",value:function(e){return or(this.from,e.from,.1)&&or(this.to,e.to,.1)}}])}(),jr=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new Cr(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=(0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield([],"t0",1);case 1:case"end":return e.stop()}}),e)})),this.mapEvent=void 0,this.mergeEvents=Jn,this.finalizeEvent=Jn,this.overlapThreshold=Kn.OVERLAPPING_THRESHOLD,this.skipOverlap=Kn.SKIP_OVERLAPPING,this.onVisibleEventsChanged=Jn,Object.assign(this,t),this.axesIndex=new ur([],{identityFunction:this.getAxisIdentity})}),[{key:"getRawEvents",set:function(e){this._getRawEvents=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"timeRange",get:function(){return this._timeRange},set:function(e){var t=this._timeRange;this._timeRange=e,or(e.length,t.length,.1)||this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"viewportWidth",set:function(e){this._viewportWidth=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"recalcVisibility",value:function(){this.visibleEvents.length=0;for(var e=this.foldedEvents,t=0,n=e.length;t<n;t+=1){var r=e[t];tr(this._timeRange.from,this._timeRange.to,r.from,r.to||r.from)&&this.visibleEvents.push(r)}return this.visibleEvents}},{key:"clampEventTrackIndex",value:function(e,t){return rr(e.trackIndex,-1,t.tracksCount-1)}},{key:"foldEvents",value:function(){var e=this;this.foldedEvents.length=0;var t,n=this._getRawEvents(),r=this.axesIndex.axes.reduce((function(t,n){return t[e.getAxisIdentity(n)]=[],t}),{}),i=Object.create(null),o=(0,Xt.A)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;this.mapEvent(i,a),i.eventsCount=1;var s=i.axisId,u=this.axesIndex.axesById[s];if(u){var l=this.clampEventTrackIndex(i,u);if(-1===l){for(l=0;l<u.tracksCount;){var c=r[s][l];if(!c||!this.isOverlapping(c,i))break;l+=1}l=rr(l,0,u.tracksCount-1),i.trackIndex=l}var d=r[s][l];d?this.isOverlapping(d,i)&&!this.skipOverlap?(d.eventsCount+=i.eventsCount,d.from=Math.min(d.from,i.from),d.to=Math.max(d.to,i.to),this.mergeEvents(d,i)):(this.finalizeEvent(d),this.foldedEvents.push(d),r[s][l]=i,i=Object.create(null)):(r[s][l]=i,i=Object.create(null))}}}catch(e){o.e(e)}finally{o.f()}for(var f=0,h=Object.values(r);f<h.length;f++){var v,p=h[f],m=(0,Xt.A)(p);try{for(m.s();!(v=m.n()).done;){var y=v.value;y&&(this.finalizeEvent(y),this.foldedEvents.push(y))}}catch(e){m.e(e)}finally{m.f()}}}},{key:"isOverlapping",value:function(e,t){return tr(e.from,e.to,t.from,t.to)||this.timeToWidth(t.from-e.to)<=this.overlapThreshold}},{key:"timeToWidth",value:function(e){return e*this._viewportWidth/this._timeRange.length}}])}(),kr=function(e){function t(e){var n;return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).handleTimeRangeChanged=_r()((function(e){n.mapper.timeRange.equals(e)||(n.mapper.timeRange=e)}),250),n.handleVisibleEventsChanged=function(e){n.canvasApi.getComponent(wr).events=e,n.host.scheduleTimelineRender()},n.mapper=void 0,n.events=[],n.mapper=new jr({mapEvent:function(e,t){Object.assign(e,t)},onVisibleEventsChanged:n.handleVisibleEventsChanged}),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"appendEvents",value:function(e){this.events=this.events.concat(e),this.notifyMapperEvents()}},{key:"setEvents",value:function(e){this.events=e,this.notifyMapperEvents()}},{key:"setSelectedEvents",value:function(e){var t=this.canvasApi.getComponent(wr);t&&(t.selectedEvents=e)}},{key:"axes",get:function(){return this.mapper.axes},set:function(e){if(e!==this.mapper.axes){var t=this.canvasApi.getComponent(mr);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new Cr(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new Cr(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=(0,Q.A)().mark(n),t=this.events;function n(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(t,"t0",1);case 1:case"end":return e.stop()}}),e)}this.mapper.getRawEvents=n}}])}(Gn),Sr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){for(var t,n,r=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0,i=e.canvas,o=e.start,a=e.end,s=e.pixelRatio,u=r,l=i.width/s,c=i.height-r,d=a-o,f=0,h=Nr.length;f<h;f+=1)if(!(d>Nr[f].domain)){for(var v=0,p=cr()(0);+p<d;p=Nr[f].step(p))nr(+p,0,d,0,0+l)>0&&(v+=Kn.RULER_GRID_SPACING);if(!(v>l+40)){n=Nr[f];break}}e.useStaticTransform(),e.ctx.lineJoin="miter",e.ctx.miterLimit=2,e.ctx.lineWidth=1,this.renderLevel(e.ctx,u,0,l,c,o,a,n)}},{key:"renderLevel",value:function(e,t,n,r,i,o,a,s){e.lineWidth=Kn.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(nr(+u,o,a,n,n+r));e.beginPath(),e.strokeStyle=s.style(u),e.moveTo(l,t),e.lineTo(l,t+i),e.stroke()}}}])}(Gn);function Tr(e,t){return function(n){return n[t]()%e==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)}}var Nr=[{domain:On,style:Tr(5,"minute"),start:function(e){return cr()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:Rn,style:function(e){return 0===e.hour()&&0===e.minute()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):e.minute()%4==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return e.add(15,"minute")}},{domain:In,style:function(e){return 0===e.hour()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):e.hour()%4==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:Pn,style:function(e){return 1===e.date()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):1===e.day()?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*Pn,style:Tr(3,"month"),start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")}},{domain:1/0,style:function(){return Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],Or=n(1609);const Rr=window,Ir=Rr.ShadowRoot&&(void 0===Rr.ShadyCSS||Rr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pr=Symbol(),Lr=new WeakMap;class Mr{constructor(e,t,n){if(this._$cssResult$=!0,n!==Pr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ir&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Lr.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Lr.set(t,e))}return e}toString(){return this.cssText}}const Dr=Ir?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Mr("string"==typeof e?e:e+"",void 0,Pr))(t)})(e):e;var zr;const $r=window,Fr=$r.trustedTypes,Ur=Fr?Fr.emptyScript:"",qr=$r.reactiveElementPolyfillSupport,Hr={toAttribute(e,t){switch(t){case Boolean:e=e?Ur:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Vr=(e,t)=>t!==e&&(t==t||e==e),Br={attribute:!0,type:String,converter:Hr,reflect:!1,hasChanged:Vr},Wr="finalized";class Yr extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const r=this._$Ep(n,t);void 0!==r&&(this._$Ev.set(r,n),e.push(r))})),e}static createProperty(e,t=Br){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Br}static finalize(){if(this.hasOwnProperty(Wr))return!1;this[Wr]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Dr(e))}else void 0!==e&&t.push(Dr(e));return t}static _$Ep(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{Ir?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=Rr.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Br){var r;const i=this.constructor._$Ep(e,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:Hr).toAttribute(t,n.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var n;const r=this.constructor,i=r._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=r.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(n=e.converter)||void 0===n?void 0:n.fromAttribute)?e.converter:Hr;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let r=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Vr)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}var Kr;Yr[Wr]=!0,Yr.elementProperties=new Map,Yr.elementStyles=[],Yr.shadowRootOptions={mode:"open"},null==qr||qr({ReactiveElement:Yr}),(null!==(zr=$r.reactiveElementVersions)&&void 0!==zr?zr:$r.reactiveElementVersions=[]).push("1.6.3");const Gr=window,Qr=Gr.trustedTypes,Xr=Qr?Qr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Jr="$lit$",Zr=`lit$${(Math.random()+"").slice(9)}$`,ei="?"+Zr,ti=`<${ei}>`,ni=document,ri=()=>ni.createComment(""),ii=e=>null===e||"object"!=typeof e&&"function"!=typeof e,oi=Array.isArray,ai="[ \t\n\f\r]",si=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ui=/-->/g,li=/>/g,ci=RegExp(`>|${ai}(?:([^\\s"'>=/]+)(${ai}*=${ai}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),di=/'/g,fi=/"/g,hi=/^(?:script|style|textarea|title)$/i,vi=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),pi=vi(1),mi=(vi(2),Symbol.for("lit-noChange")),yi=Symbol.for("lit-nothing"),gi=new WeakMap,xi=ni.createTreeWalker(ni,129,null,!1);function Ai(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Xr?Xr.createHTML(t):t}const wi=(e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=si;for(let t=0;t<n;t++){const n=e[t];let s,u,l=-1,c=0;for(;c<n.length&&(a.lastIndex=c,u=a.exec(n),null!==u);)c=a.lastIndex,a===si?"!--"===u[1]?a=ui:void 0!==u[1]?a=li:void 0!==u[2]?(hi.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=ci):void 0!==u[3]&&(a=ci):a===ci?">"===u[0]?(a=null!=i?i:si,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?ci:'"'===u[3]?fi:di):a===fi||a===di?a=ci:a===ui||a===li?a=si:(a=ci,i=void 0);const d=a===ci&&e[t+1].startsWith("/>")?" ":"";o+=a===si?n+ti:l>=0?(r.push(s),n.slice(0,l)+Jr+n.slice(l)+Zr+d):n+Zr+(-2===l?(r.push(void 0),t):d)}return[Ai(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class bi{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[u,l]=wi(e,t);if(this.el=bi.createElement(u,n),xi.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=xi.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(Jr)||t.startsWith(Zr)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+Jr).split(Zr),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?ki:"?"===t[1]?Ti:"@"===t[1]?Ni:ji})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(hi.test(r.tagName)){const e=r.textContent.split(Zr),t=e.length-1;if(t>0){r.textContent=Qr?Qr.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],ri()),xi.nextNode(),s.push({type:2,index:++i});r.append(e[t],ri())}}}else if(8===r.nodeType)if(r.data===ei)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(Zr,e+1));)s.push({type:7,index:i}),e+=Zr.length-1}i++}}static createElement(e,t){const n=ni.createElement("template");return n.innerHTML=e,n}}function Ei(e,t,n=e,r){var i,o,a,s;if(t===mi)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=ii(t)?void 0:t._$litDirective$;return(null==u?void 0:u.constructor)!==l&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===l?u=void 0:(u=new l(e),u._$AT(e,n,r)),void 0!==r?(null!==(a=(s=n)._$Co)&&void 0!==a?a:s._$Co=[])[r]=u:n._$Cl=u),void 0!==u&&(t=Ei(e,u._$AS(e,t.values),u,r)),t}class _i{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:r}=this._$AD,i=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:ni).importNode(n,!0);xi.currentNode=i;let o=xi.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new Ci(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new Oi(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=xi.nextNode(),a++)}return xi.currentNode=ni,i}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ci{constructor(e,t,n,r){var i;this.type=2,this._$AH=yi,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cp=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ei(this,e,t),ii(e)?e===yi||null==e||""===e?(this._$AH!==yi&&this._$AR(),this._$AH=yi):e!==this._$AH&&e!==mi&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>oi(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==yi&&ii(this._$AH)?this._$AA.nextSibling.data=e:this.$(ni.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=bi.createElement(Ai(r.h,r.h[0]),this.options)),r);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(n);else{const e=new _i(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=gi.get(e.strings);return void 0===t&&gi.set(e.strings,t=new bi(e)),t}T(e){oi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const i of e)r===t.length?t.push(n=new Ci(this.k(ri()),this.k(ri()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class ji{constructor(e,t,n,r,i){this.type=1,this._$AH=yi,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=yi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,r){const i=this.strings;let o=!1;if(void 0===i)e=Ei(this,e,t,0),o=!ii(e)||e!==this._$AH&&e!==mi,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Ei(this,r[n+a],t,a),s===mi&&(s=this._$AH[a]),o||(o=!ii(s)||s!==this._$AH[a]),s===yi?e=yi:e!==yi&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===yi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class ki extends ji{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===yi?void 0:e}}const Si=Qr?Qr.emptyScript:"";class Ti extends ji{constructor(){super(...arguments),this.type=4}j(e){e&&e!==yi?this.element.setAttribute(this.name,Si):this.element.removeAttribute(this.name)}}class Ni extends ji{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=Ei(this,e,t,0))&&void 0!==n?n:yi)===mi)return;const r=this._$AH,i=e===yi&&r!==yi||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==yi&&(r===yi||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class Oi{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ei(this,e)}}const Ri=Gr.litHtmlPolyfillSupport;var Ii,Pi;null==Ri||Ri(bi,Ci),(null!==(Kr=Gr.litHtmlVersions)&&void 0!==Kr?Kr:Gr.litHtmlVersions=[]).push("2.8.0");class Li extends Yr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:t;let a=o._$litPart$;if(void 0===a){const e=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new Ci(t.insertBefore(ri(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return mi}}Li.finalized=!0,Li._$litElement$=!0,null===(Ii=globalThis.litElementHydrateSupport)||void 0===Ii||Ii.call(globalThis,{LitElement:Li});const Mi=globalThis.litElementPolyfillSupport;null==Mi||Mi({LitElement:Li}),(null!==(Pi=globalThis.litElementVersions)&&void 0!==Pi?Pi:globalThis.litElementVersions=[]).push("3.3.3");var Di,zi=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.canvas=void 0,this.ctx=void 0,this.notifyBoundsChanged=void 0,this.notifyScrollTopChanged=void 0,this.timeline=void 0,Object.assign(this,t),this.canvas=t.timeline.renderRoot.querySelector("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx.globalAlpha=1}),[{key:"pixelRatio",get:function(){return window.devicePixelRatio||1}},{key:"canvasScrollTop",get:function(){return this.timeline.canvasScrollTop||0}},{key:"start",get:function(){return this.timeline.start}},{key:"end",get:function(){return this.timeline.end}},{key:"width",get:function(){return this.canvas.width/this.pixelRatio}},{key:"height",get:function(){return this.canvas.height/this.pixelRatio}},{key:"currentTime",get:function(){return ir(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return nr(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return nr(e,0,this.width,this.timeline.start,this.timeline.end)}},{key:"widthToTime",value:function(e){return this.positionToTime(e)-this.start}},{key:"clear",value:function(){this.ctx.fillStyle=Kn.resolveCssValue(Kn.PRIMARY_BACKGROUND_COLOR),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}},{key:"useStaticTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,0)}},{key:"useScrollTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,-this.canvasScrollTop*e)}},{key:"getComponent",value:function(e){return this.timeline.getComponentUnsafe(e)}}])}(),$i=function(e){function t(){var e;return(0,J.A)(this,t),(e=(0,ee.A)(this,t)).start=void 0,e.end=void 0,e.canvasScrollTop=void 0,e.canvasLastWidth=void 0,e.canvasLastHeight=void 0,e.isZoomAllowed=void 0,e.handleWindowResize=function(){e.updateCanvasSize()},e.handleCanvasMousedown=function(t){t.stopPropagation(),t.preventDefault();var n=t.pageX,r=t.pageY,i=e.start,o=e.canvasScrollTop,a=e.end-i,s=e.canvasApi.canvas.width/e.canvasApi.pixelRatio,u=0,l=function(t){var l=(t.pageX-n)/s*a;e.notifyBoundsChanged(i-l,i-l+a);var c=t.pageY-r;Math.abs(c)>.1&&e.notifyScrollTopChanged(rr(o-c,0,1/0)),u=Math.sqrt(Math.pow(t.pageX-n,2)+Math.pow(c,2))},c=function(e){u>2&&e.stopPropagation(),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c,{capture:!0})};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c,{capture:!0})},e.handleCanvasWheel=function(t){t.stopPropagation(),t.preventDefault();var n=e.canvasApi;if(t.shiftKey||e.isZoomAllowed){var r=e.start,i=e.end,o=i-r,a=!1;if(Math.abs(t.deltaY)>2)if(t.shiftKey){a=!0;var s=o*t.deltaY*Kn.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=rr(o*(t.deltaY>0?1.15:.9),Kn.ZOOM_MIN,Kn.ZOOM_MAX);r=Math.round(e.start-(l-o)*u),i=Math.round(e.end+(l-o)*(1-u))}if(!a&&0!==t.deltaX){var c=(i-r)*t.deltaX*Kn.WHEEL_PAN_SPEED;r+=c,i+=c}r===e.start&&i===e.end||e.notifyBoundsChanged(r,i)}},e.canvasApi=void 0,e.isTimelineRenderScheduled=!1,e.components=[],e.sizeUpdateTimerId=void 0,e.notifyBoundsChanged=function(t,n){e.dispatchEvent(new CustomEvent("boundsChanged",{detail:{start:t,end:n}}))},e.notifyScrollTopChanged=function(t){e.dispatchEvent(new CustomEvent("scrollTopChanged",{detail:{scrollTop:t}}))},e.canvasLastWidth=0,e.canvasLastHeight=0,e.start=0,e.end=In,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(){return pi(Di||(Di=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n canvas {\n position: relative;\n height: 100%;\n width: 100%;\n }\n </style>\n\n <canvas tabindex="0">'," "," ","</canvas>\n "])),this.start,this.end,this.canvasScrollTop)}},{key:"shouldUpdate",value:function(e){return(e.has("start")||e.has("end")||e.has("canvasScrollTop"))&&this.scheduleTimelineRender(),(0,Or.A)(t,"shouldUpdate",this,3)([e])}},{key:"connectedCallback",value:function(){(0,Or.A)(t,"connectedCallback",this,3)([]),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Or.A)(t,"disconnectedCallback",this,3)([])}},{key:"getComponentUnsafe",value:function(e){return this.components.find((function(t){return t instanceof e}))}},{key:"getComponent",value:(n=(0,X.A)((0,Q.A)().mark((function e(t){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateComplete;case 2:return e.abrupt("return",this.getComponentUnsafe(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getCanvasApiUnsafe",value:function(){return this.canvasApi}},{key:"initComponents",value:function(){this.components=this.createComponents();var e,t=(0,Xt.A)(this.components);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.addController(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"firstUpdated",value:function(e){(0,Or.A)(t,"firstUpdated",this,3)([e]),this.canvasApi=new zi({timeline:this,notifyBoundsChanged:this.notifyBoundsChanged,notifyScrollTopChanged:this.notifyScrollTopChanged}),this.initComponents();var n=this.canvasApi.canvas;n.addEventListener("mousedown",this.handleCanvasMousedown),n.addEventListener("wheel",this.handleCanvasWheel)}},{key:"init",value:function(){var e=this;this.canvasLastWidth=0,this.canvasLastHeight=0,this.updateComplete.then((function(){window.addEventListener("resize",e.handleWindowResize),e.sizeUpdateTimerId=window.setInterval((function(){(e.offsetHeight!==e.canvasLastHeight||e.offsetWidth!==e.canvasLastWidth)&&(e.updateCanvasSize(),e.canvasLastWidth=e.offsetWidth,e.canvasLastHeight=e.offsetHeight)}),2e3),e.updateCanvasSize()}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.handleWindowResize),clearInterval(this.sizeUpdateTimerId)}},{key:"reset",value:function(){var e=this;this.destroy(),requestAnimationFrame((function(){return e.init()}))}},{key:"scheduleTimelineRender",value:function(){var e=this;this.isTimelineRenderScheduled||(this.isTimelineRenderScheduled=!0,requestAnimationFrame((function(){e.renderTimeline(),e.isTimelineRenderScheduled=!1})))}},{key:"renderTimeline",value:function(){var e=this.canvasApi;e.useStaticTransform(),e.clear();var t,n=(0,Xt.A)(this.components);try{for(n.s();!(t=n.n()).done;)t.value.render(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"updateCanvasSize",value:function(){var e=this.canvasApi,t=null==e?void 0:e.canvas;t&&(t.width=Math.floor(this.offsetWidth*e.pixelRatio),t.height=Math.floor(this.offsetHeight*e.pixelRatio),this.canvasLastWidth=t.width,this.canvasLastHeight=t.height,this.scheduleTimelineRender())}}],[{key:"properties",get:function(){return{start:{type:Number},end:{type:Number},canvasScrollTop:{type:Number},isZoomAllowed:{type:Boolean}}}}]);var n}(Li);const Fi=new Set(["children","wcType"]);class Ui extends o.Component{get element(){return this._element}getTag(){let e;return"function"==typeof this.props.wcType?e=this.props.wcType.name.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase():"string"==typeof this.props.wcType&&(e=this.props.wcType),e}render(){const e=this.getTag();if(!e)throw'"wcType" must be set!';const t={};for(const e of Object.keys(this.props))e&&!0===this.props[e]&&(t[e]=!0);return o.createElement(e,Object.assign(Object.assign({},t),{ref:e=>this.setRef(e)}),this.props.children)}setRef(e){e?(e!==this._element&&this.cleanUp(),this._element=e,this.syncProps(this.props)):this.cleanUp(),this.props.innerRef&&("function"==typeof this.props.innerRef?this.props.innerRef(e):this.props.innerRef.current=e)}cleanUp(){if(this._element){for(const e in this.props)this.props.hasOwnProperty(e)&&this.isEventProp(e,this.props[e])&&this.removeEventListener(e,this.props[e]);this._element=null}}componentDidUpdate(e){const t={};for(const n in this.props)this.props.hasOwnProperty(n)&&(e[n]&&e[n]===this.props[n]||(t[n]=this.props[n],e[n]&&this.isEventProp(n,e[n])&&this.removeEventListener(n,e[n])));for(const t in e)e.hasOwnProperty(t)&&!this.props[t]&&this.isEventProp(t,e[t])&&this.removeEventListener(t,e[t]);this.syncProps(t)}syncProps(e){if(this._element)for(const t in e)Fi.has(t)||(this.isEventProp(t,e[t])&&this.addEventListener(t,e[t]),this._element[t]=e[t])}isEventProp(e,t){return e&&"function"==typeof t}addEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.addEventListener(n,t)}removeEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.removeEventListener(n,t)}}var qi=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){var a=o-8,s=Math.max(i-r,4),u=16,l=function(e,t){if(e&&t)return t-e==0?"0s":t-e<1e3?"<1s":(0,Ft.p0)(e,t,"h:mm:ss")}(t.from,t.to),c=r,d=0;if(0===t.trackIndex&&Object.keys(t.colors).length>1){for(var f=1;f<Object.keys(t.colors).length;f++){var h=s*t.colors[f].percentage;f===Object.keys(t.colors).length-1&&(h=Math.max(s*t.colors[f].percentage,4)),e.fillStyle=Kn.resolveCssValue(t.colors[f].color),e.fillRect(c,a,h,u),c+=h,d+=h}if(1===t.eventsCount&&t.borderColor&&(function(e){var t=e.ctx,n=e.x0,r=e.y0,i=e.width,o=e.height,a=e.color;t.fillStyle=a,t.beginPath(),t.lineTo(n-1,r+o+5+1),t.lineTo(n+10,r+o+1),t.lineTo(n-1,r+o+1),t.fill(),t.beginPath(),t.lineTo(n+i+1,r+o+5+1),t.lineTo(n+i-10,r+o+1),t.lineTo(n+i+1,r+o+1),t.fill()}({ctx:e,x0:r,y0:a,width:d||s,height:u,color:Kn.resolveCssValue(t.borderColor)}),e.strokeStyle=Kn.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(Kn.TRACK_HEIGHT-u)/3;e.fillStyle=Kn.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,Kn.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=Kn.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=Kn.resolveCssValue(Kn.COUNTER_FONT_COLOR),e.fillText(t,n+Kn.COUNTER_PADDING,r+Kn.COUNTER_FONT_CENTER_OFFSET)}(e,l,r+Math.max(d,s),o)}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,4),this.hitboxResult}}])}(yr),Hi=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"events",set:function(e){this.getComponent(kr).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(kr).then((function(t){t&&(t.axes=e)}))}},{key:"theme",set:function(e){this.setTimelineConfig(),this.scheduleTimelineRender()}},{key:"updateCanvasSize",value:function(){if(this.offsetHeight)return(0,Or.A)(t,"updateCanvasSize",this,3)([])}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new wr(this);return e.registerRenderer("operation",new qi),[new Sr(this),new mr(this),e,new br(this),new kr(this)]}},{key:"setTimelineConfig",value:function(){Kn.ZOOM_MAX=3*Pn,Kn.PRIMARY_BACKGROUND_COLOR=(0,Pt.kd)("--g-color-base-background"),Kn.SECONDARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic"),Kn.BOUNDARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic"),Kn.PRIMARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic-hover"),Kn.COUNTER_FONT_COLOR=(0,Pt.kd)("--g-color-text-complementary")}}])}($i);customElements.define("my-timeline-canvas",Hi);var Vi=o.forwardRef(((e,t)=>o.createElement(Ui,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e)))),Bi=n(27559),Wi=n(19812),Yi={sortOrder:{},sortColumns:[]};function Ki(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return i?e:Yi;var a=e.sortOrder,s=e.sortColumns,u=s,l=a[t],c=n;if(l&&(c=l===n||o?"ascending"===l?"descending":"ascending":void 0),!i)return c?{sortOrder:(0,r.A)({},t,c),sortColumns:[t]}:Yi;a[t];var d=(0,Zn.A)(a,[t].map(Wi.A));return c?(d[t]=c,new Set(s).has(t)||(u=[].concat((0,Oe.A)(s),[t]))):u=s.filter((function(e){return e!==t})),{sortOrder:d,sortColumns:u}}var Gi=(0,a.A)("table"),Qi=(0,N.jsx)("svg",{className:Gi("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,N.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),Xi=(0,N.jsx)("svg",{className:Gi("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,N.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function Ji(e){switch(e){case"ascending":return Qi;case"descending":return Xi;default:return null}}function Zi(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,N.jsx)("span",{className:Gi("sort-icon",{shadow:!t}),"data-index":n,children:Ji(t||i)}):null}var eo=50;function to(e){var t=e.columns,n=e.sortOrder,r=e.sortColumns,i=e.sortable,a=e.defaultOrder,s=e.onSort;function u(e){return i&&e.sortable?function(t){null==s||s(e,t.ctrlKey||t.metaKey)}:void 0}return(0,N.jsx)(o.Fragment,{children:t.map((function(e,t){var o=e.className,s=e.name,l=e.header,c=e.title,d=e.align,f=e.customStyle,h=e.width,v=e.minWidth,p=void 0===v?eo:v,m=e.maxWidth,y="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(p,"px");return(0,N.jsx)("div",{className:Gi("th",{sortable:i&&e.sortable,align:d},o),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,q.A)({flex:y,maxWidth:m},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,N.jsxs)("div",{className:Gi("head-cell"),children:[null!=l?l:s,(0,N.jsx)(Zi,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function no(e){var t=e.columns,n=e.row,r=e.index,i=e.active,o=e.selected;return t.map((function(e,t){var a=e.name,s=e.className,u=e.align,l=e.sortable,c=e.title,d=e.accessor,f=e.width,h=e.minWidth,v=void 0===h?eo:h,p=e.maxWidth,m=e.customStyle,y=e.render,g=e.onClick,x="function"==typeof d?d(n):n[e.name],A="number"==typeof f?"0 0 ".concat(f,"px"):"1 0 ".concat(v,"px");return(0,N.jsx)("div",{className:Gi("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,q.A)({flex:A,maxWidth:p},null==m?void 0:m({row:n,index:r,name:a,header:!1})),onClick:function(){null==g||g(n,e)},children:(0,N.jsx)("div",{className:Gi("row-cell"),children:"function"==typeof y?y({value:x,row:n,index:r,active:i,selected:o}):x})},t)}))}var ro=o.memo((function(e){var t=e.row,n=e.index,r=e.columns,i=e.render,a=e.active,s=e.selected;return(0,N.jsx)(o.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return no({columns:r,row:t,index:n,active:a,selected:s})},active:a,selected:s}):no({columns:r,row:t,index:n,active:a,selected:s})})}));function io(e){var t=e.containerRef,n=e.className,r=e.view,a=void 0===r?"default":r,s=e.columns,u=e.data,l=e.rowWrapper,c=e.rowHeight,d=e.renderRow,f=e.rowClassName,h=e.rowKey,v=e.alwaysShowActiveRow,p=e.activeRowIndex,m=e.selectedRowKey,y=e.headerClassName,g=e.headerHeight,x=e.onSort,A=e.initialSortOrder,w=e.onRowClick,b=e.settings,E=void 0===b?{}:b,_=E.sortable,C=void 0===_||_,j=E.defaultOrder,k=void 0===j?"ascending":j,S=E.disableSortReset,T=void 0!==S&&S,O=e.canFetchMore,R=e.isFetchingMore,I=e.fetchMore,P=e.onWrapperScroll,L=e.scrollRef,M=o.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return Ki(e,t.name,t.order,!0)}),Yi):Yi}(A)})),D=(0,i.A)(M,2),z=D[0],$=D[1],F=o.useRef(null),U=o.useCallback((function(e,t){var n,r,i=Ki(z,e.name,e.defaultOrder||k,t,T);$(i),x&&x((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[k,T,x,z]),H=o.useCallback((function(){return(0,N.jsx)(to,(0,q.A)((0,q.A)({},z),{},{sortable:C,defaultOrder:k,columns:s,onSort:U}))}),[s,k,U,z,C]),V=o.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,N.jsx)(ro,{row:e,index:t,columns:s,active:r,selected:i,render:d})}),[s,d]);o.useEffect((function(){var e,t=s.reduce((function(e,t){var n=t.width,r=t.minWidth;return e+(null!=n?n:void 0===r?eo:r)}),0)+30;null===(e=F.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var B=o.useCallback((function(e,t){return Gi("row","function"==typeof f?f(e,t):f)}),[f]);return(0,N.jsx)(Bi.w,{containerRef:(0,Ft.RQ)(F,t),className:Gi({view:a},n),wrapperClassName:Gi("table"),headerClassName:Gi("head",y),headerHeight:g,renderHeader:H,itemWrapper:l,items:u,onItemClick:w,itemClassName:B,itemHeight:c,loaderHeight:c,renderItem:V,itemKey:h,alwaysShowActiveItem:v,activeItemIndex:p,selectedItemKey:m,canFetchMore:O,isFetchingMore:R,fetchMore:I,onWrapperScroll:P,scrollRef:L})}var oo=(0,a.A)("node-name");function ao(e){var t=e.node,n=e.className,r=(0,N.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,N.jsxs)(je.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,N.jsx)(b.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,N.jsxs)("span",{className:oo("name",n),children:[r,(0,Ft.lt)(t)&&(0,N.jsx)(Le.A,{className:oo("operation-node-info"),tooltipContentClassName:oo("operation-node-info-popup"),content:(0,N.jsx)($t.A,(0,q.A)({},t)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,N.jsx)(_.I,{className:oo("icon"),data:Ut.A,size:12})})]})}var so=n(51188);const uo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"})}))};var lo=(0,a.A)("timeline"),co=(0,N.jsx)(_.I,{data:uo,size:14}),fo=(0,N.jsx)(_.I,{data:so.A,size:14}),ho=(0,N.jsx)(_.I,{data:function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.754 2.004a.75.75 0 0 0 0 1.5h4.75v4.742a.75.75 0 0 0 1.5 0V2.754a.75.75 0 0 0-.75-.75zm.492 11.992a.75.75 0 0 0 0-1.5h-4.75V7.754a.75.75 0 0 0-1.5 0v5.492a.75.75 0 0 0 .75.75z",clipRule:"evenodd"})}))},size:14});function vo(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,N.jsx)(E.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:ho})}function po(e){var t=e.isCommonButton,n=e.disabled,r=e.onClick,i=e.isExpanded,o=t?"Expand all":"Expand",a=t?"Collapse all":"Collapse",s=n?"No items to expand":"";return(0,N.jsx)("span",{title:s,children:(0,N.jsx)(E.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?co:fo})})}function mo(e){var t=e.nameHeader,n=e.controlsHeader,r=e.onRulerUpdate,i=e.onExpandAxis;return[{name:"status",header:"Status",width:110,sortable:!1,render:function(e){var t=e.row,n=t.node;return t.isEvent?null:(0,N.jsx)("span",{className:lo("row-status"),children:(0,N.jsx)(b.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,N.jsx)(yo,{progress:n.progress})})})}},{name:"name",header:null!=t?t:"Name",sortable:!1,width:220,align:"right",render:function(e){var t=e.row,n=t.isEvent,r=t.name,i=t.id,o=t.isExpanded,a=t.node;return n?(0,N.jsx)("div",{className:lo("event-name"),title:r,children:r}):(0,N.jsx)("div",{className:lo("aside-item",{expanded:o}),children:(0,N.jsx)(ao,{node:a,className:lo("node-name")})},i)}},{name:"controls",header:null!=n?n:"",sortable:!1,width:60,render:function(e){var t=e.row,n=t.node,o=t.isExpanded,a=t.from,s=t.to,u=t.id,l=t.isExpandable;return"in"===n.type||"out"===n.type?null:(0,N.jsxs)("div",{children:[(0,N.jsx)(vo,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,N.jsx)(po,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function yo(e){var t,n=e.progress,r=null!==(t=null==n?void 0:n.state)&&void 0!==t?t:"NotStarted",i=null!=n?n:{},o=i.completed,a=void 0===o?0:o,s=i.total,u=Math.floor(a/(s||1)*100);return(0,N.jsxs)("span",{className:lo("node-status"),children:[(0,N.jsx)(go,{state:r,progress:n}),(0,N.jsx)("span",{children:"InProgress"===r?"".concat(Ft.Ie[r].title,": ").concat(u,"%"):Ft.Ie[r].title})]})}function go(e){var t=e.state,n=e.progress,r=zt();return"InProgress"===t?(0,N.jsx)("img",{className:lo("node-status-icon"),src:(0,Ft.$u)(n,r)}):(0,N.jsx)("div",{className:lo("node-status-icon",{state:t.toLowerCase()})})}function xo(e){var t,n,r,i,o,a;return(0,N.jsx)("div",{className:lo("aside-header"),children:(0,N.jsx)(io,{columns:mo({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,N.jsxs)("div",{children:[(0,N.jsx)(vo,{onRulerUpdate:n}),(0,N.jsx)(po,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,N.jsx)("span",{children:["Name (".concat(t," block)"),"Name (".concat(t," blocks)"),"Name (".concat(t," blocks)"),"Name (no blocks)"][t]})),onRulerUpdate:e.onRulerUpdate,onExpandAxis:e.onExpandAxis}),data:e.tableItems,rowClassName:lo("table-row"),rowHeight:25,headerHeight:27,className:lo("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var Ao=n(34108),wo=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},bo=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Eo=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},_o=96.422,Co=82.521,jo=216/24389,ko=24389/27,So=function(e){var t=function(e){var t=bo(e.r),n=bo(e.g),r=bo(e.b);return function(e){return{x:wo(e.x,0,_o),y:wo(e.y,0,100),z:wo(e.z,0,Co),a:wo(e.a)}}(function(e){return{x:1.0478112*e.x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a}}({x:100*(.4124564*t+.3575761*n+.1804375*r),y:100*(.2126729*t+.7151522*n+.072175*r),z:100*(.0193339*t+.119192*n+.9503041*r),a:e.a}))}(e),n=t.x/_o,r=t.y/100,i=t.z/Co;return n=n>jo?Math.cbrt(n):(ko*n+16)/116,{l:116*(r=r>jo?Math.cbrt(r):(ko*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>jo?Math.cbrt(i):(ko*i+16)/116)),alpha:t.a}},To=n(72617),No=n.n(To),Oo=n(81713),Ro=n.n(Oo),Io=n(63281),Po=n.n(Io),Lo=6e4,Mo={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function Do(e){var t=e.from,n=e.to;return Math.max(n-t,Lo)}(0,Ao.X$)([function(e){function t(e,t,n){void 0===n&&(n=5);for(var r=[],i=1/(n-1),o=0;o<=n-1;o++)r.push(e.mix(t,i*o));return r}e.prototype.mix=function(t,n){void 0===n&&(n=.5);var r=t instanceof e?t:new e(t),i=function(e,t,n){var r,i=So(e),o=So(t);return function(e){var t=(e.l+16)/116,n=e.a/500+t,r=t-e.b/200;return function(e){var t,n,r=.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,i=-.0282895*t.x+1.0099416*t.y+.0210077*t.z,o=.0122982*t.x+-.020483*t.y+1.3299098*t.z;return n={r:Eo(.032404542*r-.015371385*i-.004985314*o),g:Eo(-.00969266*r+.018760108*i+41556e-8*o),b:Eo(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:wo(n.r,0,255),g:wo(n.g,0,255),b:wo(n.b,0,255),a:wo(n.a)}}({x:(Math.pow(n,3)>jo?Math.pow(n,3):(116*n-16)/ko)*_o,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/ko),z:(Math.pow(r,3)>jo?Math.pow(r,3):(116*r-16)/ko)*Co,a:e.alpha})}({l:wo((r={l:i.l*(1-n)+o.l*n,a:i.a*(1-n)+o.a*n,b:i.b*(1-n)+o.b*n,alpha:i.alpha*(1-n)+o.alpha*n}).l,0,400),a:r.a,b:r.b,alpha:wo(r.alpha)})}(this.toRgb(),r.toRgb(),n);return new e(i)},e.prototype.tints=function(e){return t(this,"#fff",e)},e.prototype.shades=function(e){return t(this,"#000",e)},e.prototype.tones=function(e){return t(this,"#808080",e)}}]);var zo=(0,a.A)("timeline");const $o=function(e){var t=e.graph,n=e.prepareNode,r=(0,be.wE)(),a=(0,It.i)(),s=zt(),u=o.useState((function(){return new St.DataSet})),l=(0,i.A)(u,1)[0],c=o.useState({}),d=(0,i.A)(c,2),f=d[0],h=d[1],v=o.useState(new Set),p=(0,i.A)(v,2),m=p[0],y=p[1],g=o.useState(""),x=(0,i.A)(g,2),A=x[0],w=x[1],b=o.useState(),E=(0,i.A)(b,2),_=E[0],C=E[1],j=(0,Ft.GE)(l),k=o.useRef(r);k.current=r;var S=o.useRef(n);S.current=n,o.useEffect((function(){l.clear(),l.add(t.nodes),k.current&&(0,Ft.DW)(l,k.current,S.current,void 0,!1),h({})}),[l,t]),o.useEffect((function(){r&&((0,Ft.DW)(l,r,S.current,void 0,!1),h({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&((0,Ft.ZG)(l,n),h({}))}),[l,n]);var T=o.useMemo((function(){var e,t=Tn()(k.current,(function(e,t){var n=t.startedAt?new Date(t.startedAt).getTime():1/0;return Math.min(n,e)}),1/0),n=l?function(e){var t=e.nodes,n=e.colors,r=e.theme,o=e.queryStartedAtMillis,a=1/0,s=[];t.forEach((function(e){var t,o,u=e.progress,l={id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",events:[],level:Number(e.level),node:e,isExpandable:!1};if(u){var c="0";"InProgress"===u.state?c=(new Date).toString():u.finishedAt?c=u.finishedAt:u.stages&&Object.keys(u.stages).length>0&&(c=Object.values(u.stages[Object.keys(u.stages).length-1])[0]);var d=null!==(o=u.startedAt)&&void 0!==o?o:"0",f=new Date(d).getTime(),h=new Date(c).getTime(),v=u.state,p=null!=v?v:"NotStarted";a=Math.min(f,a);var m=(0,q.A)((0,q.A)({},l),{},{from:f,to:h,status:p}),y=function(e){var t=e.stages,n=e.axisId,r=e.dataProgressFinishedAt,o=e.dataProgressStartedAt,a=new Date(o).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},d=0;return u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:a,to:s,id:l++})),t&&Object.values(t).forEach((function(e,n){var s,f,h=null!==(s=t[n+1])&&void 0!==s?s:{},v=(0,i.A)(Object.entries(e)[0],2),p=v[0],m=v[1],y=null!==(f=Object.values(h)[0])&&void 0!==f?f:r;0===n&&o!==m&&u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:a,to:new Date(m).getTime(),name:"init",id:l++})),u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:new Date(m).getTime(),to:new Date(y).getTime(),name:p,id:l++}))})),u}({stages:null==u?void 0:u.stages,dataProgressFinishedAt:c,dataProgressStartedAt:d,axisId:e.id});m.isExpandable=y.length>1;var g=n.operation[Mo[p]],x=n.operation["".concat(Mo[p],"Border")],A=n.operation["".concat(Mo[p],"Background")],w=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,i=e.operationDuration,o={},a=t.length,s=(0,Oe.A)(t);s.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var u=(0,Ao.Mj)(r),l=("light"===n?u.tints(a+2):u.tones(a+2)).map((function(e){return e.toHex()}));return t.forEach((function(e){var t=e.to-e.from,n=s.findIndex((function(t){return t.id===e.id}));o[e.trackIndex]={percentage:i>0?t/i:1,color:l[n]}})),o}({theme:r,events:y,eventMajorColor:g,operationDuration:h-f});m.events=y.map((function(e){return(0,q.A)((0,q.A)({},e),{},{colors:w,borderColor:x,backgroundColor:A})})),s.push(m)}else s.push((0,q.A)((0,q.A)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=Po()(s,["level","from"]);if(o!==1/0&&a!==1/0){var l={id:"preparation",from:o,to:a,events:[{eventsCount:1,axisId:"preparation",renderType:"operation",trackIndex:0,from:o,to:a,colors:{0:{percentage:100,color:n.operation[Mo.Finished]}}}],node:{label:"Preparation",progress:{state:"Finished"},id:"preparation",level:0},isExpandable:!1,level:0,status:"Finished",label:"Preparation"};u.unshift(l)}return u}({nodes:l,colors:s,theme:a,queryStartedAtMillis:t}):[],r=null!==(e=n.map((function(e){var t;return null!==(t=e.events)&&void 0!==t?t:[]})).flat())&&void 0!==e?e:[];return{axes:n,events:r}}),[l,s,a,f]),O=T.axes,R=T.events,I=function(e){var t=o.useState({}),n=(0,i.A)(t,2),r=n[0],a=r.start,s=r.end,u=n[1],l=o.useRef(!1),c=o.useRef(!1),d=o.useMemo((function(){var t,n=No()(e,"from"),r=null!==(t=Ro()(e,"to"))&&void 0!==t?t:Object.create(null),i=n?n.from-1e3:void 0;return{queryStart:i,queryEnd:r.to&&i?r.to+.08*(r.to-i):(new Date).getTime()}}),[e]),f=function(e){var t=e.queryStart,n=e.queryEnd,r=e.from,i=e.to;if(!t)return{};var o=Do({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(Do({from:r,to:i}),o);return t&&r<t||r>n?{start:t,end:t+a}:n<i||t&&t>i?{start:n-a,end:n}:{start:r,end:r+a}}({from:a,to:s,queryStart:d.queryStart,queryEnd:d.queryEnd}),h=f.start,v=f.end;return!c.current||a||s||(l.current=!l.current),c.current=Boolean(a||s),[{timelineStart:h,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(O),P=(0,i.A)(I,2),L=P[0],M=L.timelineStart,D=L.timelineEnd,z=L.timelineRulerKey,$=P[1],F=o.useMemo((function(){var e,t=A.toLowerCase().trim(),n=[],r=!1,i=(0,Xt.A)(O);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!_||o.status===_)){var a=!!o.isExpandable&&m.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,q.A)((0,q.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[O,A,_,m]),U=F.filteredAxes,H=F.isSomeAxesCollapsed,V=o.useMemo((function(){var e=0;return U.map((function(t){var n=Kn.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[U]),B=o.useRef(null),W=o.useState(0),Y=(0,i.A)(W,2),K=Y[0],G=Y[1],Q=function(e){var t=e.from,n=e.to;$({start:t,end:n})},X=o.useMemo((function(){var e=[];return U.forEach((function(t){var n;e.push(t),t.isExpanded&&(null===(n=t.events)||void 0===n||n.forEach((function(n,r){0!==r&&e.push((0,q.A)((0,q.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[U]);return(0,N.jsxs)("div",{className:zo(),children:[(0,N.jsxs)("div",{className:zo("filters"),children:[(0,N.jsx)(kn.k,{className:zo("filters-search"),hasClear:!0,value:A,onUpdate:w,placeholder:"Filter by name"}),(0,N.jsx)(dt.l,{className:zo("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:_?[_]:[],options:j.map((function(e){var t=e.state,n=e.title,r=e.count;return{value:t,content:"".concat(n).concat(r>0?" (".concat(r,")"):"")}})),width:230,hasClear:!0,onUpdate:function(e){C(e[0])}})]}),(0,N.jsxs)("div",{className:zo("content-wrapper"),children:[(0,N.jsx)(xo,{tableItems:X,isSomeAxesCollapsed:H,blocksQuantity:U.length,onExpandAll:function(){if(H){var e=new Set(O.filter((function(e){return e.isExpandable})).map((function(e){return e.id})));y(e)}else y(new Set)},onSidebarScroll:function(){B.current&&G(B.current.scrollTop)},onRulerUpdate:Q,sidebarRef:B,onExpandAxis:function(e){var t=new Set(m);t.has(e)?t.delete(e):t.add(e),y(t)}}),M&&D&&(0,N.jsxs)("div",{className:zo("container"),children:[(0,N.jsx)("div",{className:zo("ruler-wrapper"),children:(0,N.jsx)(Nn.Kf,{from:M,to:D,onUpdate:Q,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:M,maxRange:D},z)}),Boolean(V.length)&&(0,N.jsx)(Vi,{className:zo("timeline"),canvasScrollTop:K,scrollTopChanged:function(e){B.current&&(B.current.scrollTop=e.detail.scrollTop)},start:M,end:D,boundsChanged:function(e){Q({from:e.detail.start,to:e.detail.end})},axes:V,events:R,theme:a})]})]})]})};var Fo=(0,n(33882).A)(o.lazy((function(){return Promise.all([n.e(8096),n.e(1579),n.e(6762),n.e(8392)]).then(n.bind(n,83432))}))),Uo=n(66026),qo=(0,a.A)("plan");const Ho=o.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,a=(0,be.oy)(),s=o.useState(!1),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,be.gi)(),h=(0,u.d4)(Uo.st),v=o.useMemo((function(){return a?(0,Ft.vk)(a):void 0}),[a]);if(!v)return null;var p=v.nodes.length>250;return(0,N.jsx)("div",{className:qo(null,n),children:(0,N.jsxs)(Mt,{children:[(0,N.jsx)(we,{hide:"graph"!==f,className:qo("graph"),children:p&&!c?(0,N.jsx)(Vo,{showGraph:d,graph:v}):(0,N.jsx)(N.Fragment,{children:h?(0,N.jsx)(Fo,{processedGraph:v},"graph"===f?"visible":"hidden"):(0,N.jsx)(jn,{isActive:t&&"graph"===f,graph:v,showMinimap:!0,prepareNode:r})})}),(0,N.jsx)(we,{hide:"timeline"!==f,className:qo("table"),children:(0,N.jsx)($o,{graph:v,prepareNode:r})})]})})}));function Vo(e){var t=e.showGraph,n=e.graph,r=(0,be.wE)(),a=o.useState((function(){return new St.DataSet})),s=(0,i.A)(a,1)[0],u=kt(),l=o.useRef(r);l.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&(0,Ft.DW)(s,l.current),u()}),[s,n,u]),o.useEffect((function(){r&&((0,Ft.DW)(s,r),u())}),[s,r,u]);var c=n.nodes.length>700||n.edges.length>3e3;return(0,N.jsxs)("div",{className:qo("graph-info"),children:[c?(0,N.jsxs)(b.E,{children:["The plan of this operation is way too large to be visualized in browser.",(0,N.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,N.jsxs)(b.E,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,N.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,N.jsx)("br",{}),(0,N.jsx)(E.$,{className:qo("graph-info-button"),onClick:function(){t(!0)},children:c?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,N.jsx)(Vt,{nodes:s,orientation:"vertical",className:qo("legend")})]})}var Bo=n(39400),Wo=n(29746);var Yo=n(85593),Ko=function(e,t,n){var r="";return void 0===n?r="/operations/".concat(encodeURIComponent(t)):"filter"===n&&(r="/operations?type=all&state=all&filter=".concat(encodeURIComponent(t))),"/".concat(e.split(".")[0]).concat(r)},Go=function(e){var t=e.isActive,n=e.operationIdToCluster,r=(0,o.useCallback)((function(e){var t;if("in"===e.type||"out"===e.type){var r,i=function(e){var t=(0,Bo.A)(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,Bo.A)(/^(?:(\w+|\[[^\]]+])\.\s*)?\[(\/*)([^\]]+)](?::\[?([\w-]+)]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,Bo.A)(/^(['"])(\/\/)([^`]+)\1/,{quote:1,openingSlash:2,tablePath:3}).exec(e),n=null==t?void 0:t.groups;if(n){var r=n.cluster;r&&r.startsWith("`")&&(r=r.replace(/`/g,"")),r&&r.startsWith("[")&&(r=r.replace(/[[\]]/g,""));var i=function(e){try{return Wo.A.YPath.parseRelative(function(e){return e.startsWith("//")?e.slice(1):e.startsWith("/")||0===e.length?e:"/".concat(e)}(e))}catch(e){return[]}}(n.openingSlash+n.tablePath).filter((function(e){var t=e.name;return Boolean(t)}));if(0===i.length)return null;var o=i.map((function(e){return e.name})).join("/");return o.startsWith("//")||(o=o.startsWith("/")?"/"+o:"//"+o),{cluster:r,isPathAbsolute:Boolean(n.openingSlash),path:o,view:n.view}}return null}(null!==(r=e.title)&&void 0!==r?r:"");return i&&(e.url=(0,Yo.K)({cluster:i.cluster,path:i.path})),e}if(null!==(t=e.progress)&&void 0!==t&&t.remoteId){var o,a,s=null===(o=e.progress)||void 0===o?void 0:o.remoteId.split("/").pop();if(!s)return e.url=function(e){var t,n=null===(t=e.progress)||void 0===t?void 0:t.remoteId;if(n){var r=n.split("/"),i=r[0].split(".")[0];return Ko(i,r[1],r[2])||void 0}}(e),e;var u=n.has(s)?n.get(s):null===(a=e.progress)||void 0===a||null===(a=a.remoteData)||void 0===a?void 0:a.cluster_name;u&&(e.url=Ko(u,s))}return e}),[n]);return(0,N.jsx)(Ho,{isActive:t,prepareNode:r})},Qo=n(52978),Xo=n(75299);const Jo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 14.75a.75.75 0 0 1-.75-.75V3.81L4.53 6.53a.75.75 0 0 1-1.06-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06L8.75 3.81V14a.75.75 0 0 1-.75.75",clipRule:"evenodd"})}))},Zo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75",clipRule:"evenodd"})}))};var ea=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=0,o=[];Array.isArray(n.inner_errors)&&1===n.inner_errors.length;)n=(0,i.A)(n.inner_errors,1)[0],o.unshift(n),r+=1;return{issue:o[t],length:r-t}},ta=n(523),na=(0,a.A)("yt-error-cloud"),ra=function(e){var t=e.error,n=e.level,r=e.disableCloud,a=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,Xo.A)(e.initialExpanded),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useState)(0),v=(0,i.A)(h,2),p=v[0],m=v[1],y=(0,o.useCallback)((function(){m((function(e){return e+1}))}),[]),g=(0,o.useCallback)((function(){m(ea(t).length)}),[t]),x=ea(t,p);return!r&&x.length>1?(0,N.jsxs)("div",{children:[(0,N.jsxs)("div",{className:na("collapsed-messages"),children:[(0,N.jsx)(ta.L,{expanded:d,toggleExpanded:f}),(0,N.jsxs)(b.E,{color:"secondary",children:[x.length," intermediate messages"]}),(0,N.jsx)(Ue.S,{className:na("collapsed-messages-show-all"),onClick:g,children:"Show all"})]}),d&&(0,N.jsx)("div",{className:na("errors"),children:(0,N.jsx)(oa,{errors:[(0,q.A)({},x.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:a,onShowParent:y,fromCloud:!0})})]}):(0,N.jsx)(ca,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:a,onShowParent:s})},ia=function(e){return"Info"===e.attributes.severity},oa=function(e){var t=e.errors,n=e.level,r=e.expanded,i=e.onErrorClick,o=e.onShowParent,a=e.fromCloud,s=e.disableCloud;return(0,N.jsx)("div",{children:t.map((function(e,u){return(0,N.jsx)(ra,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!ia(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},aa=n(47378);const sa=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.835 2.244c.963-1.665 3.367-1.665 4.33 0l4.916 8.505c.964 1.666-.24 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.165-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})}))};var ua=n(3659),la=(0,a.A)("yt-error-tree-node"),ca=function(e){var t=e.error,n=e.expanded,r=void 0!==n&&n,a=e.level,s=void 0===a?0:a,u=e.fromCloud,l=void 0!==u&&u,c=e.disableCloud,d=void 0!==c&&c,f=e.onErrorClick,h=e.onShowParent,v=(0,Xo.A)(r),p=(0,i.A)(v,2),m=p[0],y=p[1],g=(0,Xo.A)(!1),x=(0,i.A)(g,2),A=x[0],w=x[1],b=t.inner_errors&&t.inner_errors.length>0,C=function(e){var t,n=null===(t=e.attributes)||void 0===t?void 0:t.start_position;return!!n&&"".concat(n.row,":").concat(n.column)}(t),j=ia(t),k=(0,o.useCallback)((function(){var e;null!==(e=t.attributes)&&void 0!==e&&e.start_position&&f(t.attributes.start_position)}),[t.attributes.start_position,f]);return(0,N.jsxs)("div",{className:la({leaf:!b,info:j}),children:[(0,N.jsxs)("div",{className:la("error-body"),children:[(0,N.jsxs)("div",{className:la("line"),children:[b&&(0,N.jsx)(ta.L,{expanded:m,toggleExpanded:y}),l&&(0,N.jsx)(E.$,{view:"flat-secondary",title:"Show parent",onClick:h,children:(0,N.jsx)(_.I,{data:Jo,size:16})}),(0,N.jsxs)("span",{className:la("header"),children:[(0,N.jsx)(_.I,{className:la("icon"),data:j?Zo:sa,size:16}),(0,N.jsx)("span",{className:la("title"),children:j?"Info":"Error"}),(0,N.jsxs)(E.$,{view:"flat-secondary",onClick:w,children:["Attributes"," ",(0,N.jsx)(_.I,{data:A?uo:so.A,size:16})]}),C&&(0,N.jsx)("span",{className:la("place-text"),title:"Position",children:C})]}),C?(0,N.jsx)(Ue.S,{className:la("message"),color:"primary",onClick:k,children:(0,N.jsx)(aa.H,{value:t.message})}):(0,N.jsx)("span",{className:la("message"),children:(0,N.jsx)(aa.H,{value:t.message})}),t.code?(0,N.jsxs)("span",{className:la("code"),children:["Code: ",t.code]}):null]}),A&&(0,N.jsx)(P.A,{value:t.attributes,settings:ua.A.prepareSettings({})})]}),b&&m&&(0,N.jsx)("div",{className:la("errors"),children:(0,N.jsx)(oa,{errors:t.inner_errors,level:s+1,expanded:m,disableCloud:d,onErrorClick:f})})]})},da=n(19904),fa=n(77720),ha=function(e){var t=e.rootError,n=(0,da.d)().getEditor,r=_t.Ay.getAIChat(),i=(0,o.useCallback)((function(e){var t=e.row,r=e.column,i=n("queryEditor");null==i||i.focus(),null==i||i.revealLine(t),null==i||i.setPosition(new fa.yX(t,r))}),[n]),a=(0,o.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,N.jsxs)("div",{children:[(0,N.jsxs)(Ce.s,{gap:2,alignItems:"center",children:[(0,N.jsxs)("div",{children:[(0,N.jsx)(b.E,{variant:"subheader-3",children:"Query error"})," ",(0,N.jsx)(M.A,{title:"Copy error",view:"flat-secondary",text:a,size:"l"})]}),r&&r.askAboutErrorButton]}),(0,N.jsx)(ca,{error:t,onErrorClick:i,expanded:!0})]}):null},va=n(87446),pa=n(11970),ma=n(81594),ya=function(e){if(!e)return 0;if(e.spyt_progress)return Math.round(100*e.spyt_progress);if(e.total_progress){var t=e.total_progress,n=t.read_bytes,r=t.total_bytes_to_read;return r>0?Math.round(n/(r/100)):0}return 0},ga=n(30996),xa=function(e){var t=e.query,n=[ga.d.SPYT,ga.d.CHYT].includes(t.engine),r=[ma.RE.RUNNING,ma.RE.COMPLETING].includes(t.state),i=(0,o.useMemo)((function(){if(!t.progress||!n||!r)return[];if((0,A.eZ)(t.progress)){var e=ya(t.progress);return[{tooltip:"".concat(e,"%"),percent:e}]}return t.progress.progress.map((function(e){var t=ya(e);return{tooltip:"".concat(e.query_id," - ").concat(t,"%"),percent:t}}))}),[r,n,t.progress]);return(0,N.jsx)(Ce.s,{direction:"column",gap:1,children:i.map((function(e){var t=e.tooltip,n=e.percent;return(0,N.jsx)(va.m,{content:t,children:(0,N.jsx)("div",{children:(0,N.jsx)(pa.k,{theme:"info",size:"xs",value:n})})},t)}))})},Aa=n(32751),wa=(0,a.A)("query-results"),ba=o.memo((function(e){var t=e.query,n=e.className,r=e.toolbar,i=e.minimized,a=void 0!==i&&i,s=(0,u.wA)(),l=(0,u.d4)(Aa.Qm),c=(0,u.d4)(Aa.Lc),d=(0,u.d4)(Aa.G6),f=o.useMemo((function(){var e;return function(e){var t=new Map;if(!e)return t;var n=function(e){for(var r in e)"_cluster_name"===r?t.set(e._id,e._cluster_name):"object"===(0,I.A)(e[r])&&null!==e[r]&&n(e[r])};return n(e),t}((0,A.eZ)(null==t?void 0:t.progress)?null==t||null===(e=t.progress)||void 0===e?void 0:e.yql_statistics:void 0)}),[null==t?void 0:t.progress]);if(!t)return null;var h=(0,A.eZ)(null==t?void 0:t.progress)?t.progress:{},v=null==d?void 0:d.resultIndex;return(0,N.jsxs)("div",{className:wa(null,n),children:[(0,N.jsxs)("div",{className:wa("meta"),children:[(0,N.jsx)(R,{className:wa("meta-info"),query:t}),(0,N.jsx)("div",{className:wa("toolbar"),children:r})]}),(0,N.jsx)(xa,{query:t}),(0,N.jsx)(we,{className:wa("result",{minimized:a}),hide:a,children:(0,N.jsxs)(be.rk,{plan:h.yql_plan,progress:null==h?void 0:h.yql_progress,defaultView:"graph",children:[(0,N.jsxs)("div",{className:wa("header"),children:[(0,N.jsx)(w.t,{className:wa("tabs"),items:l,activeTab:c,onSelectTab:function(e){s((0,Qo.TC)(!0)),s((0,Qo.YF)(e))}}),(null==c?void 0:c.includes("result"))&&Number.isInteger(v)&&(0,N.jsx)("div",{className:wa("tab_actions"),children:(0,N.jsx)(ve,{query:t,resultIndex:null!=v?v:0})}),"progress"===c&&(0,N.jsx)(Ee,{})]}),(0,N.jsxs)("div",{className:wa("content"),children:[(0,N.jsx)(we,{hide:!(null!=c&&c.includes("result")||Number.isInteger(v)),className:wa("result-wrap"),children:(0,N.jsx)(Et,{query:t,activeResultParams:d})}),(0,N.jsx)(we,{hide:!(null!=c&&c.includes("chart-tab")),className:wa("result-wrap"),children:(0,N.jsx)(Ct,{query:t,resultIndex:(0,pe.S)(c)||0})}),"error"===c&&(0,N.jsx)(ha,{rootError:t.error}),"meta"===c&&(0,N.jsx)(U,{query:t}),(0,N.jsx)(we,{hide:"statistic"!==c,children:(0,N.jsx)(ye,{})}),"progress"===c&&(0,N.jsx)(Go,{isActive:!0,operationIdToCluster:f})]})]})}),(0,N.jsx)("div",{})]})})),Ea=n(10720),_a=n(80999);const Ca=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9 9v2.665a.335.335 0 0 0 .55.257l4.72-3.934a.635.635 0 0 0 0-.976L9.55 3.078a.335.335 0 0 0-.55.257V6H7.5c-1.584 0-3.182.571-4.241 1.692-.9.951-1.549 2.446-1.31 4.723.65-1.026 1.365-1.837 2.201-2.413C5.198 9.279 6.323 9 7.5 9zm-3 1.731c-1.162.396-2.165 1.337-3.151 3.106-.223.4-.64.663-1.098.663-.552 0-1.04-.376-1.143-.917C-.598 7.237 3.678 4.5 7.499 4.5V3.335a1.835 1.835 0 0 1 3.01-1.41l4.722 3.935a2.135 2.135 0 0 1 0 3.28l-4.721 3.935a1.835 1.835 0 0 1-3.01-1.41V10.5c-.533 0-1.03.07-1.5.231",clipRule:"evenodd"})}))};var ja=(0,a.A)("query-share-button"),ka=new Ea.I,Sa=function(){var e=(0,u.wA)(),t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,Xo.A)(!1),c=(0,i.A)(s,2),d=c[0],h=c[1],v=(0,u.d4)(f.wJ),p=(0,u.d4)(l.Ry).includes(l.PH),m=(0,o.useCallback)((0,X.A)((0,Q.A)().mark((function t(){return(0,Q.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a(!0),t.next=4,e((0,T.sR)());case 4:return t.prev=4,a(!1),t.finish(4);case 7:case"end":return t.stop()}}),t,null,[[0,,4,7]])}))),[e]),y=(0,o.useCallback)((0,X.A)((0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.clipboard.writeText(window.location.href),p){e.next=4;break}return e.next=4,m();case 4:ka.add({name:"",autoHiding:5e3,theme:"success",title:"Query successful shared",content:"The link to your Query is published and copied to the clipboard",actions:[{label:"Unpublish",onClick:m}]});case 5:case"end":return e.stop()}}),e)}))),[m,p]);return v?(0,N.jsxs)("div",{className:ja(),children:[(0,N.jsxs)(E.$,{onClick:y,view:p?"flat-info":"flat",pin:p?"round-brick":void 0,selected:p,loading:r,children:[(0,N.jsx)(_.I,{data:Ca,width:16})," ",p?"Shared":"Share"]}),p&&(0,N.jsx)(_a.r,{renderSwitcher:function(e){return(0,N.jsx)(E.$,(0,q.A)((0,q.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,N.jsx)(_.I,{size:16,data:d?uo:so.A})}))},onSwitcherClick:h,items:[{action:m,text:"Unpublish query"}]})]}):null},Ta=n(20361),Na=n(27117),Oa=n(61422),Ra=function(e){var t=e.query_id,n=(0,u.wA)(),r=(0,u.d4)(f.EO),a=(0,y.t)(),s=a.selectACOOptions,l=a.changeCurrentQueryACO,c=a.currentQueryACO,d=(0,o.useState)(void 0),h=(0,i.A)(d,2),v=h[0],p=h[1],m=(0,Xo.A)(!1),g=(0,i.A)(m,2),x=g[0],A=g[1],w=function(){var e=(0,X.A)((0,Q.A)().mark((function e(r){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l({aco:r.aco,query_id:t});case 3:return e.next=5,n((0,Oa.et)());case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),p(e.t0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}();return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(E.$,{view:"flat",onClick:A,children:[(0,N.jsx)(_.I,{data:Na.A,size:16})," Edit ACO"]}),x&&(0,N.jsx)(Ta.yZ,{pristineSubmittable:!0,visible:x,modal:!0,headerProps:{title:"Edit query ACO"},footerProps:{textApply:"Update"},onClose:function(){p(void 0),A()},onAdd:function(e){return w(e.getState().values)},initialValues:{aco:c},fields:[{name:"aco",type:"select",extras:{options:s,placeholder:"ACO",width:"max",filterable:!0,multiple:r}}].concat((0,Oe.A)((0,Ta.Y)([v])))})]})},Ia=n(28099);const Pa=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12.5h8a1.5 1.5 0 0 0 1.5-1.5v-.5h-11v.5A1.5 1.5 0 0 0 4 12.5M2.5 9V5A1.5 1.5 0 0 1 4 3.5h8A1.5 1.5 0 0 1 13.5 5v4zM1 11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H4a3 3 0 0 0-3 3z",clipRule:"evenodd"})}))};var La=(0,a.A)("yt-qt-result-view"),Ma=(0,o.memo)((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,N.jsx)(ba,{query:t,className:La(),minimized:"minimized"===n,toolbar:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(Ce.s,{gap:2,className:La("results-toolbar-buttons"),children:[(0,N.jsx)(Sa,{}),(0,N.jsx)(Ra,{query_id:t.id})]}),"split"===n?(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("full")},children:(0,N.jsx)(_.I,{data:Ia.A,size:16})}):(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("split")},children:(0,N.jsx)(_.I,{data:Pa,size:16})}),"minimized"!==n&&(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("minimized")},children:(0,N.jsx)(_.I,{data:qt.A,size:16})})]})})}));const Da=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,N.jsx)("path",{fillRule:"evenodd",d:"M0 .994v10.013a.993.993 0 0 0 1.475.868l9.012-5.007a.993.993 0 0 0 0-1.735L1.475.125A.993.993 0 0 0 0 .994",clipRule:"evenodd"})}))};function za(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==l.PH}))}var $a=function(){var e=(0,u.d4)(f.EO),t=(0,y.t)(),n=t.selectACOOptions,r=t.isFlight,i=t.changeDraftQueryACO,a=t.currentDraftQueryACO,s=(0,o.useCallback)((function(e){return i({aco:e})}),[i]);return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(dt.l,{filterable:!0,disabled:r,width:"auto",label:"Access:",className:"query-aco-select",options:za(n),value:za(a),onUpdate:s,multiple:e})})},Fa=n(94383),Ua=n(76866),qa=n(80016),Ha=n(73689),Va=function(e){switch(e){case ga.d.CHYT:return Ha.m.CHYT;case ga.d.SPYT:return Ha.m.SPYT;case ga.d.YT_QL:return Ha.m.YTQL;default:return Ha.m.YQL}},Ba=n(57436),Wa=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.editor=void 0,this.collection=void 0,this.editor=t,this.collection=this.editor.createDecorationsCollection([])}),[{key:"clearDecorations",value:function(){this.collection.clear()}}])}(),Ya=function(e){function t(e,n,r){var i;return(0,J.A)(this,t),(i=(0,ee.A)(this,t,[e])).links=void 0,i.engine=void 0,i.commandKey=void 0,i.engine=n,i.commandKey=r,i.links=[],i}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setEngine",value:function(e){this.engine=e}},{key:"updateLinks",value:function(){var e=this,t=this.editor.getModel();if(t){var n=t.getLineCount();if(n){for(var r=[],i=[],o=function(n){var o=t.getLineContent(n);(0,Ba.R)(o,e.engine).forEach((function(t){var o=t.path,a=t.position,s=t.cluster;o&&a&&(r.push({path:o,line:n,position:a,cluster:s}),i.push({range:new fa.Q6(n,a.start,n,a.end),options:{hoverMessage:{value:"Follow link (".concat(e.commandKey," + click)")}}}))}))},a=1;a<=n;a++)o(a);rt()(r,this.links)||(this.clearDecorations(),this.collection.set(i),this.links=r)}}}},{key:"findLink",value:function(e){var t=e.lineNumber,n=e.column;if(this.editor.getModel())return this.links.find((function(e){var r=e.position,i=r.start,o=r.end,a=e.line;return t===a&&n>=i&&n<=o}))}}])}(Wa),Ka=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setActiveLine",value:function(e){if(e){var t=this.editor.getModel();t&&(this.clearDecorations(),this.collection.set([{range:new fa.Q6(e,1,e,t.getLineLength(e)+1),options:{isWholeLine:!0,className:"yt-monaco-editor__highlighted-line"}}]),this.editor.setSelection(new fa.LN(0,0,0,0)))}else this.clearLines()}},{key:"clearLines",value:function(){this.editor.setSelection(new fa.LN(0,0,0,0)),this.clearDecorations()}}])}(Wa),Ga=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setErrors",value:function(e,t){var n=this.editor.getModel();if(n){var r=[],i=[],o=new Set;e.forEach((function(e){var n=e.attributes,a=e.message,s=new fa.Q6(n.start_position.row,n.start_position.column,n.end_position.row,n.end_position.column),u=s.startLineNumber,l=s.startColumn,c=s.endLineNumber,d=s.endColumn,f={message:a,severity:fa.cj.Error,startLineNumber:u,startColumn:l,endLineNumber:c,endColumn:d};r.push(f),o.has(s.startLineNumber)||(i.push({range:s,options:{isWholeLine:!0,className:t}}),o.add(s.startLineNumber))})),this.clearDecorations(),this.collection.set(i),fa.EN.setModelMarkers(n,"query-tracker",r)}}}])}(Wa),Qa=n(256),Xa=(0,a.A)("yq-query-editor-monaco"),Ja=function(e){var t=e.pathNavigation,n=void 0===t||t,r=(0,o.useState)(!1),a=(0,i.A)(r,2),s=a[0],c=a[1],d=(0,o.useRef)(),f=(0,da.d)().setEditor,h=(0,u.d4)(l.Ux),v=(0,u.d4)(l.AC),p=(0,u.d4)(l.Q4),m=(0,u.d4)(l.ln),y=(0,u.d4)(l.Fn),g=(0,u.d4)(l.hS),x=(0,u.wA)(),A=(0,o.useRef)({isInitialized:!1,linkDecorator:null,lineDecorator:null,errorDecorator:null});!function(e){var t=(0,u.d4)(Fa.RR);(0,o.useEffect)((function(){var e;null===(e=_t.Ay.getInlineSuggestionsApi())||void 0===e||e.sendTelemetry(t?"enabled":"disabled")}),[t]);var n=(0,o.useCallback)((function(n){var r;"Escape"===n.key&&e&&t&&(null===(r=_t.Ay.getInlineSuggestionsApi())||void 0===r||r.sendTelemetry("discarded"))}),[e]);(0,o.useEffect)((function(){fa.EN.registerCommand("accessQuerySuggestionsTelemetry",(0,X.A)((0,Q.A)().mark((function e(){var t;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=_t.Ay.getInlineSuggestionsApi())||void 0===t||t.sendTelemetry("accepted");case 1:case"end":return e.stop()}}),e)}))))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",n,!0),function(){document.removeEventListener("keydown",n,!0)}}),[n,e])}(d.current),(0,o.useEffect)((function(){var e,t;null===(e=d.current)||void 0===e||e.focus(),null===(t=d.current)||void 0===t||t.setScrollTop(0)}),[h]),(0,o.useEffect)((function(){d.current&&(f("queryEditor",d.current),A.current.isInitialized||(A.current={isInitialized:!0,linkDecorator:n?new Ya(d.current,m,Qn()?"meta":"ctrl"):null,lineDecorator:new Ka(d.current),errorDecorator:new Ga(d.current)}))}),[f]),(0,o.useEffect)((function(){var e;null===(e=A.current.linkDecorator)||void 0===e||e.updateLinks()}),[v,p]),(0,o.useEffect)((function(){var e;null===(e=A.current.linkDecorator)||void 0===e||e.setEngine(m)}),[m]),(0,o.useEffect)((function(){var e;null===(e=A.current.errorDecorator)||void 0===e||e.setErrors(y,Xa("error-line"));var t,n,r=function(){var e=window.location.hash;if(!e.startsWith("#L"))return null;var t=parseInt(e.replace(/[^0-9]/g,""),10);return isNaN(t)?null:t}();g||!r||s||(null===(t=A.current.lineDecorator)||void 0===t||t.setActiveLine(r),null===(n=d.current)||void 0===n||n.revealLineInCenter(r))}),[s,y,g]);var w=(0,o.useMemo)((function(){return function(e){return{fontSize:14,language:e,renderWhitespace:"boundary",minimap:{enabled:!0},inlineSuggest:{enabled:!0,showToolbar:"always",mode:"subword",keepOnBlur:!0}}}(m)}),[m]),b=(0,o.useCallback)((function(e){var t=e.element.dataset.number;if(t){var n;null===(n=A.current.lineDecorator)||void 0===n||n.setActiveLine(parseInt(t,10));var r=new URL(window.location.href);r.hash="#L".concat(t),window.history.pushState(null,"",r.toString())}else{var i;null===(i=A.current.lineDecorator)||void 0===i||i.clearLines()}}),[]),E=(0,o.useCallback)((function(e){var t,n=null===(t=A.current.linkDecorator)||void 0===t?void 0:t.findLink(e);n&&x((0,Qa.in)(n.path,n.cluster))}),[x]),_=(0,o.useCallback)((function(e){var t=e.target,n=e.event;t.type===fa.EN.MouseTargetType.GUTTER_LINE_NUMBERS&&b(t),t.type===fa.EN.MouseTargetType.CONTENT_TEXT&&Xn(n)&&E(t.position)}),[b,E]),C=(0,o.useCallback)((function(e){c(!0),x((0,T.Bn)({query:e,error:void 0}))}),[x]);return(0,N.jsx)(qa.w,{children:(0,N.jsx)(Ua.A,{editorRef:d,value:v||"",language:Va(m),className:Xa(),onChange:C,onClick:_,monacoConfig:w})})},Za=(0,a.A)("yt-qt-query-editor-view"),es=(0,o.memo)((function(e){var t=e.onStartQuery,n=e.pathNavigation,r=(0,o.useRef)(),i=(0,da.d)().setEditor,a=(0,u.d4)(l.Ux),s=(0,u.d4)(l.ln),c=(0,u.d4)(f.d),d=(0,u.wA)(),h=(0,o.useCallback)((function(){d((0,T.GB)(t))}),[d,t]);(0,o.useEffect)((function(){var e,t;null===(e=r.current)||void 0===e||e.focus(),null===(t=r.current)||void 0===t||t.setScrollTop(0)}),[a]),(0,o.useEffect)((function(){r.current&&i("queryEditor",r.current)}),[i]),(0,o.useEffect)((function(){var e=function(e){var t=e.ctrlKey||e.metaKey,n="Enter"===e.key||"e"===e.key,r="F8"===e.key;(t&&n||r)&&(e.preventDefault(),e.stopPropagation(),h())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}),[h]);var v=(0,o.useCallback)((function(){d((0,T.GB)(t,{execution_mode:"validate"}))}),[d,t]),p=(0,o.useCallback)((function(){d((0,T.GB)(t,{execution_mode:"optimize"}))}),[d,t]);return(0,N.jsxs)("div",{className:Za(),children:[(0,N.jsx)(Ja,{pathNavigation:n}),(0,N.jsx)("div",{className:Za("actions"),children:(0,N.jsxs)("div",{className:"query-run-action",children:[(0,N.jsxs)(E.$,{qa:"qt-run",view:"action",onClick:h,children:[(0,N.jsx)(_.I,{data:Da}),"Run"]}),s===ga.d.YQL?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(E.$,{qa:"qt-validate",onClick:v,children:"Validate"}),(0,N.jsx)(E.$,{qa:"qt-explain",onClick:p,children:"Explain"})]}):null,c&&(0,N.jsx)($a,{})]})})]})})),ts=(0,a.A)("query-container"),ns=function(e){var t=e.onStartQuery,n=e.showStatusInTitle,a=e.pathNavigation,A=(0,u.wA)(),w=function(){var e=(0,u.d4)(l.st),t=(0,u.d4)(f.B8),n=(0,o.useContext)(d.o),r=(0,u.wA)(),a=(0,o.useMemo)((function(){return function(e){var n=(0,i.A)(e,1)[0];r({type:p.JJ,data:(0,v.n)(n,t)}),r((0,m.y)())}}),[r,t]);return(0,o.useEffect)((function(){if(n&&e&&(0,h.KO)(e))return n.watch([e],a)}),[n,e,a]),e}(),b=(0,y.t)().isQueryTrackerInfoLoading,E=(0,o.useState)("minimized"),_=(0,i.A)(E,2),C=_[0],j=_[1],k=(0,o.useState)([50,50]),S=(0,i.A)(k,2),T=S[0],O=S[1];(0,o.useEffect)((function(){var e,t;if(w&&n){var r=w.start_time?g.A.format.DateTime(w.start_time,{format:"short"}):"",i=(null===(e=w.annotations)||void 0===e?void 0:e.title)||"",o=(null===(t=w.state)||void 0===t?void 0:t.toUpperCase())||"";(r||i||o)&&A((0,x.ar)({path:"".concat(i," ").concat(o," ").concat(r," @ ").concat(w.engine)}))}}),[A,w,n]),(0,o.useEffect)((function(){j("split")}),[null==w?void 0:w.id]);var R=(0,u.d4)(l.Kv),I=(0,u.d4)(l.hS),P=b||I;return(0,N.jsxs)(N.Fragment,{children:[P&&(0,N.jsx)("div",{className:ts("loading"),children:(0,N.jsx)(s.a,{})}),(0,N.jsxs)(c.A,{className:ts((0,r.A)({},C,!0)),direction:c.A.VERTICAL,onResizeEnd:O,getInitialSizes:function(){return T},children:["full"!==C&&(0,N.jsx)(es,{onStartQuery:t,pathNavigation:a}),(null==w?void 0:w.id)&&R&&(0,N.jsx)(Ma,{query:w,setResultViewMode:j,resultViewMode:C})]})]})}},82662:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.488 3.43a.75.75 0 0 1 .081 1.058l-6 7a.75.75 0 0 1-1.1.042l-3.5-3.5A.75.75 0 0 1 4.03 6.97l2.928 2.927 5.473-6.385a.75.75 0 0 1 1.057-.081",clipRule:"evenodd"})}))}},82785:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});var r=(0,n(77810).createContext)(new Map)},88150:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.77 10.73.01-.01 3.08-3.08a3.889 3.889 0 1 0-5.5-5.5L4.73 4.77l-.01.01-1.667 1.666a5.303 5.303 0 0 0 7.5 7.5l3.167-3.166a.75.75 0 1 0-1.061-1.06l-3.166 3.166a3.803 3.803 0 1 1-5.379-5.379L5.33 6.291l.011-.01L8.421 3.2a2.39 2.39 0 0 1 3.38 3.378l-1.13 1.13-.012.012-2.995 2.994a.975.975 0 1 1-1.378-1.378L9.28 6.34a.75.75 0 0 0-1.06-1.06L5.225 8.274a2.475 2.475 0 0 0 3.5 3.5z",clipRule:"evenodd"})}))}},92603:(e,t,n)=>{"use strict";n.d(t,{Bf:()=>m,IQ:()=>y,gi:()=>p,oy:()=>h,rk:()=>f,wE:()=>v});var r=n(9736),i=n(77810),o=n(64922),a=i.createContext(void 0),s=i.createContext(void 0),u=i.createContext(void 0),l=i.createContext(void 0),c=i.createContext(void 0),d=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function f(e){var t=e.plan,n=e.progress,f=e.children,h=e.defaultView,v=i.useMemo((function(){return d}),[!1]),p=v[0].value,m=i.useState(null!=h?h:p),y=(0,r.A)(m,2),g=y[0],x=y[1],A=g;return v.find((function(e){return e.value===A}))||(A=p),(0,o.jsx)(a.Provider,{value:null!=t?t:null,children:(0,o.jsx)(u.Provider,{value:v,children:(0,o.jsx)(s.Provider,{value:A,children:(0,o.jsx)(l.Provider,{value:x,children:(0,o.jsx)(c.Provider,{value:null!=n?n:null,children:f})})})})})}function h(){var e=i.useContext(a);if(void 0===e)throw new Error("useResultPlan must be used within a PlanProvider");return e}function v(){var e=i.useContext(c);if(void 0===e)throw new Error("useResultProgress must be used within a PlanProvider");return e}function p(){var e=i.useContext(s);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function m(){var e=i.useContext(u);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function y(){var e=i.useContext(l);if(void 0===e)throw new Error("useSetPlanView must be used within a PlanProvider");return e}},95910:(e,t,n)=>{"use strict";n.d(t,{f:()=>r.f});var r=n(5166)},97583:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var r=function(e){return!!e&&["table","tablet_cell","replicated_table"].includes(e)}}}]);
3
- //# sourceMappingURL=9361.4389c6e7.chunk.js.map
1
+ /*! For license information please see 9361.632ac658.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[9361],{256:(e,t,n)=>{"use strict";n.d(t,{u_:()=>Z,RU:()=>J,dt:()=>K,ID:()=>G,p3:()=>ee,in:()=>te,vl:()=>X,sS:()=>Y});var r=n(53775),i=n(18801),o=n(28407),a=n(40319),s=n(55984),u=n(47001),l=n(48971),c=n(29746),d=n(97019),f=n(27859),h=n(44639),v=n(10720),p=n(68175),m=n(3659),y=n(2796),g=n(66030),x=n(58860),A=n(52797),w=n(88187),b=["columns"];function E(e){return _.apply(this,arguments)}function _(){return(_=(0,o.A)((0,r.A)().mark((function e(t){var n,o,s,u,c,d,h,v,E,_,C,j,k,S,T,N,O,R,I;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,o=t.path,s=t.login,u=t.schema,c=t.keyColumns,d=t.limit,h=t.output_format,v=u.map((function(e){return e.name})),e.next=4,(0,l.fI)(f.Qq.checkPermission(f.Vu.dynTableCheckPerm,{setup:{proxy:(0,A.v9)(n),JSONSerializer:x.b},parameters:{columns:v,permission:"read",user:s,path:o}}),{skipSuccessToast:!0,toasterName:"query_navigation_node_permissions",errorTitle:"Navigation node get attributes failure"});case 4:if(E=e.sent,Array.isArray(E.columns)){e.next=7;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table columns is not array")));case 7:if(_=E.columns.reduce((function(e,t,n){return"allow"===t.action?e.availableColumns.push(v[n]):(e.omittedColumns.push(v[n]),c.includes(v[n])&&e.deniedKeyColumns.push((0,p.A)({},v[n],t.action))),e}),{availableColumns:[],omittedColumns:[],deniedKeyColumns:[]}),C=_.availableColumns,j=_.omittedColumns,0===_.deniedKeyColumns.length){e.next=10;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table has denied key columns")));case 10:return k=C.map(m.A.decode),S={query:y.A.prepareQuery({aColumns:k,path:o,keyColumns:c,offset:0,limit:d}),output_format:h,dump_error_into_response:!0},T={proxy:(0,A.v9)(n),JSONSerializer:x.b},e.next=15,(0,l.fI)((0,w.S)({setup:T,parameters:S}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 15:return N=e.sent,O=N.columns,R=(0,i.A)(N,b),I=u.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,g._)(O,j,I)},R));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var C=n(96500),j=["columns","omittedColumns"];function k(e){return S.apply(this,arguments)}function S(){return(S=(0,o.A)((0,r.A)().mark((function e(t){var n,o,s,u,c,d,f,h,v,p,m,y;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.path,o=t.clusterConfig,s=t.schema,u=t.limit,c=t.output_format,d={proxy:(0,A.v9)(o),JSONSerializer:x.b},f={path:n+"[#0:#"+u+"]",output_format:c,table_reader:{workload_descriptor:{category:"user_interactive"}}},e.next=5,(0,l.fI)((0,C.B)({setup:d,parameters:f}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 5:return h=e.sent,v=h.columns,p=h.omittedColumns,m=(0,i.A)(h,j),y=s.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,g._)(v,p,y)},m));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var T=n(13724),N=n(21594),O=n(19314),R=n(97583),I=n(27723),P=n(73800),L=n(30996),M=n(52142),D=n(29970),z=n(6640),$=n(79329),F=n(54744),U=n(22290),q=n(9178),H=n(59028),V=n(87410),B=["target_path"],W=new v.I,Y=function(e){return function(t,n){var r=n(),i=(0,u.rS)(r),o=(0,u.mk)(r);if(i){var l=(0,N.HL)(i,O.dK.LOCAL);t((0,T.Mb)(e,l));var c=o.map((function(t){return t.path===e?(0,a.A)((0,a.A)({},t),{},{isFavorite:!t.isFavorite}):t}));t((0,s.CU)(c))}}},K=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,o){var d,h,v,p,m;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d=o(),h=(0,u.$D)(d),v=(0,u.WS)(d),h){t.next=5;break}return t.abrupt("return");case 5:return n((0,s.r1)(!0)),t.next=8,(0,l.fI)(f.Qq.list(f.Vu.navigationListNodes,{setup:{proxy:(0,A.v9)(h),JSONSerializer:x.b},parameters:{path:e,attributes:["type","broken","dynamic","sorted","target_path"]}}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node open failure"}).finally((function(){n((0,s.r1)(!1))}));case 8:p=t.sent,m=p.map((function(t){var n=c.A.getValue(t),r=e+"/"+n,o=c.A.getAttributes(t),s=o.target_path,u=(0,i.A)(o,B);return(0,a.A)((0,a.A)({name:n},u),{},{path:r,targetPath:s,isFavorite:v.includes(r)})})).sort((function(e,t){return e.name.localeCompare(t.name)})),n((0,s.R6)("")),n((0,s.SO)(e)),n((0,s.VR)(s.Dh.Tree)),n((0,s.CU)(m));case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},G=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,i){var o,a,l,f,v,p,m,y,g,x,w,b,_,C,j,S,T;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i(),a=(0,u.$D)(o),l=(0,U.GN)(),f=l.cellSize,v=l.pageSize,p=(0,$.fN)(o),m=(0,F.t5)(o),y=(0,A.ID)(o),a){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,P.M)(e,a);case 10:return g=t.sent,x=c.A.getValue(g.schema),w=(0,z.m3)(x.map((function(e){return e.name})),f,y,p,m),b=g.dynamic?E:k,t.prev=14,t.next=17,b({login:o.global.login,path:e,clusterConfig:a,schema:x,keyColumns:g.key_columns,limit:v,output_format:w});case 17:_=t.sent,C=_.columns,j=_.rows,S=_.yqlTypes,T={name:g.key,meta:(0,d.UQ)({cluster:a.id,attributes:g,tableType:(0,h.H)(g.dynamic,g),isDynamic:g.dynamic}),rows:j,schema:x,columns:C,yqlTypes:S},n((0,s.SO)(e)),n((0,s.tQ)(T)),n((0,s.VR)(s.Dh.Table)),t.next=30;break;case 27:t.prev=27,t.t0=t.catch(14),W.add({theme:"danger",autoHiding:!1,name:"Load table data error",title:t.t0?t.t0.message:"Can't load table data"});case 30:case"end":return t.stop()}}),t,null,[[14,27]])})));return function(e,n){return t.apply(this,arguments)}}()},Q=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i){var o;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i((0,s.l5)(t.id)),i((0,s.SO)(e)),n.next=5,f.Qq.get(f.Vu.navigationGetType,{setup:{proxy:(0,A.v9)(t),JSONSerializer:x.b},parameters:{path:"".concat(e,"/@type")}});case 5:if(o=n.sent,!(0,R.h)(o)){n.next=11;break}return n.next=9,i(G(e));case 9:n.next=17;break;case 11:if(!(0,I.R)(o)){n.next=16;break}return n.next=14,i(K(e));case 14:n.next=17;break;case 16:throw new Error("Сan't open this type of node");case 17:n.next=23;break;case 19:n.prev=19,n.t0=n.catch(0),i((0,s.Nh)(n.t0)),i((0,s.VR)(s.Dh.Error));case 23:case"end":return n.stop()}}),n,null,[[0,19]])})));return function(e){return n.apply(this,arguments)}}()},X=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n){return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n((0,s.l5)(e)),n((0,s.SO)("/")),t.next=4,n(K("/"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},J=function(){return function(){var e=(0,o.A)((0,r.A)().mark((function e(t,n){var i,o,a;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n(),o=(0,u.$D)(i),a=(0,u.I7)(i),o){e.next=5;break}return e.abrupt("return");case 5:a&&t((0,s.VR)(s.Dh.Loading)),t(Q(a,o));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},Z=function(e){return function(){var t=(0,o.A)((0,r.A)().mark((function t(n,i){var o;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i(),(0,u.rS)(o)){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.clipboard.writeText(e);case 7:W.add({theme:"success",name:"copy_navigation_path",title:"Path copied"}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),W.add({theme:"danger",name:"copy_navigation_path",title:"Can't copy path",content:t.t0.message,autoHiding:!1});case 13:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,n){return t.apply(this,arguments)}}()},ee=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i,o){var a;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(0,u.$D)(o())){n.next=3;break}return n.abrupt("return");case 3:t===L.d.CHYT&&i((0,M.TI)(t,a.id)),i((0,M.kR)(a.id,e,t));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()},te=function(e,t){return function(){var n=(0,o.A)((0,r.A)().mark((function n(i,o){var a,l,c,d,f,h,v;return(0,r.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=o(),l=(0,D.sh)(a),c=l.settings,d=(0,u.oz)(a),f=t||(null==c?void 0:c.cluster)){n.next=6;break}return n.abrupt("return");case 6:if(h=d[f]){n.next=9;break}return n.abrupt("return");case 9:return v=e.replace(/\/+$/,""),n.next=12,i((0,H.rw)("global::queryTracker::queriesListSidebarVisibilityMode",!0));case 12:i((0,V.MP)(q.e8.Navigation)),i((0,s.VR)(s.Dh.Loading)),i(Q(v,h));case 15:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},1701:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879zM8.75 6.75a.75.75 0 0 0-1.5 0v1.5h-1.5a.75.75 0 0 0 0 1.5h1.5v1.5a.75.75 0 0 0 1.5 0v-1.5h1.5a.75.75 0 0 0 0-1.5h-1.5z",clipRule:"evenodd"})}))}},3035:(e,t,n)=>{"use strict";n.d(t,{t:()=>d});var r=n(9736),i=n(77810),o=n(15647),a=n(51194),s=n(29970),u=n(57018),l=n(61525),c=n(52142),d=function(){var e=(0,a._)(),t=(0,o.d4)(s.Ry),n=(0,o.d4)(s.q9),d=(0,o.d4)(u.kz),f=(0,o.d4)(u.rE),h=(0,o.d4)(u.HP),v=(0,i.useState)(!1),p=(0,r.A)(v,2),m=p[0],y=p[1],g=(0,i.useCallback)((function(t){var n=t.aco,r=t.query_id;if(!r)throw new Error("query_id is empty");return y(!0),e((0,c.s_)({aco:n,query_id:r})).finally((function(){return y(!1)}))}),[e]);return{selectACOOptions:d,currentQueryACO:t,changeDraftQueryACO:(0,i.useCallback)((function(t){var n=t.aco;return y(!0),e((0,c.Tk)({aco:n})).finally((function(){return y(!1)}))}),[e]),changeCurrentQueryACO:g,currentDraftQueryACO:n,trackerInfo:h,loadQueryTrackerInfo:function(){e((0,l.N)())},isFlight:m||f,isQueryTrackerInfoLoading:f}}},4123:(e,t,n)=>{"use strict";n.d(t,{_:()=>c}),n(77810);var r=n(76872),i=n(89648),o=n(73748),a=n(3082),s=n(64922),u=(0,r.A)("query-cluster-item"),l=(0,r.A)("query-cluster-icon"),c=function(e){var t=e.id,n=e.name,r=e.environment,c=e.className,d=(0,a.O)(t);return(0,s.jsxs)("div",{className:u(null,c),"data-qa":"query-cluster-item",children:[(0,s.jsx)(o.A,{name:n,className:l(null,d)}),(0,s.jsxs)("div",{className:u("info"),children:[(0,s.jsx)("span",{"data-qa":"query-cluster-item-name",children:n}),(0,s.jsx)(i.E,{color:"secondary",className:u("environment"),children:r})]})]})}},5166:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,f:()=>p});var r=n(9736),i=n(77810),o=n(15647),a=n(6542),s=n(32235),u=n(11960),l=n(29970),c=n(1701),d=n(19314),f=n(52797),h=n(64922),v=function(e){return(0,h.jsx)(u.A,{title:"New query",content:"All the changes will be lost. Are you sure you want to reset query?",onCancel:e.cancel,onConfirm:e.confirm,onOutsideClick:e.cancel,visible:e.visible})},p=function(e){var t=e.onClick,n=e.hideText,u=(0,o.d4)(l.Py),p=(0,i.useState)(!1),m=(0,r.A)(p,2),y=m[0],g=m[1],x=(0,o.d4)(f.dB);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsxs)(a.$,{qa:"new-query-btn",view:"action",size:"l",title:"New query",href:"/".concat(x,"/").concat(d.YW.QUERIES),onClick:function(e){e.preventDefault(),u?g(!0):t()},children:[(0,h.jsx)(s.I,{data:c.A,size:16}),!n&&"New"]}),(0,h.jsx)(v,{confirm:function(){t(),g(!1)},cancel:function(){g(!1)},visible:y})]})}},12094:(e,t,n)=>{"use strict";n.d(t,{y:()=>A});var r=n(77810),i=n(30996),o=n(76872),a=n(70243),s=n(46747),u=n(89648),l=n(64922),c=(0,o.A)("query-clique-item"),d=function(e){var t=e.alias,n=e.id,r=e.active,i=e.showStatus,o=!r&&i;return(0,l.jsxs)(a.s,{direction:"column",gap:1,className:c(),children:[(0,l.jsxs)(a.s,{alignItems:"center",gap:2,children:[(0,l.jsx)("div",{children:t}),o&&(0,l.jsx)(s.J,{theme:"danger",children:"inactive"})]}),(0,l.jsx)(u.E,{color:"secondary",children:n})]})},f=n(73004),h=n(30627),v=function(e){var t=e.cliqueList,n=e.value,i=e.placeholder,o=void 0===i?"Clique alias":i,s=e.loading,u=e.showStatus,c=e.onChange,v=(0,r.useMemo)((function(){var e=t.map((function(e){var t=e.alias,n=e.yt_operation_id,r=e.state,i=e.health;return{alias:t,id:n,active:"active"===r&&"good"===i}}));return u?e.sort((function(e,t){return Number(t.active)-Number(e.active)})):e}),[t,u]);return(0,l.jsx)(f.y,{size:"l",placeholder:o,filterPlaceholder:"Search",hasClear:!0,items:v,value:n,loading:s,onChange:c,getOptionHeight:function(){return 58},disabled:s&&!v.length,renderEmptyOptions:function(){return(0,l.jsx)(a.s,{justifyContent:"center",children:"No access clique"})},popupWidth:285,children:function(e){return e.map((function(e){var t=e.alias,n=e.active,r=e.id;return(0,l.jsx)(h.l.Option,{value:t,children:(0,l.jsx)(d,{alias:t,id:r,active:n,showStatus:u})},t)}))}})},p=n(15647),m=n(29970),y=n(52142),g=n(57018),x=(0,o.A)("yt-query-selector-by-engine"),A=function(){var e=(0,p.wA)(),t=(0,p.d4)(m.K7),n=(0,p.d4)(m.ox),o=(0,p.d4)(m.sh),a=o.settings,s=void 0===a?{}:a,u=o.engine,c=(0,p.d4)(g.m6),d=(0,p.d4)(g.Qo),f=null==s?void 0:s.cluster,A=(0,r.useMemo)((function(){return c.map((function(e){return{value:e,content:e}}))}),[c]);(0,r.useEffect)((function(){u!==i.d.CHYT&&u!==i.d.SPYT||!f||e((0,y.TI)(u,f))}),[u,f,e]);var w=s.cluster&&s.cluster in t?t[s.cluster]:{},b=u in w?w[u]:[];if(u===i.d.YQL&&c.length){var E=(null==s?void 0:s.yql_version)||d;return(0,l.jsx)(h.l,{className:x("version"),size:"l",options:A,value:E?[E]:void 0,onUpdate:function(t){e((0,y.Fz)(t[0]))}})}if(u===i.d.CHYT||u===i.d.SPYT){var _=u===i.d.CHYT;return(0,l.jsx)(v,{loading:n,cliqueList:b,value:_?s.clique:s.discovery_group,onChange:_?function(t){e((0,y.EO)(t))}:function(t){e((0,y.i5)(t))},showStatus:_,placeholder:_?void 0:"Discovery path"})}return null}},14855:(e,t,n)=>{"use strict";n.d(t,{s:()=>v});var r=n(77810),i=n(15647),o=n(30627),a=n(57018),s=n(73004),u=n(4123),l=n(33547),c=n(29970),d=n(45033),f=n(52142),h=n(64922),v=function(e){var t=e.className,n=(0,i.wA)(),v=(0,i.d4)(a.EP),p=(0,i.d4)(c.HF),m=(0,i.d4)(d.Dy),y=(0,i.d4)(c.sh).settings,g=(0,l._)(),x=r.useMemo((function(){if(null==v||!v.length)return m;var e;if(l.YT.isLocalCluster)return null!==(e=null==v?void 0:v.map((function(e){return{id:e,name:e,environment:"localmode"}})))&&void 0!==e?e:[];var t=new Set(v);return m.filter((function(e){return t.has(e.id)}))}),[m,v,l.YT.isLocalCluster]);return g?(0,h.jsx)(s.y,{size:"l",className:t,disabled:p,placeholder:"Cluster",filterPlaceholder:"Search",items:x,onChange:function(e){n((0,f.jF)(e))},value:null==y?void 0:y.cluster,getOptionHeight:function(){return 52},qa:"query-cluster-selector",popupWidth:200,renderSelectedOption:function(e){var t=e.children.props.name;return(0,h.jsx)(h.Fragment,{children:t})},children:function(e){return e.map((function(e){var t=e.id,n=e.name,r=e.environment;return(0,h.jsx)(o.l.Option,{value:t,children:(0,h.jsx)(u._,{id:t,name:n,environment:r})},t)}))}}):null}},16538:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"})}))}},19904:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(77810),i=n(82785),o=function(){var e=(0,r.useContext)(i.P);return{setEditor:function(t,n){e.set(t,n)},getEditor:function(t){return e.get(t)}}}},23069:(e,t,n)=>{"use strict";n.d(t,{g:()=>N});var r=n(40319),i=n(9736),o=n(6542),a=n(32235),s=n(89648),u=n(76872),l=n(77810),c=n(60111),d=n(64922);const f=function(e){return(0,d.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,d.jsxs)("g",{fillRule:"evenodd",clipRule:"evenodd",children:[(0,d.jsx)("path",{fill:"currentColor",d:"M7.199 2A.2.2 0 0 0 7 2.199c0 1.808-1.958 2.939-3.524 2.034a.2.2 0 0 0-.272.073l-.8 1.388a.2.2 0 0 0 .072.271c1.566.905 1.566 3.165 0 4.07a.2.2 0 0 0-.073.271l.801 1.388a.2.2 0 0 0 .272.073C5.042 10.862 7 11.993 7 13.8c0 .11.089.199.199.199H8.8c.11 0 .199-.089.199-.199 0-1.808 1.958-2.939 3.524-2.034a.2.2 0 0 0 .271-.073l.802-1.388a.2.2 0 0 0-.073-.271c-1.303-.753-1.516-2.434-.665-3.5a.75.75 0 0 1 1.172.936.852.852 0 0 0 .243 1.265 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .938-.76 1.699-1.699 1.699H7.2c-.938 0-1.699-.76-1.699-1.699a.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.472 1.7 1.7 0 0 1-.622-2.32l.801-1.388a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2c0-.94.76-1.7 1.699-1.7H9.3a.75.75 0 1 1 0 1.5zm.8 7.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6"}),(0,d.jsx)("path",{fill:"#F33",d:"M12.5 5.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4"})]})}))};var h=n(87446),v=n(27117),p=n(79988),m=n(24893),y=n(30469),g=n(82662),x=(0,u.A)("settings-item-form"),A=function(e){var t=e.name,n=e.value,r=e.validator,s=e.onCancel,u=e.onSave,c=e.className,f=e.config,h=(0,l.useState)(void 0),v=(0,i.A)(h,2),p=v[0],A=v[1],w=(0,l.useRef)({name:t,value:n}),b=(0,l.useCallback)((function(){var e=r(t,w.current.name,w.current.value);A(e),e.name||e.value||u({oldName:t,name:w.current.name,value:w.current.value})}),[t,u,r]),E=(0,l.useCallback)((function(e){"Enter"===e.key&&b(),"Escape"===e.key&&s()}),[b,s]);return(0,d.jsxs)("div",{className:x(null,c),children:[(0,d.jsxs)("div",{className:x("form"),children:[(0,d.jsx)(m.k,{defaultValue:t,onChange:function(e){A(void 0),w.current.name=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.name,size:"l",disabled:!!f&&!f.name}),(0,d.jsx)(m.k,{defaultValue:n,onChange:function(e){A(void 0),w.current.value=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.value,size:"l",disabled:!!f&&!f.value})]}),(0,d.jsxs)("div",{className:x("actions"),children:[(0,d.jsx)(o.$,{view:"normal",onClick:b,size:"l",children:(0,d.jsx)(a.I,{data:g.A,size:16})}),(0,d.jsx)(o.$,{view:"flat",onClick:s,size:"l",children:(0,d.jsx)(a.I,{data:y.A,size:16})})]})]})},w=(0,u.A)("settings-item"),b=function(e){var t=e.name,n=e.value,r=e.canEdit,u=e.canRemove,f=e.onDelete,m=e.validator,y=e.onChange,g=(0,l.useState)(!1),x=(0,i.A)(g,2),b=x[0],E=x[1],_=function(){E((function(e){return!e}))};return b?(0,d.jsx)("div",{className:w({edit:!0}),children:(0,d.jsx)(A,{name:t,value:n,onSave:function(e){y(e),E(!1)},onCancel:_,validator:m,config:r})}):(0,d.jsxs)("div",{className:w(),children:[(0,d.jsxs)("div",{className:w("info"),children:[(0,d.jsx)(a.I,{className:w("icon"),data:c.A,size:16}),(0,d.jsx)(s.E,{variant:"subheader-2",ellipsis:!0,children:t}),(0,d.jsx)(s.E,{className:w("value"),ellipsis:!0,children:n})]}),(0,d.jsxs)("div",{className:w("actions"),children:[r&&(0,d.jsx)(h.m,{content:"Edit",placement:"top",children:(0,d.jsx)(o.$,{onClick:_,view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:v.A,size:16})})}),u&&(0,d.jsx)(h.m,{content:"Remove",placement:"top",children:(0,d.jsx)(o.$,{onClick:function(){f(t)},view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:p.A,size:16})})})]})]})},E=n(16538),_=(0,u.A)("settings-add-form"),C=function(e){var t=e.validator,n=e.onAdd,r=(0,l.useState)(!1),s=(0,i.A)(r,2),u=s[0],c=s[1],f=(0,l.useCallback)((function(){c((function(e){return!e}))}),[]),h=(0,l.useCallback)((function(e){n(e),c(!1)}),[n]);return(0,d.jsxs)("div",{className:_(),children:[u&&(0,d.jsx)(A,{name:"",value:"",onCancel:f,onSave:h,validator:t,className:_("add-form")}),(0,d.jsxs)(o.$,{className:_("button"),onClick:f,disabled:u,size:"l",children:[(0,d.jsx)(a.I,{data:E.A,size:16}),"Add setting"]})]})},j=n(59241),k=n(52041),S=["cluster","clique"],T=(0,u.A)("query-settings-popup"),N=function(e){var t=e.settings,n=e.className,u=e.popupClassName,h=e.onChange,v=(0,l.useState)(!1),p=(0,i.A)(v,2),m=p[0],y=p[1],g=(0,l.useRef)(null),x=(0,l.useCallback)((function(){y(!m)}),[y,m]),A=(0,l.useMemo)((function(){return t?Object.keys(t).length:0}),[t]),w=(0,l.useCallback)((function(e){var n=(0,r.A)({},t);e in n&&delete n[e],h(n)}),[h,t]),E=(0,l.useCallback)((function(e){var n=e.name,i=e.value,o=(0,r.A)({},t);o[n]=i,h(o)}),[h,t]),_=(0,l.useCallback)((function(e){var n=e.oldName,i=e.name,o=e.value,a=(0,r.A)({},t);n!==i&&delete a[n],a[i]=o,h(a)}),[h,t]),N=(0,l.useCallback)((function(e,n,r){var i=(0,k.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=k.j.NAME_ALREADY_EXIST}return i}),[t]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.$,{className:n,onClick:x,ref:g,view:m?"outlined-info":"outlined",selected:m,size:"l",children:(0,d.jsx)(a.I,{data:A?f:c.A,size:16})}),(0,d.jsxs)(j.x,{anchorRef:g,open:m,className:T(null,u),onClose:x,children:[(0,d.jsxs)("div",{className:T("header"),children:[(0,d.jsx)(s.E,{variant:"subheader-3",children:"Settings "}),A>0&&(0,d.jsx)(s.E,{variant:"subheader-3",color:"secondary",children:A})]}),(0,d.jsx)("div",{className:T("body"),children:Object.entries(t||{}).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return(0,d.jsx)(b,{name:n,value:r,canEdit:S.includes(n)?void 0:{name:!0,value:!0},canRemove:"cluster"!==n,validator:N,onDelete:w,onChange:_},n)}))}),(0,d.jsx)(C,{onAdd:E,validator:N})]})]})}},24567:function(e,t,n){!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={exports:{}},a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||function(){return this}()||Function("return this")(),u=function(e){try{return!!e()}catch(e){return!0}},l=!u((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),c=l,d=Function.prototype,f=d.apply,h=d.call,v="object"==typeof Reflect&&Reflect.apply||(c?h.bind(f):function(){return h.apply(f,arguments)}),p=l,m=Function.prototype,y=m.call,g=p&&m.bind.bind(y,y),x=p?g:function(e){return function(){return y.apply(e,arguments)}},A=x,w=A({}.toString),b=A("".slice),E=function(e){return b(w(e),8,-1)},_=E,C=x,j=function(e){if("Function"===_(e))return C(e)},k="object"==typeof document&&document.all,S={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},T=S.all,N=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},O={},R=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=l,P=Function.prototype.call,L=I?P.bind(P):function(){return P.apply(P,arguments)},M={},D={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,$=z&&!D.call({1:2},1);M.f=$?function(e){var t=z(this,e);return!!t&&t.enumerable}:D;var F,U,q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},H=u,V=E,B=Object,W=x("".split),Y=H((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?W(e,""):B(e)}:B,K=function(e){return null==e},G=K,Q=TypeError,X=function(e){if(G(e))throw Q("Can't call method on "+e);return e},J=Y,Z=X,ee=function(e){return J(Z(e))},te=N,ne=S.all,re=S.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:te(e)||e===ne}:function(e){return"object"==typeof e?null!==e:te(e)},ie={},oe=ie,ae=s,se=N,ue=function(e){return se(e)?e:void 0},le=function(e,t){return arguments.length<2?ue(oe[e])||ue(ae[e]):oe[e]&&oe[e][t]||ae[e]&&ae[e][t]},ce=x({}.isPrototypeOf),de="undefined"!=typeof navigator&&String(navigator.userAgent)||"",fe=s,he=de,ve=fe.process,pe=fe.Deno,me=ve&&ve.versions||pe&&pe.version,ye=me&&me.v8;ye&&(U=(F=ye.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&he&&(!(F=he.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=he.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ge=U,xe=ge,Ae=u,we=!!Object.getOwnPropertySymbols&&!Ae((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xe&&xe<41})),be=we&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=le,_e=N,Ce=ce,je=Object,ke=be?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return _e(t)&&Ce(t.prototype,je(e))},Se=String,Te=function(e){try{return Se(e)}catch(e){return"Object"}},Ne=N,Oe=Te,Re=TypeError,Ie=function(e){if(Ne(e))return e;throw Re(Oe(e)+" is not a function")},Pe=Ie,Le=K,Me=function(e,t){var n=e[t];return Le(n)?void 0:Pe(n)},De=L,ze=N,$e=re,Fe=TypeError,Ue={exports:{}},qe=s,He=Object.defineProperty,Ve="__core-js_shared__",Be=s[Ve]||function(e,t){try{He(qe,e,{value:t,configurable:!0,writable:!0})}catch(n){qe[e]=t}return t}(Ve,{}),We=Be;(Ue.exports=function(e,t){return We[e]||(We[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ye=Ue.exports,Ke=X,Ge=Object,Qe=function(e){return Ge(Ke(e))},Xe=Qe,Je=x({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return Je(Xe(e),t)},et=x,tt=0,nt=Math.random(),rt=et(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++tt+nt,36)},ot=Ye,at=Ze,st=it,ut=we,lt=be,ct=s.Symbol,dt=ot("wks"),ft=lt?ct.for||ct:ct&&ct.withoutSetter||st,ht=function(e){return at(dt,e)||(dt[e]=ut&&at(ct,e)?ct[e]:ft("Symbol."+e)),dt[e]},vt=L,pt=re,mt=ke,yt=Me,gt=TypeError,xt=ht("toPrimitive"),At=function(e,t){if(!pt(e)||mt(e))return e;var n,r=yt(e,xt);if(r){if(void 0===t&&(t="default"),n=vt(r,e,t),!pt(n)||mt(n))return n;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;if(ze(n=e.valueOf)&&!$e(r=De(n,e)))return r;if("string"!==t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;throw Fe("Can't convert object to primitive value")}(e,t)},wt=ke,bt=function(e){var t=At(e,"string");return wt(t)?t:t+""},Et=re,_t=s.document,Ct=Et(_t)&&Et(_t.createElement),jt=function(e){return Ct?_t.createElement(e):{}},kt=jt,St=!R&&!u((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Tt=R,Nt=L,Ot=M,Rt=q,It=ee,Pt=bt,Lt=Ze,Mt=St,Dt=Object.getOwnPropertyDescriptor;O.f=Tt?Dt:function(e,t){if(e=It(e),t=Pt(t),Mt)try{return Dt(e,t)}catch(e){}if(Lt(e,t))return Rt(!Nt(Ot.f,e,t),e[t])};var zt=u,$t=N,Ft=/#|\.prototype\./,Ut=function(e,t){var n=Ht[qt(e)];return n==Bt||n!=Vt&&($t(t)?zt(t):!!t)},qt=Ut.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Ht=Ut.data={},Vt=Ut.NATIVE="N",Bt=Ut.POLYFILL="P",Wt=Ut,Yt=Ie,Kt=l,Gt=j(j.bind),Qt=function(e,t){return Yt(e),void 0===t?e:Kt?Gt(e,t):function(){return e.apply(t,arguments)}},Xt={},Jt=R&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=re,en=String,tn=TypeError,nn=function(e){if(Zt(e))return e;throw tn(en(e)+" is not an object")},rn=R,on=St,an=Jt,sn=nn,un=bt,ln=TypeError,cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,fn="enumerable",hn="configurable",vn="writable";Xt.f=rn?an?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&vn in n&&!n[vn]){var r=dn(e,t);r&&r[vn]&&(e[t]=n.value,n={configurable:hn in n?n[hn]:r[hn],enumerable:fn in n?n[fn]:r[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=un(t),sn(n),on)try{return cn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw ln("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pn=Xt,mn=q,yn=R?function(e,t,n){return pn.f(e,t,mn(1,n))}:function(e,t,n){return e[t]=n,e},gn=s,xn=v,An=j,wn=N,bn=O.f,En=Wt,_n=ie,Cn=Qt,jn=yn,kn=Ze,Sn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return xn(e,this,arguments)};return t.prototype=e.prototype,t},Tn=function(e,t){var n,r,i,o,a,s,u,l,c,d=e.target,f=e.global,h=e.stat,v=e.proto,p=f?gn:h?gn[d]:(gn[d]||{}).prototype,m=f?_n:_n[d]||jn(_n,d,{})[d],y=m.prototype;for(o in t)r=!(n=En(f?o:d+(h?".":"#")+o,e.forced))&&p&&kn(p,o),s=m[o],r&&(u=e.dontCallGetSet?(c=bn(p,o))&&c.value:p[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(l=e.bind&&r?Cn(a,gn):e.wrap&&r?Sn(a):v&&wn(a)?An(a):a,(e.sham||a&&a.sham||s&&s.sham)&&jn(l,"sham",!0),jn(m,o,l),v&&(kn(_n,i=d+"Prototype")||jn(_n,i,{}),jn(_n[i],o,a),e.real&&y&&(n||!y[o])&&jn(y,o,a)))},Nn=Tn,On=R,Rn=Xt.f;Nn({target:"Object",stat:!0,forced:Object.defineProperty!==Rn,sham:!On},{defineProperty:Rn});var In=ie.Object,Pn=o.exports=function(e,t,n){return In.defineProperty(e,t,n)};In.defineProperty.sham&&(Pn.sham=!0);var Ln=o.exports,Mn=Ln,Dn=i(Mn),zn=E,$n=Array.isArray||function(e){return"Array"==zn(e)},Fn=Math.ceil,Un=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Un:Fn)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:qn(t)},Vn=Hn,Bn=Math.min,Wn=function(e){return function(e){return e>0?Bn(Vn(e),9007199254740991):0}(e.length)},Yn=TypeError,Kn=function(e){if(e>9007199254740991)throw Yn("Maximum allowed index exceeded");return e},Gn=bt,Qn=Xt,Xn=q,Jn=function(e,t,n){var r=Gn(t);r in e?Qn.f(e,r,Xn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=N,rr=E,ir=ht("toStringTag"),or=Object,ar="Arguments"==rr(function(){return arguments}()),sr=tr?rr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=or(e),ir))?n:ar?rr(t):"Object"==(r=rr(t))&&nr(t.callee)?"Arguments":r},ur=N,lr=Be,cr=x(Function.toString);ur(lr.inspectSource)||(lr.inspectSource=function(e){return cr(e)});var dr=lr.inspectSource,fr=x,hr=u,vr=N,pr=sr,mr=dr,yr=function(){},gr=[],xr=le("Reflect","construct"),Ar=/^\s*(?:class|function)\b/,wr=fr(Ar.exec),br=!Ar.exec(yr),Er=function(e){if(!vr(e))return!1;try{return xr(yr,gr,e),!0}catch(e){return!1}},_r=function(e){if(!vr(e))return!1;switch(pr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return br||!!wr(Ar,mr(e))}catch(e){return!0}};_r.sham=!0;var Cr=!xr||hr((function(){var e;return Er(Er.call)||!Er(Object)||!Er((function(){e=!0}))||e}))?_r:Er,jr=$n,kr=Cr,Sr=re,Tr=ht("species"),Nr=Array,Or=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(kr(t)&&(t===Nr||jr(t.prototype))||Sr(t)&&null===(t=t[Tr]))&&(t=void 0)),void 0===t?Nr:t}(e))(0===t?0:t)},Rr=u,Ir=ge,Pr=ht("species"),Lr=function(e){return Ir>=51||!Rr((function(){var t=[];return(t.constructor={})[Pr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Mr=Tn,Dr=u,zr=$n,$r=re,Fr=Qe,Ur=Wn,qr=Kn,Hr=Jn,Vr=Or,Br=Lr,Wr=ge,Yr=ht("isConcatSpreadable"),Kr=Wr>=51||!Dr((function(){var e=[];return e[Yr]=!1,e.concat()[0]!==e})),Gr=function(e){if(!$r(e))return!1;var t=e[Yr];return void 0!==t?!!t:zr(e)};Mr({target:"Array",proto:!0,arity:1,forced:!Kr||!Br("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Vr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Gr(o=-1===t?a:arguments[t]))for(i=Ur(o),qr(u+i),n=0;n<i;n++,u++)n in o&&Hr(s,u,o[n]);else qr(u+1),Hr(s,u++,o);return s.length=u,s}});var Qr=sr,Xr=String,Jr=function(e){if("Symbol"===Qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Xr(e)},Zr={},ei=Hn,ti=Math.max,ni=Math.min,ri=function(e,t){var n=ei(e);return n<0?ti(n+t,0):ni(n,t)},ii=ee,oi=ri,ai=Wn,si=function(e){return function(t,n,r){var i,o=ii(t),a=ai(o),s=oi(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ui={includes:si(!0),indexOf:si(!1)},li={},ci=Ze,di=ee,fi=ui.indexOf,hi=li,vi=x([].push),pi=function(e,t){var n,r=di(e),i=0,o=[];for(n in r)!ci(hi,n)&&ci(r,n)&&vi(o,n);for(;t.length>i;)ci(r,n=t[i++])&&(~fi(o,n)||vi(o,n));return o},mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yi=pi,gi=mi,xi=Object.keys||function(e){return yi(e,gi)},Ai=R,wi=Jt,bi=Xt,Ei=nn,_i=ee,Ci=xi;Zr.f=Ai&&!wi?Object.defineProperties:function(e,t){Ei(e);for(var n,r=_i(t),i=Ci(t),o=i.length,a=0;o>a;)bi.f(e,n=i[a++],r[n]);return e};var ji,ki=le("document","documentElement"),Si=it,Ti=Ye("keys"),Ni=function(e){return Ti[e]||(Ti[e]=Si(e))},Oi=nn,Ri=Zr,Ii=mi,Pi=li,Li=ki,Mi=jt,Di="prototype",zi="script",$i=Ni("IE_PROTO"),Fi=function(){},Ui=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Ui("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hi=function(){try{ji=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Hi="undefined"!=typeof document?document.domain&&ji?qi(ji):(t=Mi("iframe"),n="java"+zi+":",t.style.display="none",Li.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):qi(ji);for(var r=Ii.length;r--;)delete Hi[Di][Ii[r]];return Hi()};Pi[$i]=!0;var Vi=Object.create||function(e,t){var n;return null!==e?(Fi[Di]=Oi(e),n=new Fi,Fi[Di]=null,n[$i]=e):n=Hi(),void 0===t?n:Ri.f(n,t)},Bi={},Wi=pi,Yi=mi.concat("length","prototype");Bi.f=Object.getOwnPropertyNames||function(e){return Wi(e,Yi)};var Ki={},Gi=ri,Qi=Wn,Xi=Jn,Ji=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Qi(e),i=Gi(t,r),o=Gi(void 0===n?r:n,r),a=Ji(Zi(o-i,0)),s=0;i<o;i++,s++)Xi(a,s,e[i]);return a.length=s,a},to=E,no=ee,ro=Bi.f,io=eo,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ki.f=function(e){return oo&&"Window"==to(e)?function(e){try{return ro(e)}catch(e){return io(oo)}}(e):ro(no(e))};var ao={};ao.f=Object.getOwnPropertySymbols;var so=yn,uo=function(e,t,n,r){return r&&r.enumerable?e[t]=n:so(e,t,n),e},lo=Xt,co=function(e,t,n){return lo.f(e,t,n)},fo={},ho=ht;fo.f=ho;var vo,po,mo,yo=ie,go=Ze,xo=fo,Ao=Xt.f,wo=function(e){var t=yo.Symbol||(yo.Symbol={});go(t,e)||Ao(t,e,{value:xo.f(e)})},bo=L,Eo=le,_o=ht,Co=uo,jo=function(){var e=Eo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_o("toPrimitive");t&&!t[r]&&Co(t,r,(function(e){return bo(n,this)}),{arity:1})},ko=sr,So=er?{}.toString:function(){return"[object "+ko(this)+"]"},To=er,No=Xt.f,Oo=yn,Ro=Ze,Io=So,Po=ht("toStringTag"),Lo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ro(i,Po)||No(i,Po,{configurable:!0,value:t}),r&&!To&&Oo(i,"toString",Io)}},Mo=N,Do=s.WeakMap,zo=Mo(Do)&&/native code/.test(String(Do)),$o=s,Fo=re,Uo=yn,qo=Ze,Ho=Be,Vo=Ni,Bo=li,Wo="Object already initialized",Yo=$o.TypeError,Ko=$o.WeakMap;if(zo||Ho.state){var Go=Ho.state||(Ho.state=new Ko);Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,vo=function(e,t){if(Go.has(e))throw Yo(Wo);return t.facade=e,Go.set(e,t),t},po=function(e){return Go.get(e)||{}},mo=function(e){return Go.has(e)}}else{var Qo=Vo("state");Bo[Qo]=!0,vo=function(e,t){if(qo(e,Qo))throw Yo(Wo);return t.facade=e,Uo(e,Qo,t),t},po=function(e){return qo(e,Qo)?e[Qo]:{}},mo=function(e){return qo(e,Qo)}}var Xo={set:vo,get:po,has:mo,enforce:function(e){return mo(e)?po(e):vo(e,{})},getterFor:function(e){return function(t){var n;if(!Fo(t)||(n=po(t)).type!==e)throw Yo("Incompatible receiver, "+e+" required");return n}}},Jo=Qt,Zo=Y,ea=Qe,ta=Wn,na=Or,ra=x([].push),ia=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,d){for(var f,h,v=ea(u),p=Zo(v),m=Jo(l,c),y=ta(p),g=0,x=d||na,A=t?x(u,y):n||a?x(u,0):void 0;y>g;g++)if((s||g in p)&&(h=m(f=p[g],g,v),e))if(t)A[g]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:ra(A,f)}else switch(e){case 4:return!1;case 7:ra(A,f)}return o?-1:r||i?i:A}},oa={forEach:ia(0),map:ia(1),filter:ia(2),some:ia(3),every:ia(4),find:ia(5),findIndex:ia(6),filterReject:ia(7)},aa=Tn,sa=s,ua=L,la=x,ca=R,da=we,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ya=bt,ga=Jr,xa=q,Aa=Vi,wa=xi,ba=Bi,Ea=Ki,_a=ao,Ca=O,ja=Xt,ka=Zr,Sa=M,Ta=uo,Na=co,Oa=Ye,Ra=li,Ia=it,Pa=ht,La=fo,Ma=wo,Da=jo,za=Lo,$a=Xo,Fa=oa.forEach,Ua=Ni("hidden"),qa="Symbol",Ha="prototype",Va=$a.set,Ba=$a.getterFor(qa),Wa=Object[Ha],Ya=sa.Symbol,Ka=Ya&&Ya[Ha],Ga=sa.TypeError,Qa=sa.QObject,Xa=Ca.f,Ja=ja.f,Za=Ea.f,es=Sa.f,ts=la([].push),ns=Oa("symbols"),rs=Oa("op-symbols"),is=Oa("wks"),os=!Qa||!Qa[Ha]||!Qa[Ha].findChild,as=ca&&fa((function(){return 7!=Aa(Ja({},"a",{get:function(){return Ja(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Xa(Wa,t);r&&delete Wa[t],Ja(e,t,n),r&&e!==Wa&&Ja(Wa,t,r)}:Ja,ss=function(e,t){var n=ns[e]=Aa(Ka);return Va(n,{type:qa,tag:e,description:t}),ca||(n.description=t),n},us=function(e,t,n){e===Wa&&us(rs,t,n),pa(e);var r=ya(t);return pa(n),ha(ns,r)?(n.enumerable?(ha(e,Ua)&&e[Ua][r]&&(e[Ua][r]=!1),n=Aa(n,{enumerable:xa(0,!1)})):(ha(e,Ua)||Ja(e,Ua,xa(1,{})),e[Ua][r]=!0),as(e,r,n)):Ja(e,r,n)},ls=function(e,t){pa(e);var n=ma(t),r=wa(n).concat(hs(n));return Fa(r,(function(t){ca&&!ua(cs,n,t)||us(e,t,n[t])})),e},cs=function(e){var t=ya(e),n=ua(es,this,t);return!(this===Wa&&ha(ns,t)&&!ha(rs,t))&&(!(n||!ha(this,t)||!ha(ns,t)||ha(this,Ua)&&this[Ua][t])||n)},ds=function(e,t){var n=ma(e),r=ya(t);if(n!==Wa||!ha(ns,r)||ha(rs,r)){var i=Xa(n,r);return!i||!ha(ns,r)||ha(n,Ua)&&n[Ua][r]||(i.enumerable=!0),i}},fs=function(e){var t=Za(ma(e)),n=[];return Fa(t,(function(e){ha(ns,e)||ha(Ra,e)||ts(n,e)})),n},hs=function(e){var t=e===Wa,n=Za(t?rs:ma(e)),r=[];return Fa(n,(function(e){!ha(ns,e)||t&&!ha(Wa,e)||ts(r,ns[e])})),r};da||(Ya=function(){if(va(Ka,this))throw Ga("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ga(arguments[0]):void 0,t=Ia(e),n=function(e){this===Wa&&ua(n,rs,e),ha(this,Ua)&&ha(this[Ua],t)&&(this[Ua][t]=!1),as(this,t,xa(1,e))};return ca&&os&&as(Wa,t,{configurable:!0,set:n}),ss(t,e)},Ta(Ka=Ya[Ha],"toString",(function(){return Ba(this).tag})),Ta(Ya,"withoutSetter",(function(e){return ss(Ia(e),e)})),Sa.f=cs,ja.f=us,ka.f=ls,Ca.f=ds,ba.f=Ea.f=fs,_a.f=hs,La.f=function(e){return ss(Pa(e),e)},ca&&Na(Ka,"description",{configurable:!0,get:function(){return Ba(this).description}})),aa({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:Ya}),Fa(wa(is),(function(e){Ma(e)})),aa({target:qa,stat:!0,forced:!da},{useSetter:function(){os=!0},useSimple:function(){os=!1}}),aa({target:"Object",stat:!0,forced:!da,sham:!ca},{create:function(e,t){return void 0===t?Aa(e):ls(Aa(e),t)},defineProperty:us,defineProperties:ls,getOwnPropertyDescriptor:ds}),aa({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:fs}),Da(),za(Ya,qa),Ra[Ua]=!0;var vs=we&&!!Symbol.for&&!!Symbol.keyFor,ps=Tn,ms=le,ys=Ze,gs=Jr,xs=Ye,As=vs,ws=xs("string-to-symbol-registry"),bs=xs("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!As},{for:function(e){var t=gs(e);if(ys(ws,t))return ws[t];var n=ms("Symbol")(t);return ws[t]=n,bs[n]=t,n}});var Es=Tn,_s=Ze,Cs=ke,js=Te,ks=vs,Ss=Ye("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(_s(Ss,e))return Ss[e]}});var Ts=x([].slice),Ns=$n,Os=N,Rs=E,Is=Jr,Ps=x([].push),Ls=Tn,Ms=le,Ds=v,zs=L,$s=x,Fs=u,Us=N,qs=ke,Hs=Ts,Vs=we,Bs=String,Ws=Ms("JSON","stringify"),Ys=$s(/./.exec),Ks=$s("".charAt),Gs=$s("".charCodeAt),Qs=$s("".replace),Xs=$s(1..toString),Js=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!Vs||Fs((function(){var e=Ms("Symbol")();return"[null]"!=Ws([e])||"{}"!=Ws({a:e})||"{}"!=Ws(Object(e))})),nu=Fs((function(){return'"\\udf06\\ud834"'!==Ws("\udf06\ud834")||'"\\udead"'!==Ws("\udead")})),ru=function(e,t){var n=Hs(arguments),r=function(e){if(Os(e))return e;if(Ns(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ps(n,i):"number"!=typeof i&&"Number"!=Rs(i)&&"String"!=Rs(i)||Ps(n,Is(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ns(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(Us(r)&&(t=zs(r,this,Bs(e),t)),!qs(t))return t},Ds(Ws,null,n)},iu=function(e,t,n){var r=Ks(n,t-1),i=Ks(n,t+1);return Ys(Zs,e)&&!Ys(eu,i)||Ys(eu,e)&&!Ys(Zs,r)?"\\u"+Xs(Gs(e,0),16):e};Ws&&Ls({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Hs(arguments),i=Ds(tu?ru:Ws,null,r);return nu&&"string"==typeof i?Qs(i,Js,iu):i}});var ou=ao,au=Qe;Tn({target:"Object",stat:!0,forced:!we||u((function(){ou.f(1)}))},{getOwnPropertySymbols:function(e){var t=ou.f;return t?t(au(e)):[]}}),wo("asyncIterator"),wo("hasInstance"),wo("isConcatSpreadable"),wo("iterator"),wo("match"),wo("matchAll"),wo("replace"),wo("search"),wo("species"),wo("split");var su=jo;wo("toPrimitive"),su();var uu=le,lu=Lo;wo("toStringTag"),lu(uu("Symbol"),"Symbol"),wo("unscopables"),Lo(s.JSON,"JSON",!0);var cu,du,fu,hu=ie.Symbol,vu={},pu=R,mu=Ze,yu=Function.prototype,gu=pu&&Object.getOwnPropertyDescriptor,xu=mu(yu,"name"),Au={EXISTS:xu,PROPER:xu&&"something"===function(){}.name,CONFIGURABLE:xu&&(!pu||pu&&gu(yu,"name").configurable)},wu=!u((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),bu=Ze,Eu=N,_u=Qe,Cu=wu,ju=Ni("IE_PROTO"),ku=Object,Su=ku.prototype,Tu=Cu?ku.getPrototypeOf:function(e){var t=_u(e);if(bu(t,ju))return t[ju];var n=t.constructor;return Eu(n)&&t instanceof n?n.prototype:t instanceof ku?Su:null},Nu=u,Ou=N,Ru=re,Iu=Vi,Pu=Tu,Lu=uo,Mu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Pu(Pu(fu)))!==Object.prototype&&(cu=du):Du=!0);var zu=!Ru(cu)||Nu((function(){var e={};return cu[Mu].call(e)!==e}));Ou((cu=zu?{}:Iu(cu))[Mu])||Lu(cu,Mu,(function(){return this}));var $u={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},Fu=$u.IteratorPrototype,Uu=Vi,qu=q,Hu=Lo,Vu=vu,Bu=function(){return this},Wu=x,Yu=Ie,Ku=N,Gu=String,Qu=TypeError,Xu=nn,Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return Wu(Yu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Xu(n),function(e){if("object"==typeof e||Ku(e))return e;throw Qu("Can't set "+Gu(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Tn,el=L,tl=Tu,nl=Lo,rl=uo,il=vu,ol=Au.PROPER,al=$u.BUGGY_SAFARI_ITERATORS,sl=ht("iterator"),ul="keys",ll="values",cl="entries",dl=function(){return this},fl=function(e,t,n,r,i,o,a){!function(e,t,n,r){var i=t+" Iterator";e.prototype=Uu(Fu,{next:qu(+!r,n)}),Hu(e,i,!1,!0),Vu[i]=Bu}(n,t,r);var s,u,l,c=function(e){if(e===i&&p)return p;if(!al&&e in h)return h[e];switch(e){case ul:case ll:case cl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,v=h[sl]||h["@@iterator"]||i&&h[i],p=!al&&v||c(i),m="Array"==t&&h.entries||v;if(m&&(s=tl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,d,!0,!0),il[d]=dl),ol&&i==ll&&v&&v.name!==ll&&(f=!0,p=function(){return el(v,this)}),i)if(u={values:c(ll),keys:o?p:c(ul),entries:c(cl)},a)for(l in u)(al||f||!(l in h))&&rl(h,l,u[l]);else Zu({target:t,proto:!0,forced:al||f},u);return a&&h[sl]!==p&&rl(h,sl,p,{name:i}),il[t]=p,u},hl=function(e,t){return{value:e,done:t}},vl=ee,pl=vu,ml=Xo;Xt.f;var yl=fl,gl=hl,xl="Array Iterator",Al=ml.set,wl=ml.getterFor(xl);yl(Array,"Array",(function(e,t){Al(this,{type:xl,target:vl(e),index:0,kind:t})}),(function(){var e=wl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,gl(void 0,!0)):gl("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),pl.Arguments=pl.Array;var bl=s,El=sr,_l=yn,Cl=vu,jl=ht("toStringTag");for(var kl in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Sl=bl[kl],Tl=Sl&&Sl.prototype;Tl&&El(Tl)!==jl&&_l(Tl,jl,kl),Cl[kl]=Cl.Array}var Nl=hu;wo("dispose");var Ol=Nl;wo("asyncDispose");var Rl=Tn,Il=x,Pl=le("Symbol"),Ll=Pl.keyFor,Ml=Il(Pl.prototype.valueOf);Rl({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Ll(Ml(e))}catch(e){return!1}}});for(var Dl=Tn,zl=Ye,$l=le,Fl=x,Ul=ke,ql=ht,Hl=$l("Symbol"),Vl=Hl.isWellKnown,Bl=$l("Object","getOwnPropertyNames"),Wl=Fl(Hl.prototype.valueOf),Yl=zl("wks"),Kl=0,Gl=Bl(Hl),Ql=Gl.length;Kl<Ql;Kl++)try{var Xl=Gl[Kl];Ul(Hl[Xl])&&ql(Xl)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Vl&&Vl(e))return!0;try{for(var t=Wl(e),n=0,r=Bl(Yl),i=r.length;n<i;n++)if(Yl[r[n]]==t)return!0}catch(e){}return!1}}),wo("matcher"),wo("metadataKey"),wo("observable"),wo("metadata"),wo("patternMatch"),wo("replaceAll");var Jl=Ol,Zl=i(Jl),ec=x,tc=Hn,nc=Jr,rc=X,ic=ec("".charAt),oc=ec("".charCodeAt),ac=ec("".slice),sc=function(e){return function(t,n){var r,i,o=nc(rc(t)),a=tc(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=oc(o,a))<55296||r>56319||a+1===s||(i=oc(o,a+1))<56320||i>57343?e?ic(o,a):r:e?ac(o,a,a+2):i-56320+(r-55296<<10)+65536}},uc=(sc(!1),sc(!0)),lc=Jr,cc=Xo,dc=fl,fc=hl,hc="String Iterator",vc=cc.set,pc=cc.getterFor(hc);dc(String,"String",(function(e){vc(this,{type:hc,string:lc(e),index:0})}),(function(){var e,t=pc(this),n=t.string,r=t.index;return r>=n.length?fc(void 0,!0):(e=uc(n,r),t.index+=e.length,fc(e,!1))}));var mc=fo.f("iterator"),yc=mc,gc=i(yc);function xc(e){return xc="function"==typeof Zl&&"symbol"==typeof gc?function(e){return typeof e}:function(e){return e&&"function"==typeof Zl&&e.constructor===Zl&&e!==Zl.prototype?"symbol":typeof e},xc(e)}var Ac=i(fo.f("toPrimitive"));function wc(e){var t=function(e,t){if("object"!==xc(e)||null===e)return e;var n=e[Ac];if(void 0!==n){var r=n.call(e,"string");if("object"!==xc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xc(t)?t:String(t)}function bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(e,wc(r.key),r)}}function Ec(e,t,n){return t&&bc(e.prototype,t),n&&bc(e,n),Dn(e,"prototype",{writable:!1}),e}function _c(e,t,n){return(t=wc(t))in e?Dn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cc=x,jc=Ie,kc=re,Sc=Ze,Tc=Ts,Nc=l,Oc=Function,Rc=Cc([].concat),Ic=Cc([].join),Pc={},Lc=Nc?Oc.bind:function(e){var t=jc(this),n=t.prototype,r=Tc(arguments,1),i=function(){var n=Rc(r,Tc(arguments));return this instanceof i?function(e,t,n){if(!Sc(Pc,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Pc[t]=Oc("C,a","return new C("+Ic(r,",")+")")}return Pc[t](e,n)}(t,n.length,n):t.apply(e,n)};return kc(n)&&(i.prototype=n),i},Mc=Lc;Tn({target:"Function",proto:!0,forced:Function.bind!==Mc},{bind:Mc});var Dc=ie,zc=function(e){return Dc[e+"Prototype"]},$c=zc("Function").bind,Fc=ce,Uc=$c,qc=Function.prototype,Hc=function(e){var t=e.bind;return e===qc||Fc(qc,e)&&t===qc.bind?Uc:t},Vc=i(Hc),Bc=Ie,Wc=Qe,Yc=Y,Kc=Wn,Gc=TypeError,Qc=function(e){return function(t,n,r,i){Bc(n);var o=Wc(t),a=Yc(o),s=Kc(o),u=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw Gc("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},Xc={left:Qc(!1),right:Qc(!0)},Jc=u,Zc=function(e,t){var n=[][e];return!!n&&Jc((function(){n.call(null,t||function(){return 1},1)}))},ed="undefined"!=typeof process&&"process"==E(process),td=Xc.left;Tn({target:"Array",proto:!0,forced:!ed&&ge>79&&ge<83||!Zc("reduce")},{reduce:function(e){var t=arguments.length;return td(this,e,t,t>1?arguments[1]:void 0)}});var nd=zc("Array").reduce,rd=ce,id=nd,od=Array.prototype,ad=i((function(e){var t=e.reduce;return e===od||rd(od,e)&&t===od.reduce?id:t})),sd=oa.filter;Tn({target:"Array",proto:!0,forced:!Lr("filter")},{filter:function(e){return sd(this,e,arguments.length>1?arguments[1]:void 0)}});var ud=zc("Array").filter,ld=ce,cd=ud,dd=Array.prototype,fd=i((function(e){var t=e.filter;return e===dd||ld(dd,e)&&t===dd.filter?cd:t})),hd=oa.map;Tn({target:"Array",proto:!0,forced:!Lr("map")},{map:function(e){return hd(this,e,arguments.length>1?arguments[1]:void 0)}});var vd=zc("Array").map,pd=ce,md=vd,yd=Array.prototype,gd=i((function(e){var t=e.map;return e===yd||pd(yd,e)&&t===yd.map?md:t})),xd=$n,Ad=Wn,wd=Kn,bd=Qt,Ed=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&bd(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],o>0&&xd(u)?(l=Ad(u),c=Ed(e,t,u,l,c,o-1)-1):(wd(c+1),e[c]=u),c++),d++;return c},_d=Ed,Cd=Ie,jd=Qe,kd=Wn,Sd=Or;Tn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=kd(n);return Cd(e),(t=Sd(n,0)).length=_d(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Td=zc("Array").flatMap,Nd=ce,Od=Td,Rd=Array.prototype,Id=i((function(e){var t=e.flatMap;return e===Rd||Nd(Rd,e)&&t===Rd.flatMap?Od:t})),Pd=function(){function e(n,r,i){var o,a,s;t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",void 0),_c(this,"_target",void 0),_c(this,"_listeners",{add:Vc(o=this._add).call(o,this),remove:Vc(a=this._remove).call(a,this),update:Vc(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Ec(e,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(e){var t;return ad(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:"_add",value:function(e,t){null!=t&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:"_update",value:function(e,t){null!=t&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:"_remove",value:function(e,t){null!=t&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),Ld=function(){function e(n){t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",[]),this._source=n}return Ec(e,[{key:"filter",value:function(e){return this._transformers.push((function(t){return fd(t).call(t,e)})),this}},{key:"map",value:function(e){return this._transformers.push((function(t){return gd(t).call(t,e)})),this}},{key:"flatMap",value:function(e){return this._transformers.push((function(t){return Id(t).call(t,e)})),this}},{key:"to",value:function(e){return new Pd(this._source,this._transformers,e)}}]),e}(),Md=L,Dd=nn,zd=Me,$d=function(e,t,n){var r,i;Dd(e);try{if(!(r=zd(e,"return"))){if("throw"===t)throw n;return n}r=Md(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Dd(r),n},Fd=nn,Ud=$d,qd=vu,Hd=ht("iterator"),Vd=Array.prototype,Bd=function(e){return void 0!==e&&(qd.Array===e||Vd[Hd]===e)},Wd=sr,Yd=Me,Kd=K,Gd=vu,Qd=ht("iterator"),Xd=function(e){if(!Kd(e))return Yd(e,Qd)||Yd(e,"@@iterator")||Gd[Wd(e)]},Jd=L,Zd=Ie,ef=nn,tf=Te,nf=Xd,rf=TypeError,of=function(e,t){var n=arguments.length<2?nf(e):t;if(Zd(n))return ef(Jd(n,e));throw rf(tf(e)+" is not iterable")},af=Qt,sf=L,uf=Qe,lf=function(e,t,n,r){try{return r?t(Fd(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},cf=Bd,df=Cr,ff=Wn,hf=Jn,vf=of,pf=Xd,mf=Array,yf=ht("iterator"),gf=!1;try{var xf=0,Af={next:function(){return{done:!!xf++}},return:function(){gf=!0}};Af[yf]=function(){return this},Array.from(Af,(function(){throw 2}))}catch(e){}var wf=function(e,t){if(!t&&!gf)return!1;var n=!1;try{var r={};r[yf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n};Tn({target:"Array",stat:!0,forced:!wf((function(e){Array.from(e)}))},{from:function(e){var t=uf(e),n=df(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=af(i,r>2?arguments[2]:void 0));var a,s,u,l,c,d,f=pf(t),h=0;if(!f||this===mf&&cf(f))for(a=ff(t),s=n?new this(a):mf(a);a>h;h++)d=o?i(t[h],h):t[h],hf(s,h,d);else for(c=(l=vf(t,f)).next,s=n?new this:[];!(u=sf(c,l)).done;h++)d=o?lf(l,i,[u.value,h],!0):u.value,hf(s,h,d);return s.length=h,s}});var bf=ie.Array.from,Ef=i(bf),_f=i(Xd),Cf=i(ie.Object.getOwnPropertySymbols),jf={exports:{}},kf=Tn,Sf=u,Tf=ee,Nf=O.f,Of=R;kf({target:"Object",stat:!0,forced:!Of||Sf((function(){Nf(1)})),sham:!Of},{getOwnPropertyDescriptor:function(e,t){return Nf(Tf(e),t)}});var Rf=ie.Object,If=jf.exports=function(e,t){return Rf.getOwnPropertyDescriptor(e,t)};Rf.getOwnPropertyDescriptor.sham&&(If.sham=!0);var Pf=i(jf.exports),Lf=le,Mf=Bi,Df=ao,zf=nn,$f=x([].concat),Ff=Lf("Reflect","ownKeys")||function(e){var t=Mf.f(zf(e)),n=Df.f;return n?$f(t,n(e)):t},Uf=Ff,qf=ee,Hf=O,Vf=Jn;Tn({target:"Object",stat:!0,sham:!R},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qf(e),i=Hf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Vf(a,t,n);return a}});var Bf=i(ie.Object.getOwnPropertyDescriptors),Wf={exports:{}},Yf=Tn,Kf=R,Gf=Zr.f;Yf({target:"Object",stat:!0,forced:Object.defineProperties!==Gf,sham:!Kf},{defineProperties:Gf});var Qf=ie.Object,Xf=Wf.exports=function(e,t){return Qf.defineProperties(e,t)};Qf.defineProperties.sham&&(Xf.sham=!0);var Jf=i(Wf.exports),Zf=i(Ln);Tn({target:"Array",stat:!0},{isArray:$n});var eh=ie.Array.isArray,th=i(eh),nh=Tn,rh=$n,ih=Cr,oh=re,ah=ri,sh=Wn,uh=ee,lh=Jn,ch=ht,dh=Ts,fh=Lr("slice"),hh=ch("species"),vh=Array,ph=Math.max;nh({target:"Array",proto:!0,forced:!fh},{slice:function(e,t){var n,r,i,o=uh(this),a=sh(o),s=ah(e,a),u=ah(void 0===t?a:t,a);if(rh(o)&&(n=o.constructor,(ih(n)&&(n===vh||rh(n.prototype))||oh(n)&&null===(n=n[hh]))&&(n=void 0),n===vh||void 0===n))return dh(o,s,u);for(r=new(void 0===n?vh:n)(ph(u-s,0)),i=0;s<u;s++,i++)s in o&&lh(r,i,o[s]);return r.length=i,r}});var mh=zc("Array").slice,yh=ce,gh=mh,xh=Array.prototype,Ah=function(e){var t=e.slice;return e===xh||yh(xh,e)&&t===xh.slice?gh:t},wh=Ah,bh=i(wh),Eh=i(bf);function _h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ch(e,t){var n;if(e){if("string"==typeof e)return _h(e,t);var r=bh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Eh(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(e,t):void 0}}function jh(e,t){return function(e){if(th(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Zl&&_f(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Ch(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kh(e){return function(e){if(th(e))return _h(e)}(e)||function(e){if(void 0!==Zl&&null!=_f(e)||null!=e["@@iterator"])return Eh(e)}(e)||Ch(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Sh=i(Nl),Th=zc("Array").concat,Nh=ce,Oh=Th,Rh=Array.prototype,Ih=i((function(e){var t=e.concat;return e===Rh||Nh(Rh,e)&&t===Rh.concat?Oh:t})),Ph=i(Ah);Tn({target:"Reflect",stat:!0},{ownKeys:Ff});var Lh=i(ie.Reflect.ownKeys),Mh=i(eh),Dh=Qe,zh=xi;Tn({target:"Object",stat:!0,forced:u((function(){zh(1)}))},{keys:function(e){return zh(Dh(e))}});var $h=i(ie.Object.keys),Fh=oa.forEach,Uh=Zc("forEach")?[].forEach:function(e){return Fh(this,e,arguments.length>1?arguments[1]:void 0)};Tn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var qh=zc("Array").forEach,Hh=sr,Vh=Ze,Bh=ce,Wh=qh,Yh=Array.prototype,Kh={DOMTokenList:!0,NodeList:!0},Gh=function(e){var t=e.forEach;return e===Yh||Bh(Yh,e)&&t===Yh.forEach||Vh(Kh,Hh(e))?Wh:t},Qh=i(Gh),Xh=Tn,Jh=$n,Zh=x([].reverse),ev=[1,2];Xh({target:"Array",proto:!0,forced:String(ev)===String(ev.reverse())},{reverse:function(){return Jh(this)&&(this.length=this.length),Zh(this)}});var tv=zc("Array").reverse,nv=ce,rv=tv,iv=Array.prototype,ov=function(e){var t=e.reverse;return e===iv||nv(iv,e)&&t===iv.reverse?rv:t},av=i(ov),sv=R,uv=$n,lv=TypeError,cv=Object.getOwnPropertyDescriptor,dv=sv&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),fv=Te,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Tn,mv=Qe,yv=ri,gv=Hn,xv=Wn,Av=dv?function(e,t){if(uv(e)&&!cv(e,"length").writable)throw lv("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wv=Kn,bv=Or,Ev=Jn,_v=vv,Cv=Lr("splice"),jv=Math.max,kv=Math.min;pv({target:"Array",proto:!0,forced:!Cv},{splice:function(e,t){var n,r,i,o,a,s,u=mv(this),l=xv(u),c=yv(e,l),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=l-c):(n=d-2,r=kv(jv(gv(t),0),l-c)),wv(l+n-r),i=bv(u,r),o=0;o<r;o++)(a=c+o)in u&&Ev(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:_v(u,s);for(o=l;o>l-r+n;o--)_v(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:_v(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Av(u,l-r+n),i}});var Sv=zc("Array").splice,Tv=ce,Nv=Sv,Ov=Array.prototype,Rv=i((function(e){var t=e.splice;return e===Ov||Tv(Ov,e)&&t===Ov.splice?Nv:t})),Iv=R,Pv=x,Lv=L,Mv=u,Dv=xi,zv=ao,$v=M,Fv=Qe,Uv=Y,qv=Object.assign,Hv=Object.defineProperty,Vv=Pv([].concat),Bv=!qv||Mv((function(){if(Iv&&1!==qv({b:1},qv(Hv({},"a",{enumerable:!0,get:function(){Hv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=qv({},e)[n]||Dv(qv({},t)).join("")!=r}))?function(e,t){for(var n=Fv(e),r=arguments.length,i=1,o=zv.f,a=$v.f;r>i;)for(var s,u=Uv(arguments[i++]),l=o?Vv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Iv&&!Lv(a,u,s)||(n[s]=u[s]);return n}:qv,Wv=Bv;Tn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wv},{assign:Wv});var Yv=i(ie.Object.assign),Kv=Qe,Gv=Tu,Qv=wu;Tn({target:"Object",stat:!0,forced:u((function(){Gv(1)})),sham:!Qv},{getPrototypeOf:function(e){return Gv(Kv(e))}});var Xv=ie.Object.getPrototypeOf;Tn({target:"Object",stat:!0,sham:!R},{create:Vi});var Jv=ie.Object,Zv=function(e,t){return Jv.create(e,t)},ep=i(Zv),tp=ie,np=v;tp.JSON||(tp.JSON={stringify:JSON.stringify});var rp=i((function(e,t,n){return np(tp.JSON.stringify,null,arguments)})),ip="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,op=TypeError,ap=function(e,t){if(e<t)throw op("Not enough arguments");return e},sp=s,up=v,lp=N,cp=ip,dp=de,fp=Ts,hp=ap,vp=sp.Function,pp=/MSIE .\./.test(dp)||cp&&function(){var e=sp.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),mp=function(e,t){var n=t?2:1;return pp?function(r,i){var o=hp(arguments.length,1)>n,a=lp(r)?r:vp(r),s=o?fp(arguments,n):[],u=o?function(){up(a,this,s)}:a;return t?e(u,i):e(u)}:e},yp=Tn,gp=s,xp=mp(gp.setInterval,!0);yp({global:!0,bind:!0,forced:gp.setInterval!==xp},{setInterval:xp});var Ap=Tn,wp=s,bp=mp(wp.setTimeout,!0);Ap({global:!0,bind:!0,forced:wp.setTimeout!==bp},{setTimeout:bp});var Ep=i(ie.setTimeout),_p={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(_p);var Cp,jp=i(_p.exports);function kp(){return kp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kp.apply(this,arguments)}function Sp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Tp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Cp="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var Np,Op=Cp,Rp=["","webkit","Moz","MS","ms","o"],Ip="undefined"==typeof document?{style:{}}:document.createElement("div"),Pp=Math.round,Lp=Math.abs,Mp=Date.now;function Dp(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o<Rp.length;){if((r=(n=Rp[o])?n+i:t)in e)return r;o++}}Np="undefined"==typeof window?{}:window;var zp=Dp(Ip.style,"touchAction"),$p=void 0!==zp,Fp="compute",Up="auto",qp="manipulation",Hp="none",Vp="pan-x",Bp="pan-y",Wp=function(){if(!$p)return!1;var e={},t=Np.CSS&&Np.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Np.CSS.supports("touch-action",n)})),e}(),Yp="ontouchstart"in Np,Kp=void 0!==Dp(Np,"PointerEvent"),Gp=Yp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Qp="touch",Xp="mouse",Jp=25,Zp=1,em=4,tm=8,nm=1,rm=2,im=4,om=8,am=16,sm=rm|im,um=om|am,lm=sm|um,cm=["x","y"],dm=["clientX","clientY"];function fm(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function hm(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function vm(e,t){return e.indexOf(t)>-1}var pm=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Fp&&(e=this.compute()),$p&&this.manager.element.style&&Wp[e]&&(this.manager.element.style[zp]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fm(this.manager.recognizers,(function(t){hm(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(vm(e,Hp))return Hp;var t=vm(e,Vp),n=vm(e,Bp);return t&&n?Hp:t||n?t?Vp:Bp:vm(e,qp)?qp:Up}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=vm(r,Hp)&&!Wp[Hp],o=vm(r,Bp)&&!Wp[Bp],a=vm(r,Vp)&&!Wp[Vp];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&n&sm||a&&n&um?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function mm(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ym(e){var t=e.length;if(1===t)return{x:Pp(e[0].clientX),y:Pp(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Pp(n/t),y:Pp(r/t)}}function gm(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Pp(e.pointers[n].clientX),clientY:Pp(e.pointers[n].clientY)},n++;return{timeStamp:Mp(),pointers:t,center:ym(t),deltaX:e.deltaX,deltaY:e.deltaY}}function xm(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Am(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function wm(e,t){return e===t?nm:Lp(e)>=Lp(t)?e<0?rm:im:t<0?om:am}function bm(e,t,n){return{x:t/e||0,y:n/e||0}}function Em(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=t&Zp&&r-i==0,a=t&(em|tm)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=gm(t)),i>1&&!n.firstMultiple?n.firstMultiple=gm(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=ym(r);t.timeStamp=Mp(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=Am(s,u),t.distance=xm(s,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Zp&&o.eventType!==em||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=wm(t.deltaX,t.deltaY);var l,c,d=bm(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Lp(d.x)>Lp(d.y)?d.x:d.y,t.scale=a?(l=a.pointers,xm((c=r)[0],c[1],dm)/xm(l[0],l[1],dm)):1,t.rotation=a?function(e,t){return Am(t[1],t[0],dm)+Am(e[1],e[0],dm)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(t.eventType!==tm&&(s>Jp||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=bm(s,u,l);r=c.x,i=c.y,n=Lp(c.x)>Lp(c.y)?c.x:c.y,o=wm(u,l),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var f,h=e.element,v=t.srcEvent;mm(f=v.composedPath?v.composedPath()[0]:v.path?v.path[0]:v.target,h)&&(h=f),t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _m(e){return e.trim().split(/\s+/g)}function Cm(e,t,n){fm(_m(t),(function(t){e.addEventListener(t,n,!1)}))}function jm(e,t,n){fm(_m(t),(function(t){e.removeEventListener(t,n,!1)}))}function km(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Sm=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){hm(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Cm(this.element,this.evEl,this.domHandler),this.evTarget&&Cm(this.target,this.evTarget,this.domHandler),this.evWin&&Cm(km(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&jm(this.element,this.evEl,this.domHandler),this.evTarget&&jm(this.target,this.evTarget,this.domHandler),this.evWin&&jm(km(this.element),this.evWin,this.domHandler)},e}();function Tm(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Nm={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Om={2:Qp,3:"pen",4:Xp,5:"kinect"},Rm="pointerdown",Im="pointermove pointerup pointercancel";Np.MSPointerEvent&&!Np.PointerEvent&&(Rm="MSPointerDown",Im="MSPointerMove MSPointerUp MSPointerCancel");var Pm=function(e){function t(){var n,r=t.prototype;return r.evEl=Rm,r.evWin=Im,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return Sp(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Nm[r],o=Om[e.pointerType]||e.pointerType,a=o===Qp,s=Tm(t,e.pointerId,"pointerId");i&Zp&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(em|tm)&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(Sm);function Lm(e){return Array.prototype.slice.call(e,0)}function Mm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Tm(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var Dm={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},zm=function(e){function t(){var n;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).targetIds={},n}return Sp(t,e),t.prototype.handler=function(e){var t=Dm[e.type],n=$m.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Qp,srcEvent:e})},t}(Sm);function $m(e,t){var n,r,i=Lm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Lm(e.changedTouches),s=[],u=this.target;if(r=i.filter((function(e){return mm(e.target,u)})),t===Zp)for(n=0;n<r.length;)o[r[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),t&(em|tm)&&delete o[a[n].identifier],n++;return s.length?[Mm(r.concat(s),"identifier",!0),s]:void 0}var Fm={mousedown:Zp,mousemove:2,mouseup:em},Um=function(e){function t(){var n,r=t.prototype;return r.evEl="mousedown",r.evWin="mousemove mouseup",(n=e.apply(this,arguments)||this).pressed=!1,n}return Sp(t,e),t.prototype.handler=function(e){var t=Fm[e.type];t&Zp&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=em),this.pressed&&(t&em&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Xp,srcEvent:e}))},t}(Sm),qm=2500;function Hm(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),qm)}}function Vm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Hm.call(this,t)):e&(em|tm)&&Hm.call(this,t)}function Bm(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}var Wm=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===Qp,o=n.pointerType===Xp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Vm.call(Tp(Tp(r)),t,n);else if(o&&Bm.call(Tp(Tp(r)),n))return;r.callback(e,t,n)}},r.touch=new zm(r.manager,r.handler),r.mouse=new Um(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return Sp(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Sm);function Ym(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Km=32,Gm=1;function Qm(e,t){var n=t.manager;return n?n.get(e):e}function Xm(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Jm=function(){function e(e){void 0===e&&(e={}),this.options=kp({enable:!0},e),this.id=Gm++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Op(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Ym(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Qm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Ym(e,"dropRecognizeWith",this)||(e=Qm(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Ym(e,"requireFailure",this))return this;var t=this.requireFail;return-1===Tm(t,e=Qm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Ym(e,"dropRequireFailure",this))return this;e=Qm(e,this);var t=Tm(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Xm(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Xm(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Km},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Op({},e);if(!hm(this.options.enable,[this,t]))return this.reset(),void(this.state=Km);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Zm=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[qp]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&Zp&&0===this.count)return this.failTimeout();if(i&&o&&r){if(e.eventType!==em)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||xm(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Km},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Km}),this.options.interval),Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Jm),ey=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({pointers:1},t))||this}Sp(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&tm||!i)?16|t:r||i?n&em?8|t:2&t?4|t:2:Km},t}(Jm);function ty(e){return e===am?"down":e===om?"up":e===rm?"left":e===im?"right":""}var ny=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"pan",threshold:10,pointers:1,direction:lm},t))||this).pX=null,n.pY=null,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sm&&t.push(Bp),e&um&&t.push(Vp),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(t.direction&sm?(i=0===o?nm:o<0?rm:im,n=o!==this.pX,r=Math.abs(e.deltaX)):(i=0===a?nm:a<0?om:am,n=a!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return ey.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=ty(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(ey),ry=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return ny.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(sm|um)?n=t.overallVelocity:r&sm?n=t.overallVelocityX:r&um&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Lp(n)>this.options.velocity&&t.eventType&em},n.emit=function(e){var t=ty(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(ey),iy=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"pinch",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(ey),oy=function(e){function t(t){return void 0===t&&(t={}),e.call(this,kp({event:"rotate",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(ey),ay=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,kp({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Up]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(em|tm)&&!o)this.reset();else if(e.eventType&Zp)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&em)return 8;return Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&em?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Mp(),this.manager.emit(this.options.event,this._input)))},t}(Jm),sy={domEvents:!1,touchAction:Fp,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},uy=[[oy,{enable:!1}],[iy,{enable:!1},["rotate"]],[ry,{direction:sm}],[ny,{direction:sm},["swipe"]],[Zm],[Zm,{event:"doubletap",taps:2},["tap"]],[ay]];function ly(e,t){var n,r=e.element;r.style&&(fm(e.options.cssProps,(function(i,o){n=Dp(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var cy=function(){function e(e,t){var n=this;this.options=Op({},sy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(Kp?Pm:Gp?zm:Yp?Wm:Um))(this,Em),this.touchAction=new pm(this,this.options.touchAction),ly(this,!0),fm(this.options.recognizers,(function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Op(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),o++}},t.get=function(e){if(e instanceof Jm)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Ym(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Ym(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Tm(n,t);-1!==r&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return fm(_m(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return fm(_m(e),(function(e){t?n[e]&&n[e].splice(Tm(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&ly(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),dy={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},fy=function(e){function t(){var n,r=t.prototype;return r.evTarget="touchstart",r.evWin="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).started=!1,n}return Sp(t,e),t.prototype.handler=function(e){var t=dy[e.type];if(t===Zp&&(this.started=!0),this.started){var n=hy.call(this,e,t);t&(em|tm)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Qp,srcEvent:e})}},t}(Sm);function hy(e,t){var n=Lm(e.touches),r=Lm(e.changedTouches);return t&(em|tm)&&(n=Mm(n.concat(r),"identifier",!0)),[n,r]}function vy(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var py=vy((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&void 0===e[r[i]])&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),my=vy((function(e,t){return py(e,t,!0)}),"merge","Use `assign`.");function yy(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&Op(r,n)}function gy(e,t){return function(){return e.apply(t,arguments)}}var xy=function(){var e=function(e,t){return void 0===t&&(t={}),new cy(e,kp({recognizers:uy.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=lm,e.DIRECTION_DOWN=am,e.DIRECTION_LEFT=rm,e.DIRECTION_RIGHT=im,e.DIRECTION_UP=om,e.DIRECTION_HORIZONTAL=sm,e.DIRECTION_VERTICAL=um,e.DIRECTION_NONE=nm,e.DIRECTION_DOWN=am,e.INPUT_START=Zp,e.INPUT_MOVE=2,e.INPUT_END=em,e.INPUT_CANCEL=tm,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Km,e.Manager=cy,e.Input=Sm,e.TouchAction=pm,e.TouchInput=zm,e.MouseInput=Um,e.PointerEventInput=Pm,e.TouchMouseInput=Wm,e.SingleTouchInput=fy,e.Recognizer=Jm,e.AttrRecognizer=ey,e.Tap=Zm,e.Pan=ny,e.Swipe=ry,e.Pinch=iy,e.Rotate=oy,e.Press=ay,e.on=Cm,e.off=jm,e.each=fm,e.merge=my,e.extend=py,e.bindFn=gy,e.assign=Op,e.inherit=yy,e.bindFn=gy,e.prefixed=Dp,e.toArray=Lm,e.inArray=Tm,e.uniqueArray=Mm,e.splitStr=_m,e.boolOrFn=hm,e.hasParent=mm,e.addEventListeners=Cm,e.removeEventListeners=jm,e.defaults=Op({},sy,{preset:uy}),e}();function Ay(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return wy(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wy(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var by=Sh("DELETE");function Ey(){var e=_y.apply(void 0,arguments);return jy(e),e}function _y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)return t[0];var r;if(t.length>2)return _y.apply(void 0,Ih(r=[Ey(t[0],t[1])]).call(r,kh(Ph(t).call(t,2))));var i,o=t[0],a=t[1],s=Ay(Lh(a));try{for(s.s();!(i=s.n()).done;){var u=i.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===by?delete o[u]:null===o[u]||null===a[u]||"object"!==xc(o[u])||"object"!==xc(a[u])||Mh(o[u])||Mh(a[u])?o[u]=Cy(a[u]):o[u]=_y(o[u],a[u]))}}catch(e){s.e(e)}finally{s.f()}return o}function Cy(e){return Mh(e)?gd(e).call(e,(function(e){return Cy(e)})):"object"===xc(e)&&null!==e?_y({},e):e}function jy(e){for(var t=0,n=$h(e);t<n.length;t++){var r=n[t];e[r]===by?delete e[r]:"object"===xc(e[r])&&null!==e[r]&&jy(e[r])}}var ky="undefined"!=typeof window?window.Hammer||xy:function(){return function(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}()};function Sy(e){var t,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}));var r=ky(this._dom.overlay);r.on("tap",Vc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Qh(i).call(i,(function(e){r.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(t){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(t.target,e)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",n._onClick)}))),this._escListener=function(e){("key"in e?"Escape"===e.key:27===e.keyCode)&&n.deactivate()}}jp(Sy.prototype),Sy.current=null,Sy.prototype.destroy=function(){var e,t;this.deactivate();var n,r=Ay(av(e=Rv(t=this._cleanupQueue).call(t,0)).call(e));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(e){r.e(e)}finally{r.f()}},Sy.prototype.activate=function(){Sy.current&&Sy.current.deactivate(),Sy.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},Sy.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},Sy.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Ty=Cr,Ny=Te,Oy=TypeError,Ry=function(e){if(Ty(e))return e;throw Oy(Ny(e)+" is not a constructor")},Iy=Tn,Py=v,Ly=Lc,My=Ry,Dy=nn,zy=re,$y=Vi,Fy=u,Uy=le("Reflect","construct"),qy=Object.prototype,Hy=[].push,Vy=Fy((function(){function e(){}return!(Uy((function(){}),[],e)instanceof e)})),By=!Fy((function(){Uy((function(){}))})),Wy=Vy||By;Iy({target:"Reflect",stat:!0,forced:Wy,sham:Wy},{construct:function(e,t){My(e),Dy(t);var n=arguments.length<3?e:My(arguments[2]);if(By&&!Vy)return Uy(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Py(Hy,r,t),new(Py(Ly,e,r))}var i=n.prototype,o=$y(zy(i)?i:qy),a=Py(e,o,t);return zy(a)?a:o}});var Yy=i(ie.Reflect.construct);function Ky(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gy=Zv,Qy=i(Gy);Tn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Xy=ie.Object.setPrototypeOf,Jy=i(Xy),Zy=i(Hc);function eg(e,t){var n;return eg=Jy?Zy(n=Jy).call(n):function(e,t){return e.__proto__=t,e},eg(e,t)}function tg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Qy(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Dn(e,"prototype",{writable:!1}),t&&eg(e,t)}function ng(e,t){if(t&&("object"===xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ky(e)}var rg=Xv,ig=i(rg);function og(e){var t;return og=Jy?Zy(t=ig).call(t):function(e){return e.__proto__||ig(e)},og(e)}var ag={exports:{}},sg={exports:{}};!function(e){var t=Jl,n=yc;function r(i){return e.exports=r="function"==typeof t&&"symbol"==typeof n?function(e){return typeof e}:function(e){return e&&"function"==typeof t&&e.constructor===t&&e!==t.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(sg);var ug=sg.exports,lg=Gh,cg=Ze,dg=Ff,fg=O,hg=Xt,vg=re,pg=yn,mg=Error,yg=x("".replace),gg=String(mg("zxcasd").stack),xg=/\n\s*at [^:]*:[^\n]*/,Ag=xg.test(gg),wg=q,bg=!u((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",wg(1,7)),7!==e.stack)})),Eg=yn,_g=bg,Cg=Error.captureStackTrace,jg=Qt,kg=L,Sg=nn,Tg=Te,Ng=Bd,Og=Wn,Rg=ce,Ig=of,Pg=Xd,Lg=$d,Mg=TypeError,Dg=function(e,t){this.stopped=e,this.result=t},zg=Dg.prototype,$g=function(e,t,n){var r,i,o,a,s,u,l,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),p=jg(t,c),m=function(e){return r&&Lg(r,"normal",e),new Dg(!0,e)},y=function(e){return d?(Sg(e),v?p(e[0],e[1],m):p(e[0],e[1])):v?p(e,m):p(e)};if(f)r=e.iterator;else if(h)r=e;else{if(!(i=Pg(e)))throw Mg(Tg(e)+" is not iterable");if(Ng(i)){for(o=0,a=Og(e);a>o;o++)if((s=y(e[o]))&&Rg(zg,s))return s;return new Dg(!1)}r=Ig(e,i)}for(u=f?e.next:r.next;!(l=kg(u,r)).done;){try{s=y(l.value)}catch(e){Lg(r,"throw",e)}if("object"==typeof s&&s&&Rg(zg,s))return s}return new Dg(!1)},Fg=Jr,Ug=Tn,qg=ce,Hg=Tu,Vg=Ju,Bg=Vi,Wg=yn,Yg=q,Kg=function(e,t,n,r){_g&&(Cg?Cg(e,t):Eg(e,"stack",function(e,t){if(Ag&&"string"==typeof e&&!mg.prepareStackTrace)for(;t--;)e=yg(e,xg,"");return e}(n,r)))},Gg=$g,Qg=ht("toStringTag"),Xg=Error,Jg=[].push,Zg=function(e,t){var n,r=qg(ex,this);Vg?n=Vg(Xg(),r?Hg(this):ex):(n=r?this:Bg(ex),Wg(n,Qg,"Error")),void 0!==t&&Wg(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Fg(e)}(t)),Kg(n,Zg,n.stack,1),arguments.length>2&&function(e,t){vg(t)&&"cause"in t&&pg(e,"cause",t.cause)}(n,arguments[2]);var i=[];return Gg(e,Jg,{that:i}),Wg(n,"errors",i),n};Vg?Vg(Zg,Xg):function(e,t,n){for(var r=dg(t),i=hg.f,o=fg.f,a=0;a<r.length;a++){var s=r[a];cg(e,s)||n&&cg(n,s)||i(e,s,o(t,s))}}(Zg,Xg,{name:!0});var ex=Zg.prototype=Bg(Xg.prototype,{constructor:Yg(1,Zg),message:Yg(1,""),name:Yg(1,"AggregateError")});Ug({global:!0,constructor:!0,arity:2},{AggregateError:Zg});var tx,nx,rx,ix,ox=le,ax=co,sx=R,ux=ht("species"),lx=function(e){var t=ox(e);sx&&t&&!t[ux]&&ax(t,ux,{configurable:!0,get:function(){return this}})},cx=ce,dx=TypeError,fx=function(e,t){if(cx(t,e))return e;throw dx("Incorrect invocation")},hx=nn,vx=Ry,px=K,mx=ht("species"),yx=function(e,t){var n,r=hx(e).constructor;return void 0===r||px(n=hx(r)[mx])?t:vx(n)},gx=/(?:ipad|iphone|ipod).*applewebkit/i.test(de),xx=s,Ax=v,wx=Qt,bx=N,Ex=Ze,_x=u,Cx=ki,jx=Ts,kx=jt,Sx=ap,Tx=gx,Nx=ed,Ox=xx.setImmediate,Rx=xx.clearImmediate,Ix=xx.process,Px=xx.Dispatch,Lx=xx.Function,Mx=xx.MessageChannel,Dx=xx.String,zx=0,$x={},Fx="onreadystatechange";_x((function(){tx=xx.location}));var Ux=function(e){if(Ex($x,e)){var t=$x[e];delete $x[e],t()}},qx=function(e){return function(){Ux(e)}},Hx=function(e){Ux(e.data)},Vx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Ox&&Rx||(Ox=function(e){Sx(arguments.length,1);var t=bx(e)?e:Lx(e),n=jx(arguments,1);return $x[++zx]=function(){Ax(t,void 0,n)},nx(zx),zx},Rx=function(e){delete $x[e]},Nx?nx=function(e){Ix.nextTick(qx(e))}:Px&&Px.now?nx=function(e){Px.now(qx(e))}:Mx&&!Tx?(ix=(rx=new Mx).port2,rx.port1.onmessage=Hx,nx=wx(ix.postMessage,ix)):xx.addEventListener&&bx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!_x(Vx)?(nx=Vx,xx.addEventListener("message",Hx,!1)):nx=Fx in kx("script")?function(e){Cx.appendChild(kx("script"))[Fx]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(qx(e),0)});var Bx={set:Ox,clear:Rx},Wx=function(){this.head=null,this.tail=null};Wx.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Yx,Kx,Gx,Qx,Xx,Jx=Wx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eA=/web0s(?!.*chrome)/i.test(de),tA=s,nA=Qt,rA=O.f,iA=Bx.set,oA=Jx,aA=gx,sA=Zx,uA=eA,lA=ed,cA=tA.MutationObserver||tA.WebKitMutationObserver,dA=tA.document,fA=tA.process,hA=tA.Promise,vA=rA(tA,"queueMicrotask"),pA=vA&&vA.value;if(!pA){var mA=new oA,yA=function(){var e,t;for(lA&&(e=fA.domain)&&e.exit();t=mA.get();)try{t()}catch(e){throw mA.head&&Yx(),e}e&&e.enter()};aA||lA||uA||!cA||!dA?!sA&&hA&&hA.resolve?((Qx=hA.resolve(void 0)).constructor=hA,Xx=nA(Qx.then,Qx),Yx=function(){Xx(yA)}):lA?Yx=function(){fA.nextTick(yA)}:(iA=nA(iA,tA),Yx=function(){iA(yA)}):(Kx=!0,Gx=dA.createTextNode(""),new cA(yA).observe(Gx,{characterData:!0}),Yx=function(){Gx.data=Kx=!Kx}),pA=function(e){mA.head||Yx(),mA.add(e)}}var gA=pA,xA=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},AA=s.Promise,wA="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,bA=!wA&&!ed&&"object"==typeof window&&"object"==typeof document,EA=s,_A=AA,CA=N,jA=Wt,kA=dr,SA=ht,TA=bA,NA=wA,OA=ge,RA=_A&&_A.prototype,IA=SA("species"),PA=!1,LA=CA(EA.PromiseRejectionEvent),MA=jA("Promise",(function(){var e=kA(_A),t=e!==String(_A);if(!t&&66===OA)return!0;if(!RA.catch||!RA.finally)return!0;if(!OA||OA<51||!/native code/.test(e)){var n=new _A((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[IA]=r,!(PA=n.then((function(){}))instanceof r))return!0}return!t&&(TA||NA)&&!LA})),DA={CONSTRUCTOR:MA,REJECTION_EVENT:LA,SUBCLASSING:PA},zA={},$A=Ie,FA=TypeError,UA=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw FA("Bad Promise constructor");t=e,n=r})),this.resolve=$A(t),this.reject=$A(n)};zA.f=function(e){return new UA(e)};var qA,HA,VA=Tn,BA=ed,WA=s,YA=L,KA=uo,GA=Lo,QA=lx,XA=Ie,JA=N,ZA=re,ew=fx,tw=yx,nw=Bx.set,rw=gA,iw=xA,ow=Jx,aw=Xo,sw=AA,uw=zA,lw="Promise",cw=DA.CONSTRUCTOR,dw=DA.REJECTION_EVENT,fw=aw.getterFor(lw),hw=aw.set,vw=sw&&sw.prototype,pw=sw,mw=vw,yw=WA.TypeError,gw=WA.document,xw=WA.process,Aw=uw.f,ww=Aw,bw=!!(gw&&gw.createEvent&&WA.dispatchEvent),Ew="unhandledrejection",_w=function(e){var t;return!(!ZA(e)||!JA(t=e.then))&&t},Cw=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Nw(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(yw("Promise-chain cycle")):(r=_w(n))?YA(r,n,u,l):u(n)):l(o)}catch(e){c&&!i&&c.exit(),l(e)}},jw=function(e,t){e.notified||(e.notified=!0,rw((function(){for(var n,r=e.reactions;n=r.get();)Cw(n,e);e.notified=!1,t&&!e.rejection&&Sw(e)})))},kw=function(e,t,n){var r,i;bw?((r=gw.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),WA.dispatchEvent(r)):r={promise:t,reason:n},!dw&&(i=WA["on"+e])?i(r):e===Ew&&function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},Sw=function(e){YA(nw,WA,(function(){var t,n=e.facade,r=e.value;if(Tw(e)&&(t=iw((function(){BA?xw.emit("unhandledRejection",r,n):kw(Ew,n,r)})),e.rejection=BA||Tw(e)?2:1,t.error))throw t.value}))},Tw=function(e){return 1!==e.rejection&&!e.parent},Nw=function(e){YA(nw,WA,(function(){var t=e.facade;BA?xw.emit("rejectionHandled",t):kw("rejectionhandled",t,e.value)}))},Ow=function(e,t,n){return function(r){e(t,r,n)}},Rw=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,jw(e,!0))},Iw=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw yw("Promise can't be resolved itself");var r=_w(t);r?rw((function(){var n={done:!1};try{YA(r,t,Ow(Iw,n,e),Ow(Rw,n,e))}catch(t){Rw(n,t,e)}})):(e.value=t,e.state=1,jw(e,!1))}catch(t){Rw({done:!1},t,e)}}};cw&&(mw=(pw=function(e){ew(this,mw),XA(e),YA(qA,this);var t=fw(this);try{e(Ow(Iw,t),Ow(Rw,t))}catch(e){Rw(t,e)}}).prototype,(qA=function(e){hw(this,{type:lw,done:!1,notified:!1,parent:!1,reactions:new ow,rejection:!1,state:0,value:void 0})}).prototype=KA(mw,"then",(function(e,t){var n=fw(this),r=Aw(tw(this,pw));return n.parent=!0,r.ok=!JA(e)||e,r.fail=JA(t)&&t,r.domain=BA?xw.domain:void 0,0==n.state?n.reactions.add(r):rw((function(){Cw(r,n)})),r.promise})),HA=function(){var e=new qA,t=fw(e);this.promise=e,this.resolve=Ow(Iw,t),this.reject=Ow(Rw,t)},uw.f=Aw=function(e){return e===pw||void 0===e?new HA(e):ww(e)}),VA({global:!0,constructor:!0,wrap:!0,forced:cw},{Promise:pw}),GA(pw,lw,!1,!0),QA(lw);var Pw=AA,Lw=DA.CONSTRUCTOR||!wf((function(e){Pw.all(e).then(void 0,(function(){}))})),Mw=L,Dw=Ie,zw=zA,$w=xA,Fw=$g;Tn({target:"Promise",stat:!0,forced:Lw},{all:function(e){var t=this,n=zw.f(t),r=n.resolve,i=n.reject,o=$w((function(){var n=Dw(t.resolve),o=[],a=0,s=1;Fw(e,(function(e){var u=a++,l=!1;s++,Mw(n,t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Uw=Tn,qw=DA.CONSTRUCTOR;AA&&AA.prototype,Uw({target:"Promise",proto:!0,forced:qw,real:!0},{catch:function(e){return this.then(void 0,e)}});var Hw=L,Vw=Ie,Bw=zA,Ww=xA,Yw=$g;Tn({target:"Promise",stat:!0,forced:Lw},{race:function(e){var t=this,n=Bw.f(t),r=n.reject,i=Ww((function(){var i=Vw(t.resolve);Yw(e,(function(e){Hw(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Kw=L,Gw=zA;Tn({target:"Promise",stat:!0,forced:DA.CONSTRUCTOR},{reject:function(e){var t=Gw.f(this);return Kw(t.reject,void 0,e),t.promise}});var Qw=nn,Xw=re,Jw=zA,Zw=function(e,t){if(Qw(e),Xw(t)&&t.constructor===e)return t;var n=Jw.f(e);return(0,n.resolve)(t),n.promise},eb=Tn,tb=AA,nb=DA.CONSTRUCTOR,rb=Zw,ib=le("Promise"),ob=!nb;eb({target:"Promise",stat:!0,forced:!0},{resolve:function(e){return rb(ob&&this===ib?tb:this,e)}});var ab=L,sb=Ie,ub=zA,lb=xA,cb=$g;Tn({target:"Promise",stat:!0,forced:Lw},{allSettled:function(e){var t=this,n=ub.f(t),r=n.resolve,i=n.reject,o=lb((function(){var n=sb(t.resolve),i=[],o=0,a=1;cb(e,(function(e){var s=o++,u=!1;a++,ab(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var db=L,fb=Ie,hb=le,vb=zA,pb=xA,mb=$g,yb="No one promise resolved";Tn({target:"Promise",stat:!0,forced:Lw},{any:function(e){var t=this,n=hb("AggregateError"),r=vb.f(t),i=r.resolve,o=r.reject,a=pb((function(){var r=fb(t.resolve),a=[],s=0,u=1,l=!1;mb(e,(function(e){var c=s++,d=!1;u++,db(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[c]=e,--u||o(new n(a,yb)))}))})),--u||o(new n(a,yb))}));return a.error&&o(a.value),r.promise}});var gb=Tn,xb=AA,Ab=u,wb=le,bb=N,Eb=yx,_b=Zw,Cb=xb&&xb.prototype;gb({target:"Promise",proto:!0,real:!0,forced:!!xb&&Ab((function(){Cb.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Eb(this,wb("Promise")),n=bb(e);return this.then(n?function(n){return _b(t,e()).then((function(){return n}))}:e,n?function(n){return _b(t,e()).then((function(){throw n}))}:e)}});var jb=ie.Promise,kb=zA,Sb=xA;Tn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=kb.f(this),n=Sb(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Tb=jb,Nb=ov;!function(e){var t=ug.default,n=Mn,r=Jl,i=Gy,o=rg,a=lg,s=Xy,u=Tb,l=Nb,c=wh;function d(){e.exports=d=function(){return f},e.exports.__esModule=!0,e.exports.default=e.exports;var f={},h=Object.prototype,v=h.hasOwnProperty,p=n||function(e,t,n){e[t]=n.value},m="function"==typeof r?r:{},y=m.iterator||"@@iterator",g=m.asyncIterator||"@@asyncIterator",x=m.toStringTag||"@@toStringTag";function A(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{A({},"")}catch(e){A=function(e,t,n){return e[t]=n}}function w(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,a=i(o.prototype),s=new M(r||[]);return p(a,"_invoke",{value:R(e,n,s)}),a}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}f.wrap=w;var E={};function _(){}function C(){}function j(){}var k={};A(k,y,(function(){return this}));var S=o&&o(o(D([])));S&&S!==h&&v.call(S,y)&&(k=S);var T=j.prototype=_.prototype=i(k);function N(e){var t;a(t=["next","throw","return"]).call(t,(function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,n){function r(i,o,a,s){var u=b(e[i],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==t(c)&&v.call(c,"__await")?n.resolve(c.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):n.resolve(c).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;p(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,i){r(e,t,n,i)}))}return i=i?i.then(o,o):o()}})}function R(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===E)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=b(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===E)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function I(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),E;var i=b(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,E;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,E):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,E)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],a(e).call(e,P,this),this.reset(!0)}function D(e){if(e){var t=e[y];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:z}}function z(){return{value:void 0,done:!0}}return C.prototype=j,p(T,"constructor",{value:j,configurable:!0}),p(j,"constructor",{value:C,configurable:!0}),C.displayName=A(j,x,"GeneratorFunction"),f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return s?s(e,j):(e.__proto__=j,A(e,x,"GeneratorFunction")),e.prototype=i(T),e},f.awrap=function(e){return{__await:e}},N(O.prototype),A(O.prototype,g,(function(){return this})),f.AsyncIterator=O,f.async=function(e,t,n,r,i){void 0===i&&(i=u);var o=new O(w(e,t,n,r),i);return f.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},N(T),A(T,x,"Generator"),A(T,y,(function(){return this})),A(T,"toString",(function(){return"[object Generator]"})),f.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return l(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},f.values=D,M.prototype={constructor:M,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,a(t=this.tryEntries).call(t,L),!e)for(var n in this)"t"===n.charAt(0)&&v.call(this,n)&&!isNaN(+c(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),s=v.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,E):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),E}},f}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}(ag);var Ob=(0,ag.exports)(),Rb=Ob;try{regeneratorRuntime=Ob}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Ob:Function("r","regeneratorRuntime = r")(Ob)}var Ib=i(Rb),Pb={exports:{}},Lb=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Mb=u,Db=re,zb=E,$b=Lb,Fb=Object.isExtensible,Ub=Mb((function(){Fb(1)}))||$b?function(e){return!!Db(e)&&(!$b||"ArrayBuffer"!=zb(e))&&(!Fb||Fb(e))}:Fb,qb=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hb=Tn,Vb=x,Bb=li,Wb=re,Yb=Ze,Kb=Xt.f,Gb=Bi,Qb=Ki,Xb=Ub,Jb=qb,Zb=!1,eE=it("meta"),tE=0,nE=function(e){Kb(e,eE,{value:{objectID:"O"+tE++,weakData:{}}})},rE=Pb.exports={enable:function(){rE.enable=function(){},Zb=!0;var e=Gb.f,t=Vb([].splice),n={};n[eE]=1,e(n).length&&(Gb.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===eE){t(r,i,1);break}return r},Hb({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Qb.f}))},fastKey:function(e,t){if(!Wb(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Yb(e,eE)){if(!Xb(e))return"F";if(!t)return"E";nE(e)}return e[eE].objectID},getWeakData:function(e,t){if(!Yb(e,eE)){if(!Xb(e))return!0;if(!t)return!1;nE(e)}return e[eE].weakData},onFreeze:function(e){return Jb&&Zb&&Xb(e)&&!Yb(e,eE)&&nE(e),e}};Bb[eE]=!0;var iE=Pb.exports,oE=Tn,aE=s,sE=iE,uE=u,lE=yn,cE=$g,dE=fx,fE=N,hE=re,vE=Lo,pE=Xt.f,mE=oa.forEach,yE=R,gE=Xo.set,xE=Xo.getterFor,AE=function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=aE[e],u=s&&s.prototype,l={};if(yE&&fE(s)&&(o||u.forEach&&!uE((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){gE(dE(t,c),{type:e,collection:new s}),null!=n&&cE(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=xE(e);mE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||lE(c,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!hE(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||pE(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),sE.enable();return vE(r,e,!1,!0),l[e]=r,oE({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r},wE=uo,bE=Vi,EE=co,_E=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:wE(e,r,t[r],n);return e},CE=Qt,jE=fx,kE=K,SE=$g,TE=fl,NE=hl,OE=lx,RE=R,IE=iE.fastKey,PE=Xo.set,LE=Xo.getterFor,ME={getConstructor:function(e,t,n,r){var i=e((function(e,i){jE(e,o),PE(e,{type:t,index:bE(null),first:void 0,last:void 0,size:0}),RE||(e.size=0),kE(i)||SE(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=LE(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=IE(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),RE?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=IE(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return _E(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,RE?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),RE?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=CE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),_E(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),RE&&EE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=LE(t),o=LE(r);TE(e,t,(function(e,t){PE(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?NE("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,NE(void 0,!0))}),n?"entries":"values",!n,!0),OE(t)}};AE("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),ME);var DE=i(ie.Map),zE=oa.some;Tn({target:"Array",proto:!0,forced:!Zc("some")},{some:function(e){return zE(this,e,arguments.length>1?arguments[1]:void 0)}});var $E=zc("Array").some,FE=ce,UE=$E,qE=Array.prototype,HE=i((function(e){var t=e.some;return e===qE||FE(qE,e)&&t===qE.some?UE:t})),VE=zc("Array").keys,BE=sr,WE=Ze,YE=ce,KE=VE,GE=Array.prototype,QE={DOMTokenList:!0,NodeList:!0},XE=i((function(e){var t=e.keys;return e===GE||YE(GE,e)&&t===GE.keys||WE(QE,BE(e))?KE:t})),JE=eo,ZE=Math.floor,e_=function(e,t){var n=e.length,r=ZE(n/2);return n<8?t_(e,t):n_(e,e_(JE(e,0,r),t),e_(JE(e,r),t),t)},t_=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},n_=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},r_=e_,i_=de.match(/firefox\/(\d+)/i),o_=!!i_&&+i_[1],a_=/MSIE|Trident/.test(de),s_=de.match(/AppleWebKit\/(\d+)\./),u_=!!s_&&+s_[1],l_=Tn,c_=x,d_=Ie,f_=Qe,h_=Wn,v_=vv,p_=Jr,m_=u,y_=r_,g_=Zc,x_=o_,A_=a_,w_=ge,b_=u_,E_=[],__=c_(E_.sort),C_=c_(E_.push),j_=m_((function(){E_.sort(void 0)})),k_=m_((function(){E_.sort(null)})),S_=g_("sort"),T_=!m_((function(){if(w_)return w_<70;if(!(x_&&x_>3)){if(A_)return!0;if(b_)return b_<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)E_.push({k:t+r,v:n})}for(E_.sort((function(e,t){return t.v-e.v})),r=0;r<E_.length;r++)t=E_[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));l_({target:"Array",proto:!0,forced:j_||!k_||!S_||!T_},{sort:function(e){void 0!==e&&d_(e);var t=f_(this);if(T_)return void 0===e?__(t):__(t,e);var n,r,i=[],o=h_(t);for(r=0;r<o;r++)r in t&&C_(i,t[r]);for(y_(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:p_(t)>p_(n)?1:-1}}(e)),n=h_(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)v_(t,r++);return t}});var N_=zc("Array").sort,O_=ce,R_=N_,I_=Array.prototype,P_=i((function(e){var t=e.sort;return e===I_||O_(I_,e)&&t===I_.sort?R_:t})),L_=zc("Array").values,M_=sr,D_=Ze,z_=ce,$_=L_,F_=Array.prototype,U_={DOMTokenList:!0,NodeList:!0},q_=i((function(e){var t=e.values;return e===F_||z_(F_,e)&&t===F_.values||D_(U_,M_(e))?$_:t})),H_=i(mc),V_=zc("Array").entries,B_=sr,W_=Ze,Y_=ce,K_=V_,G_=Array.prototype,Q_={DOMTokenList:!0,NodeList:!0},X_=i((function(e){var t=e.entries;return e===G_||Y_(G_,e)&&t===G_.entries||W_(Q_,B_(e))?K_:t}));let J_;const Z_=new Uint8Array(16);function eC(){if(!J_&&(J_="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!J_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J_(Z_)}const tC=[];for(let e=0;e<256;++e)tC.push((e+256).toString(16).slice(1));var nC={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rC(e,t,n){if(nC.randomUUID&&!t&&!e)return nC.randomUUID();const r=(e=e||{}).random||(e.rng||eC)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return tC[e[t+0]]+tC[e[t+1]]+tC[e[t+2]]+tC[e[t+3]]+"-"+tC[e[t+4]]+tC[e[t+5]]+"-"+tC[e[t+6]]+tC[e[t+7]]+"-"+tC[e[t+8]]+tC[e[t+9]]+"-"+tC[e[t+10]]+tC[e[t+11]]+tC[e[t+12]]+tC[e[t+13]]+tC[e[t+14]]+tC[e[t+15]]}(r)}function iC(e){return"string"==typeof e||"number"==typeof e}var oC=function(){function e(n){t(this,e),_c(this,"delay",void 0),_c(this,"max",void 0),_c(this,"_queue",[]),_c(this,"_timeout",null),_c(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ec(e,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:"replace",value:function(e,t){var n=this,r=e[t];if(!r)throw new Error("Method "+t+" undefined");e[t]=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.queue({args:t,fn:r,context:this})}}},{key:"queue",value:function(e){"function"==typeof e?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Ep((function(){e.flush()}),this.delay))}},{key:"flush",value:function(){var e,t;Qh(e=Rv(t=this._queue).call(t,0)).call(e,(function(e){e.fn.apply(e.context||e.fn,e.args||[])}))}}],[{key:"extend",value:function(t,n){var r=new e(n);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){r.flush()};var i=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;o<n.replace.length;o++){var a=n.replace[o];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}}]),e}(),aC=function(){function e(){t(this,e),_c(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),_c(this,"subscribe",e.prototype.on),_c(this,"unsubscribe",e.prototype.off)}return Ec(e,[{key:"_trigger",value:function(e,t,n){var r,i;if("*"===e)throw new Error("Cannot trigger event *");Qh(r=Ih(i=[]).call(i,kh(this._subscribers[e]),kh(this._subscribers["*"]))).call(r,(function(r){r(e,t,null!=n?n:null)}))}},{key:"on",value:function(e,t){"function"==typeof t&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var n;this._subscribers[e]=fd(n=this._subscribers[e]).call(n,(function(e){return e!==t}))}}]),e}();AE("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),ME);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return dC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function dC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}sC=H_;var fC=function(){function e(n){t(this,e),_c(this,"_pairs",void 0),this._pairs=n}return Ec(e,[{key:sC,value:Ib.mark((function e(){var t,n,r,i,o;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:Ib.mark((function e(){var t,n,r,i,o;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"keys",value:Ib.mark((function e(){var t,n,r,i;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:Ib.mark((function e(){var t,n,r,i;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var e;return gd(e=kh(this._pairs)).call(e,(function(e){return e[0]}))}},{key:"toItemArray",value:function(){var e;return gd(e=kh(this._pairs)).call(e,(function(e){return e[1]}))}},{key:"toEntryArray",value:function(){return kh(this._pairs)}},{key:"toObjectMap",value:function(){var e,t=ep(null),n=cC(this._pairs);try{for(n.s();!(e=n.n()).done;){var r=jh(e.value,2),i=r[0],o=r[1];t[i]=o}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toMap",value:function(){return new DE(this._pairs)}},{key:"toIdSet",value:function(){return new uC(this.toIdArray())}},{key:"toItemSet",value:function(){return new uC(this.toItemArray())}},{key:"cache",value:function(){return new e(kh(this._pairs))}},{key:"distinct",value:function(e){var t,n=new uC,r=cC(this._pairs);try{for(r.s();!(t=r.n()).done;){var i=jh(t.value,2),o=i[0],a=i[1];n.add(e(a,o))}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"filter",value:function(t){var n=this._pairs;return new e(_c({},H_,Ib.mark((function e(){var r,i,o,a,s;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=10;break}if(o=jh(i.value,2),a=o[0],s=o[1],!t(s,a)){e.next=8;break}return e.next=8,[a,s];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),r.e(e.t0);case 15:return e.prev=15,r.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))))}},{key:"forEach",value:function(e){var t,n=cC(this._pairs);try{for(n.s();!(t=n.n()).done;){var r=jh(t.value,2),i=r[0];e(r[1],i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"map",value:function(t){var n=this._pairs;return new e(_c({},H_,Ib.mark((function e(){var r,i,o,a,s;return Ib.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=9;break}return o=jh(i.value,2),a=o[0],s=o[1],e.next=7,[a,t(s,a)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),r.e(e.t0);case 14:return e.prev=14,r.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))))}},{key:"max",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u>i&&(i=u,r=s)}return r}},{key:"min",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u<i&&(i=u,r=s)}return r}},{key:"reduce",value:function(e,t){var n,r=cC(this._pairs);try{for(r.s();!(n=r.n()).done;){var i=jh(n.value,2),o=i[0];t=e(t,i[1],o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"sort",value:function(t){var n=this;return new e(_c({},H_,(function(){var e;return lC(P_(e=kh(n._pairs)).call(e,(function(e,n){var r=jh(e,2),i=r[0],o=r[1],a=jh(n,2),s=a[0],u=a[1];return t(o,u,i,s)})))})))}}]),e}();function hC(e,t){var n=$h(e);if(Cf){var r=Cf(e);t&&(r=fd(r).call(r,(function(t){return Pf(e,t).enumerable}))),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Qh(n=hC(Object(i),!0)).call(n,(function(t){_c(e,t,i[t])})):Bf?Jf(e,Bf(i)):Qh(r=hC(Object(i))).call(r,(function(t){Zf(e,t,Pf(i,t))}))}return e}function pC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return mC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function mC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yC=function(e){tg(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Yy)return!1;if(Yy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Yy(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}(r);function r(e,i){var o;return t(this,r),_c(Ky(o=n.call(this)),"flush",void 0),_c(Ky(o),"length",void 0),_c(Ky(o),"_options",void 0),_c(Ky(o),"_data",void 0),_c(Ky(o),"_idProp",void 0),_c(Ky(o),"_queue",null),e&&!Mh(e)&&(i=e,e=[]),o._options=i||{},o._data=new DE,o.length=0,o._idProp=o._options.fieldId||"id",e&&e.length&&o.add(e),o.setOptions(i),o}return Ec(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(e){e&&void 0!==e.queue&&(!1===e.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=oC.extend(this,{replace:["add","update","remove"]})),e.queue&&"object"===xc(e.queue)&&this._queue.setOptions(e.queue)))}},{key:"add",value:function(e,t){var n,r=this,i=[];if(Mh(e)){var o=gd(e).call(e,(function(e){return e[r._idProp]}));if(HE(o).call(o,(function(e){return r._data.has(e)})))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=e.length;a<s;a++)n=this._addItem(e[a]),i.push(n)}else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");n=this._addItem(e),i.push(n)}return i.length&&this._trigger("add",{items:i},t),i}},{key:"update",value:function(e,t){var n=this,r=[],i=[],o=[],a=[],s=this._idProp,u=function(e){var t=e[s];if(null!=t&&n._data.has(t)){var u=e,l=Yv({},n._data.get(t)),c=n._updateItem(u);i.push(c),a.push(u),o.push(l)}else{var d=n._addItem(e);r.push(d)}};if(Mh(e))for(var l=0,c=e.length;l<c;l++)e[l]&&"object"===xc(e[l])?u(e[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");u(e)}if(r.length&&this._trigger("add",{items:r},t),i.length){var d={items:i,oldData:o,data:a};this._trigger("update",d,t)}return Ih(r).call(r,i)}},{key:"updateOnly",value:function(e,t){var n,r=this;Mh(e)||(e=[e]);var i=gd(n=gd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(null==t)throw new Error("Updating non-existent items is not allowed.");return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],o=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Ey.apply(void 0,Ih(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,o),{id:i,oldData:t,updatedData:o}}));if(i.length){var o={items:gd(i).call(i,(function(e){return e.id})),oldData:gd(i).call(i,(function(e){return e.oldData})),data:gd(i).call(i,(function(e){return e.updatedData}))};return this._trigger("update",o,t),o.items}return[]}},{key:"get",value:function(e,t){var n=void 0,r=void 0,i=void 0;iC(e)?(n=e,i=t):Mh(e)?(r=e,i=t):i=e;var o,a=i&&"Object"===i.returnType?"Object":"Array",s=i&&fd(i),u=[],l=void 0,c=void 0,d=void 0;if(null!=n)(l=this._data.get(n))&&s&&!s(l)&&(l=void 0);else if(null!=r)for(var f=0,h=r.length;f<h;f++)null==(l=this._data.get(r[f]))||s&&!s(l)||u.push(l);else for(var v,p=0,m=(c=kh(XE(v=this._data).call(v))).length;p<m;p++)d=c[p],null==(l=this._data.get(d))||s&&!s(l)||u.push(l);if(i&&i.order&&null==n&&this._sort(u,i.order),i&&i.fields){var y=i.fields;if(null!=n&&null!=l)l=this._filterFields(l,y);else for(var g=0,x=u.length;g<x;g++)u[g]=this._filterFields(u[g],y)}if("Object"==a){for(var A={},w=0,b=u.length;w<b;w++){var E=u[w];A[E[this._idProp]]=E}return A}return null!=n?null!==(o=l)&&void 0!==o?o:null:u}},{key:"getIds",value:function(e){var t=this._data,n=e&&fd(e),r=e&&e.order,i=kh(XE(t).call(t)),o=[];if(n)if(r){for(var a=[],s=0,u=i.length;s<u;s++){var l=i[s],c=this._data.get(l);null!=c&&n(c)&&a.push(c)}this._sort(a,r);for(var d=0,f=a.length;d<f;d++)o.push(a[d][this._idProp])}else for(var h=0,v=i.length;h<v;h++){var p=i[h],m=this._data.get(p);null!=m&&n(m)&&o.push(m[this._idProp])}else if(r){for(var y=[],g=0,x=i.length;g<x;g++){var A=i[g];y.push(t.get(A))}this._sort(y,r);for(var w=0,b=y.length;w<b;w++)o.push(y[w][this._idProp])}else for(var E=0,_=i.length;E<_;E++){var C=i[E],j=t.get(C);null!=j&&o.push(j[this._idProp])}return o}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(e,t){var n=t&&fd(t),r=this._data,i=kh(XE(r).call(r));if(t&&t.order)for(var o=this.get(t),a=0,s=o.length;a<s;a++){var u=o[a];e(u,u[this._idProp])}else for(var l=0,c=i.length;l<c;l++){var d=i[l],f=this._data.get(d);null==f||n&&!n(f)||e(f,d)}}},{key:"map",value:function(e,t){for(var n=t&&fd(t),r=[],i=this._data,o=kh(XE(i).call(i)),a=0,s=o.length;a<s;a++){var u=o[a],l=this._data.get(u);null==l||n&&!n(l)||r.push(e(l,u))}return t&&t.order&&this._sort(r,t.order),r}},{key:"_filterFields",value:function(e,t){var n;return e?ad(n=Mh(t)?t:$h(t)).call(n,(function(t,n){return t[n]=e[n],t}),{}):e}},{key:"_sort",value:function(e,t){if("string"==typeof t){var n=t;P_(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");P_(e).call(e,t)}}},{key:"remove",value:function(e,t){for(var n=[],r=[],i=Mh(e)?e:[e],o=0,a=i.length;o<a;o++){var s=this._remove(i[o]);if(s){var u=s[this._idProp];null!=u&&(n.push(u),r.push(s))}}return n.length&&this._trigger("remove",{items:n,oldData:r},t),n}},{key:"_remove",value:function(e){var t;if(iC(e)?t=e:e&&"object"===xc(e)&&(t=e[this._idProp]),null!=t&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:"clear",value:function(e){for(var t,n=kh(XE(t=this._data).call(t)),r=[],i=0,o=n.length;i<o;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger("remove",{items:n,oldData:r},e),n}},{key:"max",value:function(e){var t,n,r=null,i=null,o=pC(q_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s>i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"min",value:function(e){var t,n,r=null,i=null,o=pC(q_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s<i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"distinct",value:function(e){for(var t=this._data,n=kh(XE(t).call(t)),r=[],i=0,o=0,a=n.length;o<a;o++){for(var s=n[o],u=t.get(s)[e],l=!1,c=0;c<i;c++)if(r[c]==u){l=!0;break}l||void 0===u||(r[i]=u,i++)}return r}},{key:"_addItem",value:function(e){var t=function(e,t){return null==e[t]&&(e[t]=rC()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw new Error("Cannot add item: item with id "+n+" already exists");return this._data.set(n,t),++this.length,n}},{key:"_updateItem",value:function(e){var t=e[this._idProp];if(null==t)throw new Error("Cannot update item: item has no id (item: "+rp(e)+")");var n=this._data.get(t);if(!n)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,vC(vC({},n),e)),t}},{key:"stream",value:function(e){if(e){var t=this._data;return new fC(_c({},H_,Ib.mark((function n(){var r,i,o,a;return Ib.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=pC(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(o=i.value,null==(a=t.get(o))){n.next=9;break}return n.next=9,[o,a];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case"end":return n.stop()}}),n,null,[[1,13,16,19]])}))))}var n;return new fC(_c({},H_,Vc(n=X_(this._data)).call(n,this._data)))}}]),r}(aC);function gC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xC=function(e){tg(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Yy)return!1;if(Yy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Yy(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}(r);function r(e,i){var o,a;return t(this,r),_c(Ky(a=n.call(this)),"length",0),_c(Ky(a),"_listener",void 0),_c(Ky(a),"_data",void 0),_c(Ky(a),"_ids",new uC),_c(Ky(a),"_options",void 0),a._options=i||{},a._listener=Vc(o=a._onEvent).call(o,Ky(a)),a.setData(e),a}return Ec(r,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(e){if(this._data){this._data.off&&this._data.off("*",this._listener);var t=this._data.getIds({filter:fd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:n})}if(null!=e){this._data=e;for(var r=this._data.getIds({filter:fd(this._options)}),i=0,o=r.length;i<o;i++){var a=r[i];this._ids.add(a)}this.length=r.length,this._trigger("add",{items:r})}else this._data=new yC;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var e=this._data.getIds({filter:fd(this._options)}),t=kh(this._ids),n={},r=[],i=[],o=[],a=0,s=e.length;a<s;a++){var u=e[a];n[u]=!0,this._ids.has(u)||(r.push(u),this._ids.add(u))}for(var l=0,c=t.length;l<c;l++){var d=t[l],f=this._data.get(d);null==f?console.error("If you see this, report it please."):n[d]||(i.push(d),o.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger("add",{items:r}),i.length&&this._trigger("remove",{items:i,oldData:o})}},{key:"get",value:function(e,t){if(null==this._data)return null;var n,r=null;iC(e)||Mh(e)?(r=e,n=t):n=e;var i=Yv({},this._options,n),o=fd(this._options),a=n&&fd(n);return o&&a&&(i.filter=function(e){return o(e)&&a(e)}),null==r?this._data.get(i):this._data.get(r,i)}},{key:"getIds",value:function(e){if(this._data.length){var t,n=fd(this._options),r=null!=e?fd(e):null;return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:"forEach",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);r=o?i?function(e){return i(e)&&o(e)}:o:i,Qh(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:"map",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);return r=o?i?function(e){return i(e)&&o(e)}:o:i,gd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(e){var t;return this._data.stream(e||_c({},H_,Vc(t=XE(this._ids)).call(t,this._ids)))}},{key:"dispose",value:function(){var e;null!==(e=this._data)&&void 0!==e&&e.off&&this._data.off("*",this._listener);var t,n="This data view has already been disposed of.",i={get:function(){throw new Error(n)},set:function(){throw new Error(n)},configurable:!1},o=function(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Mh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return gC(e,t);var r=Ph(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Lh(r.prototype));try{for(o.s();!(t=o.n()).done;){var a=t.value;Zf(this,a,i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"_onEvent",value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],o=[],a=[],s=[],u=[],l=[];switch(e){case"add":for(var c=0,d=r.length;c<d;c++){var f=r[c];this.get(f)&&(this._ids.add(f),i.push(f))}break;case"update":for(var h=0,v=r.length;h<v;h++){var p=r[h];this.get(p)?this._ids.has(p)?(o.push(p),u.push(t.data[h]),s.push(t.oldData[h])):(this._ids.add(p),i.push(p)):this._ids.has(p)&&(this._ids.delete(p),a.push(p),l.push(t.oldData[h]))}break;case"remove":for(var m=0,y=r.length;m<y;m++){var g=r[m];this._ids.has(g)&&(this._ids.delete(g),a.push(g),l.push(t.oldData[m]))}}this.length+=i.length-a.length,i.length&&this._trigger("add",{items:i},n),o.length&&this._trigger("update",{items:o,oldData:s,data:u},n),a.length&&this._trigger("remove",{items:a,oldData:l},n)}}}]),r}(aC);function AC(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof t.add&&"function"==typeof t.clear&&"function"==typeof t.distinct&&"function"==typeof Qh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof gd(t)&&"function"==typeof t.max&&"function"==typeof t.min&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.remove&&"function"==typeof t.setOptions&&"function"==typeof t.stream&&"function"==typeof t.update&&"function"==typeof t.updateOnly}e.DELETE=by,e.DataSet=yC,e.DataStream=fC,e.DataView=xC,e.Queue=oC,e.createNewDataPipeFrom=function(e){return new Ld(e)},e.isDataSetLike=AC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Qh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof gd(t)&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.stream&&AC(e,t.getDataSet())}}(t)},24686:(e,t,n)=>{"use strict";n.d(t,{CG:()=>u,M7:()=>s,gU:()=>o,xK:()=>a});var r=n(18472),i=n(29970),o=function(e){return e.queryTracker.queryFilesModal.fileEditor},a=function(e){return e.queryTracker.queryFilesModal.deletedFiles},s=(0,r.Mz)([o,i._M,a],(function(e,t,n){var r="file"===e.fileType?t:n;return{fileEditor:e,file:r.find((function(t){return t.id===e.fileId}))}})),u=(0,r.Mz)([i._M,a,function(e){return e.queryTracker.queryFilesModal.addForm}],(function(e,t,n){return{files:e,deletedFiles:t,addFormOpen:n.isOpen,addFormType:n.type,showTabs:e.length>0||t.length>0||n.isOpen}}))},27117:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.423 1A3.577 3.577 0 0 1 15 4.577c0 .27-.108.53-.3.722l-.528.529-1.971 1.971-5.059 5.059a3 3 0 0 1-1.533.82l-2.638.528a1 1 0 0 1-1.177-1.177l.528-2.638a3 3 0 0 1 .82-1.533l5.059-5.059 2.5-2.5c.191-.191.451-.299.722-.299m-2.31 4.009-4.91 4.91a1.5 1.5 0 0 0-.41.766l-.38 1.903 1.902-.38a1.5 1.5 0 0 0 .767-.41l4.91-4.91a2.08 2.08 0 0 0-1.88-1.88m3.098.658a3.6 3.6 0 0 0-1.878-1.879l1.28-1.28c.995.09 1.788.884 1.878 1.88z",clipRule:"evenodd"})}))}},27723:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r=function(e){return!!e&&["map_node","scheduler_pool_tree_map","topmost_transaction_map","transaction_map","link","rootstock","portal_entrance"].includes(e)}},28099:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.5 3h-7A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3m-7-1.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-7a3 3 0 0 0-3-3z",clipRule:"evenodd"})}))}},34199:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})}))}},35788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v,o:()=>h});var r=n(77810),i=n(53775),o=n(28407),a=n(29121),s=n(12937),u=n(18309),l=function(){return(0,s.A)((function e(t){var n=this;(0,a.A)(this,e),this.intervaTime=1e3,this.watchedQueries=new Map,this.intervalKey=void 0,this.loading=!1,this.requestQueryList=void 0,this.run=(0,o.A)((0,i.A)().mark((function e(){var t,r;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(t=Array.from(n.watchedQueries.keys()))&&t.length){e.next=4;break}return n.intervalKey=void 0,e.abrupt("return");case 4:return n.loading=!0,e.prev=5,e.next=8,n.requestQueryList(t);case 8:null==(r=e.sent)||r.forEach((function(e){var t=n.watchedQueries.get(e.id);null==t||t.forEach((function(t){return t([e])})),(0,u.KO)(e)||n.unsubscribe(e.id)})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.error(e.t0);case 15:return e.prev=15,n.loading=!1,n.intervalKey=void 0,n.start(),e.finish(15);case 20:case"end":return e.stop()}}),e,null,[[5,12,15,20]])}))),this.requestQueryList=t}),[{key:"watch",value:function(e,t){var n=this,r=e.map((function(e){if(n.watchedQueries.has(e.id)){var r=n.watchedQueries.get(e.id);null==r||r.add(t)}else n.subscribe(e.id,t);return function(){return n.removeHandler(e.id,t)}}));return function(){r.forEach((function(e){return e()}))}}},{key:"start",value:function(){this.intervalKey||this.loading||(this.intervalKey=Number(setTimeout(this.run,this.intervaTime)))}},{key:"stop",value:function(){clearTimeout(this.intervalKey),this.intervalKey=void 0}},{key:"subscribe",value:function(e,t){this.watchedQueries.set(e,new Set([t])),this.start()}},{key:"unsubscribe",value:function(e){this.watchedQueries.delete(e),0===this.watchedQueries.size&&this.stop()}},{key:"removeHandler",value:function(e,t){var n=this.watchedQueries.get(e);n&&n.delete(t)}}])}(),c=n(63058),d=n(51194),f=n(64922),h=(0,r.createContext)(new l((function(){return Promise.resolve([])}))),v=function(e){var t=e.children,n=(0,d._)(),i=(0,r.useMemo)((function(){return new l((function(e){return n((0,c.Am)(e))}))}),[n]);return(0,f.jsx)(h.Provider,{value:i,children:t})}},36197:(e,t,n)=>{"use strict";n.d(t,{g:()=>N});var r=n(9736),i=n(77810),o=n(76872),a=n(73384),s=n(6542),u=n(72890),l=n(32235),c=n(4564),d=n(65986),f=n(37338);const h=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),v=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),p=(0,f.N)({en:h,ru:v},`${d.C}item-selector`),m=(0,d.o)("item-selector");class y extends i.Component{constructor(){super(...arguments),this.renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)},this.renderItem=(e,t)=>i.createElement("div",{className:m("item",{active:t})},i.createElement("span",{className:m("item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("item-select"),onClick:this.onAddItem.bind(this,e)},p("button_select"))),this.filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)},this.renderValueItem=(e,t)=>i.createElement("div",{className:m("value-item",{active:t})},i.createElement("span",{className:m("value-item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("value-item-remove"),onClick:()=>this.onRemoveItem(e)},i.createElement(l.I,{data:u.A,size:16}))),this.onAddItem=e=>{const{getItemId:t,value:n}=this.props,r=t(e),i=new Set(n).has(r)?n:[...n,r];setTimeout((()=>{this.onUpdate(i)}),0)},this.onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)},this.onErase=()=>{this.onUpdate([])},this.onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)},this.onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(c.B.moveListElement(n,e,t))}},this.onUpdate=e=>{this.props.onUpdate(e)}}getActualItems(){const{items:e,value:t,hideSelected:n,getItemId:r}=this.props,i=[],o=new Array(t.length),a=new Map(t.map(((e,t)=>[e,t])));for(const t of e){const e=a.get(r(t));void 0!==e&&(o[e]=t),n&&void 0!==e||i.push(t)}return[i,o]}render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,filterItem:r=this.filterItem,hideSelectAllButton:o}=this.props,[a,u]=this.getActualItems();return i.createElement("div",{className:m()},i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},t),!o&&i.createElement(s.$,{view:"flat",size:"s",disabled:0===a.length,onClick:this.onSelectAll},p("button_select-all"))),i.createElement(c.B,{items:a,renderItem:n,filterItem:r,filterPlaceholder:p("placeholder_search"),itemsHeight:196})),i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},`${p("label_selected")}: ${e.length}`),i.createElement(s.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase},p("button_deselect-all"))),i.createElement(c.B,{items:u,renderItem:this.renderValueItem,filterItem:r,filterPlaceholder:p("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})))}}y.defaultProps={hideSelected:!0,selectorTitle:"",getItemId:function(e){return`${e}`}};var g=n(3659),x=n(40319),A=n(64922);const w=function(e){return(0,A.jsx)("svg",(0,x.A)((0,x.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,A.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var b=(0,o.A)("yc-selector-control");function E(e){var t=e.value,n=e.placeholder;return t.length>0?(0,A.jsx)("span",{className:b("value"),children:t.join(", ")}):(0,A.jsx)("span",{className:b("placeholder"),children:n})}function _(e){var t=e.size,n=void 0===t?"s":t,r=e.width,o=e.label,a=e.focused,s=e.disabled,u=e.displayArrow,c=e.value,d=e.icon,f=e.badgeFocused,h=e.badgeRef,v=e.onBadgeClick,p=e.onClick,m=e.placeholder,y={};r&&(y.width=r);var g=i.useRef(null);return c?(0,A.jsxs)("div",{ref:g,className:b({size:n,focused:a,disabled:s}),style:y,onClick:p,children:[Boolean(o)&&(0,A.jsx)("span",{className:b("label"),children:o}),Boolean(d)&&(0,A.jsx)("div",{className:b("selected-item-icon"),children:d}),E({value:c,placeholder:m}),Boolean(c.length>0)&&(0,A.jsx)("div",{ref:h,className:b("badge",{focused:f}),onClick:v,children:c.length}),u&&(0,A.jsx)("div",{className:b("arrow"),children:(0,A.jsx)(l.I,{data:w})})]}):null}var C=n(92611);const j=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}'),k=(0,C.Kc)("yt:yc-column-selector",{en:j});var S=(0,o.A)("yc-column-selector"),T=["bottom-start","bottom-end","top-start","top-end"];function N(e){var t,n=e.className,o=e.switcher,u=e.disabled,l=e.controlWidth,c=e.items,d=e.value,f=e.onUpdate,h=e.renderItem,v=e.renderItemValue,p=e.getItemId,m=e.filterItem,x=e.popupPlacement,w=void 0===x?T:x,b=i.useRef(null),E=i.useState(!1),C=(0,r.A)(E,2),j=C[0],N=C[1],O=i.useState(!1),R=(0,r.A)(O,2),I=R[0],P=R[1],L=i.useState(),M=(0,r.A)(L,2),D=M[0],z=M[1];i.useEffect((function(){z(void 0)}),[c,d]),i.useEffect((function(){u&&(N(!1),z(void 0))}),[u]);var $=i.useCallback((function(e){z(e)}),[]),F=i.useCallback((function(){N(!1)}),[]),U=i.useCallback((function(){N(!1),z(void 0)}),[]),q=i.useCallback((function(){N(!1),z(void 0),D&&d!==D&&f(D)}),[D,f,d]);return(0,A.jsxs)("div",{className:S(null,n),children:[(0,A.jsx)("div",{className:S("control"),ref:b,onClick:function(){u||(N((function(e){return!e})),z(void 0),I||P(!0))},children:o||(0,A.jsx)(_,{displayArrow:!0,disabled:u,placeholder:k("label_placeholder"),value:(null==d||null===(t=d.map)||void 0===t?void 0:t.call(d,(function(e){return g.A.decode(e)})))||[],focused:j,width:l})}),I&&(0,A.jsxs)(a.z,{anchorRef:b,placement:w,open:j,onClose:F,children:[(0,A.jsx)(y,{selectorTitle:k("label_columns"),items:c,value:null!=D?D:d,onUpdate:$,getItemId:p,filterItem:m,renderItem:h,renderItemValue:v}),(0,A.jsxs)("div",{className:S("controls"),children:[(0,A.jsx)(s.$,{view:"flat",className:S("control"),onClick:U,children:k("button_cancel")}),(0,A.jsx)(s.$,{view:"action",className:S("control"),onClick:q,children:k("button_apply")})]})]})]})}},36612:(e,t,n)=>{"use strict";n.d(t,{y:()=>Q});var r=n(13322),i=n(9736),o=n(77810),a=n(76872),s=n(6542),u=n(32235),l=n(89648),c=n(88150),d=n(52041),f=n(59241),h=n(40319),v=n(64922);const p=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 6.53a.75.75 0 0 1 1.06 1.061l-.727.727a2.743 2.743 0 0 0 3.879 3.879l.727-.727a.75.75 0 0 1 1.06 1.06l-.726.727a4.243 4.243 0 0 1-6-6zm8 1.879a.75.75 0 0 0 1.06 1.06l.727-.726a4.243 4.243 0 0 0-6-6l-.727.727a.75.75 0 0 0 1.061 1.06l.727-.727a2.743 2.743 0 0 1 3.879 3.879zm-.94-1.879a.75.75 0 1 0-1.06-1.06l-4 4a.75.75 0 1 0 1.06 1.06z",clipRule:"evenodd"})}))};var m=n(53775),y=n(28407),g=n(1701),x=n(48971),A=n(50266),w=function(){var e=(0,y.A)((0,m.A)().mark((function e(t){return(0,m.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.onerror=function(){return n(r.error)},r.readAsText(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(e){var t=e.disabled,n=e.onLoad,r=(0,o.useState)(!1),a=(0,i.A)(r,2),l=a[0],c=a[1],d=(0,o.useRef)(null),f=function(){var e=(0,y.A)((0,m.A)().mark((function e(t){var r,i,o;return(0,m.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.target,i=r.files&&r.files[0]){e.next=4;break}return e.abrupt("return");case 4:return c(!0),e.prev=5,e.next=8,(0,x.fI)(w(i),{toasterName:"add_query_file"+i.name,skipSuccessToast:!0,errorTitle:"Failed to load file"});case 8:o=e.sent,n({name:i.name,content:o,type:"raw_inline_data",id:(0,A.A)()});case 10:return e.prev=10,c(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[5,,10,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{width:"auto",onClick:function(){var e;null===(e=d.current)||void 0===e||e.click()},size:"l",loading:l,disabled:t,children:[(0,v.jsx)(u.I,{data:g.A,size:16}),"Add file"]}),(0,v.jsx)("input",{ref:d,type:"file",style:{display:"none"},onChange:f})]})},E=n(24893),_=n(30469),C=n(82662),j=(0,a.A)("file-item-form"),k=function(e){var t=e.file,n=e.validator,r=e.onCancel,a=e.onSave,l=e.className,c=(0,o.useState)(void 0),d=(0,i.A)(c,2),f=d[0],p=d[1],m=(0,o.useRef)((0,h.A)({},t)),y="url"===t.type,g=(0,o.useCallback)((function(){var e=n(t.name,m.current);p(e),e.name||e.content||a(m.current)}),[t.name,a,n]),x=(0,o.useCallback)((function(e){"Enter"===e.key&&g(),"Escape"===e.key&&r()}),[g,r]);return(0,v.jsxs)("div",{className:j(null,l),children:[(0,v.jsxs)("div",{className:j(y?"link-form":"form"),children:[(0,v.jsx)(E.k,{defaultValue:t.name,onChange:function(e){p(void 0),m.current.name=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.name,size:"l"}),y&&(0,v.jsx)(E.k,{defaultValue:t.content,onChange:function(e){p(void 0),m.current.content=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.content,size:"l"})]}),(0,v.jsxs)("div",{className:j("actions"),children:[(0,v.jsx)(s.$,{view:"normal",onClick:g,size:"l",children:(0,v.jsx)(u.I,{data:C.A,size:16})}),(0,v.jsx)(s.$,{view:"flat",onClick:r,size:"l",children:(0,v.jsx)(u.I,{data:_.A,size:16})})]})]})},S=(0,a.A)("files-add-form"),T=function(e){var t=e.validator,n=e.addFormOpen,r=e.addFormType,i=e.onFormToggle,a=e.onAddFile,l=(0,o.useCallback)((function(e){a(e)}),[a]),c=(0,o.useCallback)((function(e){var t=e.name,n=e.content;a({name:t,content:n,type:"raw_inline_data",id:(0,A.A)()})}),[a]),d=(0,o.useCallback)((function(){i({isOpen:!0,type:"raw_inline_data"})}),[i]),f=(0,o.useCallback)((function(){i({isOpen:!0,type:"url"})}),[i]),h=(0,o.useCallback)((function(){i({isOpen:!1})}),[i]);return(0,v.jsxs)("div",{className:S(),children:[n&&(0,v.jsx)(k,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:S("buttons"),children:[(0,v.jsx)(b,{disabled:n,onLoad:c}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:d,disabled:n,children:[(0,v.jsx)(u.I,{data:g.A,size:16}),"New file"]}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:f,disabled:n,children:[(0,v.jsx)(u.I,{data:p,size:16}),"Add URL"]})]})]})},N=n(62167),O=n(87446),R=n(57660);const I=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 1 0 6.445 7.348.75.75 0 1 0-1.487-.194A5.001 5.001 0 1 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5",clipRule:"evenodd"})}))};var P=n(76091),L=(0,a.A)("deleted-file-item"),M=function(e){var t=e.file,n=e.onEditFile,r=e.onRestore,i="raw_inline_data"===t.type;return(0,v.jsxs)("div",{className:L(),children:[(0,v.jsxs)("div",{className:L("info"),children:[(0,v.jsx)(u.I,{data:i?R.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:t.name})]}),(0,v.jsxs)("div",{className:L("actions"),children:[i&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){n(t.id,"deletedFile")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P.A,size:16})})}),(0,v.jsx)(O.m,{content:"Restore",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){r(t.id)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:I,size:16})})})]})]})},D=n(79988),z=n(27117),$=(0,a.A)("file-item"),F=function(e){var t=e.file,n=e.validator,r=e.onChange,a=e.onEditFile,c=e.onDelete,d=(0,o.useState)(!1),f=(0,i.A)(d,2),h=f[0],m=f[1],y=t.id,g=t.name,x=t.content,A="raw_inline_data"===t.type,w=function(){m((function(e){return!e}))};return h?(0,v.jsx)("div",{className:$({edit:!0}),children:(0,v.jsx)(k,{file:t,onSave:function(e){r(e),m(!1)},onCancel:w,validator:n})}):(0,v.jsxs)("div",{className:$(),children:[(0,v.jsxs)("div",{className:$("info"),children:[(0,v.jsx)(u.I,{className:$("icon"),data:A?R.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:g}),!A&&(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:x})]}),(0,v.jsxs)("div",{className:$("actions"),children:[A&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){a(y,"file")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P.A,size:16})})}),(0,v.jsx)(O.m,{content:"Edit file name",placement:"top",children:(0,v.jsx)(s.$,{onClick:w,view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:z.A,size:16})})}),(0,v.jsx)(O.m,{content:"Remove",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){c(y)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:D.A,size:16})})})]})]})},U=(0,a.A)("files-tabs"),q=function(e){return e.Current="current",e.Deleted="deleted",e}(q||{}),H=function(e){var t=e.files,n=e.deletedFiles,r=e.deletedFilesCounter,a=e.validator,s=e.onDeleteFile,u=e.onChangeFile,l=e.onRestoreFile,c=e.onEditFile,d=e.className,f=(0,o.useState)(q.Current),h=(0,i.A)(f,2),p=h[0],m=h[1],y=(0,o.useMemo)((function(){return t.map((function(e){return(0,v.jsx)(F,{file:e,onDelete:s,onChange:u,onEditFile:c,validator:a},e.id)}))}),[t,s,u,c,a]),g=(0,o.useMemo)((function(){return n.map((function(e){return(0,v.jsx)(M,{file:e,onRestore:l,onEditFile:c},e.id)}))}),[n,c,l]);return(0,v.jsxs)("div",{className:U(null,d),children:[(0,v.jsx)(N.t,{activeTab:p,items:[{id:q.Current,title:"Current",counter:t.length,disabled:!t.length},{id:q.Deleted,title:"Deleted",counter:r,disabled:!r}],onSelectTab:m}),(0,v.jsx)("div",{className:U("list"),children:p===q.Current?y:g})]})},V=n(15647),B=n(87575),W=n(24686),Y=n(61033),K=n(52142),G=(0,a.A)("query-files-popup"),Q=function(e){var t=e.popupClassName,n=(0,V.wA)(),a=(0,V.d4)(W.CG),h=a.files,p=a.deletedFiles,m=a.addFormOpen,y=a.addFormType,g=a.showTabs,x=(0,o.useState)(new Map),A=(0,i.A)(x,2),w=A[0],b=A[1],E=(0,o.useState)(!1),_=(0,i.A)(E,2),C=_[0],j=_[1],k=(0,o.useRef)(null);(0,o.useEffect)((function(){b(new Map(h.map((function(e){return[e.name,e]}))))}),[h]);var S=(0,o.useCallback)((function(){j((function(e){return!e}))}),[]),N=(0,o.useCallback)((function(e){n((0,Y.Ro)(e))}),[n]),O=(0,o.useCallback)((function(e){n((0,Y.ek)(e))}),[n]),R=(0,o.useCallback)((function(e){n((0,Y.pk)(e))}),[n]),I=(0,o.useCallback)((function(e){n((0,K.Bn)({files:[].concat((0,r.A)(h),[e])})),n((0,B.M3)({isOpen:!1}))}),[n,h]),P=(0,o.useCallback)((function(e){n((0,B.M3)(e))}),[n]),L=(0,o.useCallback)((function(e,t){n((0,B.QH)({fileId:e,fileType:t,isOpen:!0,isFullWidth:!1})),j(!1)}),[n]),M=(0,o.useCallback)((function(e,t){var n={};return t.name||(n.name=d.j.NAME_REQUIRED),w.has(t.name)&&e!==t.name&&(n.name=d.j.NAME_ALREADY_EXIST),"url"!==t.type||t.content||(n.content=d.j.VALUE_REQUIRED),n}),[w]);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{ref:k,onClick:S,view:C?"outlined-info":"outlined",selected:C,size:"l",children:[(0,v.jsx)(u.I,{data:c.A,size:16}),h.length>0?" ".concat(h.length):void 0]}),(0,v.jsxs)(f.x,{anchorRef:k,open:C,onClose:S,className:G(null,t),children:[(0,v.jsx)("div",{className:G("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:"Attachments"})}),g&&(0,v.jsx)(H,{className:G("body"),files:h,deletedFiles:p,deletedFilesCounter:p.length,validator:M,onDeleteFile:O,onChangeFile:N,onRestoreFile:R,onEditFile:L}),(0,v.jsx)(T,{validator:M,addFormOpen:m,addFormType:y,onAddFile:I,onFormToggle:P})]})]})}},37068:(e,t,n)=>{"use strict";n.d(t,{u:()=>v});var r=n(9736),i=n(77810),o=n(15647),a=n(29970),s=n(52142),u=n(11960),l=n(87604),c=n(30627),d=n(76872),f=n(64922),h=(0,d.A)("yt-query-engine-selector"),v=function(e){var t=e.isDesktop,n=e.className,d=e.onChange,v=(0,o.wA)(),p=(0,o.d4)(a.ln),m=(0,o.d4)(a.u8),y=(0,o.d4)(a.Py),g=(0,o.d4)(a.xy),x=(0,o.d4)(a.HF),A=(0,o.d4)(a.Jg),w=A.cluster,b=A.path,E=Boolean((y||g)&&w&&b),_=(0,i.useState)(!1),C=(0,r.A)(_,2),j=C[0],k=C[1],S=(0,i.useState)(void 0),T=(0,r.A)(S,2),N=T[0],O=T[1],R=(0,i.useCallback)((function(e){v(w&&b?(0,s.I2)(e,w,b):(0,s.Bn)({engine:e})),null==d||d(e)}),[w,v,d,b]),I=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e;O(t),E?k(!0):R(t)}),[R,E]),P=(0,i.useCallback)((function(){O(void 0),k(!1)}),[]),L=(0,i.useCallback)((function(){O(void 0),N&&R(N),k(!1)}),[N,R]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:h(),children:t?(0,f.jsx)(l.A,{className:n,value:p,size:"l",items:m,disabled:x,onUpdate:I}):(0,f.jsx)(c.l,{className:h("select",n),value:[p],size:"l",options:m,disabled:x,onUpdate:I})}),(0,f.jsx)(u.g,{title:"Switching engine",content:"All the changes will be lost. Are you sure you want to switch the engine?",visible:j,onCancel:P,onConfirm:L,onOutsideClick:P})]})}},41347:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"})}))}},44304:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var r=n(77810);const i={top:0,right:0,bottom:0,left:0};function o(e={}){const{rect:t,contextElement:n}=e,o=r.useRef(i),a=r.useRef({contextElement:n,getBoundingClientRect(){const{top:e,right:t,bottom:n,left:r}=o.current;return{top:e,right:t,bottom:n,left:r,width:t-r,height:n-e}}});if(a.current.contextElement=n,t){const{top:e=0,left:n=0,right:r=n,bottom:i=e}=t;o.current={top:e,right:r,bottom:i,left:n}}else o.current=i;return a}},47378:(e,t,n)=>{"use strict";n.d(t,{H:()=>d});var r=n(9736),i=n(77810),o=n(75299),a=n(76872),s=n(56796),u=n(58313),l=n(64922),c=(0,a.A)("yt-collapsed-string"),d=function(e){var t=e.value,n=e.limit,a=void 0===n?200:n,d=(0,o.A)(!1),f=(0,r.A)(d,2),h=f[0],v=f[1],p=t.length>a,m=(0,i.useMemo)((function(){return h||t.length<=a?t:t.slice(0,a-1)+"…"}),[h,a,t]);return(0,l.jsxs)("div",{className:c(),children:[m,p&&(0,l.jsx)(s.S,{className:c("toggle"),onClick:v,children:h?(0,u.A)("show-less"):(0,u.A)("show-more")})]})}},52041:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,j:()=>r});var r={NAME_REQUIRED:"Name is required field",NAME_ALREADY_EXIST:"This name is already in use, please type some another",VALUE_REQUIRED:"Values is required field"},i=function(e,t){var n={};return e||(n.name=r.NAME_REQUIRED),t||(n.value=r.VALUE_REQUIRED),n}},59241:(e,t,n)=>{"use strict";n.d(t,{x:()=>c}),n(77810);var r=n(76872),i=n(73384),o=n(6542),a=n(32235),s=n(30469),u=n(64922),l=(0,r.A)("popup-with-close-button"),c=function(e){var t=e.anchorRef,n=e.open,r=e.onClose,c=e.children,d=e.className;return(0,u.jsxs)(i.z,{anchorRef:t,open:n,className:l(null,d),onOutsideClick:r,placement:"bottom",hasArrow:!0,children:[(0,u.jsx)(o.$,{view:"flat",className:l("close-button"),onClick:r,children:(0,u.jsx)(a.I,{data:s.A})}),c]})}},60111:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0",clipRule:"evenodd"})}))}},61033:(e,t,n)=>{"use strict";n.d(t,{Ro:()=>d,ek:()=>h,pk:()=>f});var r=n(9736),i=n(13322),o=n(29970),a=n(52142),s=n(87575),u=n(24686),l=new(n(10720).I),c=function(e,t){var n=e.findIndex(t);return n<0?null:[e[n],[].concat((0,i.A)(e.slice(0,n)),(0,i.A)(e.slice(n+1)))]},d=function(e){return function(t,n){var r=n(),s=(0,o._M)(r),u=s.findIndex((function(t){return t.id===e.id}));if(!(u<0)){var l=(0,i.A)(s);l[u]=e,t((0,a.Bn)({files:l}))}}},f=function(e){return function(t,n){var d=n(),f=(0,u.xK)(d),h=(0,o._M)(d),v=c(f,(function(t){return t.id===e}));if(null!==v){var p=(0,r.A)(v,2),m=p[0],y=p[1];h.some((function(e){return e.name===m.name}))?l.add({name:"restore_query_file",theme:"danger",title:"The file could not be restored. The file name already exists in the list of active files.",autoHiding:!1}):(t((0,a.Bn)({files:[].concat((0,i.A)(h),[m])})),t((0,s.pB)(y)))}}},h=function(e){return function(t,n){var l=n(),d=(0,u.xK)(l),f=(0,o._M)(l),h=c(f,(function(t){return t.id===e}));if(null!==h){var v=(0,r.A)(h,2),p=v[0],m=v[1];t((0,a.Bn)({files:m})),t((0,s.pB)([].concat((0,i.A)(d),[p])))}}}},61525:(e,t,n)=>{"use strict";n.d(t,{C:()=>f,N:()=>d});var r=n(53775),i=n(28407),o=n(10720),a=n(27859),s=n(29970),u=n(48971),l=n(88169),c=n(59028),d=function(){return function(e,t){var n=t(),r=(0,s.C3)(n).stage;return e({type:l.O.REQUEST}),a.$S.getQueryTrackerInfo(a.Vu.getQueryTrackerInfo,{setup:{transformError:function(e){var t,n,r=e.parsedData,i=e.rawError;if(404===(null==i||null===(t=i.response)||void 0===t?void 0:t.status))throw{data:r,status:null==i||null===(n=i.response)||void 0===n?void 0:n.status};throw r}},parameters:{stage:r}}).then((function(t){return e({type:l.O.SUCCESS,data:{data:t}}),t})).catch((function(t){404!==(null==t?void 0:t.status)&&(new o.I).add({name:"aco",theme:"danger",title:"Failed to load ACO",content:null==t?void 0:t.message,actions:[{label:" Details",onClick:function(){return(0,u.eW)(t)}}]}),e({type:l.O.FAILURE})}))}};function f(e){return function(){var t=(0,i.A)((0,r.A)().mark((function t(n,i){var o,a;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i(),a=(0,s.cm)(o),t.next=4,n((0,c.rw)("qt-stage::".concat(a,"::queryTracker::defaultACO"),e));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,o:()=>o});var r=n(29717);const i="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:i,e:"__",m:"_",v:"_"}))},69641:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ne});var r=n(40319),i=n(9736),o=n(77810),a=n(30513),s=n(76872),u=n(89648),l=n(6542),c=n(98115),d=n(64922),f=(0,s.A)("node-details-info");function h(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,d.jsxs)("div",{className:f(),children:[t&&(0,d.jsx)(c.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,d.jsx)("div",{className:f("streams"),children:Object.keys(t).map((function(e){return(0,d.jsx)(v,{name:e,data:t[e]},e)}))})}),(0,d.jsx)(m,{data:n,title:"InputColumns"}),(0,d.jsx)(m,{data:r,title:"InputKeyFilterColumns"})]})}function v(e){var t=e.name,n=e.data;return(0,d.jsxs)("div",{className:f("entry"),children:[(0,d.jsx)("div",{className:f("entry-name"),children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("entry-items"),children:n.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))})]})}function p(e){var t=e.Name,n=e.Children;return(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)(u.E,{className:f("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("item-children"),children:n.map((function(e,t){return(0,d.jsx)("div",{className:f("item-group"),children:e.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))},t)}))})]})}function m(e){var t,n=e.data,r=e.title;return n?function(e){return Array.isArray(e)&&e.some((function(e){return Array.isArray(e)}))}(n)?(0,d.jsx)(o.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,d.jsx)(c.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,d.jsx)(y,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,d.jsx)(c.A,{name:r,size:"ns",collapsed:!1,children:(0,d.jsx)(y,{items:t,limit:20})})):null}function y(e){var t,n=e.items,r=e.limit,a=e.className,s=o.useState(!1),c=(0,i.A)(s,2),h=c[0],v=c[1],p=r&&!h?Math.min(n.length,r):n.length,m=n.length-p,y=0===p,g=m>0?n.slice(0,p):n;return(0,d.jsxs)("div",{className:f("columns",a),children:[g.map((function(e,t){return(0,d.jsx)("div",{className:f("columns-column"),children:(0,d.jsx)(u.E,{color:"complementary",children:e})},t)})),Boolean(m)&&(0,d.jsx)(l.$,{className:f("columns-expand"),onClick:function(e){e.stopPropagation(),v(!0)},children:(t=m,"Show ".concat(t," more items"))}),y&&(0,d.jsx)("div",{className:f("columns-empty"),children:"Empty list"})]})}var g=n(66944),x=(0,s.A)("node-jobs"),A=[{name:"status",header:"Status",sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,d.jsxs)("div",{className:x("item"),children:[(0,d.jsx)("div",{className:x("item-color",{status:t.status.toLowerCase()})}),(0,d.jsx)(u.E,{className:x("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:"Quantity",align:g.Ay.RIGHT,sortable:!1}];function w(e){var t=e.running,n=void 0===t?0:t,r=e.completed,i=void 0===r?0:r,o=e.failed,a=void 0===o?0:o,s=e.aborted,u=void 0===s?0:s,l=e.total,c=void 0===l?0:l,f=[];return f.push({status:"Pending",count:c-n-i-a-u}),f.push({status:"Running",count:n}),f.push({status:"Completed",count:i}),f.push({status:"Failed",count:a}),f.push({status:"Aborted",count:u}),(0,d.jsx)("div",{className:x(),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",columns:A,data:f,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var b=n(32235),E=n(18801),_=n(13322),C=n(71291),j=n.n(C),k=n(31470),S=n.n(k),T=n(67981),N=n.n(T),O="StructType",R="ListType",I="StreamType",P="TupleType",L="DictType",M="DataType",D="VariantType",z="OptionalType",$="TaggedType",F="VoidType",U="NullType",q="EmptyDictType",H="EmptyListType",V=["Void","Yson","Json","Null"],B=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],W=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],Y=["String","Utf8","Json"];function K(e){return B.indexOf(e)>=0}function G(e){return W.indexOf(e)>=0}function Q(e){return Y.indexOf(e)>=0}function X(e){return Array.isArray(e)&&e[0]===R&&Array.isArray(e[1])}function J(e){return Array.isArray(e)&&e[0]===P&&Array.isArray(e[1])}function Z(e){return Array.isArray(e)&&e[0]===O&&Array.isArray(e[1])}function ee(e){for(var t=e;t[0]===z;)t=t[1];if(t[0]===O){var n=j()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===R&&n.Bins[1][0]===O&&S()(N().apply(void 0,(0,_.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function te(e){return"Struct"===e.name}function ne(e){return"Variant"===e.name}function re(e){return Boolean(e.complex)}function ie(e){switch(e[0]){case M:return{name:e[1],simple:(n=e[1],V.indexOf(n)<0),numeric:K(e[1]),dateTime:G(e[1]),string:Q(e[1]),params:e.slice(2)};case z:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(ie(e[1]));case $:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(ie(e[2]),e[1]);case L:return e[2][0]===F?{name:"Set",complex:!0,type:ie(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(ie)};case R:return{name:"List",complex:!0,type:ie(e[1])};case q:return{name:"EmptyDict"};case H:return{name:"EmptyList"};case I:return{name:"Stream",complex:!0,type:ie(e[1])};case P:return{name:"Tuple",complex:!0,type:e[1].map(ie)};case O:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:ie(e[1])}}))};case D:var t=function(e){var t=ie(e);switch(t.name){case"Tuple":return t.type.map((function(e,t){return{key:t,type:e}}));case"Struct":return t.struct;default:throw new Error("Invalid type in Variant type: ".concat(t.name))}}(e[1]);return t.every((function(e){return"Void"===e.type.name}))?{name:"Enum",complex:!0,type:t.map((function(e){return{name:e.key}}))}:{name:"Variant",complex:!0,struct:t};case F:return{name:"Void"};case U:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var oe=["level","defaultExpanded"],ae=(0,s.A)("data-type"),se=function(e){var t=e.entry,n=e.level;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:ae("struct-key"),children:t.key},"key")," : ",(0,d.jsx)(ue,(0,r.A)({level:n},t.type),"type")]})};function ue(e){var t=e.level,n=void 0===t?0:t,a=e.defaultExpanded,s=(0,E.A)(e,oe),u=o.useState(void 0===a?n<2:a),l=(0,i.A)(u,2),c=l[0],f=l[1],h=s.optional,v=s.optionalLevel,p=s.name,m=s.tagged,y=s.tags,g=s.params,x=s.complex;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("span",{className:ae({optional:h,complex:x,"optional-multilevel":(null!=v?v:0)>0}),"data-optional":v?"optional × ".concat(v):void 0,onClick:function(){return f((function(e){return!e}))},children:[p,Array.isArray(g)&&g.length>0&&"(".concat(g.join(", "),")"),m&&y?y.map((function(e){return(0,d.jsx)("span",{className:ae("tag"),children:e},e)})):null]},"name"),re(s)?(0,d.jsxs)("div",{className:ae("subtype",{expanded:c}),children:[(0,d.jsx)("span",{className:ae("ellipsis"),onClick:function(){return f((function(e){return!e}))}}),c&&(0,d.jsx)("div",{className:ae("content",{expanded:c}),children:te(s)||ne(s)?s.struct.map((function(e,t){return(0,d.jsx)(se,{level:n+1,entry:e},t)})):(Array.isArray(s.type)?s.type:[s.type]).map((function(e,t){return(0,d.jsx)(ue,(0,r.A)({level:n+1},e),t)}))})]},"subtype"):(0,d.jsx)("br",{},"separator")]})}const le=function(e){return(0,d.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,d.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12.75c0 .414.336.75.75.75h12.5a.75.75 0 0 0 0-1.5H1.75a.75.75 0 0 0-.75.75M1 8c0 .414.336.75.75.75h8.5a.75.75 0 0 0 0-1.5h-8.5A.75.75 0 0 0 1 8m.75-4a.75.75 0 0 1 0-1.5h2.5a.75.75 0 0 1 0 1.5z",clipRule:"evenodd"})}))};var ce=n(10559),de=n(88150),fe=n(56796),he=(0,s.A)("yql-schema-table"),ve=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,d.jsxs)(fe.S,{color:"primary",className:he("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,d.jsx)(b.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name}),(0,d.jsx)(b.I,{className:he("insert-icon"),data:de.A,size:16})]})}return(0,d.jsxs)("span",{className:he("item"),children:[t.sort&&(0,d.jsx)(b.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,d.jsx)(ue,(0,r.A)({},t.type))}}];function pe(e){var t=e.className,n=e.schemaFields;return(0,d.jsx)("div",{className:he(null,t),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",columns:ve,data:n,startIndex:1})})}var me=["key"],ye=function(e){return Boolean(e.type.simple)},ge=function(e){return Boolean(e.type.simple)};function xe(e){if(function(e){return!!J(e)&&e[1].length>0&&e[1].every((function(e){return ee(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!X(e)&&ee(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!Z(e)&&e[1].length>0&&e[1].every((function(e){return ee(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===D&&(Z(n[1])||J(n[1]))){var t=e[1];if(J(t))return[D,[t[0],t[1].map((function(e){return xe(e)}))]];if(Z(t))return[D,[t[0],t[1].map((function(e){return ee(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return ee(e)?["HistogramType",e]:e}function Ae(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=ie(e),i=function(e){return"List"===e.name}(n)?n.type:n,o=e;return X(o)&&(o=o[1]),Z(o)&&(o=o[1]),function(e){return Array.isArray(e)&&e[0]===z&&Array.isArray(e[1])}(o)&&(o=o[1]),te(i)&&Array.isArray(o)?{optional:Boolean(i.optional),resultType:X(e)?"table":"row",scheme:null!==(t=i.struct.map((function(e,t){var n=e.key,i=(0,E.A)(e,me);return(0,r.A)((0,r.A)({},i),{},{index:t,name:"".concat(n),downloadable:ye(e),sortable:ge(e)})})))&&void 0!==t?t:[],columns:o.map((function(e){return xe(e[1])}))}:function(e){return"EmptyList"===e.name}(i)&&Array.isArray(o)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:e}}var we=(0,s.A)("yql-node-schemas");function be(e){var t=e.className,n=e.schemas;return(0,d.jsxs)("div",{className:we(null,t),children:[n.inputs.length>0&&(0,d.jsx)(Ee,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,d.jsx)(Ee,{title:"Outputs",schemas:n.outputs})]})}function Ee(e){var t=e.title,n=e.schemas;return(0,d.jsx)(c.A,{className:we("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,d.jsx)("div",{children:n.map((function(e){var t=e.name,r=Ae(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,d.jsx)(c.A,{className:we("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,d.jsx)("div",{children:(0,d.jsx)(pe,{schemaFields:i})},t)},t):null}))})})}var _e=n(51238),Ce=(0,s.A)("node-stages"),je=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:g.Ay.RIGHT,sortable:!1,width:115}];function ke(e){var t=e.stages,n=function(e,t,n){var r=[],o=Object.keys(e).length;if(!o)return r;for(var a=(0,i.A)(Object.entries(e[0])[0],2),s=a[0],u=a[1],l=u,c=1;c<o;c++){var d=(0,i.A)(Object.entries(e[c])[0],2),f=d[0],h=d[1];r.push({stage:s,duration:(0,_e.p0)(u,h)}),s=f,u=h}var v=(0,_e.sj)(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:(0,_e.p0)(u,v)}),r.push({stage:"Total",duration:(0,_e.p0)(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,d.jsx)("div",{className:Ce(),children:(0,d.jsx)(g.Ay,{theme:"yandex-cloud",rowClassName:Se,columns:je,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Se(e,t,n,r){return Ce(r?"header":n?"footer":"row")}var Te=(0,s.A)("operation-node-info");function Ne(e){var t,n=e.progress,s=e.details,u=e.schemas,l=e.containerRef,c=e.radioWidth,f=e.className,v=[];(0,_e.eg)(n)&&v.push({value:"stages",content:"Stages"}),(0,_e.b_)(s)&&v.push({value:"details",content:"Details"}),(0,_e.pv)(n)&&v.push({value:"jobs",content:"Jobs"}),u&&v.push({value:"schemas",content:"Schemas"});var p=o.useState(null===(t=v[0])||void 0===t?void 0:t.value),m=(0,i.A)(p,2),y=m[0],g=m[1];return(0,d.jsxs)("div",{ref:l,className:Te(null,f),children:[v.length>1&&(0,d.jsx)(a.a,{className:Te("selector"),value:y,options:v,onUpdate:g,width:c}),"stages"===y&&(0,d.jsx)(ke,(0,r.A)({},n)),"details"===y&&(0,d.jsx)(h,(0,r.A)({},s)),"jobs"===y&&(0,d.jsx)(w,(0,r.A)({},n)),"schemas"===y&&u&&(0,d.jsx)(be,{className:Te("schema"),schemas:u})]})}},73004:(e,t,n)=>{"use strict";n.d(t,{y:()=>h});var r=n(40319),i=n(18801),o=(n(77810),n(30627)),a=n(24893),s=n(76872),u=n(64922),l=["size","items","children","className","popupClassName","onChange","value"],c=["onChange"],d=(0,s.A)("yt-query-selector-control"),f=(0,s.A)("yt-query-selector-popup"),h=function(e){var t=e.size,n=e.items,s=e.children,h=e.className,v=e.popupClassName,p=e.onChange,m=e.value,y=(0,i.A)(e,l);return(0,u.jsx)(o.l,(0,r.A)((0,r.A)({size:t,filterable:!0,className:d(null,h),popupClassName:f(null,v),value:m?[m]:[],onUpdate:function(e){p(e.length?e[0]:"")},renderFilter:function(e){var n=e.onChange,o=(0,i.A)(e,c);return(0,u.jsx)("div",{className:f("filter"),children:(0,u.jsx)(a.k,(0,r.A)((0,r.A)({},o),{},{size:t,onChange:function(e){return n(e.target.value)}}))})}},y),{},{children:s(n)}))}},76091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.169 6.331a3 3 0 0 0-.833 1.6l-.338 1.912a1 1 0 0 0 1.159 1.159l1.912-.338a3 3 0 0 0 1.6-.833l3.07-3.07 2-2A.9.9 0 0 0 15 4.13 3.13 3.13 0 0 0 11.87 1a.9.9 0 0 0-.632.262l-2 2zm3.936-1.814L7.229 7.392a1.5 1.5 0 0 0-.416.8L6.6 9.4l1.208-.213.057-.01a1.5 1.5 0 0 0 .743-.406l2.875-2.876a1.63 1.63 0 0 0-1.378-1.378m2.558.199a3.14 3.14 0 0 0-1.379-1.38l.82-.82a1.63 1.63 0 0 1 1.38 1.38zM8 2.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3V8.75a.75.75 0 0 0-1.5 0v2.75a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 11.5v-7A1.5 1.5 0 0 1 4.5 3h2.75A.75.75 0 0 0 8 2.25",clipRule:"evenodd"})}))}},82077:(e,t,n)=>{"use strict";n.d(t,{w:()=>ns});var r=n(68175),i=n(9736),o=n(77810),a=n(76872),s=n(5865),u=n(15647),l=n(29970),c=n(40295),d=n(35788),f=n(57018),h=n(18309),v=n(92354),p=n(34206),m=n(19610),y=n(3035),g=n(73822),x=n(53246),A=n(80886),w=n(62167),b=n(89648),E=n(6542),_=n(32235),C=n(64772),j=n(37267),k=n(13395),S=n(73817),T=n(52142),N=n(64922),O=(0,a.A)("query-meta-info"),R=o.memo((function(e){var t=e.query,n=e.className,r=(0,o.useMemo)((function(){return t&&(0,h.lq)(t)}),[t]),i=(0,u.wA)(),a=(0,o.useCallback)((function(){i((0,T.ib)())}),[i]);return(0,N.jsxs)("div",{className:O(null,n),children:[(0,N.jsx)(S.C,{className:O("item"),mode:"both",status:t.state}),(0,N.jsx)(j.H,{query:t,className:O("item",O("duration"))}),(0,N.jsx)(b.E,{className:O("item",O("start-time")),children:C.A.DateTime(t.start_time,{format:"short"})}),(0,N.jsxs)(b.E,{className:O("item"),color:"secondary",children:["by ",t.user]}),r&&(0,N.jsxs)(E.$,{size:"s",onClick:a,children:[(0,N.jsx)(_.I,{data:k.A}),"Stop"]})]})})),I=n(74360),P=n(78519),L=n(63366),M=n(44131),D=(0,a.A)("query-meta-table"),z=D("title"),$=D("value"),F=["query","access_control_object"];function U(e){var t=e.query,n=e.className,r=(0,o.useState)(null),a=(0,i.A)(r,2),s=a[0],u=a[1],l=(0,o.useState)(!1),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useMemo)((function(){return Object.entries(t).filter((function(e){var t=(0,i.A)(e,1)[0];return!F.includes(t)})).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1],o="object"===(0,I.A)(r),a=r;return o&&(a=(0,N.jsx)(E.$,{view:"outlined",onClick:function(){u(r),f(!0)},children:"View details"})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("dl",{className:D(null,n),children:h.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("dt",{className:z,children:g.A.format.Readable(e.title)}),t.map((function(t,n){return(0,N.jsxs)("dd",{className:$,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,N.jsx)(M.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,N.jsx)(L.A,{visible:d,disableBodyScrollLock:!0,onOutsideClick:function(){return f(!1)},onCancel:function(){return f(!1)},children:s&&(0,N.jsx)(P.A,{value:s,settings:{}})})]})}var q=n(40319),H=n(30513),V=n(22290);const B=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fillRule:"evenodd",d:"M1.5 3.5a1 1 0 0 1 1-1h1.96a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H2.5a1 1 0 0 1-1-1zm12-1a1 1 0 0 1 1 1v2.05a1 1 0 0 1-1 1H7.59a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1zm0 5.33c.2-.2.56-.14.68.11.21.42.34.87.32 1.38 0 1.6-1.3 2.87-2.85 2.87h-2.8v.87c0 .4-.47.58-.72.31l-1.41-1.45a.4.4 0 0 1 0-.6l1.41-1.45c.27-.3.73-.1.73.29v.87h2.8c.93 0 1.7-.76 1.7-1.7.02-.3-.05-.55-.15-.79a.46.46 0 0 1 .09-.49l.08-.09a1 1 0 0 0 .13-.13z",clipRule:"evenodd"})}))};var W=n(83755),Y=n(81039),K=n(36197),G=o.memo((function(e){var t=e.allColumns,n=e.columns,r=e.className,i=e.onChange,a=(0,o.useCallback)((function(e){i(e)}),[i]),s=(0,o.useMemo)((function(){return n||t.map((function(e){return e.name}))}),[t,n]),u=n&&s.length!==(null==n?void 0:n.length)?"action":"normal";return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(K.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,N.jsxs)(E.$,{size:"m",title:"Choose result columns",view:u,children:[(0,N.jsx)(_.I,{data:Y.A}),"Columns ",(0,N.jsx)(b.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:a})})})),Q=n(53775),X=n(28407),J=n(29121),Z=n(12937),ee=n(66134),te=n(10785),ne=n(97691),re=n.n(ne),ie=n(52797),oe=n(35198),ae=n(63058),se=n(51194),ue=n(29081),le=n(14475),ce=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"getDownloadParams",value:function(){var e=this.getOutputFormat(),t=e.value,n=e.error,r={output_format:t,dump_error_into_response:!0};return"schemaful_dsv"!==this.state.format&&(r.columns=this.prepareColumnsForColumnMode(!1)),{query:re().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var e=this.props,t=e.getDownloadBaseUrl,n=e.cluster,r=e.queryId,i=e.resultIndex,o=this.state,a=o.rowsMode,s=o.startRow,u=o.numRows,l=o.format,c=o.number_precision_mode,d=this.getDownloadParams(),f=d.query,h=d.error;if("excel"===l){var v="".concat((0,ue.t1)({cluster:n}),"/").concat(n,"/api/export-query-result"),p=new URLSearchParams({number_precision_mode:c,result_index:i,query_id:r});"range"===a&&(p.append("lower_row_index",s.toString()),p.append("upper_row_index",(s+u).toString()));var m=this.prepareColumnsForColumnMode(!1),y=m?"&"+m.map((function(e){return"columns=".concat(e)})).join("&"):"";return{url:"".concat(v,"?").concat(p).concat(y),error:h}}var g=t("range"===a?{start:s,end:s+u}:void 0);return{url:"".concat(g,"&").concat(f),error:h}}}])}(oe.q),de=o.memo((function(e){var t,n,r=e.queryId,a=e.resultIndex,s=e.allColumns,l=e.visibleColumns,c=e.className,d=(0,u.d4)(ie.dB),f=(0,u.d4)((function(e){return(0,V.iI)(e,r,a)})),h=(0,se._)(),v=null!=f&&f.resultReady&&(null==f?void 0:f.page)*(null==f||null===(t=f.settings)||void 0===t?void 0:t.pageSize)||0,p=(0,o.useMemo)((function(){return s.map((function(e){return{name:e.displayName,checked:!l||(null==l?void 0:l.includes(e.name))}}))}),[s,l]),m=(0,o.useState)(!1),y=(0,i.A)(m,2),g=y[0],x=y[1],A=function(){var e=(0,X.A)((0,Q.A)().mark((function e(t,n){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,le.P)(t,n));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){var e=(0,X.A)((0,Q.A)().mark((function e(t,n){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,le.P)(t,n,!0));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,N.jsx)(ce,{getDownloadBaseUrl:function(e){return h((0,ae.BK)(d,r,a,e))},proxy:"",externalProxy:"",toggleVisible:function(){},transaction_id:void 0,queryId:r,resultIndex:a,className:c,cluster:d,rowCount:null!=f&&f.resultReady?null==f?void 0:f.meta.data_statistics.row_count:0,allColumns:p,srcColumns:p,columns:p,pageSize:null!=f&&f.resultReady&&(null==f||null===(n=f.settings)||void 0===n?void 0:n.pageSize)||50,showDecoded:!1,loading:!1,path:"",visible:g,handleShow:function(){return x(!0)},handleClose:function(){return x(!1)},offsetValue:v,isSchematicTable:!0,downloadFile:A,downloadToClipboard:w})})),fe=(0,a.A)("query-result-actions"),he=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function ve(e){var t,n,r,i,a,s=e.query,l=e.resultIndex,c=(0,u.wA)(),d=(0,u.d4)((function(e){return(0,V.iI)(e,s.id,l)})),f=(0,o.useCallback)((function(){var e;c({type:p.NJ,data:{queryId:s.id,index:l,settings:{transposed:!(null!=d&&null!==(e=d.settings)&&void 0!==e&&e.transposed)}}})}),[null==d?void 0:d.settings,c]),h=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:{viewMode:e}}})}),[null==d?void 0:d.settings,c]),v=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:(0,q.A)((0,q.A)({},null==d?void 0:d.settings),{},{visibleColumns:e})}})}),[null==d?void 0:d.settings,c]);return!0===(null==d?void 0:d.resultReady)?(0,N.jsxs)("div",{className:fe(),children:[(null==d||null===(t=d.settings)||void 0===t?void 0:t.viewMode)===W.F.Table&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(E.$,{className:fe("item"),onClick:f,view:null!=d&&null!==(n=d.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,N.jsx)(_.I,{data:B,width:16})}),(0,N.jsx)(G,{className:fe("item"),allColumns:d.columns,columns:null===(r=d.settings)||void 0===r?void 0:r.visibleColumns,onChange:v}),(0,N.jsx)(de,{queryId:s.id,resultIndex:l,className:fe("item"),allColumns:d.columns,visibleColumns:null===(i=d.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,N.jsx)(H.a,{className:fe("item"),options:he,value:null==d||null===(a=d.settings)||void 0===a?void 0:a.viewMode,onUpdate:h})]}):null}var pe=n(62835),me=n(10795);function ye(){var e=(0,u.d4)(l.VQ);return e?(0,N.jsx)(me.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function ge(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,N.jsx)(o.Suspense,{fallback:i,children:(0,N.jsx)(xe,{freeze:t,children:n})})}function xe(e){var t,n,r=e.freeze,i=e.children,a=o.useRef({});if(r&&!a.current.promise)throw a.current.promise=new Promise((function(e){a.current.resolve=e})),a.current.promise;if(r)throw a.current.promise;return a.current.promise&&(null===(t=(n=a.current).resolve)||void 0===t||t.call(n),a.current.promise=void 0),(0,N.jsx)(o.Fragment,{children:i})}var Ae=(0,a.A)("not-render-until-first-visible");function we(e){var t=e.hide,n=e.className,r=e.children,a=o.useState(Boolean(t)),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var e=requestAnimationFrame((function(){l(Boolean(t))}));return function(){cancelAnimationFrame(e)}}),[t]),(0,N.jsx)("div",{style:u?{display:"none"}:void 0,className:Ae(null,n),children:(0,N.jsx)(ge,{freeze:u,children:r})})}var be=n(92603);function Ee(){var e=(0,be.gi)(),t=(0,be.Bf)(),n=(0,be.IQ)();return(0,N.jsx)(H.a,{options:t,value:e,onUpdate:function(e){n(e)}})}var _e=n(32151),Ce=n(70243),je=n(70724),ke=n(41347),Se=n(86255),Te=n(8208),Ne=n(76662),Oe=n(13322),Re=n(24966),Ie=n(20410),Pe=n(66944),Le=n(20686),Me=n(27814),De=n(85560),ze=(0,a.A)("data-type-popup");function $e(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,N.jsx)(Le.A,{className:ze(null,i),tooltipClassName:ze("tooltip"),content:n?(0,N.jsx)("div",{className:ze("tooltip-container"),children:(0,N.jsx)(De.A,(0,q.A)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,N.jsxs)("span",{className:ze("container"),children:[t,!r&&(0,N.jsx)(_.I,{className:ze("icon"),data:Me.A,size:12})]})}):(0,N.jsx)("span",{className:ze(null,i),children:t})}var Fe=n(81379),Ue=n(56796),qe=n(66133),He=(0,a.A)("yql-result-table"),Ve=Symbol("__index__");function Be(e,t){return n=e,r=Ve,"object"===(0,I.A)(n)&&n&&Reflect.has(n,r)?e[Ve]:t;var n,r}function We(){window.dispatchEvent(new Event("resize"))}var Ye={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ne.zQ,stickyTop:0,syncHeadOnResize:!0},Ke=(0,q.A)((0,q.A)({},Ye),{},{displayIndices:!1}),Ge=[];function Qe(e){var t=e.className,n=e.header,a=void 0===n?Ge:n,s=e.rows,u=void 0===s?Ge:s,l=e.totals,c=void 0===l?Ge:l,d=e.showColumns,f=void 0===d?Ge:d,h=e.theme,v=void 0===h?"yandex-cloud":h,p=e.format,m=e.formatterSettings,y=e.defaultNumberAlign,g=void 0===y?Pe.Ay.RIGHT:y,x=e.resultType,A=e.emptyDataMessage,w=e.message,E=e.isError,_=e.transpose,C=void 0!==_&&_,j=e.page,k=void 0===j?1:j,S=e.pageSize,T=void 0===S?u.length:S,O=e.startIndex,R=e.sortOrder,I=e.onSort,P=e.showFullValueInDialog,L=e.containerRef,M=e.onShowPreview,D="function"==typeof I,z=o.useMemo((function(){var e=a.map((function(e){var t=e.name,n=e.displayName,r=e.type,i=void 0===r?{}:r;return{name:t,header:(0,N.jsx)($e,{type:i,children:null!=n?n:t}),className:e.key||e.sort?"is-key":void 0,accessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t]},sortable:D&&Boolean(i.simple),sortAccessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t].$sortValue},render:function(n){var r,i;if("function"==typeof e.render)return e.render(n);var a,s=n,u=s.value,l=s.index;if(!u)return(0,N.jsx)("span",{className:"unipika",children:"<unsupported data type>"});a=Object.prototype.hasOwnProperty.call(u,"$formattedValue")?u.$formattedValue:p(u,m);var c,d=function(e){return"string"==typeof e&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}(null!==(r=u.$rawValue)&&void 0!==r?r:u.$value),f=null!==(i=u.$fullFormattedValue)&&void 0!==i?i:a;if("yql.string"===u.$type&&a.startsWith('<span class="quote">'))c=a;else{var h=a.split("\n");c=h.length>8?h.slice(0,5).join("\n"):a}var v=c!==f,y=u.$additions?(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("br",{}),(0,N.jsx)(b.E,{color:"light-hint",children:u.$additions})]}):null,g=u.$incomplete,x=u.$tagValue,A=function(){return M(t,l,x)};return v?(0,N.jsxs)(et,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[P?(0,N.jsx)(o.Fragment,{children:(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,N.jsx)(Je,{onClick:We,strippedDown:c,formattedValue:f}),y]}):(0,N.jsxs)(et,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:a}}),y]})},align:i.numeric?g:void 0}}));return e}),[a,D,g,p,m,P,M]),$=(k-1)*T,F=D?1:null!=O?O:$+1,U=o.useMemo((function(){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e.map((function(e,t){return(0,q.A)((0,r.A)({},Ve,i+t),e)}));if(!n)return o;var a=(Array.isArray(n)?n:[n]).reduce((function(e,t){var n=t.columnId,r=t.order;return e[n]=r,e}),{}),s={};t.forEach((function(e){a[e.name]&&(s[e.name]=function(e,t){var n=t;return function(t,r){var i,o;return"function"==typeof e.sortAccessor&&(i=e.sortAccessor(t),o=e.sortAccessor(r)),Number.isNaN(i)&&!Number.isNaN(o)?Number(n):Number.isNaN(o)&&!Number.isNaN(i)||null==i&&null!=o?Number(-n):null==o&&null!=i?Number(n):i<o?Number(-n):i>o?Number(n):0}}(e,a[e.name]))}));var u=Object.keys(a).map((function(e){return s[e]})).filter(Boolean);return u.length&&o.sort((function(e,t){var n=0;return u.some((function(r){return n=r(e,t),Boolean(n)})),n||e[Ve]-t[Ve]})),o}(u,z,R,F)}),[u,z,R,F]),H=o.useMemo((function(){var e=f.map((function(e){return z.find((function(t){return t.name===e}))})).filter(Boolean),t=U.slice($,$+T);if(!C)return[e,t,c];var n=t.map((function(e,t){return{name:String($+t),header:Xe(e),render:function(t){var n=t.value;return n.column.render({value:n.data,row:e})}}})).concat(c.map((function(e,t){var n=e.footerIndex;return{name:"footer".concat(t),header:String(n||t),render:function(e){var t=e.value;return t.column.render({value:t.data,footer:!0})}}}))),r=e.map((function(e){for(var t={name:e.name},n=$;n<$+T&&n!==U.length;n++)t[String(n)]={column:e,data:U[n][e.name]};return c.forEach((function(n,r){t["footer".concat(r)]={column:e,data:n[e.name]}})),t}));return[[{name:"name",header:"Name"}].concat((0,Oe.A)(n)),r,[]]}),[f,U,$,T,C,c,z]),V=(0,i.A)(H,3),B=V[0],W=V[1],Y=V[2];return"table"===x?(0,N.jsx)("div",{ref:L,className:He(null,t),children:(0,N.jsx)(Fe.Ay,{columns:B,data:W,footerData:0===Y.length?void 0:Y,settings:C?Ke:Ye,startIndex:F,emptyDataMessage:A,theme:v,rowKey:Be,sortOrder:R,onSort:I,visibleRowIndex:C?void 0:Xe})}):"cell"===x||"untyped"===x?(0,N.jsx)("div",{ref:L,className:He({mode:x},t),children:(0,N.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):w?(0,N.jsx)("div",{className:He("message",{error:E}),children:w}):null}function Xe(e){return g.A.format.Number(e[Ve])}function Je(e){var t=e.formattedValue,n=e.strippedDown,r=e.onClick,a=o.useState(!1),s=(0,i.A)(a,2),u=s[0],l=s[1];return(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,N.jsx)("br",{}),(0,N.jsx)(Ue.S,{onClick:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){l((function(e){return!e})),null==r||r()})),children:u?"Show less":"Show more"})]})}var Ze=He("cell-action");function et(e){var t=e.children,n=e.rawValue,r=e.onPreviewClick,a=e.isTruncated,s=e.tag,u=o.useRef(null),l=o.useState(!1),c=(0,i.A)(l,2),d=c[0],f=c[1];o.useEffect((function(){var e,t=null===(e=u.current)||void 0===e?void 0:e.parentElement;function n(){f(!0)}function r(e){null!=t&&t.contains(e.relatedTarget)||f(!1)}return null==t||t.addEventListener("mouseover",n),null==t||t.addEventListener("mouseout",r),function(){null==t||t.removeEventListener("mouseover",n),null==t||t.removeEventListener("mouseout",r)}}),[]);var h=Boolean(s&&a),v=o.useState(!1),p=(0,i.A)(v,2),m=p[0],y=p[1];return(0,N.jsxs)("span",{ref:u,children:[h?(0,N.jsx)(qe.A,{theme:"warning",text:"Incomplete '".concat(s,"' type")}):(0,N.jsx)("span",{className:He("cell-content"),children:t}),(d||h)&&(0,N.jsxs)(N.Fragment,{children:[n&&!a&&(0,N.jsx)(Ie.b,{className:Ze,text:n,size:"s"}),a&&(0,N.jsx)(E.$,{className:Ze,view:"flat-secondary",size:"s",loading:m,onClick:(0,X.A)((0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,y(!0),m){e.next=5;break}return e.next=5,r();case 5:return e.prev=5,y(!1),e.finish(5);case 8:case"end":return e.stop()}}),e,null,[[0,,5,8]])}))),qa:"query:reqult:show-preview",children:(0,N.jsx)(_.I,{data:Re.A,size:"12"})})]})]})}var tt=n(83648),nt=n(31470),rt=n.n(nt),it={escapeWhitespace:!1,decodeUTF8:!0,showDecoded:!1,binaryAsHex:!0,escapeYQLStrings:!0,stringAsJSON:!1,omitStructNull:!0,maxStringSize:void 0,customNumberFormatter:{numberFormatDigitSpaces:!0,numberFormatDisableExponential:!0,numberFormatPrecision:void 0}},ot=o.memo((function(e){var t=e.result,n=e.onShowPreview,r=function(e){var t,n,r=(0,o.useState)(void 0),a=(0,i.A)(r,2),s=a[0],u=a[1];(0,o.useEffect)((function(){var t=setTimeout((function(){u(e)}),0);return function(){clearTimeout(t)}}),[e]);var l=(0,o.useMemo)((function(){var t,n;return null!==(t=e.settings)&&void 0!==t&&t.visibleColumns?null===(n=e.settings)||void 0===n?void 0:n.visibleColumns:e.columns.map((function(e){return e.name}))}),[null===(t=e.settings)||void 0===t?void 0:t.visibleColumns,s]),c=(0,o.useMemo)((function(){return 1+(e.page?e.page*e.settings.pageSize:0)}),[e.page,e.settings.pageSize]);return[e.results,e.columns,l,Boolean(null===(n=e.settings)||void 0===n?void 0:n.transposed),c]}(t),a=(0,i.A)(r,5),s=a[0],u=a[1],l=a[2],c=a[3],d=a[4];return(0,N.jsx)(Qe,{format:tt.ew,formatterSettings:it,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"left",startIndex:d,theme:Ne.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&rt()(null===(n=e.result.settings)||void 0===n?void 0:n.visibleColumns,null===(r=t.result.settings)||void 0===r?void 0:r.visibleColumns)&&(null===(i=e.result.settings)||void 0===i?void 0:i.transposed)===(null===(o=t.result.settings)||void 0===o?void 0:o.transposed)})),at=(0,a.A)("query-result-scheme"),st={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ne.zQ,stickyTop:0},ut=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,N.jsx)("span",{className:at("item"),children:(0,N.jsx)("span",{className:at("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,N.jsx)(De.A,(0,q.A)({},t.type))}}],lt=o.memo((function(e){var t=e.result;return(0,N.jsx)(Pe.Ay,{theme:"yandex-cloud",columns:ut,data:t.columns,startIndex:1,settings:st})}));function ct(e){var t=e.result,n=e.className;return(0,N.jsxs)("div",{className:at(null,n),children:[(0,N.jsx)(b.E,{variant:"subheader-2",as:"div",className:at("title"),children:"Scheme"}),(0,N.jsx)("div",{className:at("table-wrap"),children:(0,N.jsx)(lt,{result:t})})]})}var dt=n(30627),ft=n(98364),ht=(0,a.A)("query-result-paginator"),vt=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function pt(e){var t=e.queryId,n=e.resultIndex,r=e.className,a=(0,u.wA)(),s=function(e,t){var n=(0,o.useState)({lastPage:0,pageSize:0}),r=(0,i.A)(n,2),a=r[0],s=r[1],l=(0,u.d4)((function(n){return(0,V.iI)(n,e,t)}));return(0,o.useEffect)((function(){if(null!=l&&l.resultReady){var e=Math.ceil(((null==l?void 0:l.meta.data_statistics.row_count)||0)/((null==l?void 0:l.settings.pageSize)||1))-1;s({pageSize:(null==l?void 0:l.settings.pageSize)||0,lastPage:e})}}),[l]),[(null==l?void 0:l.page)||0,a]}(t,n),l=(0,i.A)(s,2),c=l[0],d=l[1],f=d.pageSize,h=d.lastPage,v=(0,o.useCallback)((function(e){var r=(0,i.A)(e,1)[0];a((0,_e.iN)(t,n,{pageSize:Number(r)}))}),[a]),p=(0,o.useCallback)((function(e){a((0,_e.vj)(t,n,e))}),[t]);return(0,N.jsxs)("div",{className:ht(null,r),children:[(0,N.jsx)(dt.l,{className:ht("control"),value:[f.toString()],options:vt,onUpdate:v}),(0,N.jsx)(ft.A,{className:ht("control"),value:c,min:0,max:h,onChange:p,step:1})]})}var mt=n(75566),yt=n(76365),gt=n(54522),xt=function(e,t,n,r){return function(){var i=(0,X.A)((0,Q.A)().mark((function i(o){var a,s,l,c,d,f,h,v,p,m,y,g,x,A,w;return(0,Q.A)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=n.columnName,l=n.rowIndex,c=n.page,d=n.pageSize,r?r.onStartLoading({columnName:s,rowIndex:l}):(0,u.vA)((function(){o({type:gt.w.REQUEST,data:{}}),o((0,mt.ZD)())})),f=null!==(a=null==r?void 0:r.saveCancellation)&&void 0!==a?a:mt.Be.removeAllAndSave,i.prev=3,h=c*d+l,i.next=7,o((0,ae.BH)(e,t,{start:h,end:h+1},[s],{cellsSize:gt.F,stringLimit:Math.round(gt.F/10)},f));case 7:if(v=i.sent,!r){i.next=12;break}return i.next=11,r.onSuccess({columnName:s,rowIndex:l,data:v});case 11:return i.abrupt("return",i.sent);case 12:p=v.rows[0][s][0],m=v.rows[0][s][1],y=v.yql_type_registry[Number(m)],g=(0,tt.$5)(p,y,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),x=g.$type,A=g.$tag,w=g.$value,o({type:gt.w.SUCCESS,data:{data:{$value:A?w.$value:w,$type:x,$tag:A}}}),i.next=22;break;case 19:i.prev=19,i.t0=i.catch(3),(0,yt.m)(i.t0)||(r?null==r||r.onError({columnName:s,rowIndex:l,error:i.t0}):o({type:gt.w.FAILURE,data:{error:i.t0}}));case 22:case"end":return i.stop()}}),i,null,[[3,19]])})));return function(e){return i.apply(this,arguments)}}()},At=(0,a.A)("query-result-table");function wt(e){var t,n=e.result,r=e.onShowPreview,i=null==n||null===(t=n.settings)||void 0===t?void 0:t.viewMode,o=function(e){var t=e.meta.data_statistics.row_count,n=e.meta.is_truncated,r=e.settings.pageSize;return{start:r*e.page+1,end:Math.min(r*e.page+r,t),total:t,truncated:n}}(n),a=o.start,s=o.end,u=o.total,l=o.truncated,c=n.meta.full_result;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(we,{hide:i!==W.F.Scheme,children:(0,N.jsx)(ct,{result:n})}),(0,N.jsxs)(we,{hide:i!==W.F.Table,children:[(0,N.jsxs)(Ce.s,{alignItems:"center",gap:2,className:At("result-info"),children:[(0,N.jsxs)(b.E,{children:["Rows ",a,"-",s," of ",u,"".concat(l?" (truncated)":"")]}),c&&(0,N.jsx)(je.N,{href:"/".concat(c.cluster,"/navigation?path=//").concat(c.table_path),target:"_blank",children:(0,N.jsxs)(Ce.s,{alignItems:"center",gap:1,children:[(0,N.jsx)(_.I,{data:ke.A,size:16})," View full result"]})})]}),(0,N.jsx)(ot,{result:n,onShowPreview:r})]})]})}var bt=o.memo((function(e){var t=e.query,n=e.index,r=(0,u.d4)((function(e){return(0,V.iI)(e,t.id,n)})),i=null==r?void 0:r.page,a=(0,u.d4)((function(e){return(0,V.JO)(e,t.id,n)})).pageSize,l=function(e){var t=e.queryId,n=e.resultIndex,r=e.page,i=e.pageSize,a=(0,u.wA)(),s=o.useMemo((function(){var e=new yt.A,o={onStartLoading:function(){},onSuccess:function(e){var r=e.columnName,i=e.rowIndex,o=e.data;a((0,_e.E6)({queryId:t,resultIndex:n,columnName:r,rowIndex:i,data:o}))},onError:Se.O,cancelHelper:e,saveCancellation:function(t){e.saveCancelToken(t)},page:r,pageSize:i},s=function(){var e=(0,X.A)((0,Q.A)().mark((function e(r,i,s){var u,l,c;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(0,Se.g)(s),l=o.page,c=o.pageSize,e.next=4,a(xt(t,n,{columnName:r,rowIndex:i,page:l,pageSize:c},u?o:void 0));case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();return{dataHandler:o,onShowPreview:s}}),[t,n,r,i,a]),l=s.dataHandler,c=s.onShowPreview;return o.useEffect((function(){return function(){l.cancelHelper.removeAllRequests()}}),[l]),{onShowPreview:c}}({queryId:t.id,resultIndex:n,page:i,pageSize:a}),c=l.onShowPreview;return(0,N.jsxs)("div",{className:At(),children:[((null==r?void 0:r.state)===W.t.Init||(null==r?void 0:r.state)===W.t.Loading)&&(0,N.jsx)("div",{className:At("loading"),children:(0,N.jsx)(s.a,{size:"m"})}),(null==r?void 0:r.resultReady)&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(wt,{result:r,onShowPreview:c}),r.settings.viewMode===W.F.Table&&(0,N.jsx)(pt,{className:At("pagination"),queryId:t.id,resultIndex:n})]}),(null==r?void 0:r.state)===W.t.Error&&(0,N.jsx)(Te.z,{error:r.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),Et=function(e){var t=e.query,n=e.activeResultParams,r=(0,u.wA)();return(0,o.useEffect)((function(){n&&r((0,_e.WR)(n.queryId,n.resultIndex))}),[n,r]),(0,N.jsx)(bt,{query:t,index:(null==n?void 0:n.resultIndex)||0})},_t=n(7787),Ct=function(e){var t,n=e.query,r=e.resultIndex,i=(0,u.wA)();return(0,o.useEffect)((function(){i((0,_e.WR)(n.id,r))}),[i,n.id,r]),(null===(t=_t.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},jt=function(e){return(e+1)%1e6};function kt(){return(0,o.useReducer)(jt,0)[1]}var St=n(24567),Tt=n(44304),Nt=n(73384),Ot=n(18305),Rt=n(92225),It=n(59994),Pt=n(60150),Lt=o.createContext(void 0);function Mt(e){var t=e.children,n=e.container,r=(0,It.i)(),a=o.useState((function(){return Dt(n)})),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(e){var t=Dt(n);return rt()(e,t)?e:t}))}),[r,n]),(0,N.jsx)(Lt.Provider,{value:u,children:t})}function Dt(e){var t=function(t){return(0,Pt.LB)(t,{container:e})};return{operation:{new:t("--yql-graph-color-operation-new"),newBorder:t("--yql-graph-color-operation-new-border"),newBackground:t("--yql-graph-color-operation-new-background"),pending:t("--yql-graph-color-operation-pending"),completed:t("--yql-graph-color-operation-completed"),completedBorder:t("--yql-graph-color-operation-completed-border"),completedBackground:t("--yql-graph-color-operation-completed-background"),aborted:t("--yql-graph-color-operation-aborted"),abortedBorder:t("--yql-graph-color-operation-aborted-border"),abortedBackground:t("--yql-graph-color-operation-aborted-background"),failed:t("--yql-graph-color-operation-failed"),failedBorder:t("--yql-graph-color-operation-failed-border"),failedBackground:t("--yql-graph-color-operation-failed-background"),running:t("--yql-graph-color-operation-running"),runningBorder:t("--yql-graph-color-operation-running-border"),runningBackground:t("--yql-graph-color-operation-running-background"),started:t("--yql-graph-color-operation-started"),startedBorder:t("--yql-graph-color-operation-started-border"),startedBackground:t("--yql-graph-color-operation-started-background")},table:{fill1:t("--yql-graph-color-table-fill1"),fill2:t("--yql-graph-color-table-fill2")},edge:{color:t("--yql-graph-color-edge"),highlight:t("--yql-graph-color-edge-highlight")},text:{label:t("--yql-graph-color-text-label"),link:t("--yql-graph-color-text-link"),operationCount:t("--yql-graph-color-text-operation-count")}}}function zt(){var e=o.useContext(Lt);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var $t=n(69641),Ft=n(51238),Ut=n(34199),qt=n(30469),Ht=(0,a.A)("legend");function Vt(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=(0,Ft.GE)(r);return(0,N.jsxs)("div",{className:Ht({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,N.jsxs)("div",{className:Ht("item"),children:[(0,N.jsx)("div",{className:Ht("item-color",{state:t.toLowerCase()})}),(0,N.jsxs)(b.E,{className:Ht("item-title"),color:"complementary",children:[n,r?(0,N.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function Bt(e){var t=e.className,n=e.nodes,r=o.useState("collapsed"),a=(0,i.A)(r,2),s=a[0],u=a[1];return(0,N.jsx)("div",{className:t,children:"collapsed"===s?(0,N.jsx)(E.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,N.jsx)(_.I,{data:Ut.A,size:16})}):(0,N.jsx)(Vt,{nodes:n,children:(0,N.jsx)(E.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,N.jsx)(_.I,{data:qt.A})})})})}var Wt=n(84099),Yt=(0,a.A)("vis-network");function Kt(e){var t=e.nodes,r=e.edges,a=e.options,s=e.className,u=e.getNetwork,l=o.useRef(null),c=o.useState(),d=(0,i.A)(c,2),f=d[0],h=d[1];return o.useEffect((function(){var e;return n.e(502).then(n.t.bind(n,18275,23)).then((function(t){var n=t.Network;e=new n(l.current,{}),h(e)})),function(){var t;null===(t=e)||void 0===t||t.destroy()}}),[]),o.useEffect((function(){f&&(f.setData({nodes:t,edges:r}),f.once("afterDrawing",(function(){f.fit()})))}),[t,r,f]),o.useEffect((function(){f&&f.setOptions(a)}),[a,f]),o.useEffect((function(){f&&"function"==typeof u&&u(f)}),[u,f]),(0,N.jsx)("div",{ref:l,className:Yt(null,s)})}var Gt=(0,a.A)("yql-plan-minimap");function Qt(e){var t=e.network,n=e.nodes,r=e.edges,a=e.options,s=e.className,u=function(e){return o.useMemo((function(){return(0,q.A)((0,q.A)({},e),{},{edges:(0,q.A)((0,q.A)({},e.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[e])}(a),l=o.useState(),c=(0,i.A)(l,2),d=c[0],f=c[1],h=o.useRef(!1);!function(e){var t=e.network,n=e.minimap,r=e.nodes;o.useEffect((function(){var e=function(e){var i=e.edge,o=(0,Ft.ry)(t,r,i);null==n||n.selectEdges((0,Oe.A)(o))},i=function(){null==n||n.unselectAll()},o=function(e){var i=e.node;if(i&&r.get(i)){var o=(0,Ft.AX)(t,r,i);null==n||n.selectEdges((0,Oe.A)(o))}},a=function(){null==n||n.unselectAll()};return t.on("hoverEdge",e),t.on("blurEdge",i),t.on("hoverNode",o),t.on("blurNode",a),function(){t.off("hoverEdge",e),t.off("blurEdge",i),t.off("hoverNode",o),t.off("blurNode",a)}}),[t,n,r])}({network:t,minimap:d,nodes:n});var v=function(e){var t=e.network,n=e.minimap,r=o.useRef(null);return o.useEffect((function(){var e=function(){n&&r.current&&function(e,t,n){var r=n.body.container,i=r.clientWidth,o=r.clientHeight,a=n.getScale(),s=t.getScale(),u=n.getViewPosition(),l=t.canvasToDOM(u);e.style.transform="translate(calc(".concat(l.x,"px - 50%), calc(").concat(l.y,"px - 50%))"),e.style.width="".concat(i/a*s,"px"),e.style.height="".concat(o/a*s,"px")}(r.current,n,t)};return t.on("afterDrawing",e),function(){t.off("afterDrawing",e)}}),[t,n]),r}({network:t,minimap:d});return o.useEffect((function(){var e=function(){h.current=!1};return window.addEventListener("mouseup",e),function(){window.removeEventListener("mouseup",e)}}),[]),o.useEffect((function(){d&&d.fit()}),[d]),(0,N.jsxs)(Wt.Z,{className:Gt(null,s),type:"action",children:[(0,N.jsx)(Kt,{nodes:n,edges:r,options:u,className:Gt("minimap"),getNetwork:f}),(0,N.jsx)("div",{className:Gt("wrapper"),onMouseDown:function(e){if(d){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n}),h.current=!0}},onMouseMove:function(e){if(d&&h.current){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n})}}}),(0,N.jsx)("div",{ref:v,className:Gt("radar")})]})}var Xt=n(70353);function Jt(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,Xt.A)(e);try{for(u.s();!(r=u.n()).done;){var l=r.value;n="innerNodeId_".concat(s++);var c=o[l.level];c||(o[l.level]=c=new Set),c.add(n),a.set(l.id,n),i[n]={node:(0,q.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,Xt.A)(t);try{for(f.s();!(d=f.n()).done;){var h=d.value,v=a.get(h.from),p=a.get(h.to);void 0!==v&&void 0!==p&&(i[v].out.push(p),i[p].in.push(v))}}catch(e){f.e(e)}finally{f.f()}return{graph:i,layering:o.filter(Boolean),levels:o.map((function(e,t){return e?t:-1})).filter((function(e){return-1!==e}))}}function Zt(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,Xt.A)(a);try{for(u.s();!(o=u.n()).done;){var l=o.value,c=e[l];if(c.rank=i,i!==t.length-1)for(var d=0;d<c.out.length;d++){var f=c.out[d];if(!s.has(f)){var h="".concat(f,"_").concat(r++),v={id:h,shape:"dot",size:0,level:n[i]};e[h]={node:v,in:[l],out:[],virtual:!0},s.add(h),c.out[d]=h,e[h].out.push(f),e[f].in[e[f].in.indexOf(l)]=h}}}}catch(e){u.e(e)}finally{u.f()}}}function en(e,t,n){var r,i=n.reduce((function(e,t,n){return e[t]=n,e}),{}),o=[],a=(0,Xt.A)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,Oe.A)(e[s].out.map((function(e){return i[e]})).sort((function(e,t){return e-t}))))}}catch(e){a.e(e)}finally{a.f()}for(var u=1;u<n.length;)u*=2;var l=2*u-1;u-=1;var c=new Array(l).fill(0),d=0;return o.forEach((function(e){var t=e+u;for(c[t]++;t>0;)t%2&&(d+=c[t+1]),c[t=t-1>>1]++})),d}function tn(e,t){for(var n=0,r=1;r<t.length;++r)n+=en(e,t[r-1],t[r]);return n}function nn(e,t){var n=t.reduce((function(t,n,r){return e.includes(n)&&t.push(r),t}),[]);if(0===n.length)return-1;var r=n.length>>1;if(n.length%2==1)return n[r];if(2===n.length)return(n[0]+n[1])/2;var i=n[r-1]-n[0],o=n[n.length-1]-n[r];return(n[r-1]*o+n[r]*i)/(i+o)}function rn(e,t){for(var n=e.filter((function(e){return-1!==t[e]})).sort((function(e,n){return t[e]-t[n]})),r=0,i=0;i<n.length;r++)-1!==t[e[r]]&&(e[r]=n[i++])}function on(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,Xt.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=nn(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}rn(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,Xt.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=nn(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}rn(t[u],c)}}function an(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function sn(e,t,n){var r=0;return n>0&&(r+=en(e,t[n-1],t[n])),n<t.length-1&&(r+=en(e,t[n],t[n+1])),r}function un(e,t){for(var n=!0,r=0;n&&r++<10;){n=!1;for(var i=0;i<t.length;i++)for(var o=t[i],a=sn(e,t,i),s=0;s<o.length-1;s++){an(o,s,s+1);var u=sn(e,t,i);a>u?(n=!0,a=u):an(o,s,s+1)}}}function ln(e,t,n){for(var r=function(e,t){for(var n=(0,Oe.A)(t[0]),r=[],i=new Set(n);n.length>0;){var o=n.shift();if(void 0===o)break;var a=e[o],s=r[a.rank];s||(r[a.rank]=s=[]),s.push(o);var u,l=(0,Xt.A)(a.out);try{for(l.s();!(u=l.n()).done;){var c=u.value;i.has(c)||(i.add(c),n.push(c))}}catch(e){l.e(e)}finally{l.f()}}return r}(e,t),i=r.map((function(e){return(0,Oe.A)(e)})),o=tn(e,r),a=0,s=0;s<4&&a<24;a++,s++){on(e,r,a),n||un(e,r);var u=tn(e,r);o>u&&(o=u,i=r.map((function(e){return(0,Oe.A)(e)})),s=0)}return i.forEach((function(t){t.forEach((function(t,n){e[t].order=n}))})),i}function cn(e,t,n){var r=e[t];r||(e[t]=r=new Set),r.add(n)}function dn(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function fn(e,t,n,r,i){var o={},a=Object.keys(e).reduce((function(e,t){return e[t]=t,e}),{}),s=Object.keys(e).reduce((function(e,t){return e[t]=Number.POSITIVE_INFINITY,e}),{});function u(l){if(void 0===o[l]){o[l]=0;var c=l;do{var d=i?t.length-e[c].rank-1:e[c].rank,f=t[d].indexOf(c);if(f>0){var h=n[t[d][f-1]];u(h),a[l]===l&&(a[l]=a[h]),a[l]===a[h]?o[l]=Math.max(o[l],o[h]+100):s[a[h]]=Math.min(s[a[h]],o[l]-o[h]-100)}c=r[c]}while(c!==l)}}return Object.keys(e).forEach((function(e){n[e]===e&&u(e)})),Object.keys(e).forEach((function(e){o[e]=o[n[e]],s[a[n[e]]]<Number.POSITIVE_INFINITY&&(o[e]=o[e]+s[a[n[e]]])})),o}function hn(e,t){var n,r=function(e,t){var n={};return Object.entries(e).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){cn(n,r,e)}))})),Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){cn(n,r,e)}))})),n}(function(e,t){var n={};return t.reduce((function(t,r){var i=0,o=0,a=t.length,s=r[r.length-1];return r.forEach((function(t,u){var l=function(e,t){if(e[t].virtual)return e[t].in.find((function(t){return e[t].virtual}))}(e,t),c=l?e[l].order:a;(l||t===s)&&(r.slice(o,u+1).forEach((function(t){e[t].in.forEach((function(r){var o=e[r],a=o.order;!(a<i||c<a)||o.virtual&&e[t].virtual||cn(n,r,t)}))})),o=u+1,i=c)})),r})),n}(e,t),function(e,t){var n={};function r(t,r,i,o,a){for(var s=function(){var r=t[u];e[r].virtual&&e[r].in.forEach((function(t){var i=e[t];i.virtual&&(i.order<o||i.order>a)&&cn(n,t,r)}))},u=r;u<i;u++)s()}return t.reduce((function(t,n){var i,o=-1,a=0;return n.forEach((function(s,u){if(e[s].virtual){var l=e[s].in;l.length&&(i=e[l[0]].order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,t.length)})),n})),n}(e,t)),o={};["u","d"].forEach((function(i){n="u"===i?t:(0,Oe.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,Oe.A)(e).reverse()})));var a=function(e,t,n,r){var i={},o={},a={};return t.forEach((function(e){e.forEach((function(e,t){i[e]=e,o[e]=e,a[e]=t}))})),t.forEach((function(t){var s=-1;t.forEach((function(t){var u=e[t][r];if(u.length){u.sort((function(e,t){return a[e]-a[t]}));for(var l=(u.length-1)/2,c=Math.floor(l),d=Math.ceil(l);c<=d;c++){var f=u[c];o[t]===t&&s<a[f]&&!dn(n,t,f)&&(o[f]=t,o[t]=i[t]=i[f],s=a[f])}}}))})),{root:i,align:o}}(e,n,r,"u"===i?"in":"out"),s=a.root,u=a.align,l=fn(e,n,s,u,"d"===i);"r"===t&&Object.keys(l).forEach((function(e){l[e]=-l[e]})),o[i+t]=l}))}));var a=function(e,t){return Object.values(t).reduce((function(e,t){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),o=(t[0],t[1]);n=Math.max(o+50,n),r=Math.min(o-50,r)}));var o=n-r;return e.min>o?{min:o,align:t}:e}),{min:Number.POSITIVE_INFINITY}).align}(0,o);return function(e,t){var n=Object.values(t),r=n.reduce((function(e,t){return Math.min(e,t)})),i=n.reduce((function(e,t){return Math.max(e,t)}));["u","d"].forEach((function(n){["l","r"].forEach((function(o){var a=e[n+o];if(a!==t){var s=Object.values(a),u="l"===o?r-s.reduce((function(e,t){return Math.min(e,t)})):i-s.reduce((function(e,t){return Math.max(e,t)}));u&&Object.keys(a).forEach((function(e){a[e]+=u}))}}))}))}(o,a),function(e,t){return Object.keys(e.ul).reduce((function(t,n){var r=Object.values(e).map((function(e){return e[n]})).sort((function(e,t){return e-t}));return t[n]=(r[1]+r[2])/2,t}),{})}(o)}function vn(e,t){var n=hn(e,t);Object.keys(n).forEach((function(t){e[t].node.y=n[t]}));var r=Object.values(n),i=1.7*Math.max(100,(r.reduce((function(e,t){return Math.max(e,t)}))-r.reduce((function(e,t){return Math.min(e,t)})))/t.length),o=0;t.forEach((function(t){t.forEach((function(t){e[t].node.x=o})),o+=i}))}function pn(e){var t=[],n=[];return Object.values(e).forEach((function(r){var i=r.node;if(r.virtual){if(!e[r.in[0]].virtual){var o=r.out[0];if(e[o].virtual)for(;e[e[o].out[0]].virtual;)o=e[o].out[0];var a=e[r.in[0]].node,s=e[o].node;if(e[o].virtual){var u=e[e[o].out[0]].node;a.y===i.y?s.y===u.y?n.push({from:a.id,to:u.id}):(t.push(s),n.push({from:a.id,to:s.id,arrows:{to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}})):s.y===u.y?(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:u.id,arrows:{from:!1}})):(t.push(i),t.push(s),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1,to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}}))}else a.y===i.y&&i.y===s.y?n.push({from:a.id,to:s.id}):(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1}}))}}else t.push(i),r.out.forEach((function(t){if(!e[t].virtual){var r={from:i.id,to:e[t].node.id};n.push(r)}}))})),{nodes:t,edges:n}}function mn(e){return yn.apply(this,arguments)}function yn(){return(yn=(0,X.A)((0,Q.A)().mark((function e(t){var n,r,i,o,a,s,u,l;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.nodes,r=t.edges,i=n.length>700||r.length>3e3,o=Jt(n,r),a=o.graph,s=o.layering,u=o.levels,Zt(a,s,u),l=ln(a,s,i),vn(a,l),e.abrupt("return",pn(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gn=n(48971);const xn=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8",clipRule:"evenodd"})}))};var An=n(16538);const wn=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m0-4.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8m0-3a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))};var bn=(0,a.A)("graph"),En="".concat(bn(),"_show-tooltip");function _n(e){var t=o.useRef(e);return t.current=e,t}var Cn=(0,Ft.SV)((function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}}));function jn(e){var t=e.isActive,n=e.className,r=e.graph,a=e.showMinimap,s=e.prepareNode,u=o.useState(),l=(0,i.A)(u,2),c=l[0],d=l[1],f=o.useState(null),h=(0,i.A)(f,2),v=h[0],p=h[1],m=zt(),y=function(e){return o.useMemo((function(){return{width:"100%",height:"100%",autoResize:!1,configure:!1,edges:{arrows:{from:{enabled:!0,type:"circle",scaleFactor:.1},to:!0},arrowStrikethrough:!1,smooth:{enabled:!0,type:"cubicBezier",forceDirection:"horizontal",roundness:.5},color:{color:e.edge.color,highlight:e.edge.highlight,inherit:!1,opacity:1},hoverWidth:.5,width:1,selectionWidth:.5,selfReference:{size:80}},nodes:{font:{color:e.text.label,size:16}},layout:{hierarchical:!1},interaction:{dragNodes:!1,navigationButtons:!1,hover:!0,hoverConnectedEdges:!1,selectable:!1,zoomSpeed:.5},physics:!1}}),[e])}(m),g=(0,be.wE)(),x=o.useState((function(){return new St.DataSet})),A=(0,i.A)(x,1)[0],w=o.useState((function(){return new St.DataSet})),C=(0,i.A)(w,1)[0],j=o.useState(!0),k=(0,i.A)(j,2),S=k[0],T=k[1],O=kt(),R=o.useState(),I=(0,i.A)(R,2),P=I[0],L=I[1],M=o.useRef(null),D=o.useState(),z=(0,i.A)(D,2),$=z[0],F=z[1],U=(0,Tt.m)($?{rect:{top:$.position.y,left:$.position.x}}:void 0);o.useEffect((function(){var e=function(e){var t;null!==(t=M.current)&&void 0!==t&&t.contains(e.target)||F(void 0)};return $&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[$]);var H=o.useRef();o.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){c&&S&&(c.fit(),T(!1))}))),t||F(void 0),function(){cancelAnimationFrame(e)}}),[t,c,S]);var V=_n(m),B=_n(g),W=_n(s);o.useEffect((function(){var e=!1;function t(){return(t=(0,X.A)((0,Q.A)().mark((function e(){var t,n,i,o;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mn(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new St.DataSet(n),B.current&&(0,Ft.DW)(o,B.current),(0,Ft.Ml)(o,V.current),W.current&&(0,Ft.ZG)(o,W.current),T(A.length!==o.length||C.length!==i.length),A.clear(),A.add(o.get()),C.clear(),C.add(i),O();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return function(){return t.apply(this,arguments)}().catch((function(t){e||L(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,C,A,O]),o.useEffect((function(){g&&((0,Ft.DW)(A,g,W.current,V.current),O())}),[g,A,O]),o.useEffect((function(){"function"==typeof s&&((0,Ft.ZG)(A,s),O())}),[s,A,O]),o.useEffect((function(){(0,Ft.Ml)(A,m)}),[A,m]);var Y=o.useRef(!0);return o.useLayoutEffect((function(){if(v&&c){var e=new Rt.default((function(){Cn(c,Y.current)}));return e.observe(v),function(){e.unobserve(v)}}}),[v,c]),o.useEffect((function(){if(c){var e=function(e){var t=e.edge,n=(0,Ft.ry)(c,A,t);c.selectEdges((0,Oe.A)(n))},t=function(){c.unselectAll()},n=function(e){var t=e.node;if(t){var n=A.get(t);if(H.current=null!=n?n:void 0,n){var r=(0,Ft.AX)(c,A,t);if(c.selectEdges((0,Oe.A)(r)),n.url&&(null==v||v.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==v||v.classList.add(En),(0,Ft.lt)(n)){var i=c.getPosition(t),o=i.x,a=i.y,s=c.canvasToDOM({x:o+15,y:a}),u=c.canvasToDOM({x:o-15,y:a}),l=s,d="right";if(v){var f=v.getBoundingClientRect(),h=f.x,p=f.y,m=f.width;l.x+330>m&&(l=u,d="left"),l.x+=h,l.y+=p}F({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:d})}}}},r=function(){null==v||v.classList.remove(En),null==v||v.style.removeProperty("cursor"),c.unselectAll(),F(void 0),H.current=void 0},i=function(){if(H.current){var e=H.current;e.url&&(0,gn.V3)(e.url)}},o=function(){Y.current=!1};return c.on("hoverEdge",e),c.on("blurEdge",t),c.on("hoverNode",n),c.on("blurNode",r),c.on("click",i),c.on("zoom",o),function(){c.off("hoverEdge",e),c.off("blurEdge",t),c.off("hoverNode",n),c.off("blurNode",r),c.off("click",i),c.off("zoom",o)}}}),[c,A,v]),P?(0,N.jsx)(b.E,{color:"danger",children:"".concat(P)}):(0,N.jsx)("div",{ref:p,className:bn(null,n),children:0===A.length?(0,N.jsx)(Ot.A,{size:"m",local:!0}):(0,N.jsxs)(o.Fragment,{children:[(0,N.jsx)(Kt,{nodes:A,edges:C,options:y,className:bn("graph"),getNetwork:d}),c&&a?(0,N.jsx)(Qt,{className:bn("minimap-wrapper"),network:c,nodes:A,edges:C,options:y}):null,(0,N.jsxs)("div",{className:bn("toolbar"),children:[(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:1.1*c.getScale()}),Y.current=!1)},children:(0,N.jsx)(_.I,{data:An.A,size:16})}),(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:c.getScale()/1.1}),Y.current=!1)},children:(0,N.jsx)(_.I,{data:xn,size:16})}),(0,N.jsx)(E.$,{className:bn("toolbar-button"),onClick:function(){null==c||c.fit(),Y.current=!0},children:(0,N.jsx)(_.I,{data:wn,size:16})}),(0,N.jsx)(Bt,{nodes:A,className:bn("toolbar-button",bn("legend"))})]}),$&&t?(0,N.jsx)(Nt.z,{anchorRef:U,open:!0,placement:$.placement,children:(0,N.jsx)($t.A,(0,q.A)((0,q.A)({},$),{},{containerRef:M}))}):null]})})}var kn=n(24893),Sn=n(75414),Tn=n.n(Sn),Nn=n(30380),On=36e5,Rn=24*On,In=30*Rn,Pn=365*Rn,Ln=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function Mn(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=Kn.resolveCssValue(Kn.COUNTER_FONT_COLOR),e.fillText(o,n,r+Kn.COUNTER_FONT_CENTER_OFFSET))}var Dn=function(e){return e.INFO="INFO",e.QUEUED="QUEUED",e.DEPRECATED="DEPRECATED",e.OK="OK",e.WARNING="WARNING",e.DANGER="DANGER",e.MUTED="MUTED",e.DELETED="DELETED",e}({}),zn="#333",$n="#777",Fn="#FFF",Un="#08F",qn="#3D5",Hn="#D30",Vn="#F80",Bn="#A5A",Wn=globalThis.document.body,Yn=window.getComputedStyle(Wn),Kn={ZOOM_MIN:5e3,ZOOM_MAX:2*In,PRIMARY_BACKGROUND_COLOR:Fn,BOUNDARY_MARK_COLOR:zn,PRIMARY_MARK_COLOR:$n,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:qn,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:$n,RULER_TEXT_OUTLINE_COLOR:Fn,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:zn,RULER_WEEKEND_COLOR:Hn,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:Un,SELECTION_BG_COLOR:Un,SELECTION_OUTLINE_THICKNESS:5,COUNTER_FONT:"12px monospace",COUNTER_FONT_CENTER_OFFSET:4,COUNTER_FONT_COLOR:"#111",COUNTER_PADDING:5,WHEEL_PAN_SPEED:25e-5,MAX_TRACKS:5,LINE_HEIGHT:25,TRACK_HEIGHT:25,OVERLAPPING_THRESHOLD:8,SKIP_OVERLAPPING:!1,GRID_STROKE_WIDTH:1,eventStatusColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Dn.INFO,Un),Dn.QUEUED,Bn),Dn.DEPRECATED,Vn),Dn.OK,qn),Dn.WARNING,Vn),Dn.DANGER,Hn),Dn.MUTED,$n),Dn.DELETED,Hn),groupStatusColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Dn.INFO,Un),Dn.QUEUED,Bn),Dn.DEPRECATED,Vn),Dn.OK,qn),Dn.WARNING,Vn),Dn.DANGER,Hn),Dn.MUTED,$n),Dn.DELETED,Hn),regionStateColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Ln.CREATED,Un),Ln.PROCESSING,"#fe5"),Ln.PROCESSED,qn),Ln.FAILED,Hn),resolveCssValue:function(e){if("string"!=typeof e||!e)return e;if(e.startsWith("var(")&&e.endsWith(")")){var t,n=e.substring(4,e.length-1),r=(null===(t=globalThis.document)||void 0===t?void 0:t.documentElement).style.getPropertyValue(n);if(""!==r)return r;var i=Yn.getPropertyValue(n);return""!==i?i:n}return e}},Gn=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.host=void 0,this.canvasApi=void 0,this.host=t,this.canvasApi=t.getCanvasApiUnsafe()}),[{key:"render",value:function(e){}},{key:"hostConnected",value:function(){}}])}();function Qn(){return-1!==navigator.userAgent.indexOf("Mac OS")}function Xn(e){return Qn()?e.metaKey:e.ctrlKey}var Jn=function(){},Zn=n(18801);function er(e,t,n){return e>=t&&e<=n}function tr(e,t,n,r){return t-e>r-n?er(n,e,t)||er(r,e,t):er(e,n,r)||er(t,n,r)}function nr(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){return e},a=Math.abs(i-r),s=function(e,t,n){var r=Math.abs(n-t);return t<n?(e-t)/r:(e-n)/r}(e,t,n);return r<i?r+o(s)*a:i+o(1-s)*a}function rr(e,t,n){return e>n?n:e<t?t:e}function ir(e,t){return e-e%t}function or(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var ar=n(48495),sr=n.n(ar),ur=function(){return(0,Z.A)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,J.A)(this,e),this._axes=[],this._sortedAxes=void 0,this._axesById=void 0,this.axes=t,n&&n.identityFunction&&(this.getIdentity=n.identityFunction)}),[{key:"getIdentity",value:function(e){return e.id}},{key:"axes",get:function(){return this._axes},set:function(e){e!==this._axes&&(this._axes=e,this._sortedAxes=void 0,this._axesById=void 0)}},{key:"sortedAxes",get:function(){return this._sortedAxes||(this._sortedAxes=this._axes.slice().sort((function(e,t){return e.top-t.top}))),this._sortedAxes}},{key:"axesById",get:function(){var e=this;return this._axesById||(this._axesById=this._axes.reduce((function(t,n){return t[e.getIdentity(n)]=n,t}),{})),this._axesById}}])}(),lr=n(7059),cr=n.n(lr),dr=function(e){function t(){var e;(0,J.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,ee.A)(this,t,[].concat(r))).height=Kn.RULER_HEADER_HEIGHT,e}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){e.useStaticTransform();var t=e.ctx,n=e.start,r=e.end,i=e.canvas,o=e.pixelRatio;t.fillStyle=Kn.resolveCssValue(Kn.PRIMARY_BACKGROUND_COLOR),t.fillRect(0,0,i.width,this.height);var a=[0,0,t.canvas.width/o,this.height],s=a[0],u=a[1],l=a[2],c=a[3];function d(e){return nr(+e,n,r,0,l)}function f(e){return nr(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=Kn.resolveCssValue(Kn.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(e);+s<n;s=r.step(s)){var u=cr()(s).format(r.format),c=d(s);c>10&&c<l&&(a||(a=s),t.fillStyle=r.color&&r.color(s)||o,t.strokeText(u,c,i),t.fillText(u,c,i))}var h=f(10),v=cr()(h).format(r.format),p=rr(10,-1/0,d(a||n)-t.measureText(v).width-5);t.fillStyle=r.color&&r.color(h)||o,t.strokeText(v,p,i),t.fillText(v,p,i)}t.font=Kn.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,y=0,g=vr.length;y<g;y+=1)if(!(m>vr[y].domain)){for(var x=0,A=cr()(0);+A<m;A=vr[y].step(A))nr(+A,0,m,u,u+l)>0&&(x+=Kn.RULER_LABEL_SPACING);if(!(x>l)){p=(v=vr[y]).sup||vr[y+1];break}}v&&h(n,r,v,s+Kn.RULER_LABEL_POS,Kn.resolveCssValue(Kn.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+Kn.RULER_SUP_LABEL_POS,Kn.resolveCssValue(Kn.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=Kn.resolveCssValue(Kn.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}])}(Gn),fr={start:function(e){return cr()(e).startOf("hour")},step:function(e){return cr()(e).add(1,"hour")},format:"HH"},hr={start:function(e){return cr()(e).startOf("day")},step:function(e){return cr()(e).add(1,"day")},color:function(e){var t=cr()(e).day();return 6===t||0===t?Kn.resolveCssValue(Kn.RULER_WEEKEND_COLOR):null},format:"MMM D"},vr=[{domain:1e3,start:function(e){return cr()(e).startOf("millisecond")},step:function(e){return cr()(e).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(e){return cr()(e).startOf("second")},step:function(e){return cr()(e).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(e){return cr()(e).startOf("second")},step:function(e){return cr()(e).add(1,"second")},format:"ss[′′]",sup:{start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return cr()(e).add(5,"minute")},format:"mm[′]"}},{domain:On,start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return cr()(e).add(5,"minute")},format:"mm[′]",sup:fr},{domain:Rn,start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return cr()(e).add(15,"minute")},format:"mm[′]",sup:fr},{domain:Rn,start:function(e){return cr()(e).startOf("hour")},step:function(e){return cr()(e).add(1,"hour")},format:"HH",sup:hr},{domain:In,start:function(e){var t=cr()(e).startOf("hour");return t.subtract(t.hour()%4,"hour")},step:function(e){return cr()(e).add(4,"hour")},format:"HH",sup:hr},{domain:In,start:function(e){return cr()(e).startOf("day")},step:function(e){return cr()(e).add(1,"day")},color:function(e){var t=cr()(e).day();return 6===t||0===t?Kn.resolveCssValue(Kn.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")},format:"MMM YYYY"}},{domain:6*In,start:function(e){return cr()(e).startOf("week").add(1,"day")},step:function(e){return cr()(e).add(1,"week")},format:"D"},{domain:Pn,start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")},format:"MMM",sup:{start:function(e){return cr()(e).startOf("year")},step:function(e){return cr()(e).add(1,"year")},format:"YYYY"}},{domain:10*Pn,start:function(e){var t=cr()(e).startOf("month");return t.subtract(t.month()%3,"month")},step:function(e){return cr()(e).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(e){return cr()(e).startOf("year")},step:function(e){return cr()(e).add(1,"year")},format:"YYYY"}],pr=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),mr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).trackHeight=Kn.TRACK_HEIGHT,n.lineHeight=Kn.LINE_HEIGHT,n.strokeMode=pr.STRAIGHT,n.axesIndex=void 0,Object.assign(n,r),n.axesIndex=new ur([],{identityFunction:r.identityFunction}),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e}},{key:"axesById",get:function(){return this.axesIndex.axesById}},{key:"getAxisTrackPosition",value:function(e,t){var n=rr(t,0,e.tracksCount-1);return e.top+this.trackHeight*n+this.trackHeight/2}},{key:"render",value:function(e){var t,n=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===pr.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,Xt.A)(this.axesIndex.sortedAxes);try{for(a.s();!(o=a.n()).done;)for(var s=o.value,u=0;u<s.tracksCount;u+=1){var l=this.getAxisTrackPosition(s,u);r.moveTo(0,l),r.lineTo(i,l)}}catch(e){a.e(e)}finally{a.f()}r.stroke(),r.setLineDash([0,0])}}])}(Gn),yr=(0,Z.A)((function e(){(0,J.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),gr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount)e.beginPath(),e.fillStyle=Kn.resolveCssValue(Kn.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=Kn.resolveCssValue(Kn.groupStatusColors[t.status]),e.beginPath(),e.arc(r,o,6,Math.PI/2,3*Math.PI/2),e.arc(i,o,6,3*Math.PI/2,Math.PI/2),e.closePath(),n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,Kn.COUNTER_PADDING);Mn(e,t,a,o,i-a)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t-6,this.hitboxResult.right=n+6,this.hitboxResult}}])}(yr),xr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount){var a=o-3,s=Math.max(i-r,5);n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=Kn.resolveCssValue(Kn.eventStatusColors[t.status]),e.fillRect(r,a,s,6)}else if(t.eventsCount>1){var u=o-6,l=Math.max(i-r,5);n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=Kn.resolveCssValue(Kn.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+Kn.COUNTER_PADDING,Kn.COUNTER_PADDING);Mn(e,t,c,o,i-c)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,5),this.hitboxResult}}])}(yr),Ar=["renderers"],wr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).eventHitboxPadding=Kn.EVENT_HITBOX_PADDING,n.eventCounterFont=Kn.COUNTER_FONT,n.allowMultipleSelection=!0,n.activeEvent=null,n.handleCanvasMouseup=function(e){var t=n.getEventsAtPoint(e.offsetX,e.offsetY);t.length>0?n.selectEvents(t,{append:Xn(e),toggle:!0}):n.selectEvents([])},n.handleCanvasContextmenu=function(e){e.preventDefault();var t=n.getEventsAtPoint(e.offsetX,e.offsetY),r=t.length>0?t[0]:void 0;n.host.dispatchEvent(new CustomEvent("openContextmenu",{detail:{event:r,relativeX:e.clientX,relativeY:e.clientY}}))},n.handleCanvasMousemove=function(e){e.preventDefault();var t=n.getEventsAtPoint(e.offsetX,e.offsetY),r=t.length>0?t[0]:void 0;if(!n.activeEvent||n.activeEvent===r&&r||n.host.dispatchEvent(new CustomEvent("leftEvent",{detail:{event:n.activeEvent}})),r){var i=n.canvasApi;n.activeEvent=r,n.host.dispatchEvent(new CustomEvent("hoverEvent",{detail:{events:t,time:i.positionToTime(e.offsetX),offset:{x:e.offsetX,y:e.offsetY}}}))}else n.activeEvent=null},n.getEventIdentity=function(e){return"".concat(e.renderType,":").concat(e.axisId,":").concat(e.from,"-").concat(e.to)},n.renderers=new Map([["event",new gr],["process",new xr]]),n.maxIndexTreeWidth=16,n.index=new(sr())(n.maxIndexTreeWidth),n._selectedEvents=new Set,n._events=[];var i=r.renderers,o=(0,Zn.A)(r,Ar);if(Object.assign(n,o),i)for(var a in i)n.registerRenderer(a,i[a]);return n.canvasApi.canvas.addEventListener("mouseup",n.handleCanvasMouseup),n.canvasApi.canvas.addEventListener("contextmenu",n.handleCanvasContextmenu),n.canvasApi.canvas.addEventListener("mousemove",n.handleCanvasMousemove),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"events",get:function(){return this._events},set:function(e){this._events=e,this.rebuildIndex()}},{key:"registerRenderer",value:function(e,t){this.renderers.set(e,t)}},{key:"getRenderer",value:function(e){return this.renderers.get(e)}},{key:"getEventsAt",value:function(e){var t,n=this.canvasApi,r=-((null===(t=n.getComponent(dr))||void 0===t?void 0:t.height)||0)+n.canvasScrollTop;return this.index.search({minX:n.positionToTime(e.left-this.eventHitboxPadding),maxX:n.positionToTime(e.right+this.eventHitboxPadding),minY:e.top+r-this.eventHitboxPadding,maxY:e.bottom+r+this.eventHitboxPadding}).map((function(e){return e.event}))}},{key:"getEventsAtPoint",value:function(e,t){return this.getEventsAt(new DOMRect(e-3,t-3,6,6))}},{key:"selectedEvents",get:function(){var e=this;return this.events.filter((function(t){return e.isSelectedEvent(t)}))},set:function(e){this._selectedEvents=new Set(e)}},{key:"isSelectedEvent",value:function(e){if(!e)return!1;var t=this.getEventIdentity(e);return this._selectedEvents.has(t)}},{key:"selectEvents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._selectedEvents;t.append||n.clear();var r=t.toggle?function(e){n.has(e)?n.delete(e):n.add(e)}:function(e){return n.add(e)};if(this.allowMultipleSelection){var i,o=(0,Xt.A)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;r(this.getEventIdentity(a))}}catch(e){o.e(e)}finally{o.f()}}else e.length>0&&(n.size>0&&!n.has(e[0])&&n.clear(),e.length>0&&r(this.getEventIdentity(e[0])));this.host.dispatchEvent(new CustomEvent("eventsSelected",{detail:{events:this.selectedEvents}})),this.host.scheduleTimelineRender()}},{key:"selectEventsAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.selectEvents(this.getEventsAt(e),t)}},{key:"render",value:function(e){var t,n=e.getComponent(mr),r=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0;if(n){var i=n.axesById;e.useScrollTransform();var o=e.ctx,a=function(t){return e.timeToPosition(t)};o.translate(0,r),o.font=this.eventCounterFont,o.lineWidth=2;for(var s=0,u=this.events.length;s<u;s+=1){var l=this.events[s],c=i[l.axisId];if(c){var d=n.getAxisTrackPosition(c,l.trackIndex);if(c&&tr(e.start,e.end,l.from,l.to)){var f=e.timeToPosition(l.from),h=e.timeToPosition(l.to);this.runRenderer(o,l,this.isSelectedEvent(l),f,h,d,c.height,a)}}}}}},{key:"runRenderer",value:function(e,t,n,r,i,o,a,s,u){var l;null===(l=this.renderers)||void 0===l||null===(l=l.get(t.renderType))||void 0===l||l.render(e,t,n,r,i,o,a,s,u)}},{key:"rebuildIndex",value:function(){var e=this.canvasApi.getComponent(mr),t=this._events.map((function(t){var n=e.axesById[t.axisId],r=e.getAxisTrackPosition(n,t.trackIndex),i=t.from;return{minX:i,maxX:t.to?t.to:i+1,minY:r-e.lineHeight/2,maxY:r+e.lineHeight/2,event:t}}));this.index.clear(),this.index.load(t)}}])}(Gn),br=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).borderColor=Kn.SELECTION_OUTLINE_COLOR,n.innerColor=Kn.SELECTION_BG_COLOR,n.handleCanvasMousedown=function(e){if(Xn(e)){e.stopPropagation(),e.stopImmediatePropagation();var t=n.canvasApi.canvas.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,o=function(e){var o=e.clientX-t.left,a=e.clientY-t.top;Math.sqrt(Math.pow(o-r,2)+Math.pow(a-i,2))>3&&(n.area=new DOMRect(r,i,o-r,a-i),n.host.scheduleTimelineRender())},a=function(){n.area&&(n.onSelected(n.area),n.area=void 0,n.host.scheduleTimelineRender()),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)}},n.area=void 0,n.onSelected=function(e){var t=n.canvasApi.getComponent(wr);t&&t.selectEventsAt(e)},Object.assign(n,r),n.canvasApi.canvas.addEventListener("mousedown",n.handleCanvasMousedown),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){if(this.area){var t=this.area,n=e.ctx;e.useStaticTransform(),n.strokeStyle=Kn.resolveCssValue(this.borderColor),n.fillStyle=Kn.resolveCssValue(this.innerColor),n.lineWidth=2,n.beginPath(),n.strokeRect(t.x,t.y,t.width,t.height);var r=n.globalAlpha;n.globalAlpha=.1,n.fillRect(t.x,t.y,t.width,t.height),n.globalAlpha=r}}}])}(Gn),Er=n(24503),_r=n.n(Er),Cr=function(){function e(t,n){(0,J.A)(this,e),this.from=t,this.to=n}return(0,Z.A)(e,[{key:"set",value:function(e,t){return this.from=e,this.to=t,this}},{key:"align",value:function(e){return this.from=ir(this.from,e),this.to=ir(this.to,e),this}},{key:"contain",value:function(t){return new e(Math.min(this.from,t.from),Math.max(this.to,t.to))}},{key:"subtract",value:function(){for(var t=[this],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s,u=a[o],l=[],c=(0,Xt.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;tr(d.from,d.to,u.from,u.to)?(d.from<u.from&&l.push(new e(d.from,u.from)),d.to>u.to&&l.push(new e(u.to,d.to))):l.push(d)}}catch(e){c.e(e)}finally{c.f()}t=l}return t.sort((function(e,t){return e.from-t.from}))}},{key:"clone",value:function(){return new e(this.from,this.to)}},{key:"length",get:function(){return this.to-this.from}},{key:"equals",value:function(e){return or(this.from,e.from,.1)&&or(this.to,e.to,.1)}}])}(),jr=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new Cr(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=(0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield([],"t0",1);case 1:case"end":return e.stop()}}),e)})),this.mapEvent=void 0,this.mergeEvents=Jn,this.finalizeEvent=Jn,this.overlapThreshold=Kn.OVERLAPPING_THRESHOLD,this.skipOverlap=Kn.SKIP_OVERLAPPING,this.onVisibleEventsChanged=Jn,Object.assign(this,t),this.axesIndex=new ur([],{identityFunction:this.getAxisIdentity})}),[{key:"getRawEvents",set:function(e){this._getRawEvents=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"timeRange",get:function(){return this._timeRange},set:function(e){var t=this._timeRange;this._timeRange=e,or(e.length,t.length,.1)||this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"viewportWidth",set:function(e){this._viewportWidth=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"recalcVisibility",value:function(){this.visibleEvents.length=0;for(var e=this.foldedEvents,t=0,n=e.length;t<n;t+=1){var r=e[t];tr(this._timeRange.from,this._timeRange.to,r.from,r.to||r.from)&&this.visibleEvents.push(r)}return this.visibleEvents}},{key:"clampEventTrackIndex",value:function(e,t){return rr(e.trackIndex,-1,t.tracksCount-1)}},{key:"foldEvents",value:function(){var e=this;this.foldedEvents.length=0;var t,n=this._getRawEvents(),r=this.axesIndex.axes.reduce((function(t,n){return t[e.getAxisIdentity(n)]=[],t}),{}),i=Object.create(null),o=(0,Xt.A)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;this.mapEvent(i,a),i.eventsCount=1;var s=i.axisId,u=this.axesIndex.axesById[s];if(u){var l=this.clampEventTrackIndex(i,u);if(-1===l){for(l=0;l<u.tracksCount;){var c=r[s][l];if(!c||!this.isOverlapping(c,i))break;l+=1}l=rr(l,0,u.tracksCount-1),i.trackIndex=l}var d=r[s][l];d?this.isOverlapping(d,i)&&!this.skipOverlap?(d.eventsCount+=i.eventsCount,d.from=Math.min(d.from,i.from),d.to=Math.max(d.to,i.to),this.mergeEvents(d,i)):(this.finalizeEvent(d),this.foldedEvents.push(d),r[s][l]=i,i=Object.create(null)):(r[s][l]=i,i=Object.create(null))}}}catch(e){o.e(e)}finally{o.f()}for(var f=0,h=Object.values(r);f<h.length;f++){var v,p=h[f],m=(0,Xt.A)(p);try{for(m.s();!(v=m.n()).done;){var y=v.value;y&&(this.finalizeEvent(y),this.foldedEvents.push(y))}}catch(e){m.e(e)}finally{m.f()}}}},{key:"isOverlapping",value:function(e,t){return tr(e.from,e.to,t.from,t.to)||this.timeToWidth(t.from-e.to)<=this.overlapThreshold}},{key:"timeToWidth",value:function(e){return e*this._viewportWidth/this._timeRange.length}}])}(),kr=function(e){function t(e){var n;return(0,J.A)(this,t),(n=(0,ee.A)(this,t,[e])).handleTimeRangeChanged=_r()((function(e){n.mapper.timeRange.equals(e)||(n.mapper.timeRange=e)}),250),n.handleVisibleEventsChanged=function(e){n.canvasApi.getComponent(wr).events=e,n.host.scheduleTimelineRender()},n.mapper=void 0,n.events=[],n.mapper=new jr({mapEvent:function(e,t){Object.assign(e,t)},onVisibleEventsChanged:n.handleVisibleEventsChanged}),n}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"appendEvents",value:function(e){this.events=this.events.concat(e),this.notifyMapperEvents()}},{key:"setEvents",value:function(e){this.events=e,this.notifyMapperEvents()}},{key:"setSelectedEvents",value:function(e){var t=this.canvasApi.getComponent(wr);t&&(t.selectedEvents=e)}},{key:"axes",get:function(){return this.mapper.axes},set:function(e){if(e!==this.mapper.axes){var t=this.canvasApi.getComponent(mr);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new Cr(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new Cr(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=(0,Q.A)().mark(n),t=this.events;function n(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(t,"t0",1);case 1:case"end":return e.stop()}}),e)}this.mapper.getRawEvents=n}}])}(Gn),Sr=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e){for(var t,n,r=(null===(t=e.getComponent(dr))||void 0===t?void 0:t.height)||0,i=e.canvas,o=e.start,a=e.end,s=e.pixelRatio,u=r,l=i.width/s,c=i.height-r,d=a-o,f=0,h=Nr.length;f<h;f+=1)if(!(d>Nr[f].domain)){for(var v=0,p=cr()(0);+p<d;p=Nr[f].step(p))nr(+p,0,d,0,0+l)>0&&(v+=Kn.RULER_GRID_SPACING);if(!(v>l+40)){n=Nr[f];break}}e.useStaticTransform(),e.ctx.lineJoin="miter",e.ctx.miterLimit=2,e.ctx.lineWidth=1,this.renderLevel(e.ctx,u,0,l,c,o,a,n)}},{key:"renderLevel",value:function(e,t,n,r,i,o,a,s){e.lineWidth=Kn.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(nr(+u,o,a,n,n+r));e.beginPath(),e.strokeStyle=s.style(u),e.moveTo(l,t),e.lineTo(l,t+i),e.stroke()}}}])}(Gn);function Tr(e,t){return function(n){return n[t]()%e==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)}}var Nr=[{domain:On,style:Tr(5,"minute"),start:function(e){return cr()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:Rn,style:function(e){return 0===e.hour()&&0===e.minute()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):e.minute()%4==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){var t=cr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return e.add(15,"minute")}},{domain:In,style:function(e){return 0===e.hour()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):e.hour()%4==0?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:Pn,style:function(e){return 1===e.date()?Kn.resolveCssValue(Kn.BOUNDARY_MARK_COLOR):1===e.day()?Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR):Kn.resolveCssValue(Kn.SECONDARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*Pn,style:Tr(3,"month"),start:function(e){return cr()(e).startOf("month")},step:function(e){return cr()(e).add(1,"month")}},{domain:1/0,style:function(){return Kn.resolveCssValue(Kn.PRIMARY_MARK_COLOR)},start:function(e){return cr()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],Or=n(1609);const Rr=window,Ir=Rr.ShadowRoot&&(void 0===Rr.ShadyCSS||Rr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pr=Symbol(),Lr=new WeakMap;class Mr{constructor(e,t,n){if(this._$cssResult$=!0,n!==Pr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ir&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Lr.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Lr.set(t,e))}return e}toString(){return this.cssText}}const Dr=Ir?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Mr("string"==typeof e?e:e+"",void 0,Pr))(t)})(e):e;var zr;const $r=window,Fr=$r.trustedTypes,Ur=Fr?Fr.emptyScript:"",qr=$r.reactiveElementPolyfillSupport,Hr={toAttribute(e,t){switch(t){case Boolean:e=e?Ur:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Vr=(e,t)=>t!==e&&(t==t||e==e),Br={attribute:!0,type:String,converter:Hr,reflect:!1,hasChanged:Vr},Wr="finalized";class Yr extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const r=this._$Ep(n,t);void 0!==r&&(this._$Ev.set(r,n),e.push(r))})),e}static createProperty(e,t=Br){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Br}static finalize(){if(this.hasOwnProperty(Wr))return!1;this[Wr]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Dr(e))}else void 0!==e&&t.push(Dr(e));return t}static _$Ep(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{Ir?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=Rr.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Br){var r;const i=this.constructor._$Ep(e,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:Hr).toAttribute(t,n.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var n;const r=this.constructor,i=r._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=r.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(n=e.converter)||void 0===n?void 0:n.fromAttribute)?e.converter:Hr;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let r=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Vr)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}var Kr;Yr[Wr]=!0,Yr.elementProperties=new Map,Yr.elementStyles=[],Yr.shadowRootOptions={mode:"open"},null==qr||qr({ReactiveElement:Yr}),(null!==(zr=$r.reactiveElementVersions)&&void 0!==zr?zr:$r.reactiveElementVersions=[]).push("1.6.3");const Gr=window,Qr=Gr.trustedTypes,Xr=Qr?Qr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Jr="$lit$",Zr=`lit$${(Math.random()+"").slice(9)}$`,ei="?"+Zr,ti=`<${ei}>`,ni=document,ri=()=>ni.createComment(""),ii=e=>null===e||"object"!=typeof e&&"function"!=typeof e,oi=Array.isArray,ai="[ \t\n\f\r]",si=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ui=/-->/g,li=/>/g,ci=RegExp(`>|${ai}(?:([^\\s"'>=/]+)(${ai}*=${ai}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),di=/'/g,fi=/"/g,hi=/^(?:script|style|textarea|title)$/i,vi=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),pi=vi(1),mi=(vi(2),Symbol.for("lit-noChange")),yi=Symbol.for("lit-nothing"),gi=new WeakMap,xi=ni.createTreeWalker(ni,129,null,!1);function Ai(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Xr?Xr.createHTML(t):t}const wi=(e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=si;for(let t=0;t<n;t++){const n=e[t];let s,u,l=-1,c=0;for(;c<n.length&&(a.lastIndex=c,u=a.exec(n),null!==u);)c=a.lastIndex,a===si?"!--"===u[1]?a=ui:void 0!==u[1]?a=li:void 0!==u[2]?(hi.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=ci):void 0!==u[3]&&(a=ci):a===ci?">"===u[0]?(a=null!=i?i:si,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?ci:'"'===u[3]?fi:di):a===fi||a===di?a=ci:a===ui||a===li?a=si:(a=ci,i=void 0);const d=a===ci&&e[t+1].startsWith("/>")?" ":"";o+=a===si?n+ti:l>=0?(r.push(s),n.slice(0,l)+Jr+n.slice(l)+Zr+d):n+Zr+(-2===l?(r.push(void 0),t):d)}return[Ai(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class bi{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[u,l]=wi(e,t);if(this.el=bi.createElement(u,n),xi.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=xi.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(Jr)||t.startsWith(Zr)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+Jr).split(Zr),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?ki:"?"===t[1]?Ti:"@"===t[1]?Ni:ji})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(hi.test(r.tagName)){const e=r.textContent.split(Zr),t=e.length-1;if(t>0){r.textContent=Qr?Qr.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],ri()),xi.nextNode(),s.push({type:2,index:++i});r.append(e[t],ri())}}}else if(8===r.nodeType)if(r.data===ei)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(Zr,e+1));)s.push({type:7,index:i}),e+=Zr.length-1}i++}}static createElement(e,t){const n=ni.createElement("template");return n.innerHTML=e,n}}function Ei(e,t,n=e,r){var i,o,a,s;if(t===mi)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=ii(t)?void 0:t._$litDirective$;return(null==u?void 0:u.constructor)!==l&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===l?u=void 0:(u=new l(e),u._$AT(e,n,r)),void 0!==r?(null!==(a=(s=n)._$Co)&&void 0!==a?a:s._$Co=[])[r]=u:n._$Cl=u),void 0!==u&&(t=Ei(e,u._$AS(e,t.values),u,r)),t}class _i{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:r}=this._$AD,i=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:ni).importNode(n,!0);xi.currentNode=i;let o=xi.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new Ci(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new Oi(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=xi.nextNode(),a++)}return xi.currentNode=ni,i}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ci{constructor(e,t,n,r){var i;this.type=2,this._$AH=yi,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cp=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ei(this,e,t),ii(e)?e===yi||null==e||""===e?(this._$AH!==yi&&this._$AR(),this._$AH=yi):e!==this._$AH&&e!==mi&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>oi(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==yi&&ii(this._$AH)?this._$AA.nextSibling.data=e:this.$(ni.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=bi.createElement(Ai(r.h,r.h[0]),this.options)),r);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(n);else{const e=new _i(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=gi.get(e.strings);return void 0===t&&gi.set(e.strings,t=new bi(e)),t}T(e){oi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const i of e)r===t.length?t.push(n=new Ci(this.k(ri()),this.k(ri()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class ji{constructor(e,t,n,r,i){this.type=1,this._$AH=yi,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=yi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,r){const i=this.strings;let o=!1;if(void 0===i)e=Ei(this,e,t,0),o=!ii(e)||e!==this._$AH&&e!==mi,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Ei(this,r[n+a],t,a),s===mi&&(s=this._$AH[a]),o||(o=!ii(s)||s!==this._$AH[a]),s===yi?e=yi:e!==yi&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===yi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class ki extends ji{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===yi?void 0:e}}const Si=Qr?Qr.emptyScript:"";class Ti extends ji{constructor(){super(...arguments),this.type=4}j(e){e&&e!==yi?this.element.setAttribute(this.name,Si):this.element.removeAttribute(this.name)}}class Ni extends ji{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=Ei(this,e,t,0))&&void 0!==n?n:yi)===mi)return;const r=this._$AH,i=e===yi&&r!==yi||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==yi&&(r===yi||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class Oi{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ei(this,e)}}const Ri=Gr.litHtmlPolyfillSupport;var Ii,Pi;null==Ri||Ri(bi,Ci),(null!==(Kr=Gr.litHtmlVersions)&&void 0!==Kr?Kr:Gr.litHtmlVersions=[]).push("2.8.0");class Li extends Yr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:t;let a=o._$litPart$;if(void 0===a){const e=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new Ci(t.insertBefore(ri(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return mi}}Li.finalized=!0,Li._$litElement$=!0,null===(Ii=globalThis.litElementHydrateSupport)||void 0===Ii||Ii.call(globalThis,{LitElement:Li});const Mi=globalThis.litElementPolyfillSupport;null==Mi||Mi({LitElement:Li}),(null!==(Pi=globalThis.litElementVersions)&&void 0!==Pi?Pi:globalThis.litElementVersions=[]).push("3.3.3");var Di,zi=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.canvas=void 0,this.ctx=void 0,this.notifyBoundsChanged=void 0,this.notifyScrollTopChanged=void 0,this.timeline=void 0,Object.assign(this,t),this.canvas=t.timeline.renderRoot.querySelector("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx.globalAlpha=1}),[{key:"pixelRatio",get:function(){return window.devicePixelRatio||1}},{key:"canvasScrollTop",get:function(){return this.timeline.canvasScrollTop||0}},{key:"start",get:function(){return this.timeline.start}},{key:"end",get:function(){return this.timeline.end}},{key:"width",get:function(){return this.canvas.width/this.pixelRatio}},{key:"height",get:function(){return this.canvas.height/this.pixelRatio}},{key:"currentTime",get:function(){return ir(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return nr(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return nr(e,0,this.width,this.timeline.start,this.timeline.end)}},{key:"widthToTime",value:function(e){return this.positionToTime(e)-this.start}},{key:"clear",value:function(){this.ctx.fillStyle=Kn.resolveCssValue(Kn.PRIMARY_BACKGROUND_COLOR),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}},{key:"useStaticTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,0)}},{key:"useScrollTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,-this.canvasScrollTop*e)}},{key:"getComponent",value:function(e){return this.timeline.getComponentUnsafe(e)}}])}(),$i=function(e){function t(){var e;return(0,J.A)(this,t),(e=(0,ee.A)(this,t)).start=void 0,e.end=void 0,e.canvasScrollTop=void 0,e.canvasLastWidth=void 0,e.canvasLastHeight=void 0,e.isZoomAllowed=void 0,e.handleWindowResize=function(){e.updateCanvasSize()},e.handleCanvasMousedown=function(t){t.stopPropagation(),t.preventDefault();var n=t.pageX,r=t.pageY,i=e.start,o=e.canvasScrollTop,a=e.end-i,s=e.canvasApi.canvas.width/e.canvasApi.pixelRatio,u=0,l=function(t){var l=(t.pageX-n)/s*a;e.notifyBoundsChanged(i-l,i-l+a);var c=t.pageY-r;Math.abs(c)>.1&&e.notifyScrollTopChanged(rr(o-c,0,1/0)),u=Math.sqrt(Math.pow(t.pageX-n,2)+Math.pow(c,2))},c=function(e){u>2&&e.stopPropagation(),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c,{capture:!0})};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c,{capture:!0})},e.handleCanvasWheel=function(t){t.stopPropagation(),t.preventDefault();var n=e.canvasApi;if(t.shiftKey||e.isZoomAllowed){var r=e.start,i=e.end,o=i-r,a=!1;if(Math.abs(t.deltaY)>2)if(t.shiftKey){a=!0;var s=o*t.deltaY*Kn.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=rr(o*(t.deltaY>0?1.15:.9),Kn.ZOOM_MIN,Kn.ZOOM_MAX);r=Math.round(e.start-(l-o)*u),i=Math.round(e.end+(l-o)*(1-u))}if(!a&&0!==t.deltaX){var c=(i-r)*t.deltaX*Kn.WHEEL_PAN_SPEED;r+=c,i+=c}r===e.start&&i===e.end||e.notifyBoundsChanged(r,i)}},e.canvasApi=void 0,e.isTimelineRenderScheduled=!1,e.components=[],e.sizeUpdateTimerId=void 0,e.notifyBoundsChanged=function(t,n){e.dispatchEvent(new CustomEvent("boundsChanged",{detail:{start:t,end:n}}))},e.notifyScrollTopChanged=function(t){e.dispatchEvent(new CustomEvent("scrollTopChanged",{detail:{scrollTop:t}}))},e.canvasLastWidth=0,e.canvasLastHeight=0,e.start=0,e.end=In,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(){return pi(Di||(Di=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n canvas {\n position: relative;\n height: 100%;\n width: 100%;\n }\n </style>\n\n <canvas tabindex="0">'," "," ","</canvas>\n "])),this.start,this.end,this.canvasScrollTop)}},{key:"shouldUpdate",value:function(e){return(e.has("start")||e.has("end")||e.has("canvasScrollTop"))&&this.scheduleTimelineRender(),(0,Or.A)(t,"shouldUpdate",this,3)([e])}},{key:"connectedCallback",value:function(){(0,Or.A)(t,"connectedCallback",this,3)([]),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Or.A)(t,"disconnectedCallback",this,3)([])}},{key:"getComponentUnsafe",value:function(e){return this.components.find((function(t){return t instanceof e}))}},{key:"getComponent",value:(n=(0,X.A)((0,Q.A)().mark((function e(t){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateComplete;case 2:return e.abrupt("return",this.getComponentUnsafe(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getCanvasApiUnsafe",value:function(){return this.canvasApi}},{key:"initComponents",value:function(){this.components=this.createComponents();var e,t=(0,Xt.A)(this.components);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.addController(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"firstUpdated",value:function(e){(0,Or.A)(t,"firstUpdated",this,3)([e]),this.canvasApi=new zi({timeline:this,notifyBoundsChanged:this.notifyBoundsChanged,notifyScrollTopChanged:this.notifyScrollTopChanged}),this.initComponents();var n=this.canvasApi.canvas;n.addEventListener("mousedown",this.handleCanvasMousedown),n.addEventListener("wheel",this.handleCanvasWheel)}},{key:"init",value:function(){var e=this;this.canvasLastWidth=0,this.canvasLastHeight=0,this.updateComplete.then((function(){window.addEventListener("resize",e.handleWindowResize),e.sizeUpdateTimerId=window.setInterval((function(){(e.offsetHeight!==e.canvasLastHeight||e.offsetWidth!==e.canvasLastWidth)&&(e.updateCanvasSize(),e.canvasLastWidth=e.offsetWidth,e.canvasLastHeight=e.offsetHeight)}),2e3),e.updateCanvasSize()}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.handleWindowResize),clearInterval(this.sizeUpdateTimerId)}},{key:"reset",value:function(){var e=this;this.destroy(),requestAnimationFrame((function(){return e.init()}))}},{key:"scheduleTimelineRender",value:function(){var e=this;this.isTimelineRenderScheduled||(this.isTimelineRenderScheduled=!0,requestAnimationFrame((function(){e.renderTimeline(),e.isTimelineRenderScheduled=!1})))}},{key:"renderTimeline",value:function(){var e=this.canvasApi;e.useStaticTransform(),e.clear();var t,n=(0,Xt.A)(this.components);try{for(n.s();!(t=n.n()).done;)t.value.render(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"updateCanvasSize",value:function(){var e=this.canvasApi,t=null==e?void 0:e.canvas;t&&(t.width=Math.floor(this.offsetWidth*e.pixelRatio),t.height=Math.floor(this.offsetHeight*e.pixelRatio),this.canvasLastWidth=t.width,this.canvasLastHeight=t.height,this.scheduleTimelineRender())}}],[{key:"properties",get:function(){return{start:{type:Number},end:{type:Number},canvasScrollTop:{type:Number},isZoomAllowed:{type:Boolean}}}}]);var n}(Li);const Fi=new Set(["children","wcType"]);class Ui extends o.Component{get element(){return this._element}getTag(){let e;return"function"==typeof this.props.wcType?e=this.props.wcType.name.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase():"string"==typeof this.props.wcType&&(e=this.props.wcType),e}render(){const e=this.getTag();if(!e)throw'"wcType" must be set!';const t={};for(const e of Object.keys(this.props))e&&!0===this.props[e]&&(t[e]=!0);return o.createElement(e,Object.assign(Object.assign({},t),{ref:e=>this.setRef(e)}),this.props.children)}setRef(e){e?(e!==this._element&&this.cleanUp(),this._element=e,this.syncProps(this.props)):this.cleanUp(),this.props.innerRef&&("function"==typeof this.props.innerRef?this.props.innerRef(e):this.props.innerRef.current=e)}cleanUp(){if(this._element){for(const e in this.props)this.props.hasOwnProperty(e)&&this.isEventProp(e,this.props[e])&&this.removeEventListener(e,this.props[e]);this._element=null}}componentDidUpdate(e){const t={};for(const n in this.props)this.props.hasOwnProperty(n)&&(e[n]&&e[n]===this.props[n]||(t[n]=this.props[n],e[n]&&this.isEventProp(n,e[n])&&this.removeEventListener(n,e[n])));for(const t in e)e.hasOwnProperty(t)&&!this.props[t]&&this.isEventProp(t,e[t])&&this.removeEventListener(t,e[t]);this.syncProps(t)}syncProps(e){if(this._element)for(const t in e)Fi.has(t)||(this.isEventProp(t,e[t])&&this.addEventListener(t,e[t]),this._element[t]=e[t])}isEventProp(e,t){return e&&"function"==typeof t}addEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.addEventListener(n,t)}removeEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.removeEventListener(n,t)}}var qi=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"render",value:function(e,t,n,r,i,o){var a=o-8,s=Math.max(i-r,4),u=16,l=function(e,t){if(e&&t)return t-e==0?"0s":t-e<1e3?"<1s":(0,Ft.p0)(e,t,"h:mm:ss")}(t.from,t.to),c=r,d=0;if(0===t.trackIndex&&Object.keys(t.colors).length>1){for(var f=1;f<Object.keys(t.colors).length;f++){var h=s*t.colors[f].percentage;f===Object.keys(t.colors).length-1&&(h=Math.max(s*t.colors[f].percentage,4)),e.fillStyle=Kn.resolveCssValue(t.colors[f].color),e.fillRect(c,a,h,u),c+=h,d+=h}if(1===t.eventsCount&&t.borderColor&&(function(e){var t=e.ctx,n=e.x0,r=e.y0,i=e.width,o=e.height,a=e.color;t.fillStyle=a,t.beginPath(),t.lineTo(n-1,r+o+5+1),t.lineTo(n+10,r+o+1),t.lineTo(n-1,r+o+1),t.fill(),t.beginPath(),t.lineTo(n+i+1,r+o+5+1),t.lineTo(n+i-10,r+o+1),t.lineTo(n+i+1,r+o+1),t.fill()}({ctx:e,x0:r,y0:a,width:d||s,height:u,color:Kn.resolveCssValue(t.borderColor)}),e.strokeStyle=Kn.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(Kn.TRACK_HEIGHT-u)/3;e.fillStyle=Kn.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,Kn.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=Kn.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=Kn.resolveCssValue(Kn.SELECTION_OUTLINE_COLOR),e.lineWidth=Kn.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=Kn.resolveCssValue(Kn.COUNTER_FONT_COLOR),e.fillText(t,n+Kn.COUNTER_PADDING,r+Kn.COUNTER_FONT_CENTER_OFFSET)}(e,l,r+Math.max(d,s),o)}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,4),this.hitboxResult}}])}(yr),Hi=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"events",set:function(e){this.getComponent(kr).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(kr).then((function(t){t&&(t.axes=e)}))}},{key:"theme",set:function(e){this.setTimelineConfig(),this.scheduleTimelineRender()}},{key:"updateCanvasSize",value:function(){if(this.offsetHeight)return(0,Or.A)(t,"updateCanvasSize",this,3)([])}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new wr(this);return e.registerRenderer("operation",new qi),[new Sr(this),new mr(this),e,new br(this),new kr(this)]}},{key:"setTimelineConfig",value:function(){Kn.ZOOM_MAX=3*Pn,Kn.PRIMARY_BACKGROUND_COLOR=(0,Pt.kd)("--g-color-base-background"),Kn.SECONDARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic"),Kn.BOUNDARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic"),Kn.PRIMARY_MARK_COLOR=(0,Pt.kd)("--g-color-line-generic-hover"),Kn.COUNTER_FONT_COLOR=(0,Pt.kd)("--g-color-text-complementary")}}])}($i);customElements.define("my-timeline-canvas",Hi);var Vi=o.forwardRef(((e,t)=>o.createElement(Ui,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e)))),Bi=n(27559),Wi=n(19812),Yi={sortOrder:{},sortColumns:[]};function Ki(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return i?e:Yi;var a=e.sortOrder,s=e.sortColumns,u=s,l=a[t],c=n;if(l&&(c=l===n||o?"ascending"===l?"descending":"ascending":void 0),!i)return c?{sortOrder:(0,r.A)({},t,c),sortColumns:[t]}:Yi;a[t];var d=(0,Zn.A)(a,[t].map(Wi.A));return c?(d[t]=c,new Set(s).has(t)||(u=[].concat((0,Oe.A)(s),[t]))):u=s.filter((function(e){return e!==t})),{sortOrder:d,sortColumns:u}}var Gi=(0,a.A)("table"),Qi=(0,N.jsx)("svg",{className:Gi("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,N.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),Xi=(0,N.jsx)("svg",{className:Gi("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,N.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function Ji(e){switch(e){case"ascending":return Qi;case"descending":return Xi;default:return null}}function Zi(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,N.jsx)("span",{className:Gi("sort-icon",{shadow:!t}),"data-index":n,children:Ji(t||i)}):null}var eo=50;function to(e){var t=e.columns,n=e.sortOrder,r=e.sortColumns,i=e.sortable,a=e.defaultOrder,s=e.onSort;function u(e){return i&&e.sortable?function(t){null==s||s(e,t.ctrlKey||t.metaKey)}:void 0}return(0,N.jsx)(o.Fragment,{children:t.map((function(e,t){var o=e.className,s=e.name,l=e.header,c=e.title,d=e.align,f=e.customStyle,h=e.width,v=e.minWidth,p=void 0===v?eo:v,m=e.maxWidth,y="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(p,"px");return(0,N.jsx)("div",{className:Gi("th",{sortable:i&&e.sortable,align:d},o),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,q.A)({flex:y,maxWidth:m},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,N.jsxs)("div",{className:Gi("head-cell"),children:[null!=l?l:s,(0,N.jsx)(Zi,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function no(e){var t=e.columns,n=e.row,r=e.index,i=e.active,o=e.selected;return t.map((function(e,t){var a=e.name,s=e.className,u=e.align,l=e.sortable,c=e.title,d=e.accessor,f=e.width,h=e.minWidth,v=void 0===h?eo:h,p=e.maxWidth,m=e.customStyle,y=e.render,g=e.onClick,x="function"==typeof d?d(n):n[e.name],A="number"==typeof f?"0 0 ".concat(f,"px"):"1 0 ".concat(v,"px");return(0,N.jsx)("div",{className:Gi("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,q.A)({flex:A,maxWidth:p},null==m?void 0:m({row:n,index:r,name:a,header:!1})),onClick:function(){null==g||g(n,e)},children:(0,N.jsx)("div",{className:Gi("row-cell"),children:"function"==typeof y?y({value:x,row:n,index:r,active:i,selected:o}):x})},t)}))}var ro=o.memo((function(e){var t=e.row,n=e.index,r=e.columns,i=e.render,a=e.active,s=e.selected;return(0,N.jsx)(o.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return no({columns:r,row:t,index:n,active:a,selected:s})},active:a,selected:s}):no({columns:r,row:t,index:n,active:a,selected:s})})}));function io(e){var t=e.containerRef,n=e.className,r=e.view,a=void 0===r?"default":r,s=e.columns,u=e.data,l=e.rowWrapper,c=e.rowHeight,d=e.renderRow,f=e.rowClassName,h=e.rowKey,v=e.alwaysShowActiveRow,p=e.activeRowIndex,m=e.selectedRowKey,y=e.headerClassName,g=e.headerHeight,x=e.onSort,A=e.initialSortOrder,w=e.onRowClick,b=e.settings,E=void 0===b?{}:b,_=E.sortable,C=void 0===_||_,j=E.defaultOrder,k=void 0===j?"ascending":j,S=E.disableSortReset,T=void 0!==S&&S,O=e.canFetchMore,R=e.isFetchingMore,I=e.fetchMore,P=e.onWrapperScroll,L=e.scrollRef,M=o.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return Ki(e,t.name,t.order,!0)}),Yi):Yi}(A)})),D=(0,i.A)(M,2),z=D[0],$=D[1],F=o.useRef(null),U=o.useCallback((function(e,t){var n,r,i=Ki(z,e.name,e.defaultOrder||k,t,T);$(i),x&&x((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[k,T,x,z]),H=o.useCallback((function(){return(0,N.jsx)(to,(0,q.A)((0,q.A)({},z),{},{sortable:C,defaultOrder:k,columns:s,onSort:U}))}),[s,k,U,z,C]),V=o.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,N.jsx)(ro,{row:e,index:t,columns:s,active:r,selected:i,render:d})}),[s,d]);o.useEffect((function(){var e,t=s.reduce((function(e,t){var n=t.width,r=t.minWidth;return e+(null!=n?n:void 0===r?eo:r)}),0)+30;null===(e=F.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var B=o.useCallback((function(e,t){return Gi("row","function"==typeof f?f(e,t):f)}),[f]);return(0,N.jsx)(Bi.w,{containerRef:(0,Ft.RQ)(F,t),className:Gi({view:a},n),wrapperClassName:Gi("table"),headerClassName:Gi("head",y),headerHeight:g,renderHeader:H,itemWrapper:l,items:u,onItemClick:w,itemClassName:B,itemHeight:c,loaderHeight:c,renderItem:V,itemKey:h,alwaysShowActiveItem:v,activeItemIndex:p,selectedItemKey:m,canFetchMore:O,isFetchingMore:R,fetchMore:I,onWrapperScroll:P,scrollRef:L})}var oo=(0,a.A)("node-name");function ao(e){var t=e.node,n=e.className,r=(0,N.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,N.jsxs)(je.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,N.jsx)(b.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,N.jsxs)("span",{className:oo("name",n),children:[r,(0,Ft.lt)(t)&&(0,N.jsx)(Le.A,{className:oo("operation-node-info"),tooltipContentClassName:oo("operation-node-info-popup"),content:(0,N.jsx)($t.A,(0,q.A)({},t)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,N.jsx)(_.I,{className:oo("icon"),data:Ut.A,size:12})})]})}var so=n(51188);const uo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"})}))};var lo=(0,a.A)("timeline"),co=(0,N.jsx)(_.I,{data:uo,size:14}),fo=(0,N.jsx)(_.I,{data:so.A,size:14}),ho=(0,N.jsx)(_.I,{data:function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.754 2.004a.75.75 0 0 0 0 1.5h4.75v4.742a.75.75 0 0 0 1.5 0V2.754a.75.75 0 0 0-.75-.75zm.492 11.992a.75.75 0 0 0 0-1.5h-4.75V7.754a.75.75 0 0 0-1.5 0v5.492a.75.75 0 0 0 .75.75z",clipRule:"evenodd"})}))},size:14});function vo(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,N.jsx)(E.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:ho})}function po(e){var t=e.isCommonButton,n=e.disabled,r=e.onClick,i=e.isExpanded,o=t?"Expand all":"Expand",a=t?"Collapse all":"Collapse",s=n?"No items to expand":"";return(0,N.jsx)("span",{title:s,children:(0,N.jsx)(E.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?co:fo})})}function mo(e){var t=e.nameHeader,n=e.controlsHeader,r=e.onRulerUpdate,i=e.onExpandAxis;return[{name:"status",header:"Status",width:110,sortable:!1,render:function(e){var t=e.row,n=t.node;return t.isEvent?null:(0,N.jsx)("span",{className:lo("row-status"),children:(0,N.jsx)(b.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,N.jsx)(yo,{progress:n.progress})})})}},{name:"name",header:null!=t?t:"Name",sortable:!1,width:220,align:"right",render:function(e){var t=e.row,n=t.isEvent,r=t.name,i=t.id,o=t.isExpanded,a=t.node;return n?(0,N.jsx)("div",{className:lo("event-name"),title:r,children:r}):(0,N.jsx)("div",{className:lo("aside-item",{expanded:o}),children:(0,N.jsx)(ao,{node:a,className:lo("node-name")})},i)}},{name:"controls",header:null!=n?n:"",sortable:!1,width:60,render:function(e){var t=e.row,n=t.node,o=t.isExpanded,a=t.from,s=t.to,u=t.id,l=t.isExpandable;return"in"===n.type||"out"===n.type?null:(0,N.jsxs)("div",{children:[(0,N.jsx)(vo,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,N.jsx)(po,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function yo(e){var t,n=e.progress,r=null!==(t=null==n?void 0:n.state)&&void 0!==t?t:"NotStarted",i=null!=n?n:{},o=i.completed,a=void 0===o?0:o,s=i.total,u=Math.floor(a/(s||1)*100);return(0,N.jsxs)("span",{className:lo("node-status"),children:[(0,N.jsx)(go,{state:r,progress:n}),(0,N.jsx)("span",{children:"InProgress"===r?"".concat(Ft.Ie[r].title,": ").concat(u,"%"):Ft.Ie[r].title})]})}function go(e){var t=e.state,n=e.progress,r=zt();return"InProgress"===t?(0,N.jsx)("img",{className:lo("node-status-icon"),src:(0,Ft.$u)(n,r)}):(0,N.jsx)("div",{className:lo("node-status-icon",{state:t.toLowerCase()})})}function xo(e){var t,n,r,i,o,a;return(0,N.jsx)("div",{className:lo("aside-header"),children:(0,N.jsx)(io,{columns:mo({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,N.jsxs)("div",{children:[(0,N.jsx)(vo,{onRulerUpdate:n}),(0,N.jsx)(po,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,N.jsx)("span",{children:["Name (".concat(t," block)"),"Name (".concat(t," blocks)"),"Name (".concat(t," blocks)"),"Name (no blocks)"][t]})),onRulerUpdate:e.onRulerUpdate,onExpandAxis:e.onExpandAxis}),data:e.tableItems,rowClassName:lo("table-row"),rowHeight:25,headerHeight:27,className:lo("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var Ao=n(34108),wo=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},bo=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Eo=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},_o=96.422,Co=82.521,jo=216/24389,ko=24389/27,So=function(e){var t=function(e){var t=bo(e.r),n=bo(e.g),r=bo(e.b);return function(e){return{x:wo(e.x,0,_o),y:wo(e.y,0,100),z:wo(e.z,0,Co),a:wo(e.a)}}(function(e){return{x:1.0478112*e.x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a}}({x:100*(.4124564*t+.3575761*n+.1804375*r),y:100*(.2126729*t+.7151522*n+.072175*r),z:100*(.0193339*t+.119192*n+.9503041*r),a:e.a}))}(e),n=t.x/_o,r=t.y/100,i=t.z/Co;return n=n>jo?Math.cbrt(n):(ko*n+16)/116,{l:116*(r=r>jo?Math.cbrt(r):(ko*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>jo?Math.cbrt(i):(ko*i+16)/116)),alpha:t.a}},To=n(72617),No=n.n(To),Oo=n(81713),Ro=n.n(Oo),Io=n(63281),Po=n.n(Io),Lo=6e4,Mo={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function Do(e){var t=e.from,n=e.to;return Math.max(n-t,Lo)}(0,Ao.X$)([function(e){function t(e,t,n){void 0===n&&(n=5);for(var r=[],i=1/(n-1),o=0;o<=n-1;o++)r.push(e.mix(t,i*o));return r}e.prototype.mix=function(t,n){void 0===n&&(n=.5);var r=t instanceof e?t:new e(t),i=function(e,t,n){var r,i=So(e),o=So(t);return function(e){var t=(e.l+16)/116,n=e.a/500+t,r=t-e.b/200;return function(e){var t,n,r=.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,i=-.0282895*t.x+1.0099416*t.y+.0210077*t.z,o=.0122982*t.x+-.020483*t.y+1.3299098*t.z;return n={r:Eo(.032404542*r-.015371385*i-.004985314*o),g:Eo(-.00969266*r+.018760108*i+41556e-8*o),b:Eo(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:wo(n.r,0,255),g:wo(n.g,0,255),b:wo(n.b,0,255),a:wo(n.a)}}({x:(Math.pow(n,3)>jo?Math.pow(n,3):(116*n-16)/ko)*_o,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/ko),z:(Math.pow(r,3)>jo?Math.pow(r,3):(116*r-16)/ko)*Co,a:e.alpha})}({l:wo((r={l:i.l*(1-n)+o.l*n,a:i.a*(1-n)+o.a*n,b:i.b*(1-n)+o.b*n,alpha:i.alpha*(1-n)+o.alpha*n}).l,0,400),a:r.a,b:r.b,alpha:wo(r.alpha)})}(this.toRgb(),r.toRgb(),n);return new e(i)},e.prototype.tints=function(e){return t(this,"#fff",e)},e.prototype.shades=function(e){return t(this,"#000",e)},e.prototype.tones=function(e){return t(this,"#808080",e)}}]);var zo=(0,a.A)("timeline");const $o=function(e){var t=e.graph,n=e.prepareNode,r=(0,be.wE)(),a=(0,It.i)(),s=zt(),u=o.useState((function(){return new St.DataSet})),l=(0,i.A)(u,1)[0],c=o.useState({}),d=(0,i.A)(c,2),f=d[0],h=d[1],v=o.useState(new Set),p=(0,i.A)(v,2),m=p[0],y=p[1],g=o.useState(""),x=(0,i.A)(g,2),A=x[0],w=x[1],b=o.useState(),E=(0,i.A)(b,2),_=E[0],C=E[1],j=(0,Ft.GE)(l),k=o.useRef(r);k.current=r;var S=o.useRef(n);S.current=n,o.useEffect((function(){l.clear(),l.add(t.nodes),k.current&&(0,Ft.DW)(l,k.current,S.current,void 0,!1),h({})}),[l,t]),o.useEffect((function(){r&&((0,Ft.DW)(l,r,S.current,void 0,!1),h({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&((0,Ft.ZG)(l,n),h({}))}),[l,n]);var T=o.useMemo((function(){var e,t=Tn()(k.current,(function(e,t){var n=t.startedAt?new Date(t.startedAt).getTime():1/0;return Math.min(n,e)}),1/0),n=l?function(e){var t=e.nodes,n=e.colors,r=e.theme,o=e.queryStartedAtMillis,a=1/0,s=[];t.forEach((function(e){var t,o,u=e.progress,l={id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",events:[],level:Number(e.level),node:e,isExpandable:!1};if(u){var c="0";"InProgress"===u.state?c=(new Date).toString():u.finishedAt?c=u.finishedAt:u.stages&&Object.keys(u.stages).length>0&&(c=Object.values(u.stages[Object.keys(u.stages).length-1])[0]);var d=null!==(o=u.startedAt)&&void 0!==o?o:"0",f=new Date(d).getTime(),h=new Date(c).getTime(),v=u.state,p=null!=v?v:"NotStarted";a=Math.min(f,a);var m=(0,q.A)((0,q.A)({},l),{},{from:f,to:h,status:p}),y=function(e){var t=e.stages,n=e.axisId,r=e.dataProgressFinishedAt,o=e.dataProgressStartedAt,a=new Date(o).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},d=0;return u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:a,to:s,id:l++})),t&&Object.values(t).forEach((function(e,n){var s,f,h=null!==(s=t[n+1])&&void 0!==s?s:{},v=(0,i.A)(Object.entries(e)[0],2),p=v[0],m=v[1],y=null!==(f=Object.values(h)[0])&&void 0!==f?f:r;0===n&&o!==m&&u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:a,to:new Date(m).getTime(),name:"init",id:l++})),u.push((0,q.A)((0,q.A)({},c),{},{trackIndex:d++,from:new Date(m).getTime(),to:new Date(y).getTime(),name:p,id:l++}))})),u}({stages:null==u?void 0:u.stages,dataProgressFinishedAt:c,dataProgressStartedAt:d,axisId:e.id});m.isExpandable=y.length>1;var g=n.operation[Mo[p]],x=n.operation["".concat(Mo[p],"Border")],A=n.operation["".concat(Mo[p],"Background")],w=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,i=e.operationDuration,o={},a=t.length,s=(0,Oe.A)(t);s.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var u=(0,Ao.Mj)(r),l=("light"===n?u.tints(a+2):u.tones(a+2)).map((function(e){return e.toHex()}));return t.forEach((function(e){var t=e.to-e.from,n=s.findIndex((function(t){return t.id===e.id}));o[e.trackIndex]={percentage:i>0?t/i:1,color:l[n]}})),o}({theme:r,events:y,eventMajorColor:g,operationDuration:h-f});m.events=y.map((function(e){return(0,q.A)((0,q.A)({},e),{},{colors:w,borderColor:x,backgroundColor:A})})),s.push(m)}else s.push((0,q.A)((0,q.A)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=Po()(s,["level","from"]);if(o!==1/0&&a!==1/0){var l={id:"preparation",from:o,to:a,events:[{eventsCount:1,axisId:"preparation",renderType:"operation",trackIndex:0,from:o,to:a,colors:{0:{percentage:100,color:n.operation[Mo.Finished]}}}],node:{label:"Preparation",progress:{state:"Finished"},id:"preparation",level:0},isExpandable:!1,level:0,status:"Finished",label:"Preparation"};u.unshift(l)}return u}({nodes:l,colors:s,theme:a,queryStartedAtMillis:t}):[],r=null!==(e=n.map((function(e){var t;return null!==(t=e.events)&&void 0!==t?t:[]})).flat())&&void 0!==e?e:[];return{axes:n,events:r}}),[l,s,a,f]),O=T.axes,R=T.events,I=function(e){var t=o.useState({}),n=(0,i.A)(t,2),r=n[0],a=r.start,s=r.end,u=n[1],l=o.useRef(!1),c=o.useRef(!1),d=o.useMemo((function(){var t,n=No()(e,"from"),r=null!==(t=Ro()(e,"to"))&&void 0!==t?t:Object.create(null),i=n?n.from-1e3:void 0;return{queryStart:i,queryEnd:r.to&&i?r.to+.08*(r.to-i):(new Date).getTime()}}),[e]),f=function(e){var t=e.queryStart,n=e.queryEnd,r=e.from,i=e.to;if(!t)return{};var o=Do({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(Do({from:r,to:i}),o);return t&&r<t||r>n?{start:t,end:t+a}:n<i||t&&t>i?{start:n-a,end:n}:{start:r,end:r+a}}({from:a,to:s,queryStart:d.queryStart,queryEnd:d.queryEnd}),h=f.start,v=f.end;return!c.current||a||s||(l.current=!l.current),c.current=Boolean(a||s),[{timelineStart:h,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(O),P=(0,i.A)(I,2),L=P[0],M=L.timelineStart,D=L.timelineEnd,z=L.timelineRulerKey,$=P[1],F=o.useMemo((function(){var e,t=A.toLowerCase().trim(),n=[],r=!1,i=(0,Xt.A)(O);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!_||o.status===_)){var a=!!o.isExpandable&&m.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,q.A)((0,q.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[O,A,_,m]),U=F.filteredAxes,H=F.isSomeAxesCollapsed,V=o.useMemo((function(){var e=0;return U.map((function(t){var n=Kn.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[U]),B=o.useRef(null),W=o.useState(0),Y=(0,i.A)(W,2),K=Y[0],G=Y[1],Q=function(e){var t=e.from,n=e.to;$({start:t,end:n})},X=o.useMemo((function(){var e=[];return U.forEach((function(t){var n;e.push(t),t.isExpanded&&(null===(n=t.events)||void 0===n||n.forEach((function(n,r){0!==r&&e.push((0,q.A)((0,q.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[U]);return(0,N.jsxs)("div",{className:zo(),children:[(0,N.jsxs)("div",{className:zo("filters"),children:[(0,N.jsx)(kn.k,{className:zo("filters-search"),hasClear:!0,value:A,onUpdate:w,placeholder:"Filter by name"}),(0,N.jsx)(dt.l,{className:zo("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:_?[_]:[],options:j.map((function(e){var t=e.state,n=e.title,r=e.count;return{value:t,content:"".concat(n).concat(r>0?" (".concat(r,")"):"")}})),width:230,hasClear:!0,onUpdate:function(e){C(e[0])}})]}),(0,N.jsxs)("div",{className:zo("content-wrapper"),children:[(0,N.jsx)(xo,{tableItems:X,isSomeAxesCollapsed:H,blocksQuantity:U.length,onExpandAll:function(){if(H){var e=new Set(O.filter((function(e){return e.isExpandable})).map((function(e){return e.id})));y(e)}else y(new Set)},onSidebarScroll:function(){B.current&&G(B.current.scrollTop)},onRulerUpdate:Q,sidebarRef:B,onExpandAxis:function(e){var t=new Set(m);t.has(e)?t.delete(e):t.add(e),y(t)}}),M&&D&&(0,N.jsxs)("div",{className:zo("container"),children:[(0,N.jsx)("div",{className:zo("ruler-wrapper"),children:(0,N.jsx)(Nn.Kf,{from:M,to:D,onUpdate:Q,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:M,maxRange:D},z)}),Boolean(V.length)&&(0,N.jsx)(Vi,{className:zo("timeline"),canvasScrollTop:K,scrollTopChanged:function(e){B.current&&(B.current.scrollTop=e.detail.scrollTop)},start:M,end:D,boundsChanged:function(e){Q({from:e.detail.start,to:e.detail.end})},axes:V,events:R,theme:a})]})]})]})};var Fo=(0,n(33882).A)(o.lazy((function(){return Promise.all([n.e(8096),n.e(1579),n.e(6762),n.e(8392)]).then(n.bind(n,83432))}))),Uo=n(66026),qo=(0,a.A)("plan");const Ho=o.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,a=(0,be.oy)(),s=o.useState(!1),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,be.gi)(),h=(0,u.d4)(Uo.st),v=o.useMemo((function(){return a?(0,Ft.vk)(a):void 0}),[a]);if(!v)return null;var p=v.nodes.length>250;return(0,N.jsx)("div",{className:qo(null,n),children:(0,N.jsxs)(Mt,{children:[(0,N.jsx)(we,{hide:"graph"!==f,className:qo("graph"),children:p&&!c?(0,N.jsx)(Vo,{showGraph:d,graph:v}):(0,N.jsx)(N.Fragment,{children:h?(0,N.jsx)(Fo,{processedGraph:v},"graph"===f?"visible":"hidden"):(0,N.jsx)(jn,{isActive:t&&"graph"===f,graph:v,showMinimap:!0,prepareNode:r})})}),(0,N.jsx)(we,{hide:"timeline"!==f,className:qo("table"),children:(0,N.jsx)($o,{graph:v,prepareNode:r})})]})})}));function Vo(e){var t=e.showGraph,n=e.graph,r=(0,be.wE)(),a=o.useState((function(){return new St.DataSet})),s=(0,i.A)(a,1)[0],u=kt(),l=o.useRef(r);l.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&(0,Ft.DW)(s,l.current),u()}),[s,n,u]),o.useEffect((function(){r&&((0,Ft.DW)(s,r),u())}),[s,r,u]);var c=n.nodes.length>700||n.edges.length>3e3;return(0,N.jsxs)("div",{className:qo("graph-info"),children:[c?(0,N.jsxs)(b.E,{children:["The plan of this operation is way too large to be visualized in browser.",(0,N.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,N.jsxs)(b.E,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,N.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,N.jsx)("br",{}),(0,N.jsx)(E.$,{className:qo("graph-info-button"),onClick:function(){t(!0)},children:c?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,N.jsx)(Vt,{nodes:s,orientation:"vertical",className:qo("legend")})]})}var Bo=n(39400),Wo=n(29746);var Yo=n(85593),Ko=function(e,t,n){var r="";return void 0===n?r="/operations/".concat(encodeURIComponent(t)):"filter"===n&&(r="/operations?type=all&state=all&filter=".concat(encodeURIComponent(t))),"/".concat(e.split(".")[0]).concat(r)},Go=function(e){var t=e.isActive,n=e.operationIdToCluster,r=(0,o.useCallback)((function(e){var t;if("in"===e.type||"out"===e.type){var r,i=function(e){var t=(0,Bo.A)(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,Bo.A)(/^(?:(\w+|\[[^\]]+])\.\s*)?\[(\/*)([^\]]+)](?::\[?([\w-]+)]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,Bo.A)(/^(['"])(\/\/)([^`]+)\1/,{quote:1,openingSlash:2,tablePath:3}).exec(e),n=null==t?void 0:t.groups;if(n){var r=n.cluster;r&&r.startsWith("`")&&(r=r.replace(/`/g,"")),r&&r.startsWith("[")&&(r=r.replace(/[[\]]/g,""));var i=function(e){try{return Wo.A.YPath.parseRelative(function(e){return e.startsWith("//")?e.slice(1):e.startsWith("/")||0===e.length?e:"/".concat(e)}(e))}catch(e){return[]}}(n.openingSlash+n.tablePath).filter((function(e){var t=e.name;return Boolean(t)}));if(0===i.length)return null;var o=i.map((function(e){return e.name})).join("/");return o.startsWith("//")||(o=o.startsWith("/")?"/"+o:"//"+o),{cluster:r,isPathAbsolute:Boolean(n.openingSlash),path:o,view:n.view}}return null}(null!==(r=e.title)&&void 0!==r?r:"");return i&&(e.url=(0,Yo.K)({cluster:i.cluster,path:i.path})),e}if(null!==(t=e.progress)&&void 0!==t&&t.remoteId){var o,a,s=null===(o=e.progress)||void 0===o?void 0:o.remoteId.split("/").pop();if(!s)return e.url=function(e){var t,n=null===(t=e.progress)||void 0===t?void 0:t.remoteId;if(n){var r=n.split("/"),i=r[0].split(".")[0];return Ko(i,r[1],r[2])||void 0}}(e),e;var u=n.has(s)?n.get(s):null===(a=e.progress)||void 0===a||null===(a=a.remoteData)||void 0===a?void 0:a.cluster_name;u&&(e.url=Ko(u,s))}return e}),[n]);return(0,N.jsx)(Ho,{isActive:t,prepareNode:r})},Qo=n(52978),Xo=n(75299);const Jo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 14.75a.75.75 0 0 1-.75-.75V3.81L4.53 6.53a.75.75 0 0 1-1.06-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06L8.75 3.81V14a.75.75 0 0 1-.75.75",clipRule:"evenodd"})}))},Zo=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75",clipRule:"evenodd"})}))};var ea=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=0,o=[];Array.isArray(n.inner_errors)&&1===n.inner_errors.length;)n=(0,i.A)(n.inner_errors,1)[0],o.unshift(n),r+=1;return{issue:o[t],length:r-t}},ta=n(523),na=(0,a.A)("yt-error-cloud"),ra=function(e){var t=e.error,n=e.level,r=e.disableCloud,a=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,Xo.A)(e.initialExpanded),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useState)(0),v=(0,i.A)(h,2),p=v[0],m=v[1],y=(0,o.useCallback)((function(){m((function(e){return e+1}))}),[]),g=(0,o.useCallback)((function(){m(ea(t).length)}),[t]),x=ea(t,p);return!r&&x.length>1?(0,N.jsxs)("div",{children:[(0,N.jsxs)("div",{className:na("collapsed-messages"),children:[(0,N.jsx)(ta.L,{expanded:d,toggleExpanded:f}),(0,N.jsxs)(b.E,{color:"secondary",children:[x.length," intermediate messages"]}),(0,N.jsx)(Ue.S,{className:na("collapsed-messages-show-all"),onClick:g,children:"Show all"})]}),d&&(0,N.jsx)("div",{className:na("errors"),children:(0,N.jsx)(oa,{errors:[(0,q.A)({},x.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:a,onShowParent:y,fromCloud:!0})})]}):(0,N.jsx)(ca,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:a,onShowParent:s})},ia=function(e){return"Info"===e.attributes.severity},oa=function(e){var t=e.errors,n=e.level,r=e.expanded,i=e.onErrorClick,o=e.onShowParent,a=e.fromCloud,s=e.disableCloud;return(0,N.jsx)("div",{children:t.map((function(e,u){return(0,N.jsx)(ra,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!ia(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},aa=n(47378);const sa=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.835 2.244c.963-1.665 3.367-1.665 4.33 0l4.916 8.505c.964 1.666-.24 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.165-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})}))};var ua=n(3659),la=(0,a.A)("yt-error-tree-node"),ca=function(e){var t=e.error,n=e.expanded,r=void 0!==n&&n,a=e.level,s=void 0===a?0:a,u=e.fromCloud,l=void 0!==u&&u,c=e.disableCloud,d=void 0!==c&&c,f=e.onErrorClick,h=e.onShowParent,v=(0,Xo.A)(r),p=(0,i.A)(v,2),m=p[0],y=p[1],g=(0,Xo.A)(!1),x=(0,i.A)(g,2),A=x[0],w=x[1],b=t.inner_errors&&t.inner_errors.length>0,C=function(e){var t,n=null===(t=e.attributes)||void 0===t?void 0:t.start_position;return!!n&&"".concat(n.row,":").concat(n.column)}(t),j=ia(t),k=(0,o.useCallback)((function(){var e;null!==(e=t.attributes)&&void 0!==e&&e.start_position&&f(t.attributes.start_position)}),[t.attributes.start_position,f]);return(0,N.jsxs)("div",{className:la({leaf:!b,info:j}),children:[(0,N.jsxs)("div",{className:la("error-body"),children:[(0,N.jsxs)("div",{className:la("line"),children:[b&&(0,N.jsx)(ta.L,{expanded:m,toggleExpanded:y}),l&&(0,N.jsx)(E.$,{view:"flat-secondary",title:"Show parent",onClick:h,children:(0,N.jsx)(_.I,{data:Jo,size:16})}),(0,N.jsxs)("span",{className:la("header"),children:[(0,N.jsx)(_.I,{className:la("icon"),data:j?Zo:sa,size:16}),(0,N.jsx)("span",{className:la("title"),children:j?"Info":"Error"}),(0,N.jsxs)(E.$,{view:"flat-secondary",onClick:w,children:["Attributes"," ",(0,N.jsx)(_.I,{data:A?uo:so.A,size:16})]}),C&&(0,N.jsx)("span",{className:la("place-text"),title:"Position",children:C})]}),C?(0,N.jsx)(Ue.S,{className:la("message"),color:"primary",onClick:k,children:(0,N.jsx)(aa.H,{value:t.message})}):(0,N.jsx)("span",{className:la("message"),children:(0,N.jsx)(aa.H,{value:t.message})}),t.code?(0,N.jsxs)("span",{className:la("code"),children:["Code: ",t.code]}):null]}),A&&(0,N.jsx)(P.A,{value:t.attributes,settings:ua.A.prepareSettings({})})]}),b&&m&&(0,N.jsx)("div",{className:la("errors"),children:(0,N.jsx)(oa,{errors:t.inner_errors,level:s+1,expanded:m,disableCloud:d,onErrorClick:f})})]})},da=n(19904),fa=n(77720),ha=function(e){var t=e.rootError,n=(0,da.d)().getEditor,r=_t.Ay.getAIChat(),i=(0,o.useCallback)((function(e){var t=e.row,r=e.column,i=n("queryEditor");null==i||i.focus(),null==i||i.revealLine(t),null==i||i.setPosition(new fa.yX(t,r))}),[n]),a=(0,o.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,N.jsxs)("div",{children:[(0,N.jsxs)(Ce.s,{gap:2,alignItems:"center",children:[(0,N.jsxs)("div",{children:[(0,N.jsx)(b.E,{variant:"subheader-3",children:"Query error"})," ",(0,N.jsx)(M.A,{title:"Copy error",view:"flat-secondary",text:a,size:"l"})]}),r&&r.askAboutErrorButton]}),(0,N.jsx)(ca,{error:t,onErrorClick:i,expanded:!0})]}):null},va=n(87446),pa=n(11970),ma=n(81594),ya=function(e){if(!e)return 0;if(e.spyt_progress)return Math.round(100*e.spyt_progress);if(e.total_progress){var t=e.total_progress,n=t.read_bytes,r=t.total_bytes_to_read;return r>0?Math.round(n/(r/100)):0}return 0},ga=n(30996),xa=function(e){var t=e.query,n=[ga.d.SPYT,ga.d.CHYT].includes(t.engine),r=[ma.RE.RUNNING,ma.RE.COMPLETING].includes(t.state),i=(0,o.useMemo)((function(){if(!t.progress||!n||!r)return[];if((0,A.eZ)(t.progress)){var e=ya(t.progress);return[{tooltip:"".concat(e,"%"),percent:e}]}return t.progress.progress.map((function(e){var t=ya(e);return{tooltip:"".concat(e.query_id," - ").concat(t,"%"),percent:t}}))}),[r,n,t.progress]);return(0,N.jsx)(Ce.s,{direction:"column",gap:1,children:i.map((function(e){var t=e.tooltip,n=e.percent;return(0,N.jsx)(va.m,{content:t,children:(0,N.jsx)("div",{children:(0,N.jsx)(pa.k,{theme:"info",size:"xs",value:n})})},t)}))})},Aa=n(32751),wa=(0,a.A)("query-results"),ba=o.memo((function(e){var t=e.query,n=e.className,r=e.toolbar,i=e.minimized,a=void 0!==i&&i,s=(0,u.wA)(),l=(0,u.d4)(Aa.Qm),c=(0,u.d4)(Aa.Lc),d=(0,u.d4)(Aa.G6),f=o.useMemo((function(){var e;return function(e){var t=new Map;if(!e)return t;var n=function(e){for(var r in e)"_cluster_name"===r?t.set(e._id,e._cluster_name):"object"===(0,I.A)(e[r])&&null!==e[r]&&n(e[r])};return n(e),t}((0,A.eZ)(null==t?void 0:t.progress)?null==t||null===(e=t.progress)||void 0===e?void 0:e.yql_statistics:void 0)}),[null==t?void 0:t.progress]);if(!t)return null;var h=(0,A.eZ)(null==t?void 0:t.progress)?t.progress:{},v=null==d?void 0:d.resultIndex;return(0,N.jsxs)("div",{className:wa(null,n),children:[(0,N.jsxs)("div",{className:wa("meta"),children:[(0,N.jsx)(R,{className:wa("meta-info"),query:t}),(0,N.jsx)("div",{className:wa("toolbar"),children:r})]}),(0,N.jsx)(xa,{query:t}),(0,N.jsx)(we,{className:wa("result",{minimized:a}),hide:a,children:(0,N.jsxs)(be.rk,{plan:h.yql_plan,progress:null==h?void 0:h.yql_progress,defaultView:"graph",children:[(0,N.jsxs)("div",{className:wa("header"),children:[(0,N.jsx)(w.t,{className:wa("tabs"),items:l,activeTab:c,onSelectTab:function(e){s((0,Qo.TC)(!0)),s((0,Qo.YF)(e))}}),(null==c?void 0:c.includes("result"))&&Number.isInteger(v)&&(0,N.jsx)("div",{className:wa("tab_actions"),children:(0,N.jsx)(ve,{query:t,resultIndex:null!=v?v:0})}),"progress"===c&&(0,N.jsx)(Ee,{})]}),(0,N.jsxs)("div",{className:wa("content"),children:[(0,N.jsx)(we,{hide:!(null!=c&&c.includes("result")||Number.isInteger(v)),className:wa("result-wrap"),children:(0,N.jsx)(Et,{query:t,activeResultParams:d})}),(0,N.jsx)(we,{hide:!(null!=c&&c.includes("chart-tab")),className:wa("result-wrap"),children:(0,N.jsx)(Ct,{query:t,resultIndex:(0,pe.S)(c)||0})}),"error"===c&&(0,N.jsx)(ha,{rootError:t.error}),"meta"===c&&(0,N.jsx)(U,{query:t}),(0,N.jsx)(we,{hide:"statistic"!==c,children:(0,N.jsx)(ye,{})}),"progress"===c&&(0,N.jsx)(Go,{isActive:!0,operationIdToCluster:f})]})]})}),(0,N.jsx)("div",{})]})})),Ea=n(10720),_a=n(80999);const Ca=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9 9v2.665a.335.335 0 0 0 .55.257l4.72-3.934a.635.635 0 0 0 0-.976L9.55 3.078a.335.335 0 0 0-.55.257V6H7.5c-1.584 0-3.182.571-4.241 1.692-.9.951-1.549 2.446-1.31 4.723.65-1.026 1.365-1.837 2.201-2.413C5.198 9.279 6.323 9 7.5 9zm-3 1.731c-1.162.396-2.165 1.337-3.151 3.106-.223.4-.64.663-1.098.663-.552 0-1.04-.376-1.143-.917C-.598 7.237 3.678 4.5 7.499 4.5V3.335a1.835 1.835 0 0 1 3.01-1.41l4.722 3.935a2.135 2.135 0 0 1 0 3.28l-4.721 3.935a1.835 1.835 0 0 1-3.01-1.41V10.5c-.533 0-1.03.07-1.5.231",clipRule:"evenodd"})}))};var ja=(0,a.A)("query-share-button"),ka=new Ea.I,Sa=function(){var e=(0,u.wA)(),t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,Xo.A)(!1),c=(0,i.A)(s,2),d=c[0],h=c[1],v=(0,u.d4)(f.wJ),p=(0,u.d4)(l.Ry).includes(l.PH),m=(0,o.useCallback)((0,X.A)((0,Q.A)().mark((function t(){return(0,Q.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a(!0),t.next=4,e((0,T.sR)());case 4:return t.prev=4,a(!1),t.finish(4);case 7:case"end":return t.stop()}}),t,null,[[0,,4,7]])}))),[e]),y=(0,o.useCallback)((0,X.A)((0,Q.A)().mark((function e(){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.clipboard.writeText(window.location.href),p){e.next=4;break}return e.next=4,m();case 4:ka.add({name:"",autoHiding:5e3,theme:"success",title:"Query successful shared",content:"The link to your Query is published and copied to the clipboard",actions:[{label:"Unpublish",onClick:m}]});case 5:case"end":return e.stop()}}),e)}))),[m,p]);return v?(0,N.jsxs)("div",{className:ja(),children:[(0,N.jsxs)(E.$,{onClick:y,view:p?"flat-info":"flat",pin:p?"round-brick":void 0,selected:p,loading:r,children:[(0,N.jsx)(_.I,{data:Ca,width:16})," ",p?"Shared":"Share"]}),p&&(0,N.jsx)(_a.r,{renderSwitcher:function(e){return(0,N.jsx)(E.$,(0,q.A)((0,q.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,N.jsx)(_.I,{size:16,data:d?uo:so.A})}))},onSwitcherClick:h,items:[{action:m,text:"Unpublish query"}]})]}):null},Ta=n(20361),Na=n(27117),Oa=n(61422),Ra=function(e){var t=e.query_id,n=(0,u.wA)(),r=(0,u.d4)(f.EO),a=(0,y.t)(),s=a.selectACOOptions,l=a.changeCurrentQueryACO,c=a.currentQueryACO,d=(0,o.useState)(void 0),h=(0,i.A)(d,2),v=h[0],p=h[1],m=(0,Xo.A)(!1),g=(0,i.A)(m,2),x=g[0],A=g[1],w=function(){var e=(0,X.A)((0,Q.A)().mark((function e(r){return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l({aco:r.aco,query_id:t});case 3:return e.next=5,n((0,Oa.et)({refresh:!0}));case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),p(e.t0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}();return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(E.$,{view:"flat",onClick:A,children:[(0,N.jsx)(_.I,{data:Na.A,size:16})," Edit ACO"]}),x&&(0,N.jsx)(Ta.yZ,{pristineSubmittable:!0,visible:x,modal:!0,headerProps:{title:"Edit query ACO"},footerProps:{textApply:"Update"},onClose:function(){p(void 0),A()},onAdd:function(e){return w(e.getState().values)},initialValues:{aco:c},fields:[{name:"aco",type:"select",extras:{options:s,placeholder:"ACO",width:"max",filterable:!0,multiple:r}}].concat((0,Oe.A)((0,Ta.Y)([v])))})]})},Ia=n(28099);const Pa=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,N.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12.5h8a1.5 1.5 0 0 0 1.5-1.5v-.5h-11v.5A1.5 1.5 0 0 0 4 12.5M2.5 9V5A1.5 1.5 0 0 1 4 3.5h8A1.5 1.5 0 0 1 13.5 5v4zM1 11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H4a3 3 0 0 0-3 3z",clipRule:"evenodd"})}))};var La=(0,a.A)("yt-qt-result-view"),Ma=(0,o.memo)((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,N.jsx)(ba,{query:t,className:La(),minimized:"minimized"===n,toolbar:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(Ce.s,{gap:2,className:La("results-toolbar-buttons"),children:[(0,N.jsx)(Sa,{}),(0,N.jsx)(Ra,{query_id:t.id})]}),"split"===n?(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("full")},children:(0,N.jsx)(_.I,{data:Ia.A,size:16})}):(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("split")},children:(0,N.jsx)(_.I,{data:Pa,size:16})}),"minimized"!==n&&(0,N.jsx)(E.$,{view:"flat",onClick:function(){return r("minimized")},children:(0,N.jsx)(_.I,{data:qt.A,size:16})})]})})}));const Da=function(e){return(0,N.jsx)("svg",(0,q.A)((0,q.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,N.jsx)("path",{fillRule:"evenodd",d:"M0 .994v10.013a.993.993 0 0 0 1.475.868l9.012-5.007a.993.993 0 0 0 0-1.735L1.475.125A.993.993 0 0 0 0 .994",clipRule:"evenodd"})}))};function za(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==l.PH}))}var $a=function(){var e=(0,u.d4)(f.EO),t=(0,y.t)(),n=t.selectACOOptions,r=t.isFlight,i=t.changeDraftQueryACO,a=t.currentDraftQueryACO,s=(0,o.useCallback)((function(e){return i({aco:e})}),[i]);return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(dt.l,{filterable:!0,disabled:r,width:"auto",label:"Access:",className:"query-aco-select",options:za(n),value:za(a),onUpdate:s,multiple:e})})},Fa=n(94383),Ua=n(76866),qa=n(80016),Ha=n(73689),Va=function(e){switch(e){case ga.d.CHYT:return Ha.m.CHYT;case ga.d.SPYT:return Ha.m.SPYT;case ga.d.YT_QL:return Ha.m.YTQL;default:return Ha.m.YQL}},Ba=n(57436),Wa=function(){return(0,Z.A)((function e(t){(0,J.A)(this,e),this.editor=void 0,this.collection=void 0,this.editor=t,this.collection=this.editor.createDecorationsCollection([])}),[{key:"clearDecorations",value:function(){this.collection.clear()}}])}(),Ya=function(e){function t(e,n,r){var i;return(0,J.A)(this,t),(i=(0,ee.A)(this,t,[e])).links=void 0,i.engine=void 0,i.commandKey=void 0,i.engine=n,i.commandKey=r,i.links=[],i}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setEngine",value:function(e){this.engine=e}},{key:"updateLinks",value:function(){var e=this,t=this.editor.getModel();if(t){var n=t.getLineCount();if(n){for(var r=[],i=[],o=function(n){var o=t.getLineContent(n);(0,Ba.R)(o,e.engine).forEach((function(t){var o=t.path,a=t.position,s=t.cluster;o&&a&&(r.push({path:o,line:n,position:a,cluster:s}),i.push({range:new fa.Q6(n,a.start,n,a.end),options:{hoverMessage:{value:"Follow link (".concat(e.commandKey," + click)")}}}))}))},a=1;a<=n;a++)o(a);rt()(r,this.links)||(this.clearDecorations(),this.collection.set(i),this.links=r)}}}},{key:"findLink",value:function(e){var t=e.lineNumber,n=e.column;if(this.editor.getModel())return this.links.find((function(e){var r=e.position,i=r.start,o=r.end,a=e.line;return t===a&&n>=i&&n<=o}))}}])}(Wa),Ka=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setActiveLine",value:function(e){if(e){var t=this.editor.getModel();t&&(this.clearDecorations(),this.collection.set([{range:new fa.Q6(e,1,e,t.getLineLength(e)+1),options:{isWholeLine:!0,className:"yt-monaco-editor__highlighted-line"}}]),this.editor.setSelection(new fa.LN(0,0,0,0)))}else this.clearLines()}},{key:"clearLines",value:function(){this.editor.setSelection(new fa.LN(0,0,0,0)),this.clearDecorations()}}])}(Wa),Ga=function(e){function t(){return(0,J.A)(this,t),(0,ee.A)(this,t,arguments)}return(0,te.A)(t,e),(0,Z.A)(t,[{key:"setErrors",value:function(e,t){var n=this.editor.getModel();if(n){var r=[],i=[],o=new Set;e.forEach((function(e){var n=e.attributes,a=e.message,s=new fa.Q6(n.start_position.row,n.start_position.column,n.end_position.row,n.end_position.column),u=s.startLineNumber,l=s.startColumn,c=s.endLineNumber,d=s.endColumn,f={message:a,severity:fa.cj.Error,startLineNumber:u,startColumn:l,endLineNumber:c,endColumn:d};r.push(f),o.has(s.startLineNumber)||(i.push({range:s,options:{isWholeLine:!0,className:t}}),o.add(s.startLineNumber))})),this.clearDecorations(),this.collection.set(i),fa.EN.setModelMarkers(n,"query-tracker",r)}}}])}(Wa),Qa=n(256),Xa=(0,a.A)("yq-query-editor-monaco"),Ja=function(e){var t=e.pathNavigation,n=void 0===t||t,r=(0,o.useState)(!1),a=(0,i.A)(r,2),s=a[0],c=a[1],d=(0,o.useRef)(),f=(0,da.d)().setEditor,h=(0,u.d4)(l.Ux),v=(0,u.d4)(l.AC),p=(0,u.d4)(l.Q4),m=(0,u.d4)(l.ln),y=(0,u.d4)(l.Fn),g=(0,u.d4)(l.hS),x=(0,u.wA)(),A=(0,o.useRef)({isInitialized:!1,linkDecorator:null,lineDecorator:null,errorDecorator:null});!function(e){var t=(0,u.d4)(Fa.RR);(0,o.useEffect)((function(){var e;null===(e=_t.Ay.getInlineSuggestionsApi())||void 0===e||e.sendTelemetry(t?"enabled":"disabled")}),[t]);var n=(0,o.useCallback)((function(n){var r;"Escape"===n.key&&e&&t&&(null===(r=_t.Ay.getInlineSuggestionsApi())||void 0===r||r.sendTelemetry("discarded"))}),[e]);(0,o.useEffect)((function(){fa.EN.registerCommand("accessQuerySuggestionsTelemetry",(0,X.A)((0,Q.A)().mark((function e(){var t;return(0,Q.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=_t.Ay.getInlineSuggestionsApi())||void 0===t||t.sendTelemetry("accepted");case 1:case"end":return e.stop()}}),e)}))))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",n,!0),function(){document.removeEventListener("keydown",n,!0)}}),[n,e])}(d.current),(0,o.useEffect)((function(){var e,t;null===(e=d.current)||void 0===e||e.focus(),null===(t=d.current)||void 0===t||t.setScrollTop(0)}),[h]),(0,o.useEffect)((function(){d.current&&(f("queryEditor",d.current),A.current.isInitialized||(A.current={isInitialized:!0,linkDecorator:n?new Ya(d.current,m,Qn()?"meta":"ctrl"):null,lineDecorator:new Ka(d.current),errorDecorator:new Ga(d.current)}))}),[f]),(0,o.useEffect)((function(){var e;null===(e=A.current.linkDecorator)||void 0===e||e.updateLinks()}),[v,p]),(0,o.useEffect)((function(){var e;null===(e=A.current.linkDecorator)||void 0===e||e.setEngine(m)}),[m]),(0,o.useEffect)((function(){var e;null===(e=A.current.errorDecorator)||void 0===e||e.setErrors(y,Xa("error-line"));var t,n,r=function(){var e=window.location.hash;if(!e.startsWith("#L"))return null;var t=parseInt(e.replace(/[^0-9]/g,""),10);return isNaN(t)?null:t}();g||!r||s||(null===(t=A.current.lineDecorator)||void 0===t||t.setActiveLine(r),null===(n=d.current)||void 0===n||n.revealLineInCenter(r))}),[s,y,g]);var w=(0,o.useMemo)((function(){return function(e){return{fontSize:14,language:e,renderWhitespace:"boundary",minimap:{enabled:!0},inlineSuggest:{enabled:!0,showToolbar:"always",mode:"subword",keepOnBlur:!0}}}(m)}),[m]),b=(0,o.useCallback)((function(e){var t=e.element.dataset.number;if(t){var n;null===(n=A.current.lineDecorator)||void 0===n||n.setActiveLine(parseInt(t,10));var r=new URL(window.location.href);r.hash="#L".concat(t),window.history.pushState(null,"",r.toString())}else{var i;null===(i=A.current.lineDecorator)||void 0===i||i.clearLines()}}),[]),E=(0,o.useCallback)((function(e){var t,n=null===(t=A.current.linkDecorator)||void 0===t?void 0:t.findLink(e);n&&x((0,Qa.in)(n.path,n.cluster))}),[x]),_=(0,o.useCallback)((function(e){var t=e.target,n=e.event;t.type===fa.EN.MouseTargetType.GUTTER_LINE_NUMBERS&&b(t),t.type===fa.EN.MouseTargetType.CONTENT_TEXT&&Xn(n)&&E(t.position)}),[b,E]),C=(0,o.useCallback)((function(e){c(!0),x((0,T.Bn)({query:e,error:void 0}))}),[x]);return(0,N.jsx)(qa.w,{children:(0,N.jsx)(Ua.A,{editorRef:d,value:v||"",language:Va(m),className:Xa(),onChange:C,onClick:_,monacoConfig:w})})},Za=(0,a.A)("yt-qt-query-editor-view"),es=(0,o.memo)((function(e){var t=e.onStartQuery,n=e.pathNavigation,r=(0,o.useRef)(),i=(0,da.d)().setEditor,a=(0,u.d4)(l.Ux),s=(0,u.d4)(l.ln),c=(0,u.d4)(f.d),d=(0,u.wA)(),h=(0,o.useCallback)((function(){d((0,T.GB)(t))}),[d,t]);(0,o.useEffect)((function(){var e,t;null===(e=r.current)||void 0===e||e.focus(),null===(t=r.current)||void 0===t||t.setScrollTop(0)}),[a]),(0,o.useEffect)((function(){r.current&&i("queryEditor",r.current)}),[i]),(0,o.useEffect)((function(){var e=function(e){var t=e.ctrlKey||e.metaKey,n="Enter"===e.key||"e"===e.key,r="F8"===e.key;(t&&n||r)&&(e.preventDefault(),e.stopPropagation(),h())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}),[h]);var v=(0,o.useCallback)((function(){d((0,T.GB)(t,{execution_mode:"validate"}))}),[d,t]),p=(0,o.useCallback)((function(){d((0,T.GB)(t,{execution_mode:"optimize"}))}),[d,t]);return(0,N.jsxs)("div",{className:Za(),children:[(0,N.jsx)(Ja,{pathNavigation:n}),(0,N.jsx)("div",{className:Za("actions"),children:(0,N.jsxs)("div",{className:"query-run-action",children:[(0,N.jsxs)(E.$,{qa:"qt-run",view:"action",onClick:h,children:[(0,N.jsx)(_.I,{data:Da}),"Run"]}),s===ga.d.YQL?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(E.$,{qa:"qt-validate",onClick:v,children:"Validate"}),(0,N.jsx)(E.$,{qa:"qt-explain",onClick:p,children:"Explain"})]}):null,c&&(0,N.jsx)($a,{})]})})]})})),ts=(0,a.A)("query-container"),ns=function(e){var t=e.onStartQuery,n=e.showStatusInTitle,a=e.pathNavigation,A=(0,u.wA)(),w=function(){var e=(0,u.d4)(l.st),t=(0,u.d4)(f.B8),n=(0,o.useContext)(d.o),r=(0,u.wA)(),a=(0,o.useMemo)((function(){return function(e){var n=(0,i.A)(e,1)[0];r({type:p.JJ,data:(0,v.n)(n,t)}),r((0,m.y)())}}),[r,t]);return(0,o.useEffect)((function(){if(n&&e&&(0,h.KO)(e))return n.watch([e],a)}),[n,e,a]),e}(),b=(0,y.t)().isQueryTrackerInfoLoading,E=(0,o.useState)("minimized"),_=(0,i.A)(E,2),C=_[0],j=_[1],k=(0,o.useState)([50,50]),S=(0,i.A)(k,2),T=S[0],O=S[1];(0,o.useEffect)((function(){var e,t;if(w&&n){var r=w.start_time?g.A.format.DateTime(w.start_time,{format:"short"}):"",i=(null===(e=w.annotations)||void 0===e?void 0:e.title)||"",o=(null===(t=w.state)||void 0===t?void 0:t.toUpperCase())||"";(r||i||o)&&A((0,x.ar)({path:"".concat(i," ").concat(o," ").concat(r," @ ").concat(w.engine)}))}}),[A,w,n]),(0,o.useEffect)((function(){j("split")}),[null==w?void 0:w.id]);var R=(0,u.d4)(l.Kv),I=(0,u.d4)(l.hS),P=b||I;return(0,N.jsxs)(N.Fragment,{children:[P&&(0,N.jsx)("div",{className:ts("loading"),children:(0,N.jsx)(s.a,{})}),(0,N.jsxs)(c.A,{className:ts((0,r.A)({},C,!0)),direction:c.A.VERTICAL,onResizeEnd:O,getInitialSizes:function(){return T},children:["full"!==C&&(0,N.jsx)(es,{onStartQuery:t,pathNavigation:a}),(null==w?void 0:w.id)&&R&&(0,N.jsx)(Ma,{query:w,setResultViewMode:j,resultViewMode:C})]})]})}},82662:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.488 3.43a.75.75 0 0 1 .081 1.058l-6 7a.75.75 0 0 1-1.1.042l-3.5-3.5A.75.75 0 0 1 4.03 6.97l2.928 2.927 5.473-6.385a.75.75 0 0 1 1.057-.081",clipRule:"evenodd"})}))}},82785:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});var r=(0,n(77810).createContext)(new Map)},88150:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.77 10.73.01-.01 3.08-3.08a3.889 3.889 0 1 0-5.5-5.5L4.73 4.77l-.01.01-1.667 1.666a5.303 5.303 0 0 0 7.5 7.5l3.167-3.166a.75.75 0 1 0-1.061-1.06l-3.166 3.166a3.803 3.803 0 1 1-5.379-5.379L5.33 6.291l.011-.01L8.421 3.2a2.39 2.39 0 0 1 3.38 3.378l-1.13 1.13-.012.012-2.995 2.994a.975.975 0 1 1-1.378-1.378L9.28 6.34a.75.75 0 0 0-1.06-1.06L5.225 8.274a2.475 2.475 0 0 0 3.5 3.5z",clipRule:"evenodd"})}))}},92603:(e,t,n)=>{"use strict";n.d(t,{Bf:()=>m,IQ:()=>y,gi:()=>p,oy:()=>h,rk:()=>f,wE:()=>v});var r=n(9736),i=n(77810),o=n(64922),a=i.createContext(void 0),s=i.createContext(void 0),u=i.createContext(void 0),l=i.createContext(void 0),c=i.createContext(void 0),d=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function f(e){var t=e.plan,n=e.progress,f=e.children,h=e.defaultView,v=i.useMemo((function(){return d}),[!1]),p=v[0].value,m=i.useState(null!=h?h:p),y=(0,r.A)(m,2),g=y[0],x=y[1],A=g;return v.find((function(e){return e.value===A}))||(A=p),(0,o.jsx)(a.Provider,{value:null!=t?t:null,children:(0,o.jsx)(u.Provider,{value:v,children:(0,o.jsx)(s.Provider,{value:A,children:(0,o.jsx)(l.Provider,{value:x,children:(0,o.jsx)(c.Provider,{value:null!=n?n:null,children:f})})})})})}function h(){var e=i.useContext(a);if(void 0===e)throw new Error("useResultPlan must be used within a PlanProvider");return e}function v(){var e=i.useContext(c);if(void 0===e)throw new Error("useResultProgress must be used within a PlanProvider");return e}function p(){var e=i.useContext(s);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function m(){var e=i.useContext(u);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function y(){var e=i.useContext(l);if(void 0===e)throw new Error("useSetPlanView must be used within a PlanProvider");return e}},95910:(e,t,n)=>{"use strict";n.d(t,{f:()=>r.f});var r=n(5166)},97583:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var r=function(e){return!!e&&["table","tablet_cell","replicated_table"].includes(e)}}}]);
3
+ //# sourceMappingURL=9361.632ac658.chunk.js.map