@ytsaurus/ui 3.3.1 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/build/assets-manifest.json +34 -34
- package/dist/public/build/css/3132.43311d48.chunk.css +2 -0
- package/dist/public/build/css/3132.43311d48.chunk.css.map +1 -0
- package/dist/public/build/css/590.6f40b178.chunk.css +2 -0
- package/dist/public/build/css/590.6f40b178.chunk.css.map +1 -0
- package/dist/public/build/css/scheduling.8b8a192b.chunk.css +2 -0
- package/dist/public/build/css/scheduling.8b8a192b.chunk.css.map +1 -0
- package/dist/public/build/js/2563.bbb74274.chunk.js +2 -0
- package/dist/public/build/js/2563.bbb74274.chunk.js.map +1 -0
- package/dist/public/build/js/4237.57c56e6b.chunk.js +3 -0
- package/dist/public/build/js/4237.57c56e6b.chunk.js.map +1 -0
- package/dist/public/build/js/887.d8e107dc.chunk.js +2 -0
- package/dist/public/build/js/887.d8e107dc.chunk.js.map +1 -0
- package/dist/public/build/js/{app-navigation-page-layout.27364587.chunk.js → app-navigation-page-layout.afb1c1ba.chunk.js} +2 -2
- package/dist/public/build/js/app-navigation-page-layout.afb1c1ba.chunk.js.map +1 -0
- package/dist/public/build/js/{app-navigation.b86557c0.chunk.js → app-navigation.38835895.chunk.js} +2 -2
- package/dist/public/build/js/{app-navigation.b86557c0.chunk.js.map → app-navigation.38835895.chunk.js.map} +1 -1
- package/dist/public/build/js/{cluster-page-wrapper.98d8905c.chunk.js → cluster-page-wrapper.84f72ceb.chunk.js} +2 -2
- package/dist/public/build/js/{cluster-page-wrapper.98d8905c.chunk.js.map → cluster-page-wrapper.84f72ceb.chunk.js.map} +1 -1
- package/dist/public/build/js/{code-assistant-chat.4275144c.chunk.js → code-assistant-chat.a7927638.chunk.js} +2 -2
- package/dist/public/build/js/{code-assistant-chat.4275144c.chunk.js.map → code-assistant-chat.a7927638.chunk.js.map} +1 -1
- package/dist/public/build/js/main.d91d7090.js +3 -0
- package/dist/public/build/js/main.d91d7090.js.map +1 -0
- package/dist/public/build/js/{navigation.c35bb543.chunk.js → navigation.9b4e0429.chunk.js} +2 -2
- package/dist/public/build/js/navigation.9b4e0429.chunk.js.map +1 -0
- package/dist/public/build/js/{query-tracker.17cb6d4e.chunk.js → query-tracker.1b6d537a.chunk.js} +2 -2
- package/dist/public/build/js/{query-tracker.17cb6d4e.chunk.js.map → query-tracker.1b6d537a.chunk.js.map} +1 -1
- package/dist/public/build/js/{runtime.6000b37f.js → runtime.93a1fc00.js} +2 -2
- package/dist/public/build/js/{runtime.6000b37f.js.map → runtime.93a1fc00.js.map} +1 -1
- package/dist/public/build/js/scheduling.943b1602.chunk.js +2 -0
- package/dist/public/build/js/scheduling.943b1602.chunk.js.map +1 -0
- package/dist/public/build/manifest.json +30 -30
- package/dist/server/controllers/ai-chat.js +2 -1
- package/dist/server/types/ai-chat.d.ts +3 -0
- package/package.json +5 -5
- package/dist/public/build/css/3132.62cd9c06.chunk.css +0 -2
- package/dist/public/build/css/3132.62cd9c06.chunk.css.map +0 -1
- package/dist/public/build/css/590.1d7b27ca.chunk.css +0 -2
- package/dist/public/build/css/590.1d7b27ca.chunk.css.map +0 -1
- package/dist/public/build/css/scheduling.f5b832cf.chunk.css +0 -2
- package/dist/public/build/css/scheduling.f5b832cf.chunk.css.map +0 -1
- package/dist/public/build/js/3205.87c8575d.chunk.js +0 -2
- package/dist/public/build/js/3205.87c8575d.chunk.js.map +0 -1
- package/dist/public/build/js/4237.a6d263f6.chunk.js +0 -3
- package/dist/public/build/js/4237.a6d263f6.chunk.js.map +0 -1
- package/dist/public/build/js/887.7bbb21d6.chunk.js +0 -2
- package/dist/public/build/js/887.7bbb21d6.chunk.js.map +0 -1
- package/dist/public/build/js/app-navigation-page-layout.27364587.chunk.js.map +0 -1
- package/dist/public/build/js/main.39129d1a.js +0 -3
- package/dist/public/build/js/main.39129d1a.js.map +0 -1
- package/dist/public/build/js/navigation.c35bb543.chunk.js.map +0 -1
- package/dist/public/build/js/scheduling.3fff0b4f.chunk.js +0 -2
- package/dist/public/build/js/scheduling.3fff0b4f.chunk.js.map +0 -1
- /package/dist/public/build/js/{4237.a6d263f6.chunk.js.LICENSE.txt → 4237.57c56e6b.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{main.39129d1a.js.LICENSE.txt → main.d91d7090.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4237.a6d263f6.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[3205,4237],{256:(e,t,n)=>{"use strict";n.d(t,{u_:()=>X,RU:()=>Q,dt:()=>W,ID:()=>Y,p3:()=>Z,in:()=>ee,vl:()=>J,sS:()=>K});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(68175),p=n(3659),m=n(2796),y=n(66030),g=n(58860),x=n(52797),A=n(88187),w=["columns"];function b(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,b,_,E,C,j,k,S,N,O,T,I,R;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,b=u.map((function(e){return e.name})),e.next=4,(0,l.fI)(f.Qq.checkPermission(f.Vu.dynTableCheckPerm,{setup:{proxy:(0,x.v9)(n),JSONSerializer:g.b},parameters:{columns:b,permission:"read",user:s,path:o}}),{skipSuccessToast:!0,toasterName:"query_navigation_node_permissions",errorTitle:"Navigation node get attributes failure"});case 4:if(_=e.sent,Array.isArray(_.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(b[n]):(e.omittedColumns.push(b[n]),c.includes(b[n])&&e.deniedKeyColumns.push((0,v.A)({},b[n],t.action))),e}),{availableColumns:[],omittedColumns:[],deniedKeyColumns:[]}),C=E.availableColumns,j=E.omittedColumns,0===E.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(p.A.decode),S={query:m.A.prepareQuery({aColumns:k,path:o,keyColumns:c,offset:0,limit:d}),output_format:h,dump_error_into_response:!0},N={proxy:(0,x.v9)(n),JSONSerializer:g.b},e.next=15,(0,l.fI)((0,A.S)({setup:N,parameters:S}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 15:return O=e.sent,T=O.columns,I=(0,i.A)(O,w),R=u.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,y._)(T,j,R)},I));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var E=n(96500),C=["columns","omittedColumns"];function j(e){return k.apply(this,arguments)}function k(){return(k=(0,o.A)((0,r.A)().mark((function e(t){var n,o,s,u,c,d,f,h,v,p,m,A;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,x.v9)(o),JSONSerializer:g.b},f={path:n+"[#0:#"+u+"]",output_format:c,table_reader:{workload_descriptor:{category:"user_interactive"}}},e.next=5,(0,l.fI)((0,E.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,C),A=s.map((function(e){return e.name})),e.abrupt("return",(0,a.A)({columns:(0,y._)(v,p,A)},m));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var S=n(13724),N=n(21594),O=n(19314),T=n(97583),I=n(27723),R=n(73800),P=n(30996),M=n(52142),L=n(29970),D=n(6640),q=n(79329),z=n(54744),$=n(22290),U=n(9178),F=n(59028),H=n(87410),B=n(91984),V=["target_path"],K=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,S.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))}}},W=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,x.v9)(h),JSONSerializer:g.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,V);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)}}()},Y=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,A,w,_,E,C,k,S,N;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,$.GN)(),f=l.cellSize,v=l.pageSize,p=(0,q.fN)(o),m=(0,z.t5)(o),y=(0,x.ID)(o),a){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,R.M)(e,a);case 10:return g=t.sent,A=c.A.getValue(g.schema),w=(0,D.m3)(A.map((function(e){return e.name})),f,y,p,m),_=g.dynamic?b:j,t.prev=14,t.next=17,_({login:o.global.login,path:e,clusterConfig:a,schema:A,keyColumns:g.key_columns,limit:v,output_format:w});case 17:E=t.sent,C=E.columns,k=E.rows,S=E.yqlTypes,N={name:g.key,meta:(0,d.UQ)({cluster:a.id,attributes:g,tableType:(0,h.H)(g.dynamic,g),isDynamic:g.dynamic}),rows:k,schema:A,columns:C,yqlTypes:S},n((0,s.SO)(e)),n((0,s.tQ)(N)),n((0,s.VR)(s.Dh.Table)),t.next=30;break;case 27:t.prev=27,t.t0=t.catch(14),B.X.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)}}()},G=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,x.v9)(t),JSONSerializer:g.b},parameters:{path:"".concat(e,"/@type")}});case 5:if(o=n.sent,!(0,T.h)(o)){n.next=11;break}return n.next=9,i(Y(e));case 9:n.next=17;break;case 11:if(!(0,I.R)(o)){n.next=16;break}return n.next=14,i(W(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)}}()},J=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(W("/"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Q=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(G(a,o));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},X=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:B.X.add({theme:"success",name:"copy_navigation_path",title:"Path copied"}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),B.X.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)}}()},Z=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===P.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)}}()},ee=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,L.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,F.rw)("global::queryTracker::queriesListSidebarVisibilityMode",!0));case 12:i((0,H.MP)(U.e8.Navigation)),i((0,s.VR)(s.Dh.Loading)),i(G(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"})}))}},2371:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var r=n(64922),i=n(77810),o=n(28344),a=n(91018);const s=i.forwardRef(((e,t)=>{const n=function(e){const t=i.useContext(o.H);if(!t)throw new Error("<TabPanel> must be used within <TabProvider>");const n=t.value,r=t.id,s=`${r}:t:${e.value}`,u=`${r}:p:${e.value}`,l=n===e.value,{value:c,qa:d,...f}=e;return{...f,role:"tabpanel","aria-labelledby":s,id:u,className:(0,a.yX)({hidden:!l},e.className),"data-qa":e.qa}}(e);return(0,r.jsx)(o.H.Provider,{value:void 0,children:(0,r.jsx)("div",{ref:t,...n,children:e.children})})}));s.displayName="TabPanel"},3035:(e,t,n)=>{"use strict";n.d(t,{t:()=>c});var r=n(9736),i=n(77810),o=n(14371),a=n(29970),s=n(57018),u=n(61525),l=n(52142),c=function(){var e=(0,o.w)(),t=(0,o.d)(a.Ry),n=(0,o.d)(a.q9),c=(0,o.d)(s.kz),d=(0,o.d)(s.rE),f=(0,o.d)(s.HP),h=(0,i.useState)(!1),v=(0,r.A)(h,2),p=v[0],m=v[1],y=(0,i.useCallback)((function(t){var n=t.aco,r=t.query_id;if(!r)throw new Error("query_id is empty");return m(!0),e((0,l.s_)({aco:n,query_id:r})).finally((function(){return m(!1)}))}),[e]);return{selectACOOptions:c,currentQueryACO:t,changeDraftQueryACO:(0,i.useCallback)((function(t){var n=t.aco;return m(!0),e((0,l.Tk)({aco:n})).finally((function(){return m(!1)}))}),[e]),changeCurrentQueryACO:y,currentDraftQueryACO:n,trackerInfo:f,loadQueryTrackerInfo:function(){e((0,u.N)())},isFlight:p||d,isQueryTrackerInfoLoading:d}}},4123:(e,t,n)=>{"use strict";n.d(t,{_:()=>c}),n(77810);var r=n(76872),i=n(3962),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})]})]})}},7584:(e,t,n)=>{"use strict";n.d(t,{j:()=>s,D:()=>u});var r=n(92611);const i=JSON.parse('{"alert_name-required":"Name is required field","alert_name-already-exist":"This name is already in use, please type some another","alert_value-required":"Values is required field"}'),o=JSON.parse('{"alert_name-required":"Название обязательно","alert_name-already-exist":"Это название уже используется, введите другое","alert_value-required":"Значение обязательно"}'),a=(0,r.Kc)("yt:query-tracker.settings",{en:i,ru:o});var s={NAME_REQUIRED:a("alert_name-required"),NAME_ALREADY_EXIST:a("alert_name-already-exist"),VALUE_REQUIRED:a("alert_value-required")},u=function(e,t){var n={};return e||(n.name=s.NAME_REQUIRED),t||(n.value=s.VALUE_REQUIRED),n}},8767:(e,t,n)=>{"use strict";n.d(t,{w:()=>qs});var r=n(68175),i=n(9736),o=n(77810),a=n(76872),s=n(56201),u=n(14371),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(17581),b=n(38828),_=n(13051),E=n(2371),C=n(3962),j=n(1335),k=n(45760),S=n(64772),N=n(37267),O=n(13395),T=n(79065),I=n(52142),R=n(92611);const P=JSON.parse('{"context_by-user":"by {{user}}","action_stop":"Stop"}'),M=JSON.parse('{"context_by-user":"от {{user}}","action_stop":"Остановить"}'),L=(0,R.Kc)("yt:query-tracker.query-meta-row",{en:P,ru:M});var D=n(64922),q=(0,a.A)("query-meta-info"),z=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.w)(),a=(0,o.useCallback)((function(){i((0,I.ib)())}),[i]);return(0,D.jsxs)("div",{className:q(null,n),children:[(0,D.jsx)(T.C,{className:q("item"),mode:"both",status:t.state}),(0,D.jsx)(N.H,{query:t,className:q("item",q("duration"))}),(0,D.jsx)(C.E,{className:q("item",q("start-time")),children:S.A.DateTime(t.start_time,{format:"short"})}),(0,D.jsx)(C.E,{className:q("item"),color:"secondary",children:L("context_by-user",{user:t.user})}),r&&(0,D.jsxs)(j.$,{size:"s",onClick:a,children:[(0,D.jsx)(k.I,{data:O.A}),L("action_stop")]})]})})),$=n(74360),U=n(78519),F=n(63366),H=n(44131);const B=JSON.parse('{"action_view-details":"View details"}'),V=JSON.parse('{"action_view-details":"Подробнее"}'),K=(0,R.Kc)("yt:query-tracker.meta-table",{en:B,ru:V});var W=(0,a.A)("query-meta-table"),Y=W("title"),G=W("value"),J=["query","access_control_object"];function Q(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!J.includes(t)})).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1],o="object"===(0,$.A)(r),a=r;return o&&(a=(0,D.jsx)(j.$,{view:"outlined",onClick:function(){u(r),f(!0)},children:K("action_view-details")})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("dl",{className:W(null,n),children:h.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,D.jsxs)(o.Fragment,{children:[(0,D.jsx)("dt",{className:Y,children:g.A.format.Readable(e.title)}),t.map((function(t,n){return(0,D.jsxs)("dd",{className:G,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,D.jsx)(H.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,D.jsx)(F.A,{visible:d,disableBodyScrollLock:!0,onOutsideClick:function(){return f(!1)},onCancel:function(){return f(!1)},children:s&&(0,D.jsx)(U.A,{value:s,settings:{}})})]})}var X=n(40319),Z=n(54473),ee=n(22290);const te=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,D.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 ne=n(83755),re=n(81039),ie=n(87709);const oe=JSON.parse('{"value_full-result":"Full result","value_scheme":"Scheme","action_columns":"Columns","action_choose-columns":"Choose result columns"}'),ae=JSON.parse('{"value_full-result":"Полный результат","value_scheme":"Схема","action_columns":"Колонки","action_choose-columns":"Выбрать колонки результата"}'),se=(0,R.Kc)("yt:query-tracker.query-result-actions",{en:oe,ru:ae});var ue=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,D.jsx)(D.Fragment,{children:(0,D.jsx)(ie.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,D.jsxs)(j.$,{size:"m",title:se("action_choose-columns"),view:u,children:[(0,D.jsx)(k.I,{data:re.A}),se("action_columns")," ",(0,D.jsx)(C.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:a})})})),le=n(53775),ce=n(28407),de=n(29121),fe=n(12937),he=n(66134),ve=n(10785),pe=n(97691),me=n.n(pe),ye=n(52797),ge=n(35198),xe=n(57976),Ae=n(29081),we=n(14475),be=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.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:me().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,Ae.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}}}])}(ge.q),_e=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.d)(ye.dB),f=(0,u.d)((function(e){return(0,ee.iI)(e,r,a)})),h=(0,u.w)(),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,ce.A)((0,le.A)().mark((function e(t,n){return(0,le.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,we.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,ce.A)((0,le.A)().mark((function e(t,n){return(0,le.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,we.P)(t,n,!0));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,D.jsx)(be,{getDownloadBaseUrl:function(e){return h((0,xe.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})})),Ee=(0,a.A)("query-result-actions");function Ce(e){var t,n,r,i,a,s=e.query,l=e.resultIndex,c=(0,u.w)(),d=(0,u.d)((function(e){return(0,ee.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,X.A)((0,X.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,D.jsxs)("div",{className:Ee(),children:[(null==d||null===(t=d.settings)||void 0===t?void 0:t.viewMode)===ne.F.Table&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(j.$,{className:Ee("item"),onClick:f,view:null!=d&&null!==(n=d.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,D.jsx)(k.I,{data:te,width:16})}),(0,D.jsx)(ue,{className:Ee("item"),allColumns:d.columns,columns:null===(r=d.settings)||void 0===r?void 0:r.visibleColumns,onChange:v}),(0,D.jsx)(_e,{queryId:s.id,resultIndex:l,className:Ee("item"),allColumns:d.columns,visibleColumns:null===(i=d.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,D.jsx)(Z.x,{className:Ee("item"),options:[{value:"table",content:se("value_full-result")},{value:"scheme",content:se("value_scheme")}],value:null==d||null===(a=d.settings)||void 0===a?void 0:a.viewMode,onUpdate:h})]}):null}var je=n(62835),ke=n(10795);function Se(){var e=(0,u.d)(l.VQ);return e?(0,D.jsx)(ke.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function Ne(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,D.jsx)(o.Suspense,{fallback:i,children:(0,D.jsx)(Oe,{freeze:t,children:n})})}function Oe(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,D.jsx)(o.Fragment,{children:i})}var Te=(0,a.A)("not-render-until-first-visible");function Ie(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,D.jsx)("div",{style:u?{display:"none"}:void 0,className:Te(null,n),children:(0,D.jsx)(Ne,{freeze:u,children:r})})}var Re=n(92603);function Pe(){var e=(0,Re.gi)(),t=(0,Re.Bf)(),n=(0,Re.IQ)();return(0,D.jsx)(Z.x,{options:t,value:e,onUpdate:function(e){n(e)}})}var Me=n(32151),Le=n(55339),De=n(31542),qe=n(41347),ze=n(86255),$e=n(8208),Ue=n(76662),Fe=n(13322),He=n(24966),Be=n(93706),Ve=n(66944),Ke=n(27814),We=n(85560),Ye=n(19410),Ge=(0,a.A)("data-type-popup");function Je(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,D.jsx)(Ye.m,{className:Ge(null,i),content:n?(0,D.jsx)("div",{className:Ge("tooltip-container"),children:(0,D.jsx)(We.A,(0,X.A)({},n))}):null,children:(0,D.jsxs)("span",{className:Ge("container"),children:[t,!r&&(0,D.jsx)(k.I,{className:Ge("icon"),data:Ke.A,size:12})]})}):(0,D.jsx)("span",{className:Ge(null,i),children:t})}var Qe=n(81379),Xe=n(56796),Ze=n(66133),et=(0,a.A)("yql-result-table"),tt=Symbol("__index__");function nt(e,t){return n=e,r=tt,"object"===(0,$.A)(n)&&n&&Reflect.has(n,r)?e[tt]:t;var n,r}function rt(){window.dispatchEvent(new Event("resize"))}var it={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ue.zQ,stickyTop:0,syncHeadOnResize:!0},ot=(0,X.A)((0,X.A)({},it),{},{displayIndices:!1}),at=[];function st(e){var t=e.className,n=e.header,a=void 0===n?at:n,s=e.rows,u=void 0===s?at:s,l=e.totals,c=void 0===l?at:l,d=e.showColumns,f=void 0===d?at:d,h=e.theme,v=void 0===h?"yandex-cloud":h,p=e.format,m=e.formatterSettings,y=e.defaultNumberAlign,g=void 0===y?Ve.Ay.RIGHT:y,x=e.resultType,A=e.emptyDataMessage,w=e.message,b=e.isError,_=e.transpose,E=void 0!==_&&_,j=e.page,k=void 0===j?1:j,S=e.pageSize,N=void 0===S?u.length:S,O=e.startIndex,T=e.sortOrder,I=e.onSort,R=e.showFullValueInDialog,P=e.containerRef,M=e.onShowPreview,L="function"==typeof I,q=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,D.jsx)(Je,{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:L&&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,D.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,D.jsxs)(o.Fragment,{children:[(0,D.jsx)("br",{}),(0,D.jsx)(C.E,{color:"light-hint",children:u.$additions})]}):null,g=u.$incomplete,x=u.$tagValue,A=function(){return M(t,l,x)};return v?(0,D.jsxs)(dt,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[R?(0,D.jsx)(o.Fragment,{children:(0,D.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,D.jsx)(lt,{onClick:rt,strippedDown:c,formattedValue:f}),y]}):(0,D.jsxs)(dt,{rawValue:d,onPreviewClick:A,isTruncated:g,tag:x,children:[(0,D.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:a}}),y]})},align:i.numeric?g:void 0}}));return e}),[a,L,g,p,m,R,M]),z=(k-1)*N,$=L?1:null!=O?O:z+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,X.A)((0,r.A)({},tt,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[tt]-t[tt]})),o}(u,q,T,$)}),[u,q,T,$]),F=o.useMemo((function(){var e=f.map((function(e){return q.find((function(t){return t.name===e}))})).filter(Boolean),t=U.slice(z,z+N);if(!E)return[e,t,c];var n=t.map((function(e,t){return{name:String(z+t),header:ut(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=z;n<z+N&&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,Fe.A)(n)),r,[]]}),[f,U,z,N,E,c,q]),H=(0,i.A)(F,3),B=H[0],V=H[1],K=H[2];return"table"===x?(0,D.jsx)("div",{ref:P,className:et(null,t),children:(0,D.jsx)(Qe.Ay,{columns:B,data:V,footerData:0===K.length?void 0:K,settings:E?ot:it,startIndex:$,emptyDataMessage:A,theme:v,rowKey:nt,sortOrder:T,onSort:I,visibleRowIndex:E?void 0:ut})}):"cell"===x||"untyped"===x?(0,D.jsx)("div",{ref:P,className:et({mode:x},t),children:(0,D.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):w?(0,D.jsx)("div",{className:et("message",{error:b}),children:w}):null}function ut(e){return g.A.format.Number(e[tt])}function lt(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,D.jsxs)(o.Fragment,{children:[(0,D.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,D.jsx)("br",{}),(0,D.jsx)(Xe.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 ct=et("cell-action");function dt(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,D.jsxs)("span",{ref:u,children:[h?(0,D.jsx)(Ze.A,{theme:"warning",text:"Incomplete '".concat(s,"' type")}):(0,D.jsx)("span",{className:et("cell-content"),children:t}),(d||h)&&(0,D.jsxs)(D.Fragment,{children:[n&&!a&&(0,D.jsx)(Be.b,{className:ct,text:n,size:"s"}),a&&(0,D.jsx)(j.$,{className:ct,view:"flat-secondary",size:"s",loading:m,onClick:(0,ce.A)((0,le.A)().mark((function e(){return(0,le.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,D.jsx)(k.I,{data:He.A,size:"12"})})]})]})}var ft=n(83648),ht=n(31470),vt=n.n(ht),pt={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}},mt=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,D.jsx)(st,{format:ft.ew,formatterSettings:pt,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"left",startIndex:d,theme:Ue.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&vt()(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)})),yt=(0,a.A)("query-result-scheme"),gt={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Ue.zQ,stickyTop:0},xt=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,D.jsx)("span",{className:yt("item"),children:(0,D.jsx)("span",{className:yt("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,D.jsx)(We.A,(0,X.A)({},t.type))}}],At=o.memo((function(e){var t=e.result;return(0,D.jsx)(Ve.Ay,{theme:"yandex-cloud",columns:xt,data:t.columns,startIndex:1,settings:gt})}));function wt(e){var t=e.result,n=e.className;return(0,D.jsxs)("div",{className:yt(null,n),children:[(0,D.jsx)(C.E,{variant:"subheader-2",as:"div",className:yt("title"),children:"Scheme"}),(0,D.jsx)("div",{className:yt("table-wrap"),children:(0,D.jsx)(At,{result:t})})]})}var bt=n(73688),_t=n(98364),Et=(0,a.A)("query-result-paginator"),Ct=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function jt(e){var t=e.queryId,n=e.resultIndex,r=e.className,a=(0,u.w)(),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.d)((function(n){return(0,ee.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,Me.iN)(t,n,{pageSize:Number(r)}))}),[a]),p=(0,o.useCallback)((function(e){a((0,Me.vj)(t,n,e))}),[t]);return(0,D.jsxs)("div",{className:Et(null,r),children:[(0,D.jsx)(bt.l,{className:Et("control"),value:[f.toString()],options:Ct,onUpdate:v}),(0,D.jsx)(_t.A,{className:Et("control"),value:c,min:0,max:h,onChange:p,step:1})]})}var kt=n(8160),St=n(75566),Nt=n(76365),Ot=n(54522),Tt=function(e,t,n,r){return function(){var i=(0,ce.A)((0,le.A)().mark((function i(o){var a,s,u,l,c,d,f,h,v,p,m,y,g,x,A;return(0,le.A)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=n.columnName,u=n.rowIndex,l=n.page,c=n.pageSize,r?r.onStartLoading({columnName:s,rowIndex:u}):(0,kt.vA)((function(){o({type:Ot.w.REQUEST,data:{}}),o((0,St.ZD)())})),d=null!==(a=null==r?void 0:r.saveCancellation)&&void 0!==a?a:St.Be.removeAllAndSave,i.prev=3,f=l*c+u,i.next=7,o((0,xe.BH)(e,t,{start:f,end:f+1},[s],{cellsSize:Ot.F,stringLimit:Math.round(Ot.F/10)},d));case 7:if(h=i.sent,!r){i.next=12;break}return i.next=11,r.onSuccess({columnName:s,rowIndex:u,data:h});case 11:return i.abrupt("return",i.sent);case 12:v=h.rows[0][s][0],p=h.rows[0][s][1],m=h.yql_type_registry[Number(p)],y=(0,ft.$5)(v,m,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),g=y.$type,x=y.$tag,A=y.$value,o({type:Ot.w.SUCCESS,data:{data:{$value:x?A.$value:A,$type:g,$tag:x}}}),i.next=22;break;case 19:i.prev=19,i.t0=i.catch(3),(0,Nt.m)(i.t0)||(r?null==r||r.onError({columnName:s,rowIndex:u,error:i.t0}):o({type:Ot.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)}}()};const It=JSON.parse('{"context_rows-info":"Rows {{start}}-{{end}} of {{total}}","context_rows-truncated":"(truncated)","action_view-full-result":"View full result"}'),Rt=JSON.parse('{"context_rows-info":"Строки {{start}}-{{end}} из {{total}}","context_rows-truncated":"(обрезано)","action_view-full-result":"Посмотреть полный результат"}'),Pt=(0,R.Kc)("yt:query-tracker.results-view",{en:It,ru:Rt});var Mt=(0,a.A)("query-result-table");function Lt(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,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ie,{hide:i!==ne.F.Scheme,children:(0,D.jsx)(wt,{result:n})}),(0,D.jsxs)(Ie,{hide:i!==ne.F.Table,children:[(0,D.jsxs)(Le.s,{alignItems:"center",gap:2,className:Mt("result-info"),children:[(0,D.jsxs)(C.E,{children:[Pt("context_rows-info",{start:String(a),end:String(s),total:String(u)}),l?" ".concat(Pt("context_rows-truncated")):""]}),c&&(0,D.jsx)(De.N,{href:"/".concat(c.cluster,"/navigation?path=//").concat(c.table_path),target:"_blank",children:(0,D.jsxs)(Le.s,{alignItems:"center",gap:1,children:[(0,D.jsx)(k.I,{data:qe.A,size:16})," ",Pt("action_view-full-result")]})})]}),(0,D.jsx)(mt,{result:n,onShowPreview:r})]})]})}var Dt=o.memo((function(e){var t=e.query,n=e.index,r=(0,u.d)((function(e){return(0,ee.iI)(e,t.id,n)})),i=null==r?void 0:r.page,a=(0,u.d)((function(e){return(0,ee.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.w)(),s=o.useMemo((function(){var e=new Nt.A,o={onStartLoading:function(){},onSuccess:function(e){var r=e.columnName,i=e.rowIndex,o=e.data;a((0,Me.E6)({queryId:t,resultIndex:n,columnName:r,rowIndex:i,data:o}))},onError:ze.O,cancelHelper:e,saveCancellation:function(t){e.saveCancelToken(t)},page:r,pageSize:i},s=function(){var e=(0,ce.A)((0,le.A)().mark((function e(r,i,s){var u,l,c;return(0,le.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(0,ze.g)(s),l=o.page,c=o.pageSize,e.next=4,a(Tt(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,D.jsxs)("div",{className:Mt(),children:[((null==r?void 0:r.state)===ne.t.Init||(null==r?void 0:r.state)===ne.t.Loading)&&(0,D.jsx)("div",{className:Mt("loading"),children:(0,D.jsx)(s.a,{size:"m"})}),(null==r?void 0:r.resultReady)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Lt,{result:r,onShowPreview:c}),r.settings.viewMode===ne.F.Table&&(0,D.jsx)(jt,{className:Mt("pagination"),queryId:t.id,resultIndex:n})]}),(null==r?void 0:r.state)===ne.t.Error&&(0,D.jsx)($e.z,{error:r.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),qt=function(e){var t=e.query,n=e.activeResultParams,r=(0,u.w)();return(0,o.useEffect)((function(){n&&r((0,Me.WR)(n.queryId,n.resultIndex))}),[n,r]),(0,D.jsx)(Dt,{query:t,index:(null==n?void 0:n.resultIndex)||0})},zt=n(7787),$t=function(e){var t,n=e.query,r=e.resultIndex,i=(0,u.w)();return(0,o.useEffect)((function(){i((0,Me.WR)(n.id,r))}),[i,n.id,r]),(null===(t=zt.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},Ut=function(e){return(e+1)%1e6};function Ft(){return(0,o.useReducer)(Ut,0)[1]}var Ht=n(24567),Bt=n(79961),Vt=n(21211),Kt=n(18305),Wt=n(92225),Yt=n(75621),Gt=n(60150),Jt=o.createContext(void 0);function Qt(e){var t=e.children,n=e.container,r=(0,Yt.i)(),a=o.useState((function(){return Xt(n)})),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(e){var t=Xt(n);return vt()(e,t)?e:t}))}),[r,n]),(0,D.jsx)(Jt.Provider,{value:u,children:t})}function Xt(e){var t=function(t){return(0,Gt.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(Jt);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var en=n(58178),tn=n(51238),nn=n(34199),rn=n(30469),on=(0,a.A)("legend");function an(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=(0,tn.GE)(r);return(0,D.jsxs)("div",{className:on({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,D.jsxs)("div",{className:on("item"),children:[(0,D.jsx)("div",{className:on("item-color",{state:t.toLowerCase()})}),(0,D.jsxs)(C.E,{className:on("item-title"),color:"complementary",children:[n,r?(0,D.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function sn(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,D.jsx)("div",{className:t,children:"collapsed"===s?(0,D.jsx)(j.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,D.jsx)(k.I,{data:nn.A,size:16})}):(0,D.jsx)(an,{nodes:n,children:(0,D.jsx)(j.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,D.jsx)(k.I,{data:rn.A})})})})}var un=n(32101),ln=(0,a.A)("vis-network");function cn(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,D.jsx)("div",{ref:l,className:ln(null,s)})}var dn=(0,a.A)("yql-plan-minimap");function fn(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,X.A)((0,X.A)({},e),{},{edges:(0,X.A)((0,X.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,tn.ry)(t,r,i);null==n||n.selectEdges((0,Fe.A)(o))},i=function(){null==n||n.unselectAll()},o=function(e){var i=e.node;if(i&&r.get(i)){var o=(0,tn.AX)(t,r,i);null==n||n.selectEdges((0,Fe.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,D.jsxs)(un.Z,{className:dn(null,s),type:"action",children:[(0,D.jsx)(cn,{nodes:n,edges:r,options:u,className:dn("minimap"),getNetwork:f}),(0,D.jsx)("div",{className:dn("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,D.jsx)("div",{ref:v,className:dn("radar")})]})}var hn=n(70353);function vn(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,hn.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,X.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,hn.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 pn(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,hn.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 mn(e,t,n){var r,i=n.reduce((function(e,t,n){return e[t]=n,e}),{}),o=[],a=(0,hn.A)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,Fe.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 yn(e,t){for(var n=0,r=1;r<t.length;++r)n+=mn(e,t[r-1],t[r]);return n}function gn(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 xn(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 An(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,hn.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=gn(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}xn(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,hn.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=gn(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}xn(t[u],c)}}function wn(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function bn(e,t,n){var r=0;return n>0&&(r+=mn(e,t[n-1],t[n])),n<t.length-1&&(r+=mn(e,t[n],t[n+1])),r}function _n(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=bn(e,t,i),s=0;s<o.length-1;s++){wn(o,s,s+1);var u=bn(e,t,i);a>u?(n=!0,a=u):wn(o,s,s+1)}}}function En(e,t,n){for(var r=function(e,t){for(var n=(0,Fe.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,hn.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,Fe.A)(e)})),o=yn(e,r),a=0,s=0;s<4&&a<24;a++,s++){An(e,r,a),n||_n(e,r);var u=yn(e,r);o>u&&(o=u,i=r.map((function(e){return(0,Fe.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 jn(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function kn(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 Sn(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,Fe.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,Fe.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]&&!jn(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=kn(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 Nn(e,t){var n=Sn(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 On(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 Tn(e){return In.apply(this,arguments)}function In(){return(In=(0,ce.A)((0,le.A)().mark((function e(t){var n,r,i,o,a,s,u,l;return(0,le.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=vn(n,r),a=o.graph,s=o.layering,u=o.levels,pn(a,s,u),l=En(a,s,i),Nn(a,l),e.abrupt("return",On(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Rn=n(48971);const Pn=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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.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 Mn=n(16538);const Ln=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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 Dn=(0,a.A)("graph"),qn="".concat(Dn(),"_show-tooltip");function zn(e){var t=o.useRef(e);return t.current=e,t}var $n=(0,tn.SV)((function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}}));function Un(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,Re.wE)(),x=o.useState((function(){return new Ht.DataSet})),A=(0,i.A)(x,1)[0],w=o.useState((function(){return new Ht.DataSet})),b=(0,i.A)(w,1)[0],_=o.useState(!0),E=(0,i.A)(_,2),S=E[0],N=E[1],O=Ft(),T=o.useState(),I=(0,i.A)(T,2),R=I[0],P=I[1],M=o.useRef(null),L=o.useState(),q=(0,i.A)(L,2),z=q[0],$=q[1],U=(0,Bt.m)(z?{rect:{top:z.position.y,left:z.position.x}}:void 0);o.useEffect((function(){var e=function(e){var t;null!==(t=M.current)&&void 0!==t&&t.contains(e.target)||$(void 0)};return z&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[z]);var F=o.useRef();o.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){c&&S&&(c.fit(),N(!1))}))),t||$(void 0),function(){cancelAnimationFrame(e)}}),[t,c,S]);var H=zn(m),B=zn(g),V=zn(s);o.useEffect((function(){var e=!1;function t(){return(t=(0,ce.A)((0,le.A)().mark((function e(){var t,n,i,o;return(0,le.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Tn(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new Ht.DataSet(n),B.current&&(0,tn.DW)(o,B.current),(0,tn.Ml)(o,H.current),V.current&&(0,tn.ZG)(o,V.current),N(A.length!==o.length||b.length!==i.length),A.clear(),A.add(o.get()),b.clear(),b.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||P(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,b,A,O]),o.useEffect((function(){g&&((0,tn.DW)(A,g,V.current,H.current),O())}),[g,A,O]),o.useEffect((function(){"function"==typeof s&&((0,tn.ZG)(A,s),O())}),[s,A,O]),o.useEffect((function(){(0,tn.Ml)(A,m)}),[A,m]);var K=o.useRef(!0);return o.useLayoutEffect((function(){if(v&&c){var e=new Wt.default((function(){$n(c,K.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,tn.ry)(c,A,t);c.selectEdges((0,Fe.A)(n))},t=function(){c.unselectAll()},n=function(e){var t=e.node;if(t){var n=A.get(t);if(F.current=null!=n?n:void 0,n){var r=(0,tn.AX)(c,A,t);if(c.selectEdges((0,Fe.A)(r)),n.url&&(null==v||v.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==v||v.classList.add(qn),(0,tn.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}$({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:d})}}}},r=function(){null==v||v.classList.remove(qn),null==v||v.style.removeProperty("cursor"),c.unselectAll(),$(void 0),F.current=void 0},i=function(){if(F.current){var e=F.current;e.url&&(0,Rn.V3)(e.url)}},o=function(){K.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]),R?(0,D.jsx)(C.E,{color:"danger",children:"".concat(R)}):(0,D.jsx)("div",{ref:p,className:Dn(null,n),children:0===A.length?(0,D.jsx)(Kt.A,{size:"m",local:!0}):(0,D.jsxs)(o.Fragment,{children:[(0,D.jsx)(cn,{nodes:A,edges:b,options:y,className:Dn("graph"),getNetwork:d}),c&&a?(0,D.jsx)(fn,{className:Dn("minimap-wrapper"),network:c,nodes:A,edges:b,options:y}):null,(0,D.jsxs)("div",{className:Dn("toolbar"),children:[(0,D.jsx)(j.$,{className:Dn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:1.1*c.getScale()}),K.current=!1)},children:(0,D.jsx)(k.I,{data:Mn.A,size:16})}),(0,D.jsx)(j.$,{className:Dn("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:c.getScale()/1.1}),K.current=!1)},children:(0,D.jsx)(k.I,{data:Pn,size:16})}),(0,D.jsx)(j.$,{className:Dn("toolbar-button"),onClick:function(){null==c||c.fit(),K.current=!0},children:(0,D.jsx)(k.I,{data:Ln,size:16})}),(0,D.jsx)(sn,{nodes:A,className:Dn("toolbar-button",Dn("legend"))})]}),z&&t?(0,D.jsx)(Vt.z,{anchorElement:U.current,open:!0,placement:z.placement,children:(0,D.jsx)(en.A,(0,X.A)((0,X.A)({},z),{},{containerRef:M}))}):null]})})}var Fn=n(69764),Hn=n(75414),Bn=n.n(Hn),Vn=n(30380),Kn=36e5,Wn=24*Kn,Yn=30*Wn,Gn=365*Wn,Jn=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function Qn(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=lr.resolveCssValue(lr.COUNTER_FONT_COLOR),e.fillText(o,n,r+lr.COUNTER_FONT_CENTER_OFFSET))}var Xn=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",er="#777",tr="#FFF",nr="#08F",rr="#3D5",ir="#D30",or="#F80",ar="#A5A",sr=globalThis.document.body,ur=window.getComputedStyle(sr),lr={ZOOM_MIN:5e3,ZOOM_MAX:2*Yn,PRIMARY_BACKGROUND_COLOR:tr,BOUNDARY_MARK_COLOR:Zn,PRIMARY_MARK_COLOR:er,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:rr,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:er,RULER_TEXT_OUTLINE_COLOR:tr,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:ir,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:nr,SELECTION_BG_COLOR:nr,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)({},Xn.INFO,nr),Xn.QUEUED,ar),Xn.DEPRECATED,or),Xn.OK,rr),Xn.WARNING,or),Xn.DANGER,ir),Xn.MUTED,er),Xn.DELETED,ir),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)({},Xn.INFO,nr),Xn.QUEUED,ar),Xn.DEPRECATED,or),Xn.OK,rr),Xn.WARNING,or),Xn.DANGER,ir),Xn.MUTED,er),Xn.DELETED,ir),regionStateColors:(0,r.A)((0,r.A)((0,r.A)((0,r.A)({},Jn.CREATED,nr),Jn.PROCESSING,"#fe5"),Jn.PROCESSED,rr),Jn.FAILED,ir),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=ur.getPropertyValue(n);return""!==i?i:n}return e}},cr=function(){return(0,fe.A)((function e(t){(0,de.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 dr(){return-1!==navigator.userAgent.indexOf("Mac OS")}function fr(e){return dr()?e.metaKey:e.ctrlKey}var hr=function(){},vr=n(18801);function pr(e,t,n){return e>=t&&e<=n}function mr(e,t,n,r){return t-e>r-n?pr(n,e,t)||pr(r,e,t):pr(e,n,r)||pr(t,n,r)}function yr(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 gr(e,t,n){return e>n?n:e<t?t:e}function xr(e,t){return e-e%t}function Ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var wr=n(48495),br=n.n(wr),_r=function(){return(0,fe.A)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,de.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}}])}(),Er=n(7059),Cr=n.n(Er),jr=function(e){function t(){var e;(0,de.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,he.A)(this,t,[].concat(r))).height=lr.RULER_HEADER_HEIGHT,e}return(0,ve.A)(t,e),(0,fe.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=lr.resolveCssValue(lr.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 yr(+e,n,r,0,l)}function f(e){return yr(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=lr.resolveCssValue(lr.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=gr(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=lr.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,y=0,g=Nr.length;y<g;y+=1)if(!(m>Nr[y].domain)){for(var x=0,A=Cr()(0);+A<m;A=Nr[y].step(A))yr(+A,0,m,u,u+l)>0&&(x+=lr.RULER_LABEL_SPACING);if(!(x>l)){p=(v=Nr[y]).sup||Nr[y+1];break}}v&&h(n,r,v,s+lr.RULER_LABEL_POS,lr.resolveCssValue(lr.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+lr.RULER_SUP_LABEL_POS,lr.resolveCssValue(lr.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=lr.resolveCssValue(lr.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}])}(cr),kr={start:function(e){return Cr()(e).startOf("hour")},step:function(e){return Cr()(e).add(1,"hour")},format:"HH"},Sr={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?lr.resolveCssValue(lr.RULER_WEEKEND_COLOR):null},format:"MMM D"},Nr=[{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:Kn,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:kr},{domain:Wn,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:kr},{domain:Wn,start:function(e){return Cr()(e).startOf("hour")},step:function(e){return Cr()(e).add(1,"hour")},format:"HH",sup:Sr},{domain:Yn,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:Sr},{domain:Yn,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?lr.resolveCssValue(lr.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*Yn,start:function(e){return Cr()(e).startOf("week").add(1,"day")},step:function(e){return Cr()(e).add(1,"week")},format:"D"},{domain:Gn,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*Gn,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"}],Or=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),Tr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,de.A)(this,t),(n=(0,he.A)(this,t,[e])).trackHeight=lr.TRACK_HEIGHT,n.lineHeight=lr.LINE_HEIGHT,n.strokeMode=Or.STRAIGHT,n.axesIndex=void 0,Object.assign(n,r),n.axesIndex=new _r([],{identityFunction:r.identityFunction}),n}return(0,ve.A)(t,e),(0,fe.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=gr(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(jr))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===Or.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=lr.resolveCssValue(lr.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,hn.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])}}])}(cr),Ir=(0,fe.A)((function e(){(0,de.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),Rr=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount)e.beginPath(),e.fillStyle=lr.resolveCssValue(lr.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=lr.resolveCssValue(lr.SELECTION_OUTLINE_COLOR),e.lineWidth=lr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=lr.resolveCssValue(lr.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=lr.resolveCssValue(lr.SELECTION_OUTLINE_COLOR),e.lineWidth=lr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,lr.COUNTER_PADDING);Qn(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}}])}(Ir),Pr=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.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=lr.resolveCssValue(lr.SELECTION_OUTLINE_COLOR),e.lineWidth=lr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=lr.resolveCssValue(lr.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=lr.resolveCssValue(lr.SELECTION_OUTLINE_COLOR),e.lineWidth=lr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=lr.resolveCssValue(lr.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+lr.COUNTER_PADDING,lr.COUNTER_PADDING);Qn(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}}])}(Ir),Mr=["renderers"],Lr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,de.A)(this,t),(n=(0,he.A)(this,t,[e])).eventHitboxPadding=lr.EVENT_HITBOX_PADDING,n.eventCounterFont=lr.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:fr(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 Rr],["process",new Pr]]),n.maxIndexTreeWidth=16,n.index=new(br())(n.maxIndexTreeWidth),n._selectedEvents=new Set,n._events=[];var i=r.renderers,o=(0,vr.A)(r,Mr);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,ve.A)(t,e),(0,fe.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(jr))||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,hn.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(Tr),r=(null===(t=e.getComponent(jr))||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&&mr(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(Tr),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)}}])}(cr),Dr=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,de.A)(this,t),(n=(0,he.A)(this,t,[e])).borderColor=lr.SELECTION_OUTLINE_COLOR,n.innerColor=lr.SELECTION_BG_COLOR,n.handleCanvasMousedown=function(e){if(fr(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(Lr);t&&t.selectEventsAt(e)},Object.assign(n,r),n.canvasApi.canvas.addEventListener("mousedown",n.handleCanvasMousedown),n}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"render",value:function(e){if(this.area){var t=this.area,n=e.ctx;e.useStaticTransform(),n.strokeStyle=lr.resolveCssValue(this.borderColor),n.fillStyle=lr.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}}}])}(cr),qr=n(24503),zr=n.n(qr),$r=function(){function e(t,n){(0,de.A)(this,e),this.from=t,this.to=n}return(0,fe.A)(e,[{key:"set",value:function(e,t){return this.from=e,this.to=t,this}},{key:"align",value:function(e){return this.from=xr(this.from,e),this.to=xr(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,hn.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;mr(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 Ar(this.from,e.from,.1)&&Ar(this.to,e.to,.1)}}])}(),Ur=function(){return(0,fe.A)((function e(t){(0,de.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new $r(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=(0,le.A)().mark((function e(){return(0,le.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=hr,this.finalizeEvent=hr,this.overlapThreshold=lr.OVERLAPPING_THRESHOLD,this.skipOverlap=lr.SKIP_OVERLAPPING,this.onVisibleEventsChanged=hr,Object.assign(this,t),this.axesIndex=new _r([],{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,Ar(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];mr(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 gr(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,hn.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=gr(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,hn.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 mr(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}}])}(),Fr=function(e){function t(e){var n;return(0,de.A)(this,t),(n=(0,he.A)(this,t,[e])).handleTimeRangeChanged=zr()((function(e){n.mapper.timeRange.equals(e)||(n.mapper.timeRange=e)}),250),n.handleVisibleEventsChanged=function(e){n.canvasApi.getComponent(Lr).events=e,n.host.scheduleTimelineRender()},n.mapper=void 0,n.events=[],n.mapper=new Ur({mapEvent:function(e,t){Object.assign(e,t)},onVisibleEventsChanged:n.handleVisibleEventsChanged}),n}return(0,ve.A)(t,e),(0,fe.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(Lr);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(Tr);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new $r(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new $r(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=(0,le.A)().mark(n),t=this.events;function n(){return(0,le.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}}])}(cr),Hr=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"render",value:function(e){for(var t,n,r=(null===(t=e.getComponent(jr))||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=Vr.length;f<h;f+=1)if(!(d>Vr[f].domain)){for(var v=0,p=Cr()(0);+p<d;p=Vr[f].step(p))yr(+p,0,d,0,0+l)>0&&(v+=lr.RULER_GRID_SPACING);if(!(v>l+40)){n=Vr[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=lr.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(yr(+u,o,a,n,n+r));e.beginPath(),e.strokeStyle=s.style(u),e.moveTo(l,t),e.lineTo(l,t+i),e.stroke()}}}])}(cr);function Br(e,t){return function(n){return n[t]()%e==0?lr.resolveCssValue(lr.PRIMARY_MARK_COLOR):lr.resolveCssValue(lr.SECONDARY_MARK_COLOR)}}var Vr=[{domain:Kn,style:Br(5,"minute"),start:function(e){return Cr()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:Wn,style:function(e){return 0===e.hour()&&0===e.minute()?lr.resolveCssValue(lr.BOUNDARY_MARK_COLOR):e.minute()%4==0?lr.resolveCssValue(lr.PRIMARY_MARK_COLOR):lr.resolveCssValue(lr.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:Yn,style:function(e){return 0===e.hour()?lr.resolveCssValue(lr.BOUNDARY_MARK_COLOR):e.hour()%4==0?lr.resolveCssValue(lr.PRIMARY_MARK_COLOR):lr.resolveCssValue(lr.SECONDARY_MARK_COLOR)},start:function(e){return Cr()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:Gn,style:function(e){return 1===e.date()?lr.resolveCssValue(lr.BOUNDARY_MARK_COLOR):1===e.day()?lr.resolveCssValue(lr.PRIMARY_MARK_COLOR):lr.resolveCssValue(lr.SECONDARY_MARK_COLOR)},start:function(e){return Cr()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*Gn,style:Br(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 lr.resolveCssValue(lr.PRIMARY_MARK_COLOR)},start:function(e){return Cr()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],Kr=n(1609);const Wr=window,Yr=Wr.ShadowRoot&&(void 0===Wr.ShadyCSS||Wr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gr=Symbol(),Jr=new WeakMap;class Qr{constructor(e,t,n){if(this._$cssResult$=!0,n!==Gr)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(Yr&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Jr.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Jr.set(t,e))}return e}toString(){return this.cssText}}const Xr=Yr?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new Qr("string"==typeof e?e:e+"",void 0,Gr))(t)})(e):e;var Zr;const ei=window,ti=ei.trustedTypes,ni=ti?ti.emptyScript:"",ri=ei.reactiveElementPolyfillSupport,ii={toAttribute(e,t){switch(t){case Boolean:e=e?ni: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}},oi=(e,t)=>t!==e&&(t==t||e==e),ai={attribute:!0,type:String,converter:ii,reflect:!1,hasChanged:oi},si="finalized";class ui 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=ai){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)||ai}static finalize(){if(this.hasOwnProperty(si))return!1;this[si]=!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(Xr(e))}else void 0!==e&&t.push(Xr(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)=>{Yr?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=Wr.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=ai){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:ii).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:ii;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||oi)(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 li;ui[si]=!0,ui.elementProperties=new Map,ui.elementStyles=[],ui.shadowRootOptions={mode:"open"},null==ri||ri({ReactiveElement:ui}),(null!==(Zr=ei.reactiveElementVersions)&&void 0!==Zr?Zr:ei.reactiveElementVersions=[]).push("1.6.3");const ci=window,di=ci.trustedTypes,fi=di?di.createPolicy("lit-html",{createHTML:e=>e}):void 0,hi="$lit$",vi=`lit$${(Math.random()+"").slice(9)}$`,pi="?"+vi,mi=`<${pi}>`,yi=document,gi=()=>yi.createComment(""),xi=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ai=Array.isArray,wi="[ \t\n\f\r]",bi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_i=/-->/g,Ei=/>/g,Ci=RegExp(`>|${wi}(?:([^\\s"'>=/]+)(${wi}*=${wi}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ji=/'/g,ki=/"/g,Si=/^(?:script|style|textarea|title)$/i,Ni=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Oi=Ni(1),Ti=(Ni(2),Symbol.for("lit-noChange")),Ii=Symbol.for("lit-nothing"),Ri=new WeakMap,Pi=yi.createTreeWalker(yi,129,null,!1);function Mi(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fi?fi.createHTML(t):t}const Li=(e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=bi;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===bi?"!--"===u[1]?a=_i:void 0!==u[1]?a=Ei:void 0!==u[2]?(Si.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Ci):void 0!==u[3]&&(a=Ci):a===Ci?">"===u[0]?(a=null!=i?i:bi,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]?ki:ji):a===ki||a===ji?a=Ci:a===_i||a===Ei?a=bi:(a=Ci,i=void 0);const d=a===Ci&&e[t+1].startsWith("/>")?" ":"";o+=a===bi?n+mi:l>=0?(r.push(s),n.slice(0,l)+hi+n.slice(l)+vi+d):n+vi+(-2===l?(r.push(void 0),t):d)}return[Mi(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class Di{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]=Li(e,t);if(this.el=Di.createElement(u,n),Pi.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=Pi.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(hi)||t.startsWith(vi)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+hi).split(vi),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?Fi:"?"===t[1]?Bi:"@"===t[1]?Vi:Ui})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(Si.test(r.tagName)){const e=r.textContent.split(vi),t=e.length-1;if(t>0){r.textContent=di?di.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],gi()),Pi.nextNode(),s.push({type:2,index:++i});r.append(e[t],gi())}}}else if(8===r.nodeType)if(r.data===pi)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(vi,e+1));)s.push({type:7,index:i}),e+=vi.length-1}i++}}static createElement(e,t){const n=yi.createElement("template");return n.innerHTML=e,n}}function qi(e,t,n=e,r){var i,o,a,s;if(t===Ti)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=xi(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=qi(e,u._$AS(e,t.values),u,r)),t}class zi{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:yi).importNode(n,!0);Pi.currentNode=i;let o=Pi.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new $i(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new Ki(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=Pi.nextNode(),a++)}return Pi.currentNode=yi,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 $i{constructor(e,t,n,r){var i;this.type=2,this._$AH=Ii,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=qi(this,e,t),xi(e)?e===Ii||null==e||""===e?(this._$AH!==Ii&&this._$AR(),this._$AH=Ii):e!==this._$AH&&e!==Ti&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>Ai(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!==Ii&&xi(this._$AH)?this._$AA.nextSibling.data=e:this.$(yi.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=Di.createElement(Mi(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 zi(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=Ri.get(e.strings);return void 0===t&&Ri.set(e.strings,t=new Di(e)),t}T(e){Ai(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 $i(this.k(gi()),this.k(gi()),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 Ui{constructor(e,t,n,r,i){this.type=1,this._$AH=Ii,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=Ii}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=qi(this,e,t,0),o=!xi(e)||e!==this._$AH&&e!==Ti,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=qi(this,r[n+a],t,a),s===Ti&&(s=this._$AH[a]),o||(o=!xi(s)||s!==this._$AH[a]),s===Ii?e=Ii:e!==Ii&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===Ii?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class Fi extends Ui{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ii?void 0:e}}const Hi=di?di.emptyScript:"";class Bi extends Ui{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Ii?this.element.setAttribute(this.name,Hi):this.element.removeAttribute(this.name)}}class Vi extends Ui{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=qi(this,e,t,0))&&void 0!==n?n:Ii)===Ti)return;const r=this._$AH,i=e===Ii&&r!==Ii||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==Ii&&(r===Ii||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 Ki{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){qi(this,e)}}const Wi=ci.litHtmlPolyfillSupport;var Yi,Gi;null==Wi||Wi(Di,$i),(null!==(li=ci.litHtmlVersions)&&void 0!==li?li:ci.litHtmlVersions=[]).push("2.8.0");class Ji extends ui{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 $i(t.insertBefore(gi(),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 Ti}}Ji.finalized=!0,Ji._$litElement$=!0,null===(Yi=globalThis.litElementHydrateSupport)||void 0===Yi||Yi.call(globalThis,{LitElement:Ji});const Qi=globalThis.litElementPolyfillSupport;null==Qi||Qi({LitElement:Ji}),(null!==(Gi=globalThis.litElementVersions)&&void 0!==Gi?Gi:globalThis.litElementVersions=[]).push("3.3.3");var Xi,Zi=function(){return(0,fe.A)((function e(t){(0,de.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 xr(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return yr(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return yr(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=lr.resolveCssValue(lr.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)}}])}(),eo=function(e){function t(){var e;return(0,de.A)(this,t),(e=(0,he.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(gr(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*lr.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=gr(o*(t.deltaY>0?1.15:.9),lr.ZOOM_MIN,lr.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*lr.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=Yn,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"render",value:function(){return Oi(Xi||(Xi=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,Kr.A)(t,"shouldUpdate",this,3)([e])}},{key:"connectedCallback",value:function(){(0,Kr.A)(t,"connectedCallback",this,3)([]),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Kr.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,ce.A)((0,le.A)().mark((function e(t){return(0,le.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,hn.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,Kr.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,hn.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}(Ji);const to=new Set(["children","wcType"]);class no 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)to.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 ro=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.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,tn.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=lr.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:lr.resolveCssValue(t.borderColor)}),e.strokeStyle=lr.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(lr.TRACK_HEIGHT-u)/3;e.fillStyle=lr.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,lr.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=lr.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=lr.resolveCssValue(lr.SELECTION_OUTLINE_COLOR),e.lineWidth=lr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=lr.resolveCssValue(lr.COUNTER_FONT_COLOR),e.fillText(t,n+lr.COUNTER_PADDING,r+lr.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}}])}(Ir),io=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"events",set:function(e){this.getComponent(Fr).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(Fr).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,Kr.A)(t,"updateCanvasSize",this,3)([])}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new Lr(this);return e.registerRenderer("operation",new ro),[new Hr(this),new Tr(this),e,new Dr(this),new Fr(this)]}},{key:"setTimelineConfig",value:function(){lr.ZOOM_MAX=3*Gn,lr.PRIMARY_BACKGROUND_COLOR=(0,Gt.kd)("--g-color-base-background"),lr.SECONDARY_MARK_COLOR=(0,Gt.kd)("--g-color-line-generic"),lr.BOUNDARY_MARK_COLOR=(0,Gt.kd)("--g-color-line-generic"),lr.PRIMARY_MARK_COLOR=(0,Gt.kd)("--g-color-line-generic-hover"),lr.COUNTER_FONT_COLOR=(0,Gt.kd)("--g-color-text-complementary")}}])}(eo);customElements.define("my-timeline-canvas",io);var oo=o.forwardRef(((e,t)=>o.createElement(no,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e)))),ao=n(27559),so=n(19812),uo={sortOrder:{},sortColumns:[]};function lo(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:uo;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]}:uo;a[t];var d=(0,vr.A)(a,[t].map(so.A));return c?(d[t]=c,new Set(s).has(t)||(u=[].concat((0,Fe.A)(s),[t]))):u=s.filter((function(e){return e!==t})),{sortOrder:d,sortColumns:u}}var co=(0,a.A)("table"),fo=(0,D.jsx)("svg",{className:co("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,D.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),ho=(0,D.jsx)("svg",{className:co("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,D.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function vo(e){switch(e){case"ascending":return fo;case"descending":return ho;default:return null}}function po(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,D.jsx)("span",{className:co("sort-icon",{shadow:!t}),"data-index":n,children:vo(t||i)}):null}var mo=50;function yo(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,D.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?mo:v,m=e.maxWidth,y="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(p,"px");return(0,D.jsx)("div",{className:co("th",{sortable:i&&e.sortable,align:d},o),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,X.A)({flex:y,maxWidth:m},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,D.jsxs)("div",{className:co("head-cell"),children:[null!=l?l:s,(0,D.jsx)(po,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function go(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?mo: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,D.jsx)("div",{className:co("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,X.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,D.jsx)("div",{className:co("row-cell"),children:"function"==typeof y?y({value:x,row:n,index:r,active:i,selected:o}):x})},t)}))}var xo=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,D.jsx)(o.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return go({columns:r,row:t,index:n,active:a,selected:s})},active:a,selected:s}):go({columns:r,row:t,index:n,active:a,selected:s})})}));function Ao(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,_=void 0===b?{}:b,E=_.sortable,C=void 0===E||E,j=_.defaultOrder,k=void 0===j?"ascending":j,S=_.disableSortReset,N=void 0!==S&&S,O=e.canFetchMore,T=e.isFetchingMore,I=e.fetchMore,R=e.onWrapperScroll,P=e.scrollRef,M=o.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return lo(e,t.name,t.order,!0)}),uo):uo}(A)})),L=(0,i.A)(M,2),q=L[0],z=L[1],$=o.useRef(null),U=o.useCallback((function(e,t){var n,r,i=lo(q,e.name,e.defaultOrder||k,t,N);z(i),x&&x((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[k,N,x,q]),F=o.useCallback((function(){return(0,D.jsx)(yo,(0,X.A)((0,X.A)({},q),{},{sortable:C,defaultOrder:k,columns:s,onSort:U}))}),[s,k,U,q,C]),H=o.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,D.jsx)(xo,{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?mo:r)}),0)+30;null===(e=$.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var B=o.useCallback((function(e,t){return co("row","function"==typeof f?f(e,t):f)}),[f]);return(0,D.jsx)(ao.w,{containerRef:(0,tn.RQ)($,t),className:co({view:a},n),wrapperClassName:co("table"),headerClassName:co("head",y),headerHeight:g,renderHeader:F,itemWrapper:l,items:u,onItemClick:w,itemClassName:B,itemHeight:c,loaderHeight:c,renderItem:H,itemKey:h,alwaysShowActiveItem:v,activeItemIndex:p,selectedItemKey:m,canFetchMore:O,isFetchingMore:T,fetchMore:I,onWrapperScroll:R,scrollRef:P})}var wo=n(1435),bo=(0,a.A)("node-name");function _o(e){var t=e.node,n=e.className,r=(0,D.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,D.jsxs)(De.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,D.jsx)(C.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,D.jsxs)("span",{className:bo("name",n),children:[r,(0,tn.lt)(t)&&(0,D.jsx)(wo.m,{className:bo("operation-node-info"),content:(0,D.jsx)(en.A,(0,X.A)((0,X.A)({},t),{},{className:bo("operation-node-info-popup")})),placement:["right","left"],openDelay:300,closeDelay:300,children:(0,D.jsx)(k.I,{className:bo("icon"),data:nn.A,size:12})})]})}var Eo=n(51188),Co=n(20239);var jo=(0,a.A)("timeline"),ko=(0,D.jsx)(k.I,{data:Co.A,size:14}),So=(0,D.jsx)(k.I,{data:Eo.A,size:14}),No=(0,D.jsx)(k.I,{data:function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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 Oo(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,D.jsx)(j.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:No})}function To(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,D.jsx)("span",{title:s,children:(0,D.jsx)(j.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?ko:So})})}function Io(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,D.jsx)("span",{className:jo("row-status"),children:(0,D.jsx)(C.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,D.jsx)(Ro,{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,D.jsx)("div",{className:jo("event-name"),title:r,children:r}):(0,D.jsx)("div",{className:jo("aside-item",{expanded:o}),children:(0,D.jsx)(_o,{node:a,className:jo("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,D.jsxs)("div",{children:[(0,D.jsx)(Oo,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,D.jsx)(To,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function Ro(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,D.jsxs)("span",{className:jo("node-status"),children:[(0,D.jsx)(Po,{state:r,progress:n}),(0,D.jsx)("span",{children:"InProgress"===r?"".concat(tn.Ie[r].title,": ").concat(u,"%"):tn.Ie[r].title})]})}function Po(e){var t=e.state,n=e.progress,r=Zt();return"InProgress"===t?(0,D.jsx)("img",{className:jo("node-status-icon"),src:(0,tn.$u)(n,r)}):(0,D.jsx)("div",{className:jo("node-status-icon",{state:t.toLowerCase()})})}function Mo(e){var t,n,r,i,o,a;return(0,D.jsx)("div",{className:jo("aside-header"),children:(0,D.jsx)(Ao,{columns:Io({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,D.jsxs)("div",{children:[(0,D.jsx)(Oo,{onRulerUpdate:n}),(0,D.jsx)(To,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,D.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:jo("table-row"),rowHeight:25,headerHeight:27,className:jo("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var Lo=n(34108),Do=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},qo=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},zo=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},$o=96.422,Uo=82.521,Fo=216/24389,Ho=24389/27,Bo=function(e){var t=function(e){var t=qo(e.r),n=qo(e.g),r=qo(e.b);return function(e){return{x:Do(e.x,0,$o),y:Do(e.y,0,100),z:Do(e.z,0,Uo),a:Do(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/Uo;return n=n>Fo?Math.cbrt(n):(Ho*n+16)/116,{l:116*(r=r>Fo?Math.cbrt(r):(Ho*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>Fo?Math.cbrt(i):(Ho*i+16)/116)),alpha:t.a}},Vo=n(72617),Ko=n.n(Vo),Wo=n(81713),Yo=n.n(Wo),Go=n(63281),Jo=n.n(Go),Qo=6e4,Xo={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function Zo(e){var t=e.from,n=e.to;return Math.max(n-t,Qo)}(0,Lo.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=Bo(e),o=Bo(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:zo(.032404542*r-.015371385*i-.004985314*o),g:zo(-.00969266*r+.018760108*i+41556e-8*o),b:zo(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:Do(n.r,0,255),g:Do(n.g,0,255),b:Do(n.b,0,255),a:Do(n.a)}}({x:(Math.pow(n,3)>Fo?Math.pow(n,3):(116*n-16)/Ho)*$o,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/Ho),z:(Math.pow(r,3)>Fo?Math.pow(r,3):(116*r-16)/Ho)*Uo,a:e.alpha})}({l:Do((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:Do(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 ea=(0,a.A)("timeline");const ta=function(e){var t=e.graph,n=e.prepareNode,r=(0,Re.wE)(),a=(0,Yt.i)(),s=Zt(),u=o.useState((function(){return new Ht.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(),_=(0,i.A)(b,2),E=_[0],C=_[1],j=(0,tn.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,tn.DW)(l,k.current,S.current,void 0,!1),h({})}),[l,t]),o.useEffect((function(){r&&((0,tn.DW)(l,r,S.current,void 0,!1),h({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&((0,tn.ZG)(l,n),h({}))}),[l,n]);var N=o.useMemo((function(){var e,t=Bn()(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,X.A)((0,X.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,X.A)((0,X.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,X.A)((0,X.A)({},c),{},{trackIndex:d++,from:a,to:new Date(m).getTime(),name:"init",id:l++})),u.push((0,X.A)((0,X.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[Xo[p]],x=n.operation["".concat(Xo[p],"Border")],A=n.operation["".concat(Xo[p],"Background")],w=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,i=e.operationDuration,o={},a=t.length,s=(0,Fe.A)(t);s.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var u=(0,Lo.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,X.A)((0,X.A)({},e),{},{colors:w,borderColor:x,backgroundColor:A})})),s.push(m)}else s.push((0,X.A)((0,X.A)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=Jo()(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[Xo.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=N.axes,T=N.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=Ko()(e,"from"),r=null!==(t=Yo()(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=Zo({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(Zo({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),R=(0,i.A)(I,2),P=R[0],M=P.timelineStart,L=P.timelineEnd,q=P.timelineRulerKey,z=R[1],$=o.useMemo((function(){var e,t=A.toLowerCase().trim(),n=[],r=!1,i=(0,hn.A)(O);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!E||o.status===E)){var a=!!o.isExpandable&&m.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,X.A)((0,X.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[O,A,E,m]),U=$.filteredAxes,F=$.isSomeAxesCollapsed,H=o.useMemo((function(){var e=0;return U.map((function(t){var n=lr.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[U]),B=o.useRef(null),V=o.useState(0),K=(0,i.A)(V,2),W=K[0],Y=K[1],G=function(e){var t=e.from,n=e.to;z({start:t,end:n})},J=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,X.A)((0,X.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[U]);return(0,D.jsxs)("div",{className:ea(),children:[(0,D.jsxs)("div",{className:ea("filters"),children:[(0,D.jsx)(Fn.k,{className:ea("filters-search"),hasClear:!0,value:A,onUpdate:w,placeholder:"Filter by name"}),(0,D.jsx)(bt.l,{className:ea("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:E?[E]:[],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,D.jsxs)("div",{className:ea("content-wrapper"),children:[(0,D.jsx)(Mo,{tableItems:J,isSomeAxesCollapsed:F,blocksQuantity:U.length,onExpandAll:function(){if(F){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&&Y(B.current.scrollTop)},onRulerUpdate:G,sidebarRef:B,onExpandAxis:function(e){var t=new Set(m);t.has(e)?t.delete(e):t.add(e),y(t)}}),M&&L&&(0,D.jsxs)("div",{className:ea("container"),children:[(0,D.jsx)("div",{className:ea("ruler-wrapper"),children:(0,D.jsx)(Vn.Kf,{from:M,to:L,onUpdate:G,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:M,maxRange:L},q)}),Boolean(H.length)&&(0,D.jsx)(oo,{className:ea("timeline"),canvasScrollTop:W,scrollTopChanged:function(e){B.current&&(B.current.scrollTop=e.detail.scrollTop)},start:M,end:L,boundsChanged:function(e){G({from:e.detail.start,to:e.detail.end})},axes:H,events:T,theme:a})]})]})]})};var na=(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))}))),ra=n(66026);const ia=JSON.parse('{"context_plan-too-large":"The plan of this operation is way too large to be visualized in browser.","context_plan-large":"The operation\'s plan is quite large, it has {{nodes}} nodes and {{edges}} edges.","context_plan-large-time":"It could take a lot of time to draw.","context_plan-nodes-edges":"It has {{nodes}} nodes and {{edges}} edges.","action_draw-plan":"Draw the plan anyway","action_draw-plan-freeze":"I understand it might freeze my browser, draw the plan anyway"}'),oa=JSON.parse('{"context_plan-too-large":"План этой операции слишком велик для визуализации в браузере.","context_plan-large":"План операции довольно большой: {{nodes}} узлов и {{edges}} ребер.","context_plan-large-time":"Отрисовка может занять много времени.","context_plan-nodes-edges":"Он содержит {{nodes}} узлов и {{edges}} ребер.","action_draw-plan":"Все равно отрисовать план","action_draw-plan-freeze":"Я понимаю, что браузер может зависнуть, все равно отрисовать план"}'),aa=(0,R.Kc)("yt:query-tracker.plan",{en:ia,ru:oa});var sa=(0,a.A)("plan");const ua=o.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,a=(0,Re.oy)(),s=o.useState(!1),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,Re.gi)(),h=(0,u.d)(ra.st),v=o.useMemo((function(){return a?(0,tn.vk)(a):void 0}),[a]);if(!v)return null;var p=v.nodes.length>250;return(0,D.jsx)("div",{className:sa(null,n),children:(0,D.jsxs)(Qt,{children:[(0,D.jsx)(Ie,{hide:"graph"!==f,className:sa("graph"),children:p&&!c?(0,D.jsx)(la,{showGraph:d,graph:v}):(0,D.jsx)(D.Fragment,{children:h?(0,D.jsx)(na,{processedGraph:v},"graph"===f?"visible":"hidden"):(0,D.jsx)(Un,{isActive:t&&"graph"===f,graph:v,showMinimap:!0,prepareNode:r})})}),(0,D.jsx)(Ie,{hide:"timeline"!==f,className:sa("table"),children:(0,D.jsx)(ta,{graph:v,prepareNode:r})})]})})}));function la(e){var t=e.showGraph,n=e.graph,r=(0,Re.wE)(),a=o.useState((function(){return new Ht.DataSet})),s=(0,i.A)(a,1)[0],u=Ft(),l=o.useRef(r);l.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&(0,tn.DW)(s,l.current),u()}),[s,n,u]),o.useEffect((function(){r&&((0,tn.DW)(s,r),u())}),[s,r,u]);var c=n.nodes.length>700||n.edges.length>3e3;return(0,D.jsxs)("div",{className:sa("graph-info"),children:[c?(0,D.jsxs)(C.E,{children:[aa("context_plan-too-large"),(0,D.jsx)("br",{}),aa("context_plan-nodes-edges",{nodes:String(n.nodes.length),edges:String(n.edges.length)})]}):(0,D.jsxs)(C.E,{children:[aa("context_plan-large",{nodes:String(n.nodes.length),edges:String(n.edges.length)}),(0,D.jsx)("br",{}),aa("context_plan-large-time")]}),(0,D.jsx)("br",{}),(0,D.jsx)(j.$,{className:sa("graph-info-button"),onClick:function(){t(!0)},children:aa(c?"action_draw-plan-freeze":"action_draw-plan")}),(0,D.jsx)(an,{nodes:s,orientation:"vertical",className:sa("legend")})]})}var ca=n(39400),da=n(29746);var fa=n(85593),ha=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)},va=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,ca.A)(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,ca.A)(/^(?:(\w+|\[[^\]]+])\.\s*)?\[(\/*)([^\]]+)](?::\[?([\w-]+)]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||(0,ca.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 da.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,fa.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 ha(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=ha(u,s))}return e}),[n]);return(0,D.jsx)(ua,{isActive:t,prepareNode:r})},pa=n(52978),ma=n(75299),ya=n(64945);const ga=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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 xa=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}},Aa=n(523),wa=(0,a.A)("yt-error-cloud"),ba=function(e){var t=e.error,n=e.level,r=e.disableCloud,a=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,ma.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(xa(t).length)}),[t]),x=xa(t,p);return!r&&x.length>1?(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{className:wa("collapsed-messages"),children:[(0,D.jsx)(Aa.L,{expanded:d,toggleExpanded:f}),(0,D.jsxs)(C.E,{color:"secondary",children:[x.length," intermediate messages"]}),(0,D.jsx)(Xe.S,{className:wa("collapsed-messages-show-all"),onClick:g,children:"Show all"})]}),d&&(0,D.jsx)("div",{className:wa("errors"),children:(0,D.jsx)(Ea,{errors:[(0,X.A)({},x.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:a,onShowParent:y,fromCloud:!0})})]}):(0,D.jsx)(Na,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:a,onShowParent:s})},_a=function(e){return"Info"===e.attributes.severity},Ea=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,D.jsx)("div",{children:t.map((function(e,u){return(0,D.jsx)(ba,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!_a(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},Ca=n(47378);const ja=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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 ka=n(3659),Sa=(0,a.A)("yt-error-tree-node"),Na=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,ma.A)(r),p=(0,i.A)(v,2),m=p[0],y=p[1],g=(0,ma.A)(!1),x=(0,i.A)(g,2),A=x[0],w=x[1],b=t.inner_errors&&t.inner_errors.length>0,_=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),E=_a(t),C=(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,D.jsxs)("div",{className:Sa({leaf:!b,info:E}),children:[(0,D.jsxs)("div",{className:Sa("error-body"),children:[(0,D.jsxs)("div",{className:Sa("line"),children:[b&&(0,D.jsx)(Aa.L,{expanded:m,toggleExpanded:y}),l&&(0,D.jsx)(j.$,{view:"flat-secondary",title:"Show parent",onClick:h,children:(0,D.jsx)(k.I,{data:ya.A,size:16})}),(0,D.jsxs)("span",{className:Sa("header"),children:[(0,D.jsx)(k.I,{className:Sa("icon"),data:E?ga:ja,size:16}),(0,D.jsx)("span",{className:Sa("title"),children:E?"Info":"Error"}),(0,D.jsxs)(j.$,{view:"flat-secondary",onClick:w,children:["Attributes"," ",(0,D.jsx)(k.I,{data:A?Co.A:Eo.A,size:16})]}),_&&(0,D.jsx)("span",{className:Sa("place-text"),title:"Position",children:_})]}),_?(0,D.jsx)(Xe.S,{className:Sa("message"),color:"primary",onClick:C,children:(0,D.jsx)(Ca.H,{value:t.message})}):(0,D.jsx)("span",{className:Sa("message"),children:(0,D.jsx)(Ca.H,{value:t.message})}),t.code?(0,D.jsxs)("span",{className:Sa("code"),children:["Code: ",t.code]}):null]}),A&&(0,D.jsx)(U.A,{value:t.attributes,settings:ka.A.prepareSettings({})})]}),b&&m&&(0,D.jsx)("div",{className:Sa("errors"),children:(0,D.jsx)(Ea,{errors:t.inner_errors,level:s+1,expanded:m,disableCloud:d,onErrorClick:f})})]})},Oa=n(19904),Ta=n(77720),Ia=n(87111),Ra=n(83205),Pa=n(51404);const Ma=JSON.parse('{"context_tooltip":"Ask AI chat why the query failed","action_button":"AI help","question_default":"How to solve the problem?"}'),La=JSON.parse('{"context_tooltip":"Спросить AI чат почему запрос упал","action_button":"AI помощь","question_default":"Как решить проблему?"}'),Da=(0,R.Kc)("yt:ai.chat.ask-ai-error",{en:Ma,ru:La});var qa=function(){var e=(0,u.w)();return(0,u.d)(Pa.ly)?(0,D.jsx)(wo.m,{content:Da("context_tooltip"),children:(0,D.jsxs)(j.$,{view:"outlined-utility",onClick:function(){e((0,Ra.mI)(Da("question_default")))},children:[(0,D.jsx)(k.I,{data:Ia.A,size:16})," ",Da("action_button")]})}):null},za=function(e){var t=e.rootError,n=(0,Oa.d)().getEditor,r=(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 Ta.yX(t,r))}),[n]),i=(0,o.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,D.jsxs)("div",{children:[(0,D.jsxs)(Le.s,{gap:2,alignItems:"center",children:[(0,D.jsxs)("div",{children:[(0,D.jsx)(C.E,{variant:"subheader-3",children:"Query error"})," ",(0,D.jsx)(H.A,{title:"Copy error",view:"flat-secondary",text:i,size:"l"})]}),(0,D.jsx)(qa,{})]}),(0,D.jsx)(Na,{error:t,onErrorClick:r,expanded:!0})]}):null},$a=n(82777),Ua=n(81594),Fa=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},Ha=n(30996),Ba=function(e){var t=e.query,n=[Ha.d.SPYT,Ha.d.CHYT].includes(t.engine),r=[Ua.RE.RUNNING,Ua.RE.COMPLETING].includes(t.state),i=(0,o.useMemo)((function(){if(!t.progress||!n||!r)return[];if((0,A.eZ)(t.progress)){var e=Fa(t.progress);return[{tooltip:"".concat(e,"%"),percent:e}]}return t.progress.progress.map((function(e){var t=Fa(e);return{tooltip:"".concat(e.query_id," - ").concat(t,"%"),percent:t}}))}),[r,n,t.progress]);return(0,D.jsx)(Le.s,{direction:"column",gap:1,children:i.map((function(e){var t=e.tooltip,n=e.percent;return(0,D.jsx)(wo.m,{content:t,children:(0,D.jsx)("div",{children:(0,D.jsx)($a.k,{theme:"info",size:"xs",value:n})})},t)}))})},Va=n(32751),Ka=(0,a.A)("query-results"),Wa=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.w)(),l=(0,u.d)(Va.Qm),c=(0,u.d)(Va.Lc),d=(0,u.d)(Va.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,$.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,D.jsxs)("div",{className:Ka(null,n),children:[(0,D.jsxs)("div",{className:Ka("meta"),children:[(0,D.jsx)(z,{className:Ka("meta-info"),query:t}),(0,D.jsx)("div",{className:Ka("toolbar"),children:r})]}),(0,D.jsx)(Ba,{query:t}),(0,D.jsx)(Ie,{className:Ka("result",{minimized:a}),hide:a,children:(0,D.jsx)(Re.rk,{plan:h.yql_plan,progress:null==h?void 0:h.yql_progress,defaultView:"graph",children:(0,D.jsxs)(w.f,{value:c||"",onUpdate:function(e){s((0,pa.TC)(!0)),s((0,pa.YF)(e))},children:[(0,D.jsxs)("div",{className:Ka("header"),children:[(0,D.jsx)(b.w,{className:Ka("tabs"),children:l.map((function(e){return(0,D.jsx)(_.o,{value:e.id,children:e.title},e.id)}))}),(null==c?void 0:c.includes("result"))&&Number.isInteger(v)&&(0,D.jsx)("div",{className:Ka("tab_actions"),children:(0,D.jsx)(Ce,{query:t,resultIndex:null!=v?v:0})}),"progress"===c&&(0,D.jsx)(Pe,{})]}),(0,D.jsx)("div",{className:Ka("content"),children:l.map((function(e){return(0,D.jsx)(E.K,{value:e.id,children:(n=e.id,null!=n&&n.includes("result")?(0,D.jsx)(Ie,{className:Ka("result-wrap"),children:(0,D.jsx)(qt,{query:t,activeResultParams:d})}):null!=n&&n.includes("chart-tab")?(0,D.jsx)(Ie,{className:Ka("result-wrap"),children:(0,D.jsx)($t,{query:t,resultIndex:(0,je.S)(n)||0})}):"error"===n?(0,D.jsx)(za,{rootError:t.error}):"meta"===n?(0,D.jsx)(Q,{query:t}):"statistic"===n?(0,D.jsx)(Ie,{children:(0,D.jsx)(Se,{})}):"progress"===n?(0,D.jsx)(va,{isActive:!0,operationIdToCluster:f}):null)},e.id);var n}))})]})})}),(0,D.jsx)("div",{})]})})),Ya=n(33559);const Ga=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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=n(91984);const Qa=JSON.parse('{"action_share":"Share","value_shared":"Shared","action_unpublish":"Unpublish","action_unpublish-query":"Unpublish query","alert_query-shared":"Query successful shared","alert_query-shared-content":"The link to your Query is published and copied to the clipboard"}'),Xa=JSON.parse('{"action_share":"Поделиться","value_shared":"Опубликован","action_unpublish":"Отменить публикацию","action_unpublish-query":"Отменить публикацию запроса","alert_query-shared":"Запрос успешно опубликован","alert_query-shared-content":"Ссылка на ваш запрос опубликована и скопирована в буфер обмена"}'),Za=(0,R.Kc)("yt:query-tracker.share-button",{en:Qa,ru:Xa});var es=(0,a.A)("query-share-button"),ts=function(){var e=(0,u.w)(),t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,ma.A)(!1),c=(0,i.A)(s,2),d=c[0],h=c[1],v=(0,u.d)(f.wJ),p=(0,u.d)(l.Ry).includes(l.PH),m=(0,o.useCallback)((0,ce.A)((0,le.A)().mark((function t(){return(0,le.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a(!0),t.next=4,e((0,I.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,ce.A)((0,le.A)().mark((function e(){return(0,le.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:Ja.X.add({name:"",autoHiding:5e3,theme:"success",title:Za("alert_query-shared"),content:Za("alert_query-shared-content"),actions:[{label:Za("action_unpublish"),onClick:m}]});case 5:case"end":return e.stop()}}),e)}))),[m,p]);return v?(0,D.jsxs)("div",{className:es(),children:[(0,D.jsxs)(j.$,{onClick:y,view:p?"flat-info":"flat",pin:p?"round-brick":void 0,selected:p,loading:r,children:[(0,D.jsx)(k.I,{data:Ga,width:16})," ",Za(p?"value_shared":"action_share")]}),p&&(0,D.jsx)(Ya.r,{renderSwitcher:function(e){return(0,D.jsx)(j.$,(0,X.A)((0,X.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,D.jsx)(k.I,{size:16,data:d?Co.A:Eo.A})}))},onSwitcherClick:h,items:[{action:m,text:Za("action_unpublish-query")}]})]}):null},ns=n(20361),rs=n(27117),is=n(61422);const os=JSON.parse('{"title_edit-query-aco":"Edit query ACO","action_edit-aco":"Edit ACO","action_update":"Update"}'),as=JSON.parse('{"title_edit-query-aco":"Редактирование ACO запроса","action_edit-aco":"Редактировать ACO","action_update":"Обновить"}'),ss=(0,R.Kc)("yt:query-tracker.edit-query-aco-modal",{en:os,ru:as});var us=function(e){var t=e.query_id,n=(0,u.w)(),r=(0,u.d)(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,ma.A)(!1),g=(0,i.A)(m,2),x=g[0],A=g[1],w=function(){var e=(0,ce.A)((0,le.A)().mark((function e(r){return(0,le.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,is.uG)());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,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(j.$,{view:"flat",onClick:A,children:[(0,D.jsx)(k.I,{data:rs.A,size:16})," ",ss("action_edit-aco")]}),x&&(0,D.jsx)(ns.yZ,{pristineSubmittable:!0,visible:x,modal:!0,headerProps:{title:ss("title_edit-query-aco")},footerProps:{textApply:ss("action_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,Fe.A)((0,ns.Y)([v])))})]})},ls=n(28099);const cs=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.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:"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 ds=(0,a.A)("yt-qt-result-view"),fs=(0,o.memo)((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,D.jsx)(Wa,{query:t,className:ds(),minimized:"minimized"===n,toolbar:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(Le.s,{gap:2,className:ds("results-toolbar-buttons"),children:[(0,D.jsx)(ts,{}),(0,D.jsx)(us,{query_id:t.id})]}),"split"===n?(0,D.jsx)(j.$,{view:"flat",onClick:function(){return r("full")},children:(0,D.jsx)(k.I,{data:ls.A,size:16})}):(0,D.jsx)(j.$,{view:"flat",onClick:function(){return r("split")},children:(0,D.jsx)(k.I,{data:cs,size:16})}),"minimized"!==n&&(0,D.jsx)(j.$,{view:"flat",onClick:function(){return r("minimized")},children:(0,D.jsx)(k.I,{data:rn.A,size:16})})]})})}));const hs=function(e){return(0,D.jsx)("svg",(0,X.A)((0,X.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,D.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 vs(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==l.PH}))}const ps=JSON.parse('{"field_access":"Access:"}'),ms=JSON.parse('{"field_access":"Доступ:"}'),ys=(0,R.Kc)("yt:query-tracker.query-aco-select",{en:ps,ru:ms});var gs=function(){var e=(0,u.d)(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,D.jsx)(D.Fragment,{children:(0,D.jsx)(bt.l,{filterable:!0,disabled:r,width:"auto",label:ys("field_access"),className:"query-aco-select",options:vs(n),value:vs(a),onUpdate:s,multiple:e})})},xs=n(94383),As=n(76866),ws=n(80016),bs=n(73689),_s=function(e){switch(e){case Ha.d.CHYT:return bs.m.CHYT;case Ha.d.SPYT:return bs.m.SPYT;case Ha.d.YT_QL:return bs.m.YTQL;default:return bs.m.YQL}},Es=n(57436),Cs=function(){return(0,fe.A)((function e(t){(0,de.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()}}])}(),js=function(e){function t(e,n,r){var i;return(0,de.A)(this,t),(i=(0,he.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,ve.A)(t,e),(0,fe.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,Es.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 Ta.Q6(n,a.start,n,a.end),options:{hoverMessage:{value:"Follow link (".concat(e.commandKey," + click)")}}}))}))},a=1;a<=n;a++)o(a);vt()(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}))}}])}(Cs),ks=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.A)(t,[{key:"setActiveLine",value:function(e){if(e){var t=this.editor.getModel();t&&(this.clearDecorations(),this.collection.set([{range:new Ta.Q6(e,1,e,t.getLineLength(e)+1),options:{isWholeLine:!0,className:"yt-monaco-editor__highlighted-line"}}]),this.editor.setSelection(new Ta.LN(0,0,0,0)))}else this.clearLines()}},{key:"clearLines",value:function(){this.editor.setSelection(new Ta.LN(0,0,0,0)),this.clearDecorations()}}])}(Cs),Ss=function(e){function t(){return(0,de.A)(this,t),(0,he.A)(this,t,arguments)}return(0,ve.A)(t,e),(0,fe.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 Ta.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:Ta.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),Ta.EN.setModelMarkers(n,"query-tracker",r)}}}])}(Cs),Ns=n(256),Os=(0,a.A)("yq-query-editor-monaco"),Ts=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,Oa.d)().setEditor,h=(0,u.d)(l.Ux),v=(0,u.d)(l.AC),p=(0,u.d)(l.Q4),m=(0,u.d)(l.ln),y=(0,u.d)(l.Fn),g=(0,u.d)(l.hS),x=(0,u.w)(),A=(0,o.useRef)({isInitialized:!1,linkDecorator:null,lineDecorator:null,errorDecorator:null});!function(e){var t=(0,u.d)(xs.RR);(0,o.useEffect)((function(){var e;null===(e=zt.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=zt.Ay.getInlineSuggestionsApi())||void 0===r||r.sendTelemetry("discarded"))}),[e]);(0,o.useEffect)((function(){Ta.EN.registerCommand("accessQuerySuggestionsTelemetry",(0,ce.A)((0,le.A)().mark((function e(){var t;return(0,le.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=zt.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 js(d.current,m,dr()?"meta":"ctrl"):null,lineDecorator:new ks(d.current),errorDecorator:new Ss(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,Os("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()}}),[]),_=(0,o.useCallback)((function(e){var t,n=null===(t=A.current.linkDecorator)||void 0===t?void 0:t.findLink(e);n&&x((0,Ns.in)(n.path,n.cluster))}),[x]),E=(0,o.useCallback)((function(e){var t=e.target,n=e.event;t.type===Ta.EN.MouseTargetType.GUTTER_LINE_NUMBERS&&b(t),t.type===Ta.EN.MouseTargetType.CONTENT_TEXT&&fr(n)&&_(t.position)}),[b,_]),C=(0,o.useCallback)((function(e){c(!0),x((0,I.Bn)({query:e,error:void 0}))}),[x]);return(0,D.jsx)(ws.w,{children:(0,D.jsx)(As.A,{editorRef:d,value:v||"",language:_s(m),className:Os(),onChange:C,onClick:E,monacoConfig:w})})};const Is=JSON.parse('{"action_run":"Run","action_validate":"Validate","action_explain":"Explain"}'),Rs=JSON.parse('{"action_run":"Запустить","action_validate":"Проверить","action_explain":"Объяснить"}'),Ps=(0,R.Kc)("yt:query-tracker.query-editor-view",{en:Is,ru:Rs});var Ms=(0,a.A)("yt-qt-query-editor-view"),Ls=(0,o.memo)((function(e){var t=e.onStartQuery,n=e.pathNavigation,r=(0,o.useRef)(),i=(0,Oa.d)().setEditor,a=(0,u.d)(l.Ux),s=(0,u.d)(l.ln),c=(0,u.d)(f.d),d=(0,u.w)(),h=(0,o.useCallback)((function(){d((0,I.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,I.GB)(t,{execution_mode:"validate"}))}),[d,t]),p=(0,o.useCallback)((function(){d((0,I.GB)(t,{execution_mode:"optimize"}))}),[d,t]);return(0,D.jsxs)("div",{className:Ms(),children:[(0,D.jsx)(Ts,{pathNavigation:n}),(0,D.jsx)("div",{className:Ms("actions"),children:(0,D.jsxs)("div",{className:"query-run-action",children:[(0,D.jsxs)(j.$,{qa:"qt-run",view:"action",onClick:h,children:[(0,D.jsx)(k.I,{data:hs}),Ps("action_run")]}),s===Ha.d.YQL?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(j.$,{qa:"qt-validate",onClick:v,children:Ps("action_validate")}),(0,D.jsx)(j.$,{qa:"qt-explain",onClick:p,children:Ps("action_explain")})]}):null,c&&(0,D.jsx)(gs,{})]})})]})})),Ds=(0,a.A)("query-container"),qs=function(e){var t=e.onStartQuery,n=e.showStatusInTitle,a=e.pathNavigation,A=(0,u.w)(),w=function(){var e=(0,u.d)(l.st),t=(0,u.d)(f.B8),n=(0,o.useContext)(d.o),r=(0,u.w)(),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,_=(0,o.useState)("minimized"),E=(0,i.A)(_,2),C=E[0],j=E[1],k=(0,o.useState)([50,50]),S=(0,i.A)(k,2),N=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 T=(0,u.d)(l.Kv),I=(0,u.d)(l.hS),R=b||I;return(0,D.jsxs)(D.Fragment,{children:[R&&(0,D.jsx)("div",{className:Ds("loading"),children:(0,D.jsx)(s.a,{})}),(0,D.jsxs)(c.A,{className:Ds((0,r.A)({},C,!0)),direction:c.A.VERTICAL,onResizeEnd:O,getInitialSizes:function(){return N},children:["full"!==C&&(0,D.jsx)(Ls,{onStartQuery:t,pathNavigation:a}),(null==w?void 0:w.id)&&T&&(0,D.jsx)(fs,{query:w,setResultViewMode:j,resultViewMode:C})]})]})}},12094:(e,t,n)=>{"use strict";n.d(t,{y:()=>A});var r=n(77810),i=n(30996),o=n(76872),a=n(55339),s=n(60723),u=n(3962),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(73688),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(14371),m=n(29970),y=n(52142),g=n(57018),x=(0,o.A)("yt-query-selector-by-engine"),A=function(){var e=(0,p.w)(),t=(0,p.d)(m.K7),n=(0,p.d)(m.ox),o=(0,p.d)(m.sh),a=o.settings,s=void 0===a?{}:a,u=o.engine,c=(0,p.d)(g.m6),d=(0,p.d)(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 _=(null==s?void 0:s.yql_version)||d;return(0,l.jsx)(h.l,{className:x("version"),size:"l",options:A,value:_?[_]:void 0,onUpdate:function(t){e((0,y.Fz)(t[0]))}})}if(u===i.d.CHYT||u===i.d.SPYT){var E=u===i.d.CHYT;return(0,l.jsx)(v,{loading:n,cliqueList:b,value:E?s.clique:s.discovery_group,onChange:E?function(t){e((0,y.EO)(t))}:function(t){e((0,y.i5)(t))},showStatus:E,placeholder:E?void 0:"Discovery path"})}return null}},13051:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var r=n(64922),i=n(77810),o=n(60723),a=n(91018),s=n(43904),u=n(28344);const l=i.forwardRef((function(e,t){const n=function(e){const t=i.useContext(u.H);if(!t)throw new Error("<Tab> must be used within <TabList>");const n=t.value,r=`${t.id}:t:${e.value}`,o=t.isProvider?`${t.id}:p:${e.value}`:void 0,l=n===e.value,c=e.disabled,d=t.isFocused,{value:f,icon:h,counter:v,label:p,disabled:m,href:y,component:g,qa:x,...A}=e;return{...A,role:"tab","aria-selected":l,"aria-disabled":c,"aria-controls":o,id:r,tabIndex:!l||c||d?-1:0,onClick:n=>{e.disabled||(t.onUpdate?.(e.value),e.onClick?.(n))},onKeyDown:n=>{n.key!==s.D.SPACEBAR&&n.key!==s.D.ENTER||e.disabled||(t.onUpdate?.(e.value),e.onKeyDown?.(n))},className:(0,a.A3)({active:l,disabled:c},e.className),"data-qa":e.qa,[a.kq]:e.value}}(e),l=(0,r.jsxs)("div",{className:(0,a.A3)("content"),children:[e.icon&&(0,r.jsx)("div",{className:(0,a.A3)("icon"),children:e.icon}),(0,r.jsx)("div",{className:(0,a.A3)("title"),children:e.children||e.value}),void 0!==e.counter&&(0,r.jsx)("div",{className:(0,a.A3)("counter"),children:e.counter}),e.label&&(0,r.jsx)(o.J,{className:(0,a.A3)("label"),theme:e.label.theme,children:e.label.content})]});return void 0!==e.component?i.createElement(e.component,{...n,ref:t}):void 0!==e.href?(0,r.jsx)("a",{...n,ref:t,href:e.href,rel:"_blank"!==e.target||e.rel?e.rel:"noopener noreferrer",children:l}):(0,r.jsx)("button",{...n,ref:t,type:e.type||"button",children:l})}));l.displayName="Tab"},14855:(e,t,n)=>{"use strict";n.d(t,{s:()=>v});var r=n(77810),i=n(14371),o=n(73688),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.w)(),v=(0,i.d)(a.EP),p=(0,i.d)(c.HF),m=(0,i.d)(d.Dy),y=(0,i.d)(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"})}))}},17581:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var r=n(64922),i=n(77810),o=n(49533),a=n(28344);const s=({value:e,onUpdate:t,children:n})=>{const s=(0,o.u)(),u=i.useMemo((()=>({value:e,onUpdate:t,id:s,isProvider:!0})),[e,t,s]);return(0,r.jsx)(a.H.Provider,{value:u,children:n})}},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)}}}},20239:(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.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"})}))}},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),_=function(e){return b(w(e),8,-1)},E=_,C=x,j=function(e){if("Function"===E(e))return C(e)},k="object"==typeof document&&document.all,S={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},N=S.all,O=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===N}:function(e){return"function"==typeof e},T={},I=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=l,P=Function.prototype.call,M=R?P.bind(P):function(){return P.apply(P,arguments)},L={},D={}.propertyIsEnumerable,q=Object.getOwnPropertyDescriptor,z=q&&!D.call({1:2},1);L.f=z?function(e){var t=q(this,e);return!!t&&t.enumerable}:D;var $,U,F=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},H=u,B=_,V=Object,K=x("".split),W=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?K(e,""):V(e)}:V,Y=function(e){return null==e},G=Y,J=TypeError,Q=function(e){if(G(e))throw J("Can't call method on "+e);return e},X=W,Z=Q,ee=function(e){return X(Z(e))},te=O,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=O,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=($=ye.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!U&&he&&(!($=he.match(/Edge\/(\d+)/))||$[1]>=74)&&($=he.match(/Chrome\/(\d+)/))&&(U=+$[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,_e=le,Ee=O,Ce=ce,je=Object,ke=be?function(e){return"symbol"==typeof e}:function(e){var t=_e("Symbol");return Ee(t)&&Ce(t.prototype,je(e))},Se=String,Ne=function(e){try{return Se(e)}catch(e){return"Object"}},Oe=O,Te=Ne,Ie=TypeError,Re=function(e){if(Oe(e))return e;throw Ie(Te(e)+" is not a function")},Pe=Re,Me=Y,Le=function(e,t){var n=e[t];return Me(n)?void 0:Pe(n)},De=M,qe=O,ze=re,$e=TypeError,Ue={exports:{}},Fe=s,He=Object.defineProperty,Be="__core-js_shared__",Ve=s[Be]||function(e,t){try{He(Fe,e,{value:t,configurable:!0,writable:!0})}catch(n){Fe[e]=t}return t}(Be,{}),Ke=Ve;(Ue.exports=function(e,t){return Ke[e]||(Ke[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 We=Ue.exports,Ye=Q,Ge=Object,Je=function(e){return Ge(Ye(e))},Qe=Je,Xe=x({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return Xe(Qe(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=We,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=M,pt=re,mt=ke,yt=Le,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&&qe(n=e.toString)&&!ze(r=De(n,e)))return r;if(qe(n=e.valueOf)&&!ze(r=De(n,e)))return r;if("string"!==t&&qe(n=e.toString)&&!ze(r=De(n,e)))return r;throw $e("Can't convert object to primitive value")}(e,t)},wt=ke,bt=function(e){var t=At(e,"string");return wt(t)?t:t+""},_t=re,Et=s.document,Ct=_t(Et)&&_t(Et.createElement),jt=function(e){return Ct?Et.createElement(e):{}},kt=jt,St=!I&&!u((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Nt=I,Ot=M,Tt=L,It=F,Rt=ee,Pt=bt,Mt=Ze,Lt=St,Dt=Object.getOwnPropertyDescriptor;T.f=Nt?Dt:function(e,t){if(e=Rt(e),t=Pt(t),Lt)try{return Dt(e,t)}catch(e){}if(Mt(e,t))return It(!Ot(Tt.f,e,t),e[t])};var qt=u,zt=O,$t=/#|\.prototype\./,Ut=function(e,t){var n=Ht[Ft(e)];return n==Vt||n!=Bt&&(zt(t)?qt(t):!!t)},Ft=Ut.normalize=function(e){return String(e).replace($t,".").toLowerCase()},Ht=Ut.data={},Bt=Ut.NATIVE="N",Vt=Ut.POLYFILL="P",Kt=Ut,Wt=Re,Yt=l,Gt=j(j.bind),Jt=function(e,t){return Wt(e),void 0===t?e:Yt?Gt(e,t):function(){return e.apply(t,arguments)}},Qt={},Xt=I&&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=I,on=St,an=Xt,sn=nn,un=bt,ln=TypeError,cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,fn="enumerable",hn="configurable",vn="writable";Qt.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=Qt,mn=F,yn=I?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=O,bn=T.f,_n=Kt,En=ie,Cn=Jt,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},Nn=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?En:En[d]||jn(En,d,{})[d],y=m.prototype;for(o in t)r=!(n=_n(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(En,i=d+"Prototype")||jn(En,i,{}),jn(En[i],o,a),e.real&&y&&(n||!y[o])&&jn(y,o,a)))},On=Nn,Tn=I,In=Qt.f;On({target:"Object",stat:!0,forced:Object.defineProperty!==In,sham:!Tn},{defineProperty:In});var Rn=ie.Object,Pn=o.exports=function(e,t,n){return Rn.defineProperty(e,t,n)};Rn.defineProperty.sham&&(Pn.sham=!0);var Mn=o.exports,Ln=Mn,Dn=i(Ln),qn=_,zn=Array.isArray||function(e){return"Array"==qn(e)},$n=Math.ceil,Un=Math.floor,Fn=Math.trunc||function(e){var t=+e;return(t>0?Un:$n)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:Fn(t)},Bn=Hn,Vn=Math.min,Kn=function(e){return function(e){return e>0?Vn(Bn(e),9007199254740991):0}(e.length)},Wn=TypeError,Yn=function(e){if(e>9007199254740991)throw Wn("Maximum allowed index exceeded");return e},Gn=bt,Jn=Qt,Qn=F,Xn=function(e,t,n){var r=Gn(t);r in e?Jn.f(e,r,Qn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=O,rr=_,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=O,lr=Ve,cr=x(Function.toString);ur(lr.inspectSource)||(lr.inspectSource=function(e){return cr(e)});var dr=lr.inspectSource,fr=x,hr=u,vr=O,pr=sr,mr=dr,yr=function(){},gr=[],xr=le("Reflect","construct"),Ar=/^\s*(?:class|function)\b/,wr=fr(Ar.exec),br=!Ar.exec(yr),_r=function(e){if(!vr(e))return!1;try{return xr(yr,gr,e),!0}catch(e){return!1}},Er=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}};Er.sham=!0;var Cr=!xr||hr((function(){var e;return _r(_r.call)||!_r(Object)||!_r((function(){e=!0}))||e}))?Er:_r,jr=zn,kr=Cr,Sr=re,Nr=ht("species"),Or=Array,Tr=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(kr(t)&&(t===Or||jr(t.prototype))||Sr(t)&&null===(t=t[Nr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},Ir=u,Rr=ge,Pr=ht("species"),Mr=function(e){return Rr>=51||!Ir((function(){var t=[];return(t.constructor={})[Pr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Lr=Nn,Dr=u,qr=zn,zr=re,$r=Je,Ur=Kn,Fr=Yn,Hr=Xn,Br=Tr,Vr=Mr,Kr=ge,Wr=ht("isConcatSpreadable"),Yr=Kr>=51||!Dr((function(){var e=[];return e[Wr]=!1,e.concat()[0]!==e})),Gr=function(e){if(!zr(e))return!1;var t=e[Wr];return void 0!==t?!!t:qr(e)};Lr({target:"Array",proto:!0,arity:1,forced:!Yr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=$r(this),s=Br(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),Fr(u+i),n=0;n<i;n++,u++)n in o&&Hr(s,u,o[n]);else Fr(u+1),Hr(s,u++,o);return s.length=u,s}});var Jr=sr,Qr=String,Xr=function(e){if("Symbol"===Jr(e))throw TypeError("Cannot convert a Symbol value to a string");return Qr(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=Kn,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=I,wi=Xt,bi=Qt,_i=nn,Ei=ee,Ci=xi;Zr.f=Ai&&!wi?Object.defineProperties:function(e,t){_i(e);for(var n,r=Ei(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,Ni=We("keys"),Oi=function(e){return Ni[e]||(Ni[e]=Si(e))},Ti=nn,Ii=Zr,Ri=mi,Pi=li,Mi=ki,Li=jt,Di="prototype",qi="script",zi=Oi("IE_PROTO"),$i=function(){},Ui=function(e){return"<"+qi+">"+e+"</"+qi+">"},Fi=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?Fi(ji):(t=Li("iframe"),n="java"+qi+":",t.style.display="none",Mi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):Fi(ji);for(var r=Ri.length;r--;)delete Hi[Di][Ri[r]];return Hi()};Pi[zi]=!0;var Bi=Object.create||function(e,t){var n;return null!==e?($i[Di]=Ti(e),n=new $i,$i[Di]=null,n[zi]=e):n=Hi(),void 0===t?n:Ii.f(n,t)},Vi={},Ki=pi,Wi=mi.concat("length","prototype");Vi.f=Object.getOwnPropertyNames||function(e){return Ki(e,Wi)};var Yi={},Gi=ri,Ji=Kn,Qi=Xn,Xi=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Ji(e),i=Gi(t,r),o=Gi(void 0===n?r:n,r),a=Xi(Zi(o-i,0)),s=0;i<o;i++,s++)Qi(a,s,e[i]);return a.length=s,a},to=_,no=ee,ro=Vi.f,io=eo,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Yi.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=Qt,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=Qt.f,wo=function(e){var t=yo.Symbol||(yo.Symbol={});go(t,e)||Ao(t,e,{value:xo.f(e)})},bo=M,_o=le,Eo=ht,Co=uo,jo=function(){var e=_o("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Eo("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)+"]"},No=er,Oo=Qt.f,To=yn,Io=Ze,Ro=So,Po=ht("toStringTag"),Mo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Io(i,Po)||Oo(i,Po,{configurable:!0,value:t}),r&&!No&&To(i,"toString",Ro)}},Lo=O,Do=s.WeakMap,qo=Lo(Do)&&/native code/.test(String(Do)),zo=s,$o=re,Uo=yn,Fo=Ze,Ho=Ve,Bo=Oi,Vo=li,Ko="Object already initialized",Wo=zo.TypeError,Yo=zo.WeakMap;if(qo||Ho.state){var Go=Ho.state||(Ho.state=new Yo);Go.get=Go.get,Go.has=Go.has,Go.set=Go.set,vo=function(e,t){if(Go.has(e))throw Wo(Ko);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 Jo=Bo("state");Vo[Jo]=!0,vo=function(e,t){if(Fo(e,Jo))throw Wo(Ko);return t.facade=e,Uo(e,Jo,t),t},po=function(e){return Fo(e,Jo)?e[Jo]:{}},mo=function(e){return Fo(e,Jo)}}var Qo={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(!$o(t)||(n=po(t)).type!==e)throw Wo("Incompatible receiver, "+e+" required");return n}}},Xo=Jt,Zo=W,ea=Je,ta=Kn,na=Tr,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=Xo(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=Nn,sa=s,ua=M,la=x,ca=I,da=we,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ya=bt,ga=Xr,xa=F,Aa=Bi,wa=xi,ba=Vi,_a=Yi,Ea=ao,Ca=T,ja=Qt,ka=Zr,Sa=L,Na=uo,Oa=co,Ta=We,Ia=li,Ra=it,Pa=ht,Ma=fo,La=wo,Da=jo,qa=Mo,za=Qo,$a=oa.forEach,Ua=Oi("hidden"),Fa="Symbol",Ha="prototype",Ba=za.set,Va=za.getterFor(Fa),Ka=Object[Ha],Wa=sa.Symbol,Ya=Wa&&Wa[Ha],Ga=sa.TypeError,Ja=sa.QObject,Qa=Ca.f,Xa=ja.f,Za=_a.f,es=Sa.f,ts=la([].push),ns=Ta("symbols"),rs=Ta("op-symbols"),is=Ta("wks"),os=!Ja||!Ja[Ha]||!Ja[Ha].findChild,as=ca&&fa((function(){return 7!=Aa(Xa({},"a",{get:function(){return Xa(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Qa(Ka,t);r&&delete Ka[t],Xa(e,t,n),r&&e!==Ka&&Xa(Ka,t,r)}:Xa,ss=function(e,t){var n=ns[e]=Aa(Ya);return Ba(n,{type:Fa,tag:e,description:t}),ca||(n.description=t),n},us=function(e,t,n){e===Ka&&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)||Xa(e,Ua,xa(1,{})),e[Ua][r]=!0),as(e,r,n)):Xa(e,r,n)},ls=function(e,t){pa(e);var n=ma(t),r=wa(n).concat(hs(n));return $a(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===Ka&&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!==Ka||!ha(ns,r)||ha(rs,r)){var i=Qa(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 $a(t,(function(e){ha(ns,e)||ha(Ia,e)||ts(n,e)})),n},hs=function(e){var t=e===Ka,n=Za(t?rs:ma(e)),r=[];return $a(n,(function(e){!ha(ns,e)||t&&!ha(Ka,e)||ts(r,ns[e])})),r};da||(Wa=function(){if(va(Ya,this))throw Ga("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ga(arguments[0]):void 0,t=Ra(e),n=function(e){this===Ka&&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(Ka,t,{configurable:!0,set:n}),ss(t,e)},Na(Ya=Wa[Ha],"toString",(function(){return Va(this).tag})),Na(Wa,"withoutSetter",(function(e){return ss(Ra(e),e)})),Sa.f=cs,ja.f=us,ka.f=ls,Ca.f=ds,ba.f=_a.f=fs,Ea.f=hs,Ma.f=function(e){return ss(Pa(e),e)},ca&&Oa(Ya,"description",{configurable:!0,get:function(){return Va(this).description}})),aa({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:Wa}),$a(wa(is),(function(e){La(e)})),aa({target:Fa,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(),qa(Wa,Fa),Ia[Ua]=!0;var vs=we&&!!Symbol.for&&!!Symbol.keyFor,ps=Nn,ms=le,ys=Ze,gs=Xr,xs=We,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 _s=Nn,Es=Ze,Cs=ke,js=Ne,ks=vs,Ss=We("symbol-to-string-registry");_s({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(Es(Ss,e))return Ss[e]}});var Ns=x([].slice),Os=zn,Ts=O,Is=_,Rs=Xr,Ps=x([].push),Ms=Nn,Ls=le,Ds=v,qs=M,zs=x,$s=u,Us=O,Fs=ke,Hs=Ns,Bs=we,Vs=String,Ks=Ls("JSON","stringify"),Ws=zs(/./.exec),Ys=zs("".charAt),Gs=zs("".charCodeAt),Js=zs("".replace),Qs=zs(1..toString),Xs=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!Bs||$s((function(){var e=Ls("Symbol")();return"[null]"!=Ks([e])||"{}"!=Ks({a:e})||"{}"!=Ks(Object(e))})),nu=$s((function(){return'"\\udf06\\ud834"'!==Ks("\udf06\ud834")||'"\\udead"'!==Ks("\udead")})),ru=function(e,t){var n=Hs(arguments),r=function(e){if(Ts(e))return e;if(Os(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"!=Is(i)&&"String"!=Is(i)||Ps(n,Rs(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Os(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Us(r)&&(t=qs(r,this,Vs(e),t)),!Fs(t))return t},Ds(Ks,null,n)},iu=function(e,t,n){var r=Ys(n,t-1),i=Ys(n,t+1);return Ws(Zs,e)&&!Ws(eu,i)||Ws(eu,e)&&!Ws(Zs,r)?"\\u"+Qs(Gs(e,0),16):e};Ks&&Ms({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Hs(arguments),i=Ds(tu?ru:Ks,null,r);return nu&&"string"==typeof i?Js(i,Xs,iu):i}});var ou=ao,au=Je;Nn({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=Mo;wo("toStringTag"),lu(uu("Symbol"),"Symbol"),wo("unscopables"),Mo(s.JSON,"JSON",!0);var cu,du,fu,hu=ie.Symbol,vu={},pu=I,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,_u=O,Eu=Je,Cu=wu,ju=Oi("IE_PROTO"),ku=Object,Su=ku.prototype,Nu=Cu?ku.getPrototypeOf:function(e){var t=Eu(e);if(bu(t,ju))return t[ju];var n=t.constructor;return _u(n)&&t instanceof n?n.prototype:t instanceof ku?Su:null},Ou=u,Tu=O,Iu=re,Ru=Bi,Pu=Nu,Mu=uo,Lu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Pu(Pu(fu)))!==Object.prototype&&(cu=du):Du=!0);var qu=!Iu(cu)||Ou((function(){var e={};return cu[Lu].call(e)!==e}));Tu((cu=qu?{}:Ru(cu))[Lu])||Mu(cu,Lu,(function(){return this}));var zu={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},$u=zu.IteratorPrototype,Uu=Bi,Fu=F,Hu=Mo,Bu=vu,Vu=function(){return this},Ku=x,Wu=Re,Yu=O,Gu=String,Ju=TypeError,Qu=nn,Xu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return Ku(Wu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Qu(n),function(e){if("object"==typeof e||Yu(e))return e;throw Ju("Can't set "+Gu(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Nn,el=M,tl=Nu,nl=Mo,rl=uo,il=vu,ol=Au.PROPER,al=zu.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($u,{next:Fu(+!r,n)}),Hu(e,i,!1,!0),Bu[i]=Vu}(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=Qo;Qt.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,_l=sr,El=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],Nl=Sl&&Sl.prototype;Nl&&_l(Nl)!==jl&&El(Nl,jl,kl),Cl[kl]=Cl.Array}var Ol=hu;wo("dispose");var Tl=Ol;wo("asyncDispose");var Il=Nn,Rl=x,Pl=le("Symbol"),Ml=Pl.keyFor,Ll=Rl(Pl.prototype.valueOf);Il({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Ml(Ll(e))}catch(e){return!1}}});for(var Dl=Nn,ql=We,zl=le,$l=x,Ul=ke,Fl=ht,Hl=zl("Symbol"),Bl=Hl.isWellKnown,Vl=zl("Object","getOwnPropertyNames"),Kl=$l(Hl.prototype.valueOf),Wl=ql("wks"),Yl=0,Gl=Vl(Hl),Jl=Gl.length;Yl<Jl;Yl++)try{var Ql=Gl[Yl];Ul(Hl[Ql])&&Fl(Ql)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Bl&&Bl(e))return!0;try{for(var t=Kl(e),n=0,r=Vl(Wl),i=r.length;n<i;n++)if(Wl[r[n]]==t)return!0}catch(e){}return!1}}),wo("matcher"),wo("metadataKey"),wo("observable"),wo("metadata"),wo("patternMatch"),wo("replaceAll");var Xl=Tl,Zl=i(Xl),ec=x,tc=Hn,nc=Xr,rc=Q,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=Xr,cc=Qo,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 _c(e,t,n){return t&&bc(e.prototype,t),n&&bc(e,n),Dn(e,"prototype",{writable:!1}),e}function Ec(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=Re,kc=re,Sc=Ze,Nc=Ns,Oc=l,Tc=Function,Ic=Cc([].concat),Rc=Cc([].join),Pc={},Mc=Oc?Tc.bind:function(e){var t=jc(this),n=t.prototype,r=Nc(arguments,1),i=function(){var n=Ic(r,Nc(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]=Tc("C,a","return new C("+Rc(r,",")+")")}return Pc[t](e,n)}(t,n.length,n):t.apply(e,n)};return kc(n)&&(i.prototype=n),i},Lc=Mc;Nn({target:"Function",proto:!0,forced:Function.bind!==Lc},{bind:Lc});var Dc=ie,qc=function(e){return Dc[e+"Prototype"]},zc=qc("Function").bind,$c=ce,Uc=zc,Fc=Function.prototype,Hc=function(e){var t=e.bind;return e===Fc||$c(Fc,e)&&t===Fc.bind?Uc:t},Bc=i(Hc),Vc=Re,Kc=Je,Wc=W,Yc=Kn,Gc=TypeError,Jc=function(e){return function(t,n,r,i){Vc(n);var o=Kc(t),a=Wc(o),s=Yc(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}},Qc={left:Jc(!1),right:Jc(!0)},Xc=u,Zc=function(e,t){var n=[][e];return!!n&&Xc((function(){n.call(null,t||function(){return 1},1)}))},ed="undefined"!=typeof process&&"process"==_(process),td=Qc.left;Nn({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=qc("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;Nn({target:"Array",proto:!0,forced:!Mr("filter")},{filter:function(e){return sd(this,e,arguments.length>1?arguments[1]:void 0)}});var ud=qc("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;Nn({target:"Array",proto:!0,forced:!Mr("map")},{map:function(e){return hd(this,e,arguments.length>1?arguments[1]:void 0)}});var vd=qc("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=zn,Ad=Kn,wd=Yn,bd=Jt,_d=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=_d(e,t,u,l,c,o-1)-1):(wd(c+1),e[c]=u),c++),d++;return c},Ed=_d,Cd=Re,jd=Je,kd=Kn,Sd=Tr;Nn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=kd(n);return Cd(e),(t=Sd(n,0)).length=Ed(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Nd=qc("Array").flatMap,Od=ce,Td=Nd,Id=Array.prototype,Rd=i((function(e){var t=e.flatMap;return e===Id||Od(Id,e)&&t===Id.flatMap?Td:t})),Pd=function(){function e(n,r,i){var o,a,s;t(this,e),Ec(this,"_source",void 0),Ec(this,"_transformers",void 0),Ec(this,"_target",void 0),Ec(this,"_listeners",{add:Bc(o=this._add).call(o,this),remove:Bc(a=this._remove).call(a,this),update:Bc(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return _c(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}(),Md=function(){function e(n){t(this,e),Ec(this,"_source",void 0),Ec(this,"_transformers",[]),this._source=n}return _c(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 Rd(t).call(t,e)})),this}},{key:"to",value:function(e){return new Pd(this._source,this._transformers,e)}}]),e}(),Ld=M,Dd=nn,qd=Le,zd=function(e,t,n){var r,i;Dd(e);try{if(!(r=qd(e,"return"))){if("throw"===t)throw n;return n}r=Ld(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Dd(r),n},$d=nn,Ud=zd,Fd=vu,Hd=ht("iterator"),Bd=Array.prototype,Vd=function(e){return void 0!==e&&(Fd.Array===e||Bd[Hd]===e)},Kd=sr,Wd=Le,Yd=Y,Gd=vu,Jd=ht("iterator"),Qd=function(e){if(!Yd(e))return Wd(e,Jd)||Wd(e,"@@iterator")||Gd[Kd(e)]},Xd=M,Zd=Re,ef=nn,tf=Ne,nf=Qd,rf=TypeError,of=function(e,t){var n=arguments.length<2?nf(e):t;if(Zd(n))return ef(Xd(n,e));throw rf(tf(e)+" is not iterable")},af=Jt,sf=M,uf=Je,lf=function(e,t,n,r){try{return r?t($d(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},cf=Vd,df=Cr,ff=Kn,hf=Xn,vf=of,pf=Qd,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};Nn({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,_f=i(bf),Ef=i(Qd),Cf=i(ie.Object.getOwnPropertySymbols),jf={exports:{}},kf=Nn,Sf=u,Nf=ee,Of=T.f,Tf=I;kf({target:"Object",stat:!0,forced:!Tf||Sf((function(){Of(1)})),sham:!Tf},{getOwnPropertyDescriptor:function(e,t){return Of(Nf(e),t)}});var If=ie.Object,Rf=jf.exports=function(e,t){return If.getOwnPropertyDescriptor(e,t)};If.getOwnPropertyDescriptor.sham&&(Rf.sham=!0);var Pf=i(jf.exports),Mf=le,Lf=Vi,Df=ao,qf=nn,zf=x([].concat),$f=Mf("Reflect","ownKeys")||function(e){var t=Lf.f(qf(e)),n=Df.f;return n?zf(t,n(e)):t},Uf=$f,Ff=ee,Hf=T,Bf=Xn;Nn({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Ff(e),i=Hf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Bf(a,t,n);return a}});var Vf=i(ie.Object.getOwnPropertyDescriptors),Kf={exports:{}},Wf=Nn,Yf=I,Gf=Zr.f;Wf({target:"Object",stat:!0,forced:Object.defineProperties!==Gf,sham:!Yf},{defineProperties:Gf});var Jf=ie.Object,Qf=Kf.exports=function(e,t){return Jf.defineProperties(e,t)};Jf.defineProperties.sham&&(Qf.sham=!0);var Xf=i(Kf.exports),Zf=i(Mn);Nn({target:"Array",stat:!0},{isArray:zn});var eh=ie.Array.isArray,th=i(eh),nh=Nn,rh=zn,ih=Cr,oh=re,ah=ri,sh=Kn,uh=ee,lh=Xn,ch=ht,dh=Ns,fh=Mr("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=qc("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),_h=i(bf);function Eh(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 Eh(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?_h(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(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&&Ef(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 Eh(e)}(e)||function(e){if(void 0!==Zl&&null!=Ef(e)||null!=e["@@iterator"])return _h(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(Ol),Nh=qc("Array").concat,Oh=ce,Th=Nh,Ih=Array.prototype,Rh=i((function(e){var t=e.concat;return e===Ih||Oh(Ih,e)&&t===Ih.concat?Th:t})),Ph=i(Ah);Nn({target:"Reflect",stat:!0},{ownKeys:$f});var Mh=i(ie.Reflect.ownKeys),Lh=i(eh),Dh=Je,qh=xi;Nn({target:"Object",stat:!0,forced:u((function(){qh(1)}))},{keys:function(e){return qh(Dh(e))}});var zh=i(ie.Object.keys),$h=oa.forEach,Uh=Zc("forEach")?[].forEach:function(e){return $h(this,e,arguments.length>1?arguments[1]:void 0)};Nn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var Fh=qc("Array").forEach,Hh=sr,Bh=Ze,Vh=ce,Kh=Fh,Wh=Array.prototype,Yh={DOMTokenList:!0,NodeList:!0},Gh=function(e){var t=e.forEach;return e===Wh||Vh(Wh,e)&&t===Wh.forEach||Bh(Yh,Hh(e))?Kh:t},Jh=i(Gh),Qh=Nn,Xh=zn,Zh=x([].reverse),ev=[1,2];Qh({target:"Array",proto:!0,forced:String(ev)===String(ev.reverse())},{reverse:function(){return Xh(this)&&(this.length=this.length),Zh(this)}});var tv=qc("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=I,uv=zn,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=Ne,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Nn,mv=Je,yv=ri,gv=Hn,xv=Kn,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=Yn,bv=Tr,_v=Xn,Ev=vv,Cv=Mr("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&&_v(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]:Ev(u,s);for(o=l;o>l-r+n;o--)Ev(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]:Ev(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Av(u,l-r+n),i}});var Sv=qc("Array").splice,Nv=ce,Ov=Sv,Tv=Array.prototype,Iv=i((function(e){var t=e.splice;return e===Tv||Nv(Tv,e)&&t===Tv.splice?Ov:t})),Rv=I,Pv=x,Mv=M,Lv=u,Dv=xi,qv=ao,zv=L,$v=Je,Uv=W,Fv=Object.assign,Hv=Object.defineProperty,Bv=Pv([].concat),Vv=!Fv||Lv((function(){if(Rv&&1!==Fv({b:1},Fv(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!=Fv({},e)[n]||Dv(Fv({},t)).join("")!=r}))?function(e,t){for(var n=$v(e),r=arguments.length,i=1,o=qv.f,a=zv.f;r>i;)for(var s,u=Uv(arguments[i++]),l=o?Bv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Rv&&!Mv(a,u,s)||(n[s]=u[s]);return n}:Fv,Kv=Vv;Nn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Kv},{assign:Kv});var Wv=i(ie.Object.assign),Yv=Je,Gv=Nu,Jv=wu;Nn({target:"Object",stat:!0,forced:u((function(){Gv(1)})),sham:!Jv},{getPrototypeOf:function(e){return Gv(Yv(e))}});var Qv=ie.Object.getPrototypeOf;Nn({target:"Object",stat:!0,sham:!I},{create:Bi});var Xv=ie.Object,Zv=function(e,t){return Xv.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=O,cp=ip,dp=de,fp=Ns,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=Nn,gp=s,xp=mp(gp.setInterval,!0);yp({global:!0,bind:!0,forced:gp.setInterval!==xp},{setInterval:xp});var Ap=Nn,wp=s,bp=mp(wp.setTimeout,!0);Ap({global:!0,bind:!0,forced:wp.setTimeout!==bp},{setTimeout:bp});var _p=i(ie.setTimeout),Ep={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}}(Ep);var Cp,jp=i(Ep.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 Np(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 Op,Tp=Cp,Ip=["","webkit","Moz","MS","ms","o"],Rp="undefined"==typeof document?{style:{}}:document.createElement("div"),Pp=Math.round,Mp=Math.abs,Lp=Date.now;function Dp(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o<Ip.length;){if((r=(n=Ip[o])?n+i:t)in e)return r;o++}}Op="undefined"==typeof window?{}:window;var qp=Dp(Rp.style,"touchAction"),zp=void 0!==qp,$p="compute",Up="auto",Fp="manipulation",Hp="none",Bp="pan-x",Vp="pan-y",Kp=function(){if(!zp)return!1;var e={},t=Op.CSS&&Op.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Op.CSS.supports("touch-action",n)})),e}(),Wp="ontouchstart"in Op,Yp=void 0!==Dp(Op,"PointerEvent"),Gp=Wp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Jp="touch",Qp="mouse",Xp=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===$p&&(e=this.compute()),zp&&this.manager.element.style&&Kp[e]&&(this.manager.element.style[qp]=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,Bp),n=vm(e,Vp);return t&&n?Hp:t||n?t?Bp:Vp:vm(e,Fp)?Fp: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)&&!Kp[Hp],o=vm(r,Vp)&&!Kp[Vp],a=vm(r,Bp)&&!Kp[Bp];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:Lp(),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:Mp(e)>=Mp(t)?e<0?rm:im:t<0?om:am}function bm(e,t,n){return{x:t/e||0,y:n/e||0}}function _m(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=Lp(),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=Mp(d.x)>Mp(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>Xp||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=Mp(c.x)>Mp(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 Em(e){return e.trim().split(/\s+/g)}function Cm(e,t,n){fm(Em(t),(function(t){e.addEventListener(t,n,!1)}))}function jm(e,t,n){fm(Em(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 Nm(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 Om={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Tm={2:Jp,3:"pen",4:Qp,5:"kinect"},Im="pointerdown",Rm="pointermove pointerup pointercancel";Op.MSPointerEvent&&!Op.PointerEvent&&(Im="MSPointerDown",Rm="MSPointerMove MSPointerUp MSPointerCancel");var Pm=function(e){function t(){var n,r=t.prototype;return r.evEl=Im,r.evWin=Rm,(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=Om[r],o=Tm[e.pointerType]||e.pointerType,a=o===Jp,s=Nm(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 Mm(e){return Array.prototype.slice.call(e,0)}function Lm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Nm(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},qm=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=zm.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Jp,srcEvent:e})},t}(Sm);function zm(e,t){var n,r,i=Mm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Mm(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?[Lm(r.concat(s),"identifier",!0),s]:void 0}var $m={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=$m[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:Qp,srcEvent:e}))},t}(Sm),Fm=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)}),Fm)}}function Bm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Hm.call(this,t)):e&(em|tm)&&Hm.call(this,t)}function Vm(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 Km=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===Jp,o=n.pointerType===Qp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Bm.call(Np(Np(r)),t,n);else if(o&&Vm.call(Np(Np(r)),n))return;r.callback(e,t,n)}},r.touch=new qm(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 Wm(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Ym=32,Gm=1;function Jm(e,t){var n=t.manager;return n?n.get(e):e}function Qm(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Xm=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 Tp(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Wm(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Jm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Wm(e,"dropRecognizeWith",this)||(e=Jm(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Wm(e,"requireFailure",this))return this;var t=this.requireFail;return-1===Nm(t,e=Jm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Wm(e,"dropRequireFailure",this))return this;e=Jm(e,this);var t=Nm(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+Qm(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Qm(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ym},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=Tp({},e);if(!hm(this.options.enable,[this,t]))return this.reset(),void(this.state=Ym);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[Fp]},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 Ym},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Ym}),this.options.interval),Ym},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}(Xm),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:Ym},t}(Xm);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(Vp),e&um&&t.push(Bp),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&&Mp(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 Ym},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=Lp(),this.manager.emit(this.options.event,this._input)))},t}(Xm),sy={domEvents:!1,touchAction:$p,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=Tp({},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||(Yp?Pm:Gp?qm:Wp?Km:Um))(this,_m),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 Tp(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 Xm)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(Wm(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(Wm(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Nm(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(Em(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(Em(e),(function(e){t?n[e]&&n[e].splice(Nm(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:Jp,srcEvent:e})}},t}(Sm);function hy(e,t){var n=Mm(e.touches),r=Mm(e.changedTouches);return t&(em|tm)&&(n=Lm(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&&Tp(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=Ym,e.Manager=cy,e.Input=Sm,e.TouchAction=pm,e.TouchInput=qm,e.MouseInput=Um,e.PointerEventInput=Pm,e.TouchMouseInput=Km,e.SingleTouchInput=fy,e.Recognizer=Xm,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=Tp,e.inherit=yy,e.bindFn=gy,e.prefixed=Dp,e.toArray=Mm,e.inArray=Nm,e.uniqueArray=Lm,e.splitStr=Em,e.boolOrFn=hm,e.hasParent=mm,e.addEventListeners=Cm,e.removeEventListeners=jm,e.defaults=Tp({},sy,{preset:uy}),e}();function Ay(e,t){var n=void 0!==Sh&&Ef(e)||e["@@iterator"];if(!n){if(Lh(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?_f(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 _y(){var e=Ey.apply(void 0,arguments);return jy(e),e}function Ey(){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 Ey.apply(void 0,Rh(r=[_y(t[0],t[1])]).call(r,kh(Ph(t).call(t,2))));var i,o=t[0],a=t[1],s=Ay(Mh(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])||Lh(o[u])||Lh(a[u])?o[u]=Cy(a[u]):o[u]=Ey(o[u],a[u]))}}catch(e){s.e(e)}finally{s.f()}return o}function Cy(e){return Lh(e)?gd(e).call(e,(function(e){return Cy(e)})):"object"===xc(e)&&null!==e?Ey({},e):e}function jy(e){for(var t=0,n=zh(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",Bc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Jh(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=Iv(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 Ny=Cr,Oy=Ne,Ty=TypeError,Iy=function(e){if(Ny(e))return e;throw Ty(Oy(e)+" is not a constructor")},Ry=Nn,Py=v,My=Mc,Ly=Iy,Dy=nn,qy=re,zy=Bi,$y=u,Uy=le("Reflect","construct"),Fy=Object.prototype,Hy=[].push,By=$y((function(){function e(){}return!(Uy((function(){}),[],e)instanceof e)})),Vy=!$y((function(){Uy((function(){}))})),Ky=By||Vy;Ry({target:"Reflect",stat:!0,forced:Ky,sham:Ky},{construct:function(e,t){Ly(e),Dy(t);var n=arguments.length<3?e:Ly(arguments[2]);if(Vy&&!By)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(My,e,r))}var i=n.prototype,o=zy(qy(i)?i:Fy),a=Py(e,o,t);return qy(a)?a:o}});var Wy=i(ie.Reflect.construct);function Yy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gy=Zv,Jy=i(Gy);Nn({target:"Object",stat:!0},{setPrototypeOf:Xu});var Qy=ie.Object.setPrototypeOf,Xy=i(Qy),Zy=i(Hc);function eg(e,t){var n;return eg=Xy?Zy(n=Xy).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=Jy(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 Yy(e)}var rg=Qv,ig=i(rg);function og(e){var t;return og=Xy?Zy(t=ig).call(t):function(e){return e.__proto__||ig(e)},og(e)}var ag={exports:{}},sg={exports:{}};!function(e){var t=Xl,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=$f,fg=T,hg=Qt,vg=re,pg=yn,mg=Error,yg=x("".replace),gg=String(mg("zxcasd").stack),xg=/\n\s*at [^:]*:[^\n]*/,Ag=xg.test(gg),wg=F,bg=!u((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",wg(1,7)),7!==e.stack)})),_g=yn,Eg=bg,Cg=Error.captureStackTrace,jg=Jt,kg=M,Sg=nn,Ng=Ne,Og=Vd,Tg=Kn,Ig=ce,Rg=of,Pg=Qd,Mg=zd,Lg=TypeError,Dg=function(e,t){this.stopped=e,this.result=t},qg=Dg.prototype,zg=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&&Mg(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 Lg(Ng(e)+" is not iterable");if(Og(i)){for(o=0,a=Tg(e);a>o;o++)if((s=y(e[o]))&&Ig(qg,s))return s;return new Dg(!1)}r=Rg(e,i)}for(u=f?e.next:r.next;!(l=kg(u,r)).done;){try{s=y(l.value)}catch(e){Mg(r,"throw",e)}if("object"==typeof s&&s&&Ig(qg,s))return s}return new Dg(!1)},$g=Xr,Ug=Nn,Fg=ce,Hg=Nu,Bg=Xu,Vg=Bi,Kg=yn,Wg=F,Yg=function(e,t,n,r){Eg&&(Cg?Cg(e,t):_g(e,"stack",function(e,t){if(Ag&&"string"==typeof e&&!mg.prepareStackTrace)for(;t--;)e=yg(e,xg,"");return e}(n,r)))},Gg=zg,Jg=ht("toStringTag"),Qg=Error,Xg=[].push,Zg=function(e,t){var n,r=Fg(ex,this);Bg?n=Bg(Qg(),r?Hg(this):ex):(n=r?this:Vg(ex),Kg(n,Jg,"Error")),void 0!==t&&Kg(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:$g(e)}(t)),Yg(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,Xg,{that:i}),Kg(n,"errors",i),n};Bg?Bg(Zg,Qg):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,Qg,{name:!0});var ex=Zg.prototype=Vg(Qg.prototype,{constructor:Wg(1,Zg),message:Wg(1,""),name:Wg(1,"AggregateError")});Ug({global:!0,constructor:!0,arity:2},{AggregateError:Zg});var tx,nx,rx,ix,ox=le,ax=co,sx=I,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=Iy,px=Y,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=Jt,bx=O,_x=Ze,Ex=u,Cx=ki,jx=Ns,kx=jt,Sx=ap,Nx=gx,Ox=ed,Tx=xx.setImmediate,Ix=xx.clearImmediate,Rx=xx.process,Px=xx.Dispatch,Mx=xx.Function,Lx=xx.MessageChannel,Dx=xx.String,qx=0,zx={},$x="onreadystatechange";Ex((function(){tx=xx.location}));var Ux=function(e){if(_x(zx,e)){var t=zx[e];delete zx[e],t()}},Fx=function(e){return function(){Ux(e)}},Hx=function(e){Ux(e.data)},Bx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Tx&&Ix||(Tx=function(e){Sx(arguments.length,1);var t=bx(e)?e:Mx(e),n=jx(arguments,1);return zx[++qx]=function(){Ax(t,void 0,n)},nx(qx),qx},Ix=function(e){delete zx[e]},Ox?nx=function(e){Rx.nextTick(Fx(e))}:Px&&Px.now?nx=function(e){Px.now(Fx(e))}:Lx&&!Nx?(ix=(rx=new Lx).port2,rx.port1.onmessage=Hx,nx=wx(ix.postMessage,ix)):xx.addEventListener&&bx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!Ex(Bx)?(nx=Bx,xx.addEventListener("message",Hx,!1)):nx=$x in kx("script")?function(e){Cx.appendChild(kx("script"))[$x]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(Fx(e),0)});var Vx={set:Tx,clear:Ix},Kx=function(){this.head=null,this.tail=null};Kx.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 Wx,Yx,Gx,Jx,Qx,Xx=Kx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eA=/web0s(?!.*chrome)/i.test(de),tA=s,nA=Jt,rA=T.f,iA=Vx.set,oA=Xx,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&&Wx(),e}e&&e.enter()};aA||lA||uA||!cA||!dA?!sA&&hA&&hA.resolve?((Jx=hA.resolve(void 0)).constructor=hA,Qx=nA(Jx.then,Jx),Wx=function(){Qx(yA)}):lA?Wx=function(){fA.nextTick(yA)}:(iA=nA(iA,tA),Wx=function(){iA(yA)}):(Yx=!0,Gx=dA.createTextNode(""),new cA(yA).observe(Gx,{characterData:!0}),Wx=function(){Gx.data=Yx=!Yx}),pA=function(e){mA.head||Wx(),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,_A=s,EA=AA,CA=O,jA=Kt,kA=dr,SA=ht,NA=bA,OA=wA,TA=ge,IA=EA&&EA.prototype,RA=SA("species"),PA=!1,MA=CA(_A.PromiseRejectionEvent),LA=jA("Promise",(function(){var e=kA(EA),t=e!==String(EA);if(!t&&66===TA)return!0;if(!IA.catch||!IA.finally)return!0;if(!TA||TA<51||!/native code/.test(e)){var n=new EA((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[RA]=r,!(PA=n.then((function(){}))instanceof r))return!0}return!t&&(NA||OA)&&!MA})),DA={CONSTRUCTOR:LA,REJECTION_EVENT:MA,SUBCLASSING:PA},qA={},zA=Re,$A=TypeError,UA=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw $A("Bad Promise constructor");t=e,n=r})),this.resolve=zA(t),this.reject=zA(n)};qA.f=function(e){return new UA(e)};var FA,HA,BA=Nn,VA=ed,KA=s,WA=M,YA=uo,GA=Mo,JA=lx,QA=Re,XA=O,ZA=re,ew=fx,tw=yx,nw=Vx.set,rw=gA,iw=xA,ow=Xx,aw=Qo,sw=AA,uw=qA,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=KA.TypeError,gw=KA.document,xw=KA.process,Aw=uw.f,ww=Aw,bw=!!(gw&&gw.createEvent&&KA.dispatchEvent),_w="unhandledrejection",Ew=function(e){var t;return!(!ZA(e)||!XA(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&&Ow(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=Ew(n))?WA(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),KA.dispatchEvent(r)):r={promise:t,reason:n},!dw&&(i=KA["on"+e])?i(r):e===_w&&function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},Sw=function(e){WA(nw,KA,(function(){var t,n=e.facade,r=e.value;if(Nw(e)&&(t=iw((function(){VA?xw.emit("unhandledRejection",r,n):kw(_w,n,r)})),e.rejection=VA||Nw(e)?2:1,t.error))throw t.value}))},Nw=function(e){return 1!==e.rejection&&!e.parent},Ow=function(e){WA(nw,KA,(function(){var t=e.facade;VA?xw.emit("rejectionHandled",t):kw("rejectionhandled",t,e.value)}))},Tw=function(e,t,n){return function(r){e(t,r,n)}},Iw=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,jw(e,!0))},Rw=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=Ew(t);r?rw((function(){var n={done:!1};try{WA(r,t,Tw(Rw,n,e),Tw(Iw,n,e))}catch(t){Iw(n,t,e)}})):(e.value=t,e.state=1,jw(e,!1))}catch(t){Iw({done:!1},t,e)}}};cw&&(mw=(pw=function(e){ew(this,mw),QA(e),WA(FA,this);var t=fw(this);try{e(Tw(Rw,t),Tw(Iw,t))}catch(e){Iw(t,e)}}).prototype,(FA=function(e){hw(this,{type:lw,done:!1,notified:!1,parent:!1,reactions:new ow,rejection:!1,state:0,value:void 0})}).prototype=YA(mw,"then",(function(e,t){var n=fw(this),r=Aw(tw(this,pw));return n.parent=!0,r.ok=!XA(e)||e,r.fail=XA(t)&&t,r.domain=VA?xw.domain:void 0,0==n.state?n.reactions.add(r):rw((function(){Cw(r,n)})),r.promise})),HA=function(){var e=new FA,t=fw(e);this.promise=e,this.resolve=Tw(Rw,t),this.reject=Tw(Iw,t)},uw.f=Aw=function(e){return e===pw||void 0===e?new HA(e):ww(e)}),BA({global:!0,constructor:!0,wrap:!0,forced:cw},{Promise:pw}),GA(pw,lw,!1,!0),JA(lw);var Pw=AA,Mw=DA.CONSTRUCTOR||!wf((function(e){Pw.all(e).then(void 0,(function(){}))})),Lw=M,Dw=Re,qw=qA,zw=xA,$w=zg;Nn({target:"Promise",stat:!0,forced:Mw},{all:function(e){var t=this,n=qw.f(t),r=n.resolve,i=n.reject,o=zw((function(){var n=Dw(t.resolve),o=[],a=0,s=1;$w(e,(function(e){var u=a++,l=!1;s++,Lw(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=Nn,Fw=DA.CONSTRUCTOR;AA&&AA.prototype,Uw({target:"Promise",proto:!0,forced:Fw,real:!0},{catch:function(e){return this.then(void 0,e)}});var Hw=M,Bw=Re,Vw=qA,Kw=xA,Ww=zg;Nn({target:"Promise",stat:!0,forced:Mw},{race:function(e){var t=this,n=Vw.f(t),r=n.reject,i=Kw((function(){var i=Bw(t.resolve);Ww(e,(function(e){Hw(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Yw=M,Gw=qA;Nn({target:"Promise",stat:!0,forced:DA.CONSTRUCTOR},{reject:function(e){var t=Gw.f(this);return Yw(t.reject,void 0,e),t.promise}});var Jw=nn,Qw=re,Xw=qA,Zw=function(e,t){if(Jw(e),Qw(t)&&t.constructor===e)return t;var n=Xw.f(e);return(0,n.resolve)(t),n.promise},eb=Nn,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=M,sb=Re,ub=qA,lb=xA,cb=zg;Nn({target:"Promise",stat:!0,forced:Mw},{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=M,fb=Re,hb=le,vb=qA,pb=xA,mb=zg,yb="No one promise resolved";Nn({target:"Promise",stat:!0,forced:Mw},{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=Nn,xb=AA,Ab=u,wb=le,bb=O,_b=yx,Eb=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=_b(this,wb("Promise")),n=bb(e);return this.then(n?function(n){return Eb(t,e()).then((function(){return n}))}:e,n?function(n){return Eb(t,e()).then((function(){throw n}))}:e)}});var jb=ie.Promise,kb=qA,Sb=xA;Nn({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 Nb=jb,Ob=ov;!function(e){var t=ug.default,n=Ln,r=Xl,i=Gy,o=rg,a=lg,s=Qy,u=Nb,l=Ob,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 E?t:E,a=i(o.prototype),s=new L(r||[]);return p(a,"_invoke",{value:I(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 _={};function E(){}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 N=j.prototype=E.prototype=i(k);function O(e){var t;a(t=["next","throw","return"]).call(t,(function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function T(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 I(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=R(a,n);if(s){if(s===_)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===_)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function R(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,R(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var i=b(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,_;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,_):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}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 M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(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:q}}function q(){return{value:void 0,done:!0}}return C.prototype=j,p(N,"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(N),e},f.awrap=function(e){return{__await:e}},O(T.prototype),A(T.prototype,g,(function(){return this})),f.AsyncIterator=T,f.async=function(e,t,n,r,i){void 0===i&&(i=u);var o=new T(w(e,t,n,r),i);return f.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},O(N),A(N,x,"Generator"),A(N,y,(function(){return this})),A(N,"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,L.prototype={constructor:L,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,M),!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,_):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),_},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),M(n),_}},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;M(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),_}},f}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}(ag);var Tb=(0,ag.exports)(),Ib=Tb;try{regeneratorRuntime=Tb}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Tb:Function("r","regeneratorRuntime = r")(Tb)}var Rb=i(Ib),Pb={exports:{}},Mb=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Lb=u,Db=re,qb=_,zb=Mb,$b=Object.isExtensible,Ub=Lb((function(){$b(1)}))||zb?function(e){return!!Db(e)&&(!zb||"ArrayBuffer"!=qb(e))&&(!$b||$b(e))}:$b,Fb=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hb=Nn,Bb=x,Vb=li,Kb=re,Wb=Ze,Yb=Qt.f,Gb=Vi,Jb=Yi,Qb=Ub,Xb=Fb,Zb=!1,e_=it("meta"),t_=0,n_=function(e){Yb(e,e_,{value:{objectID:"O"+t_++,weakData:{}}})},r_=Pb.exports={enable:function(){r_.enable=function(){},Zb=!0;var e=Gb.f,t=Bb([].splice),n={};n[e_]=1,e(n).length&&(Gb.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===e_){t(r,i,1);break}return r},Hb({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Jb.f}))},fastKey:function(e,t){if(!Kb(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Wb(e,e_)){if(!Qb(e))return"F";if(!t)return"E";n_(e)}return e[e_].objectID},getWeakData:function(e,t){if(!Wb(e,e_)){if(!Qb(e))return!0;if(!t)return!1;n_(e)}return e[e_].weakData},onFreeze:function(e){return Xb&&Zb&&Qb(e)&&!Wb(e,e_)&&n_(e),e}};Vb[e_]=!0;var i_=Pb.exports,o_=Nn,a_=s,s_=i_,u_=u,l_=yn,c_=zg,d_=fx,f_=O,h_=re,v_=Mo,p_=Qt.f,m_=oa.forEach,y_=I,g_=Qo.set,x_=Qo.getterFor,A_=function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=a_[e],u=s&&s.prototype,l={};if(y_&&f_(s)&&(o||u.forEach&&!u_((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){g_(d_(t,c),{type:e,collection:new s}),null!=n&&c_(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=x_(e);m_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||l_(c,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!h_(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||p_(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),s_.enable();return v_(r,e,!1,!0),l[e]=r,o_({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r},w_=uo,b_=Bi,__=co,E_=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:w_(e,r,t[r],n);return e},C_=Jt,j_=fx,k_=Y,S_=zg,N_=fl,O_=hl,T_=lx,I_=I,R_=i_.fastKey,P_=Qo.set,M_=Qo.getterFor,L_={getConstructor:function(e,t,n,r){var i=e((function(e,i){j_(e,o),P_(e,{type:t,index:b_(null),first:void 0,last:void 0,size:0}),I_||(e.size=0),k_(i)||S_(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=M_(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=R_(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),I_?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=R_(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,I_?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),I_?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=C_(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)}}),I_&&__(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=M_(t),o=M_(r);N_(e,t,(function(e,t){P_(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)?O_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,O_(void 0,!0))}),n?"entries":"values",!n,!0),T_(t)}};A_("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),L_);var D_=i(ie.Map),q_=oa.some;Nn({target:"Array",proto:!0,forced:!Zc("some")},{some:function(e){return q_(this,e,arguments.length>1?arguments[1]:void 0)}});var z_=qc("Array").some,$_=ce,U_=z_,F_=Array.prototype,H_=i((function(e){var t=e.some;return e===F_||$_(F_,e)&&t===F_.some?U_:t})),B_=qc("Array").keys,V_=sr,K_=Ze,W_=ce,Y_=B_,G_=Array.prototype,J_={DOMTokenList:!0,NodeList:!0},Q_=i((function(e){var t=e.keys;return e===G_||W_(G_,e)&&t===G_.keys||K_(J_,V_(e))?Y_:t})),X_=eo,Z_=Math.floor,eE=function(e,t){var n=e.length,r=Z_(n/2);return n<8?tE(e,t):nE(e,eE(X_(e,0,r),t),eE(X_(e,r),t),t)},tE=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},nE=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},rE=eE,iE=de.match(/firefox\/(\d+)/i),oE=!!iE&&+iE[1],aE=/MSIE|Trident/.test(de),sE=de.match(/AppleWebKit\/(\d+)\./),uE=!!sE&&+sE[1],lE=Nn,cE=x,dE=Re,fE=Je,hE=Kn,vE=vv,pE=Xr,mE=u,yE=rE,gE=Zc,xE=oE,AE=aE,wE=ge,bE=uE,_E=[],EE=cE(_E.sort),CE=cE(_E.push),jE=mE((function(){_E.sort(void 0)})),kE=mE((function(){_E.sort(null)})),SE=gE("sort"),NE=!mE((function(){if(wE)return wE<70;if(!(xE&&xE>3)){if(AE)return!0;if(bE)return bE<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}}));lE({target:"Array",proto:!0,forced:jE||!kE||!SE||!NE},{sort:function(e){void 0!==e&&dE(e);var t=fE(this);if(NE)return void 0===e?EE(t):EE(t,e);var n,r,i=[],o=hE(t);for(r=0;r<o;r++)r in t&&CE(i,t[r]);for(yE(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:pE(t)>pE(n)?1:-1}}(e)),n=hE(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)vE(t,r++);return t}});var OE=qc("Array").sort,TE=ce,IE=OE,RE=Array.prototype,PE=i((function(e){var t=e.sort;return e===RE||TE(RE,e)&&t===RE.sort?IE:t})),ME=qc("Array").values,LE=sr,DE=Ze,qE=ce,zE=ME,$E=Array.prototype,UE={DOMTokenList:!0,NodeList:!0},FE=i((function(e){var t=e.values;return e===$E||qE($E,e)&&t===$E.values||DE(UE,LE(e))?zE:t})),HE=i(mc),BE=qc("Array").entries,VE=sr,KE=Ze,WE=ce,YE=BE,GE=Array.prototype,JE={DOMTokenList:!0,NodeList:!0},QE=i((function(e){var t=e.entries;return e===GE||WE(GE,e)&&t===GE.entries||KE(JE,VE(e))?YE:t}));let XE;const ZE=new Uint8Array(16);function eC(){if(!XE&&(XE="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!XE))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return XE(ZE)}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),Ec(this,"delay",void 0),Ec(this,"max",void 0),Ec(this,"_queue",[]),Ec(this,"_timeout",null),Ec(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return _c(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=_p((function(){e.flush()}),this.delay))}},{key:"flush",value:function(){var e,t;Jh(e=Iv(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),Ec(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ec(this,"subscribe",e.prototype.on),Ec(this,"unsubscribe",e.prototype.off)}return _c(e,[{key:"_trigger",value:function(e,t,n){var r,i;if("*"===e)throw new Error("Cannot trigger event *");Jh(r=Rh(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}();A_("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),L_);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==Sh&&Ef(e)||e["@@iterator"];if(!n){if(Lh(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?_f(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=HE;var fC=function(){function e(n){t(this,e),Ec(this,"_pairs",void 0),this._pairs=n}return _c(e,[{key:sC,value:Rb.mark((function e(){var t,n,r,i,o;return Rb.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:Rb.mark((function e(){var t,n,r,i,o;return Rb.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:Rb.mark((function e(){var t,n,r,i;return Rb.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:Rb.mark((function e(){var t,n,r,i;return Rb.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 D_(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(Ec({},HE,Rb.mark((function e(){var r,i,o,a,s;return Rb.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(Ec({},HE,Rb.mark((function e(){var r,i,o,a,s;return Rb.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(Ec({},HE,(function(){var e;return lC(PE(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=zh(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?Jh(n=hC(Object(i),!0)).call(n,(function(t){Ec(e,t,i[t])})):Vf?Xf(e,Vf(i)):Jh(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&&Ef(e)||e["@@iterator"];if(!n){if(Lh(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?_f(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||!Wy)return!1;if(Wy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Wy(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}(r);function r(e,i){var o;return t(this,r),Ec(Yy(o=n.call(this)),"flush",void 0),Ec(Yy(o),"length",void 0),Ec(Yy(o),"_options",void 0),Ec(Yy(o),"_data",void 0),Ec(Yy(o),"_idProp",void 0),Ec(Yy(o),"_queue",null),e&&!Lh(e)&&(i=e,e=[]),o._options=i||{},o._data=new D_,o.length=0,o._idProp=o._options.fieldId||"id",e&&e.length&&o.add(e),o.setOptions(i),o}return _c(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(Lh(e)){var o=gd(e).call(e,(function(e){return e[r._idProp]}));if(H_(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=Wv({},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(Lh(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 Rh(r).call(r,i)}},{key:"updateOnly",value:function(e,t){var n,r=this;Lh(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 _y.apply(void 0,Rh(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):Lh(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(Q_(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 _=u[w];A[_[this._idProp]]=_}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(Q_(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 _=0,E=i.length;_<E;_++){var C=i[_],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(Q_(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(Q_(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=Lh(t)?t:zh(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;PE(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");PE(e).call(e,t)}}},{key:"remove",value:function(e,t){for(var n=[],r=[],i=Lh(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(Q_(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(FE(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(FE(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(Q_(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(Ec({},HE,Rb.mark((function n(){var r,i,o,a;return Rb.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(Ec({},HE,Bc(n=QE(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||!Wy)return!1;if(Wy.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wy(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=og(e);if(t){var i=og(this).constructor;n=Wy(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),Ec(Yy(a=n.call(this)),"length",0),Ec(Yy(a),"_listener",void 0),Ec(Yy(a),"_data",void 0),Ec(Yy(a),"_ids",new uC),Ec(Yy(a),"_options",void 0),a._options=i||{},a._listener=Bc(o=a._onEvent).call(o,Yy(a)),a.setData(e),a}return _c(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)||Lh(e)?(r=e,n=t):n=e;var i=Wv({},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,Jh(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||Ec({},HE,Bc(t=Q_(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&&Ef(e)||e["@@iterator"];if(!n){if(Lh(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?_f(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}}}}(Mh(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 Jh(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 Md(e)},e.isDataSetLike=AC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Jh(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"})}))}},28344:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});const r=n(77810).createContext(void 0);r.displayName="TabContext"},28997:(e,t,n)=>{"use strict";n.d(t,{y1:()=>ge});var r=n(13322),i=n(9736),o=n(77810),a=n(76872),s=n(1335),u=n(45760),l=n(3962),c=n(88150),d=n(7584),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=n(92611);const b=JSON.parse('{"action_add-file":"Add file","alert_file-load-error":"Failed to load file"}'),_=JSON.parse('{"action_add-file":"Добавить файл","alert_file-load-error":"Ошибка загрузки файла"}'),E=(0,w.Kc)("yt:query-tracker.add-file-button",{en:b,ru:_});var C=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)}}(),j=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)(C(i),{toasterName:"add_query_file"+i.name,skipSuccessToast:!0,errorTitle:E("alert_file-load-error")});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}),E("action_add-file")]}),(0,v.jsx)("input",{ref:d,type:"file",style:{display:"none"},onChange:f})]})},k=n(69764),S=n(30469),N=n(82662),O=(0,a.A)("file-item-form"),T=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:O(null,l),children:[(0,v.jsxs)("div",{className:O(y?"link-form":"form"),children:[(0,v.jsx)(k.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)(k.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:O("actions"),children:[(0,v.jsx)(s.$,{view:"normal",onClick:g,size:"l",children:(0,v.jsx)(u.I,{data:N.A,size:16})}),(0,v.jsx)(s.$,{view:"flat",onClick:r,size:"l",children:(0,v.jsx)(u.I,{data:S.A,size:16})})]})]})};const I=JSON.parse('{"action_new-file":"New file","action_add-url":"Add URL"}'),R=JSON.parse('{"action_new-file":"Новый файл","action_add-url":"Добавить URL"}'),P=(0,w.Kc)("yt:query-tracker.actions-with-add-form",{en:I,ru:R});var M=(0,a.A)("files-add-form"),L=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:M(),children:[n&&(0,v.jsx)(T,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:M("buttons"),children:[(0,v.jsx)(j,{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}),P("action_new-file")]}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:f,disabled:n,children:[(0,v.jsx)(u.I,{data:p,size:16}),P("action_add-url")]})]})]})},D=n(17581),q=n(38828),z=n(13051),$=n(2371),U=n(1435),F=n(57660);const H=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 B=n(76091);const V=JSON.parse('{"action_edit-file":"Edit file","action_restore":"Restore"}'),K=JSON.parse('{"action_edit-file":"Редактировать файл","action_restore":"Восстановить"}'),W=(0,w.Kc)("yt:query-tracker.deleted-file-item",{en:V,ru:K});var Y=(0,a.A)("deleted-file-item"),G=function(e){var t=e.file,n=e.onEditFile,r=e.onRestore,i="raw_inline_data"===t.type;return(0,v.jsxs)("div",{className:Y(),children:[(0,v.jsxs)("div",{className:Y("info"),children:[(0,v.jsx)(u.I,{data:i?F.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:t.name})]}),(0,v.jsxs)("div",{className:Y("actions"),children:[i&&(0,v.jsx)(U.m,{content:W("action_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:B.A,size:16})})}),(0,v.jsx)(U.m,{content:W("action_restore"),placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){r(t.id)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:H,size:16})})})]})]})},J=n(79988),Q=n(27117);const X=JSON.parse('{"action_edit-file":"Edit file","action_edit-file-name":"Edit file name","action_remove":"Remove"}'),Z=JSON.parse('{"action_edit-file":"Редактировать файл","action_edit-file-name":"Редактировать имя файла","action_remove":"Удалить"}'),ee=(0,w.Kc)("yt:query-tracker.file-item",{en:X,ru:Z});var te=(0,a.A)("file-item"),ne=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:te({edit:!0}),children:(0,v.jsx)(T,{file:t,onSave:function(e){r(e),m(!1)},onCancel:w,validator:n})}):(0,v.jsxs)("div",{className:te(),children:[(0,v.jsxs)("div",{className:te("info"),children:[(0,v.jsx)(u.I,{className:te("icon"),data:A?F.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:te("actions"),children:[A&&(0,v.jsx)(U.m,{content:ee("action_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:B.A,size:16})})}),(0,v.jsx)(U.m,{content:ee("action_edit-file-name"),placement:"top",children:(0,v.jsx)(s.$,{onClick:w,view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:Q.A,size:16})})}),(0,v.jsx)(U.m,{content:ee("action_remove"),placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){c(y)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:J.A,size:16})})})]})]})};const re=JSON.parse('{"tab_current":"Current","tab_deleted":"Deleted"}'),ie=JSON.parse('{"tab_current":"Текущие","tab_deleted":"Удаленные"}'),oe=(0,w.Kc)("yt:query-tracker.files-tabs",{en:re,ru:ie});var ae=(0,a.A)("files-tabs"),se=function(e){return e.Current="current",e.Deleted="deleted",e}(se||{}),ue=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)(se.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)(ne,{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)(G,{file:e,onRestore:l,onEditFile:c},e.id)}))}),[n,c,l]);return(0,v.jsx)("div",{className:ae(null,d),children:(0,v.jsxs)(D.f,{value:p,children:[(0,v.jsxs)(q.w,{onUpdate:m,children:[(0,v.jsx)(z.o,{value:se.Current,counter:t.length,disabled:!t.length,children:oe("tab_current")}),(0,v.jsx)(z.o,{value:se.Deleted,counter:r,disabled:!r,children:oe("tab_deleted")})]}),(0,v.jsxs)("div",{className:ae("list"),children:[(0,v.jsx)($.K,{value:se.Current,children:y}),(0,v.jsx)($.K,{value:se.Deleted,children:g})]})]})})},le=n(14371),ce=n(87575),de=n(24686),fe=n(61033),he=n(52142);const ve=JSON.parse('{"title_attachments":"Attachments"}'),pe=JSON.parse('{"title_attachments":"Вложения"}'),me=(0,w.Kc)("yt:query-tracker.files-button",{en:ve,ru:pe});var ye=(0,a.A)("query-files-popup"),ge=function(e){var t=e.popupClassName,n=(0,le.w)(),a=(0,le.d)(de.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],_=(0,o.useState)(!1),E=(0,i.A)(_,2),C=E[0],j=E[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,fe.Ro)(e))}),[n]),O=(0,o.useCallback)((function(e){n((0,fe.ek)(e))}),[n]),T=(0,o.useCallback)((function(e){n((0,fe.pk)(e))}),[n]),I=(0,o.useCallback)((function(e){n((0,he.Bn)({files:[].concat((0,r.A)(h),[e])})),n((0,ce.M3)({isOpen:!1}))}),[n,h]),R=(0,o.useCallback)((function(e){n((0,ce.M3)(e))}),[n]),P=(0,o.useCallback)((function(e,t){n((0,ce.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:ye(null,t),children:[(0,v.jsx)("div",{className:ye("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:me("title_attachments")})}),g&&(0,v.jsx)(ue,{className:ye("body"),files:h,deletedFiles:p,deletedFilesCounter:p.length,validator:M,onDeleteFile:O,onChangeFile:N,onRestoreFile:T,onEditFile:P}),(0,v.jsx)(L,{validator:M,addFormOpen:m,addFormType:y,onAddFile:I,onFormToggle:R})]})]})}},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(57976),d=n(14371),f=n(64922),h=(0,r.createContext)(new l((function(){return Promise.resolve([])}))),v=function(e){var t=e.children,n=(0,d.w)(),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})}},38828:(e,t,n)=>{"use strict";n.d(t,{w:()=>p});var r=n(64922),i=n(77810),o=n(49533),a=n(48250),s=n(28344),u=n(43904),l=n(73314),c=n(91018);const d=e=>[...e.closest('[role="tablist"]')?.querySelectorAll(`[${c.kq}]`)??[]],f=e=>Boolean(e.getAttribute("aria-disabled")),h=(e,t,n)=>{const r=e.target,i=d(r),o=i.indexOf(r);let a=1;for(;a<i.length;){const e=o+a*(n?-1:1)*(t?-1:1),r=i.at(e%i.length);if(r&&!f(r))return r.focus(),r;a++}return r},v=(e,t)=>{const n=e.target,r=d(n),i=t?0:r.length-1;let o=r.indexOf(n),a=n;for(;o!==i;){o+=t?-1:1;const e=r.at(o);e&&!f(e)&&(a=e)}return a.focus(),a};const p=i.forwardRef(((e,t)=>{const n=i.useContext(s.H),d=(0,o.u)(),f=function(e){const t=i.useContext(s.H),n="rtl"===(0,l.j)(),r=n=>{const r=(e=>e.getAttribute(c.kq))(n);e.activateOnFocus&&r&&(e.onUpdate?.(r),t?.onUpdate?.(r))},{value:o,onUpdate:a,size:d,activateOnFocus:f,qa:p,...m}=e;return{...m,role:"tablist","aria-orientation":"horizontal",onKeyDown:t=>{switch(t.code){case u.D.ARROW_LEFT:t.preventDefault(),r(h(t,!0,n));break;case u.D.ARROW_RIGHT:t.preventDefault(),r(h(t,!1,n));break;case u.D.HOME:t.preventDefault(),r(v(t,!0));break;case u.D.END:t.preventDefault(),r(v(t,!1))}e.onKeyDown?.(t)},className:(0,c.Gs)({size:e.size??"m"},e.className),"data-qa":e.qa}}(e),[p,m]=i.useState(!1),{focusWithinProps:y}=(0,a.R)({onFocusWithinChange:m}),g=i.useMemo((()=>({value:n?.value??e.value,onUpdate:n?.onUpdate??e.onUpdate,id:n?.id??d,isProvider:n?.isProvider??!1,isFocused:p})),[n,e.value,e.onUpdate,d,p]);return(0,r.jsx)(s.H.Provider,{value:g,children:(0,r.jsx)("div",{ref:t,...f,...y,children:e.children})})}));p.displayName="TabList"},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"})}))}},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")})]})}},51324:(e,t,n)=>{"use strict";n.d(t,{g:()=>$});var r=n(40319),i=n(9736),o=n(1335),a=n(45760),s=n(3962),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(1435),v=n(27117),p=n(79988),m=n(69764),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]),_=(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:_,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:_,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=n(92611);const b=JSON.parse('{"action_edit":"Edit","action_remove":"Remove"}'),_=JSON.parse('{"action_edit":"Редактировать","action_remove":"Удалить"}'),E=(0,w.Kc)("yt:query-tracker.settings-item",{en:b,ru:_});var C=(0,u.A)("settings-item"),j=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),w=x[0],b=x[1],_=function(){b((function(e){return!e}))};return w?(0,d.jsx)("div",{className:C({edit:!0}),children:(0,d.jsx)(A,{name:t,value:n,onSave:function(e){y(e),b(!1)},onCancel:_,validator:m,config:r})}):(0,d.jsxs)("div",{className:C(),children:[(0,d.jsxs)("div",{className:C("info"),children:[(0,d.jsx)(a.I,{className:C("icon"),data:c.A,size:16}),(0,d.jsx)(s.E,{variant:"subheader-2",ellipsis:!0,children:t}),(0,d.jsx)(s.E,{className:C("value"),ellipsis:!0,children:n})]}),(0,d.jsxs)("div",{className:C("actions"),children:[r&&(0,d.jsx)(h.m,{content:E("action_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:E("action_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})})})]})]})},k=n(16538);const S=JSON.parse('{"action_add-setting":"Add setting"}'),N=JSON.parse('{"action_add-setting":"Добавить настройку"}'),O=(0,w.Kc)("yt:query-tracker.settings-add-form",{en:S,ru:N});var T=(0,u.A)("settings-add-form"),I=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:T(),children:[u&&(0,d.jsx)(A,{name:"",value:"",onCancel:f,onSave:h,validator:t,className:T("add-form")}),(0,d.jsxs)(o.$,{className:T("button"),onClick:f,disabled:u,size:"l",children:[(0,d.jsx)(a.I,{data:k.A,size:16}),O("action_add-setting")]})]})},R=n(59241),P=n(7584);const M=JSON.parse('{"title_settings":"Settings"}'),L=JSON.parse('{"title_settings":"Настройки"}'),D=(0,w.Kc)("yt:query-tracker.settings-button",{en:M,ru:L});var q=["cluster","clique"],z=(0,u.A)("query-settings-popup"),$=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]),b=(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]),E=(0,l.useCallback)((function(e,n,r){var i=(0,P.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=P.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)(R.x,{anchorRef:g,open:m,className:z(null,u),onClose:x,children:[(0,d.jsxs)("div",{className:z("header"),children:[(0,d.jsxs)(s.E,{variant:"subheader-3",children:[D("title_settings")," "]}),A>0&&(0,d.jsx)(s.E,{variant:"subheader-3",color:"secondary",children:A})]}),(0,d.jsx)("div",{className:z("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)(j,{name:n,value:r,canEdit:q.includes(n)?void 0:{name:!0,value:!0},canRemove:"cluster"!==n,validator:E,onDelete:w,onChange:_},n)}))}),(0,d.jsx)(I,{onAdd:b,validator:E})]})]})}},51404:(e,t,n)=>{"use strict";n.d(t,{BF:()=>y,D4:()=>p,G_:()=>c,RP:()=>_,V3:()=>m,X3:()=>E,Ye:()=>l,_o:()=>A,a$:()=>C,bG:()=>v,eA:()=>b,f:()=>d,gj:()=>f,id:()=>g,lb:()=>x,ly:()=>u,nv:()=>w,xS:()=>h});var r=n(9736),i=n(41655),o=n.n(i),a=n(18472),s=n(31229),u=function(){return Boolean(s.mH.aiChatConfig)},l=function(){var e;return(null===(e=s.mH.aiChatConfig)||void 0===e?void 0:e.model)||""},c=function(e){return e.aiChat.mode},d=function(e){return e.aiChat.currentQuestion},f=function(e){return e.aiChat.currentAnswer},h=function(e){return e.aiChat.loading},v=function(e){return e.aiChat.sending},p=function(e){return e.aiChat.isOpen},m=function(e){return e.aiChat.conversationId},y=function(e){return e.aiChat.conversations},g=function(e){return e.aiChat.conversation},x=function(e){return e.aiChat.error},A=function(e){return e.aiChat.attachedFiles},w=function(e){return e.aiChat.conversations.loading},b=function(e){return e.aiChat.conversations.hasMore},_=(0,a.Mz)([c,g,f],(function(e,t,n){var r=t.items;return"chat"===e&&(r.length>0||Boolean(n))})),E=(0,a.Mz)([c],(function(e){return"history"===e})),C=(0,a.Mz)([function(e){return e.aiChat.conversations.items}],(function(e){var t=new Map;return e.forEach((function(e){var n=o()(1e3*e.created_at).startOf("day").format("YYYY-MM-DD");t.has(n)||t.set(n,[]),t.get(n).push(e)})),Array.from(t.entries()).map((function(e){var t=(0,r.A)(e,2);return{date:t[0],items:t[1]}}))}))},58178:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ke});var r=n(40319),i=n(9736),o=n(77810),a=n(54473),s=n(76872),u=n(3962),l=n(1335),c=n(98115),d=n(92611);const f=JSON.parse('{"action_show-more-items":"Show {{count}} more items","context_empty-list":"Empty list"}'),h=JSON.parse('{"action_show-more-items":"Показать еще {{count}} элементов","context_empty-list":"Пустой список"}'),v=(0,d.Kc)("yt:query-tracker.node-details-info",{en:f,ru:h});var p=n(64922),m=(0,s.A)("node-details-info");function y(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,p.jsxs)("div",{className:m(),children:[t&&(0,p.jsx)(c.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,p.jsx)("div",{className:m("streams"),children:Object.keys(t).map((function(e){return(0,p.jsx)(g,{name:e,data:t[e]},e)}))})}),(0,p.jsx)(A,{data:n,title:"InputColumns"}),(0,p.jsx)(A,{data:r,title:"InputKeyFilterColumns"})]})}function g(e){var t=e.name,n=e.data;return(0,p.jsxs)("div",{className:m("entry"),children:[(0,p.jsx)("div",{className:m("entry-name"),children:t}),Array.isArray(n)&&(0,p.jsx)("div",{className:m("entry-items"),children:n.map((function(e,t){return(0,p.jsx)(x,(0,r.A)({},e),t)}))})]})}function x(e){var t=e.Name,n=e.Children;return(0,p.jsxs)("div",{className:m("item"),children:[(0,p.jsx)(u.E,{className:m("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,p.jsx)("div",{className:m("item-children"),children:n.map((function(e,t){return(0,p.jsx)("div",{className:m("item-group"),children:e.map((function(e,t){return(0,p.jsx)(x,(0,r.A)({},e),t)}))},t)}))})]})}function A(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,p.jsx)(o.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,p.jsx)(c.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,p.jsx)(w,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,p.jsx)(c.A,{name:r,size:"ns",collapsed:!1,children:(0,p.jsx)(w,{items:t,limit:20})})):null}function w(e){var t,n=e.items,r=e.limit,a=e.className,s=o.useState(!1),c=(0,i.A)(s,2),d=c[0],f=c[1],h=r&&!d?Math.min(n.length,r):n.length,y=n.length-h,g=0===h,x=y>0?n.slice(0,h):n;return(0,p.jsxs)("div",{className:m("columns",a),children:[x.map((function(e,t){return(0,p.jsx)("div",{className:m("columns-column"),children:(0,p.jsx)(u.E,{color:"complementary",children:e})},t)})),Boolean(y)&&(0,p.jsx)(l.$,{className:m("columns-expand"),onClick:function(e){e.stopPropagation(),f(!0)},children:(t=y,v("action_show-more-items",{count:String(t)}))}),g&&(0,p.jsx)("div",{className:m("columns-empty"),children:v("context_empty-list")})]})}var b=n(66944);const _=JSON.parse('{"field_status":"Status","field_quantity":"Quantity","value_pending":"Pending","value_running":"Running","value_completed":"Completed","value_failed":"Failed","value_aborted":"Aborted","value_total":"Total"}'),E=JSON.parse('{"field_status":"Статус","field_quantity":"Количество","value_pending":"Ожидание","value_running":"Выполняется","value_completed":"Завершен","value_failed":"Ошибка","value_aborted":"Прерван","value_total":"Всего"}'),C=(0,d.Kc)("yt:query-tracker.node-jobs",{en:_,ru:E});var j=(0,s.A)("node-jobs"),k=function(){return[{name:"status",header:C("field_status"),sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,p.jsxs)("div",{className:j("item"),children:[(0,p.jsx)("div",{className:j("item-color",{status:t.status.toLowerCase()})}),(0,p.jsx)(u.E,{className:j("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:C("field_quantity"),align:b.Ay.RIGHT,sortable:!1}]};function S(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,d=[];return d.push({status:C("value_pending"),count:c-n-i-a-u}),d.push({status:C("value_running"),count:n}),d.push({status:C("value_completed"),count:i}),d.push({status:C("value_failed"),count:a}),d.push({status:C("value_aborted"),count:u}),(0,p.jsx)("div",{className:j(),children:(0,p.jsx)(b.Ay,{theme:"yandex-cloud",columns:k(),data:d,footerData:[{status:C("value_total"),count:c}],settings:{displayIndices:!1}})})}var N=n(45760),O=n(18801),T=n(13322),I=n(71291),R=n.n(I),P=n(31470),M=n.n(P),L=n(67981),D=n.n(L),q="StructType",z="ListType",$="StreamType",U="TupleType",F="DictType",H="DataType",B="VariantType",V="OptionalType",K="TaggedType",W="VoidType",Y="NullType",G="EmptyDictType",J="EmptyListType",Q=["Void","Yson","Json","Null"],X=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],Z=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],ee=["String","Utf8","Json"];function te(e){return X.indexOf(e)>=0}function ne(e){return Z.indexOf(e)>=0}function re(e){return ee.indexOf(e)>=0}function ie(e){return Array.isArray(e)&&e[0]===z&&Array.isArray(e[1])}function oe(e){return Array.isArray(e)&&e[0]===U&&Array.isArray(e[1])}function ae(e){return Array.isArray(e)&&e[0]===q&&Array.isArray(e[1])}function se(e){for(var t=e;t[0]===V;)t=t[1];if(t[0]===q){var n=R()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===z&&n.Bins[1][0]===q&&M()(D().apply(void 0,(0,T.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function ue(e){return"Struct"===e.name}function le(e){return"Variant"===e.name}function ce(e){return Boolean(e.complex)}function de(e){switch(e[0]){case H:return{name:e[1],simple:(n=e[1],Q.indexOf(n)<0),numeric:te(e[1]),dateTime:ne(e[1]),string:re(e[1]),params:e.slice(2)};case V:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(de(e[1]));case K:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(de(e[2]),e[1]);case F:return e[2][0]===W?{name:"Set",complex:!0,type:de(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(de)};case z:return{name:"List",complex:!0,type:de(e[1])};case G:return{name:"EmptyDict"};case J:return{name:"EmptyList"};case $:return{name:"Stream",complex:!0,type:de(e[1])};case U:return{name:"Tuple",complex:!0,type:e[1].map(de)};case q:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:de(e[1])}}))};case B:var t=function(e){var t=de(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 W:return{name:"Void"};case Y:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var fe=["level","defaultExpanded"],he=(0,s.A)("data-type"),ve=function(e){var t=e.entry,n=e.level;return(0,p.jsxs)(o.Fragment,{children:[(0,p.jsx)("span",{className:he("struct-key"),children:t.key},"key")," : ",(0,p.jsx)(pe,(0,r.A)({level:n},t.type),"type")]})};function pe(e){var t=e.level,n=void 0===t?0:t,a=e.defaultExpanded,s=(0,O.A)(e,fe),u=o.useState(void 0===a?n<2:a),l=(0,i.A)(u,2),c=l[0],d=l[1],f=s.optional,h=s.optionalLevel,v=s.name,m=s.tagged,y=s.tags,g=s.params,x=s.complex;return(0,p.jsxs)(o.Fragment,{children:[(0,p.jsxs)("span",{className:he({optional:f,complex:x,"optional-multilevel":(null!=h?h:0)>0}),"data-optional":h?"optional × ".concat(h):void 0,onClick:function(){return d((function(e){return!e}))},children:[v,Array.isArray(g)&&g.length>0&&"(".concat(g.join(", "),")"),m&&y?y.map((function(e){return(0,p.jsx)("span",{className:he("tag"),children:e},e)})):null]},"name"),ce(s)?(0,p.jsxs)("div",{className:he("subtype",{expanded:c}),children:[(0,p.jsx)("span",{className:he("ellipsis"),onClick:function(){return d((function(e){return!e}))}}),c&&(0,p.jsx)("div",{className:he("content",{expanded:c}),children:ue(s)||le(s)?s.struct.map((function(e,t){return(0,p.jsx)(ve,{level:n+1,entry:e},t)})):(Array.isArray(s.type)?s.type:[s.type]).map((function(e,t){return(0,p.jsx)(pe,(0,r.A)({level:n+1},e),t)}))})]},"subtype"):(0,p.jsx)("br",{},"separator")]})}const me=function(e){return(0,p.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,p.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 ye=n(10559),ge=n(88150),xe=n(56796),Ae=(0,s.A)("yql-schema-table"),we=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,p.jsxs)(xe.S,{color:"primary",className:Ae("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,p.jsx)(N.I,{className:Ae("sort-icon"),data:t.sort.ascending?me:ye.A,size:16}),(0,p.jsx)("span",{className:Ae("name"),title:t.name,children:t.name}),(0,p.jsx)(N.I,{className:Ae("insert-icon"),data:ge.A,size:16})]})}return(0,p.jsxs)("span",{className:Ae("item"),children:[t.sort&&(0,p.jsx)(N.I,{className:Ae("sort-icon"),data:t.sort.ascending?me:ye.A,size:16}),(0,p.jsx)("span",{className:Ae("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,p.jsx)(pe,(0,r.A)({},t.type))}}];function be(e){var t=e.className,n=e.schemaFields;return(0,p.jsx)("div",{className:Ae(null,t),children:(0,p.jsx)(b.Ay,{theme:"yandex-cloud",columns:we,data:n,startIndex:1})})}var _e=["key"],Ee=function(e){return Boolean(e.type.simple)},Ce=function(e){return Boolean(e.type.simple)};function je(e){if(function(e){return!!oe(e)&&e[1].length>0&&e[1].every((function(e){return se(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!ie(e)&&se(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!ae(e)&&e[1].length>0&&e[1].every((function(e){return se(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===B&&(ae(n[1])||oe(n[1]))){var t=e[1];if(oe(t))return[B,[t[0],t[1].map((function(e){return je(e)}))]];if(ae(t))return[B,[t[0],t[1].map((function(e){return se(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return se(e)?["HistogramType",e]:e}function ke(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=de(e),i=function(e){return"List"===e.name}(n)?n.type:n,o=e;return ie(o)&&(o=o[1]),ae(o)&&(o=o[1]),function(e){return Array.isArray(e)&&e[0]===V&&Array.isArray(e[1])}(o)&&(o=o[1]),ue(i)&&Array.isArray(o)?{optional:Boolean(i.optional),resultType:ie(e)?"table":"row",scheme:null!==(t=i.struct.map((function(e,t){var n=e.key,i=(0,O.A)(e,_e);return(0,r.A)((0,r.A)({},i),{},{index:t,name:"".concat(n),downloadable:Ee(e),sortable:Ce(e)})})))&&void 0!==t?t:[],columns:o.map((function(e){return je(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}}const Se=JSON.parse('{"value_inputs":"Inputs","value_outputs":"Outputs"}'),Ne=JSON.parse('{"value_inputs":"Входы","value_outputs":"Выходы"}'),Oe=(0,d.Kc)("yt:query-tracker.node-schemas",{en:Se,ru:Ne});var Te=(0,s.A)("yql-node-schemas");function Ie(e){var t=e.className,n=e.schemas;return(0,p.jsxs)("div",{className:Te(null,t),children:[n.inputs.length>0&&(0,p.jsx)(Re,{title:Oe("value_inputs"),schemas:n.inputs}),n.outputs.length>0&&(0,p.jsx)(Re,{title:Oe("value_outputs"),schemas:n.outputs})]})}function Re(e){var t=e.title,n=e.schemas;return(0,p.jsx)(c.A,{className:Te("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,p.jsx)("div",{children:n.map((function(e){var t=e.name,r=ke(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,p.jsx)(c.A,{className:Te("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,p.jsx)("div",{children:(0,p.jsx)(be,{schemaFields:i})},t)},t):null}))})})}var Pe=n(51238);const Me=JSON.parse('{"field_stage":"Stage","field_duration":"Duration","value_total":"Total"}'),Le=JSON.parse('{"field_stage":"Этап","field_duration":"Длительность","value_total":"Всего"}'),De=(0,d.Kc)("yt:query-tracker.node-stages",{en:Me,ru:Le});var qe=(0,s.A)("node-stages"),ze=function(){return[{name:"stage",header:De("field_stage"),sortable:!1},{name:"duration",header:De("field_duration"),align:b.Ay.RIGHT,sortable:!1,width:115}]};function $e(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,Pe.p0)(u,h)}),s=f,u=h}var v=(0,Pe.sj)(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:(0,Pe.p0)(u,v)}),r.push({stage:De("value_total"),duration:(0,Pe.p0)(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,p.jsx)("div",{className:qe(),children:(0,p.jsx)(b.Ay,{theme:"yandex-cloud",rowClassName:Ue,columns:ze(),startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Ue(e,t,n,r){return qe(r?"header":n?"footer":"row")}const Fe=JSON.parse('{"value_stages":"Stages","value_details":"Details","value_jobs":"Jobs","value_schemas":"Schemas"}'),He=JSON.parse('{"value_stages":"Этапы","value_details":"Детали","value_jobs":"Задания","value_schemas":"Схемы"}'),Be=(0,d.Kc)("yt:query-tracker.operation-node-info",{en:Fe,ru:He});var Ve=(0,s.A)("operation-node-info");function Ke(e){var t,n=e.progress,s=e.details,u=e.schemas,l=e.containerRef,c=e.radioWidth,d=e.className,f=[];(0,Pe.eg)(n)&&f.push({value:"stages",content:Be("value_stages")}),(0,Pe.b_)(s)&&f.push({value:"details",content:Be("value_details")}),(0,Pe.pv)(n)&&f.push({value:"jobs",content:Be("value_jobs")}),u&&f.push({value:"schemas",content:Be("value_schemas")});var h=o.useState(null===(t=f[0])||void 0===t?void 0:t.value),v=(0,i.A)(h,2),m=v[0],g=v[1];return(0,p.jsxs)("div",{ref:l,className:Ve(null,d),children:[f.length>1&&(0,p.jsx)(a.x,{className:Ve("selector"),value:m,options:f,onUpdate:g,width:c}),"stages"===m&&(0,p.jsx)($e,(0,r.A)({},n)),"details"===m&&(0,p.jsx)(y,(0,r.A)({},s)),"jobs"===m&&(0,p.jsx)(S,(0,r.A)({},n)),"schemas"===m&&u&&(0,p.jsx)(Ie,{className:Ve("schema"),schemas:u})]})}},59241:(e,t,n)=>{"use strict";n.d(t,{x:()=>c}),n(77810);var r=n(76872),i=n(21211),o=n(1335),a=n(45760),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,f=e.placement,h=void 0===f?"bottom":f;return(0,u.jsxs)(i.z,{anchorElement:t.current,open:n,className:l(null,d),onOpenChange:function(e,t,n){e||"outside-press"!==n||r()},placement:h,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=n(91984),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.X.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(27859),a=n(29970),s=n(48971),u=n(88169),l=n(59028),c=n(91984),d=function(){return function(e,t){var n=t(),r=(0,a.C3)(n).stage;return e({type:u.O.REQUEST}),o.$S.getQueryTrackerInfo(o.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:u.O.SUCCESS,data:{data:t}}),t})).catch((function(t){404!==(null==t?void 0:t.status)&&c.X.add({name:"aco",theme:"danger",title:"Failed to load ACO",content:null==t?void 0:t.message,actions:[{label:" Details",onClick:function(){return(0,s.eW)(t)}}]}),e({type:u.O.FAILURE})}))}};function f(e){return function(){var t=(0,i.A)((0,r.A)().mark((function t(n,i){var o,s;return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i(),s=(0,a.cm)(o),t.next=4,n((0,l.rw)("qt-stage::".concat(s,"::queryTracker::defaultACO"),e));case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}},64945:(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 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"})}))}},66439:(e,t,n)=>{"use strict";n.d(t,{f:()=>x,J:()=>g});var r=n(9736),i=n(77810),o=n(14371),a=n(1335),s=n(45760),u=n(11960),l=n(29970),c=n(1701),d=n(19314),f=n(52797),h=n(92611);const v=JSON.parse('{"title_new-query":"New query","confirm_new-query":"All the changes will be lost. Are you sure you want to reset query?","action_new":"New"}'),p=JSON.parse('{"title_new-query":"Новый запрос","confirm_new-query":"Все изменения будут потеряны. Вы уверены, что хотите сбросить запрос?","action_new":"Новый"}'),m=(0,h.Kc)("yt:query-tracker.new-query",{en:v,ru:p});var y=n(64922),g=function(e){return(0,y.jsx)(u.A,{title:m("title_new-query"),content:m("confirm_new-query"),onCancel:e.cancel,onConfirm:e.confirm,onOutsideClick:e.cancel,visible:e.visible})},x=function(e){var t=e.onClick,n=e.hideText,u=(0,o.d)(l.Py),h=(0,i.useState)(!1),v=(0,r.A)(h,2),p=v[0],x=v[1],A=(0,o.d)(f.dB);return(0,y.jsxs)(i.Fragment,{children:[(0,y.jsxs)(a.$,{qa:"new-query-btn",view:"action",size:"l",title:m("title_new-query"),href:"/".concat(A,"/").concat(d.YW.QUERIES),onClick:function(e){e.preventDefault(),u?x(!0):t()},children:[(0,y.jsx)(s.I,{data:c.A,size:16}),!n&&m("action_new")]}),(0,y.jsx)(g,{confirm:function(){t(),x(!1)},cancel:function(){x(!1)},visible:p})]})}},73004:(e,t,n)=>{"use strict";n.d(t,{y:()=>h});var r=n(40319),i=n(18801),o=(n(77810),n(73688)),a=n(69764),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"})}))}},76492:(e,t,n)=>{"use strict";n.d(t,{u:()=>g});var r=n(9736),i=n(77810),o=n(14371),a=n(29970),s=n(52142),u=n(11960),l=n(87604),c=n(73688),d=n(76872),f=n(92611);const h=JSON.parse('{"title_switching-engine":"Switching engine","confirm_switching-engine":"All the changes will be lost. Are you sure you want to switch the engine?"}'),v=JSON.parse('{"title_switching-engine":"Переключение движка","confirm_switching-engine":"Все изменения будут потеряны. Вы уверены, что хотите переключить движок?"}'),p=(0,f.Kc)("yt:query-tracker.query-engine-selector",{en:h,ru:v});var m=n(64922),y=(0,d.A)("yt-query-engine-selector"),g=function(e){var t=e.isDesktop,n=e.className,d=e.onChange,f=(0,o.w)(),h=(0,o.d)(a.ln),v=(0,o.d)(a.u8),g=(0,o.d)(a.Py),x=(0,o.d)(a.xy),A=(0,o.d)(a.HF),w=(0,o.d)(a.Jg),b=w.cluster,_=w.path,E=Boolean((g||x)&&b&&_),C=(0,i.useState)(!1),j=(0,r.A)(C,2),k=j[0],S=j[1],N=(0,i.useState)(void 0),O=(0,r.A)(N,2),T=O[0],I=O[1],R=(0,i.useCallback)((function(e){f(b&&_?(0,s.I2)(e,b,_):(0,s.Bn)({engine:e})),null==d||d(e)}),[b,f,d,_]),P=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e;I(t),E?S(!0):R(t)}),[R,E]),M=(0,i.useCallback)((function(){I(void 0),S(!1)}),[]),L=(0,i.useCallback)((function(){I(void 0),T&&R(T),S(!1)}),[T,R]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:y(),children:t?(0,m.jsx)(l.A,{className:n,value:h,size:"l",items:v,disabled:A,onUpdate:P}):(0,m.jsx)(c.l,{className:y("select",n),value:[h],size:"l",options:v,disabled:A,onUpdate:P})}),(0,m.jsx)(u.g,{title:p("title_switching-engine"),content:p("confirm_switching-engine"),visible:k,onCancel:M,onConfirm:L,onOutsideClick:M})]})}},79961:(e,t,n)=>{"use strict";n.d(t,{m:()=>o,t:()=>a});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}function a(e){const t=r.useRef(e),[n,i]=r.useState({getBoundingClientRect(){const{top:e=0,left:n=0,right:r=n,bottom:i=e}=t.current;return{top:e,left:n,bottom:i,right:r,width:r-n,height:i-e}},contextElement:void 0}),o=r.useCallback((e=>{i({getBoundingClientRect(){const{top:e=0,left:n=0,right:r=n,bottom:i=e}=t.current;return{top:e,left:n,bottom:i,right:r,width:r-n,height:i-e}},contextElement:e??void 0})}),[]),{top:a,left:s,bottom:u,right:l}=e;return r.useEffect((()=>{t.current={top:a,left:s,bottom:u,right:l}}),[a,s,u,l]),{anchor:n,setContextElement:o}}},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)},83205:(e,t,n)=>{"use strict";n.d(t,{p$:()=>q,mI:()=>T,ly:()=>P,Io:()=>M,hO:()=>L,Yj:()=>I,L6:()=>O,ZY:()=>R,iJ:()=>D});var r=n(70353),i=n(13322),o=n(40319),a=n(28407),s=n(53775);function u(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new l(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function l(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return l=function(e){this.s=e,this.n=e.next},l.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new l(e)}function c(e,t){this.v=e,this.k=t}function d(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof c;Promise.resolve(s?a.v:a).then((function(n){if(s){var u="return"===t?"return":"next";if(!a.k||n.done)return r(u,n);n=e[u](n).value}i(o.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}d.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},d.prototype.next=function(e){return this._invoke("next",e)},d.prototype.throw=function(e){return this._invoke("throw",e)},d.prototype.return=function(e){return this._invoke("return",e)};var f=n(51404),h=n(29970),v=n(40315),p=n(41169),m=function(e){if(!e.startsWith("data: ")||"data: [DONE]"===e)return null;try{return JSON.parse(e.substring(6))}catch(e){return null}},y=function(e){return"text"in e?e.text:"type"in e&&"response.output_text.delta"===e.type&&e.delta?e.delta:null},g=function(e){if("mcp_call"===e.type){if("search_docs"===e.name&&e.output)try{var t,n=null===(t=JSON.parse(e.output).response)||void 0===t?void 0:t.result;if(n&&Array.isArray(n))return{id:e.id,type:"mcp_search_answer",value:n}}catch(e){}return"get_table_schema"===e.name&&e.output?{id:e.id,type:"mcp_table_schema_answer",value:e.output}:{id:e.id,type:"mcp_unknown_answer",name:e.name||"unknown",value:e}}},x=function(e,t){if("message"===e.type)return{id:e.id,type:"answer",state:"done",value:t}},A=["<user_message>","<query>","<error>","<warning>","<info>","<library>","<rag_context>"],w=function(e){return e.reduce((function(e,t){if("mcp_call"===t.type){if("search_docs"===t.name)try{var n,r=null===(n=JSON.parse(t.output).response)||void 0===n?void 0:n.result;if(r&&Array.isArray(r))return e.push({id:t.id,type:"mcp_search_answer",value:r}),e}catch(e){}return"get_table_schema"===t.name?(e.push({id:t.id,type:"mcp_table_schema_answer",value:t.output}),e):(e.push({id:t.id,type:"mcp_unknown_answer",name:t.name,value:t}),e)}return A.some((function(e){return t.content[0].text.startsWith(e)}))||("user"===t.role?e.push({id:t.id,type:"question",value:t.content[0].text}):e.push({id:t.id,type:"answer",state:"done",value:t.content[0].text})),e}),[])},b="/api/code-assistant",_={agent:"qt"},E=function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var r,i=null===(r=e.target)||void 0===r?void 0:r.result;"string"==typeof i?t(i):n(new Error("Failed to read file as text"))},r.onerror=function(){return n(r.error)},r.readAsText(e)}))},C=null;function j(e){return k.apply(this,arguments)}function k(){var e;return e=(0,s.A)().mark((function e(t){var n,r,i;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0;case 1:return e.next=4,new c(t.read(),0);case 4:if(n=e.sent,r=n.done,i=n.value,!r){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,i;case 11:e.next=1;break;case 13:return e.prev=13,t.releaseLock(),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,,13,16]])})),k=function(){return new d(e.apply(this,arguments))},k.apply(this,arguments)}var S=function(e){if(!window.location.pathname.includes("/queries"))return[];var t=(0,h.sh)(e),n=[];if(t.query&&t.query.trim()&&n.push("<query>\n".concat(t.query,"\n</query>")),t.error){var r="string"==typeof t.error?t.error:JSON.stringify(t.error,null,2);n.push("<error>\n".concat(r,"\n</error>"))}return n},N=function(e){return function(){var t=(0,a.A)((0,s.A)().mark((function t(n,r){var i,a,u,l;return(0,s.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r(),a=(0,f.BF)(i),t.prev=2,t.next=5,p.A.post("".concat(b,"/conversations/").concat(e,"/summarize-title"));case 5:u=t.sent,l=a.items.map((function(t){return t.id===e?(0,o.A)((0,o.A)({},t),{},{metadata:(0,o.A)((0,o.A)({},t.metadata),{},{topic:u.data.title})}):t})),n((0,v.dU)({items:l})),t.next=12;break;case 10:t.prev=10,t.t0=t.catch(2);case 12:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e,n){return t.apply(this,arguments)}}()},O=function(){return function(){var e=(0,a.A)((0,s.A)().mark((function e(t,n){var r,l,c,d,h,A,w,k,O,T,I,R,P,M,L,D,q,z,$,U,F,H,B,V,K,W,Y,G,J,Q,X,Z,ee,te;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e,n){var r=m(e);if(!r)return n;var i=y(r);if(i){var o=n+i;return t((0,v.oY)(o)),o}if("type"in r&&"response.output_item.done"===r.type&&r.item){var a=x(r.item,n);if(a)return t((0,v.a6)(a)),t((0,v.vh)()),"";var s=g(r.item);s&&t((0,v.a6)(s))}return n},l=n(),c=(0,f.f)(l),d=(0,f.V3)(l),h=(0,f.BF)(l),A=h.items,w=h.hasMore,k=h.lastId,O=(0,f._o)(l),T=(0,f.Ye)(),I=!1,c){e.next=10;break}return e.abrupt("return");case 10:if(R=S(l),t((0,v.iY)("chat")),t((0,v.a6)({id:"",type:"question",value:c})),t((0,v.b2)(void 0)),t((0,v.$c)(!0)),e.prev=15,L=d){e.next=25;break}return e.next=20,p.A.post("".concat(b,"/create-conversation"),{model:T,metadata:(0,o.A)((0,o.A)({},_),{},{topic:"новый чат"})});case 20:D=e.sent,q=D.data,L=q.id,t((0,v.dU)({items:[q].concat((0,i.A)(A)),hasMore:w,lastId:k,loading:!1})),I=!0;case 25:return e.next=27,Promise.all(O.map(function(){var e=(0,a.A)((0,s.A)().mark((function e(t){return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.name,e.t1=t.type,e.next=4,E(t);case 4:return e.t2=e.sent,e.abrupt("return",{name:e.t0,type:e.t1,content:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 27:return z=e.sent,C&&C.abort(),C=new AbortController,e.next=32,fetch("".concat(b,"/send-message"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:c,model:T,metadata:_,conversationId:L,contextMessages:R.length>0?R:void 0,files:z.length>0?z:void 0}),signal:C.signal});case 32:if(($=e.sent).ok){e.next=35;break}throw new Error("".concat("HTTP error! status:"," ").concat($.status));case 35:if(P=null===(M=$.body)||void 0===M?void 0:M.getReader(),U=new TextDecoder,P){e.next=39;break}throw new Error("Response body is not readable");case 39:F="",H="",B=!1,V=!1,e.prev=43,W=u(j(P));case 45:return e.next=47,W.next();case 47:if(!(B=!(Y=e.sent).done)){e.next=57;break}for(G=Y.value,J=U.decode(G,{stream:!0}),Q=(F+=J).split("\n"),X=0;X<Q.length-1;X++)Z=Q[X].trim(),H=r(Z,H);F=Q[Q.length-1];case 54:B=!1,e.next=45;break;case 57:e.next=63;break;case 59:e.prev=59,e.t0=e.catch(43),V=!0,K=e.t0;case 63:if(e.prev=63,e.prev=64,!B||null==W.return){e.next=68;break}return e.next=68,W.return();case 68:if(e.prev=68,!V){e.next=71;break}throw K;case 71:return e.finish(68);case 72:return e.finish(63);case 73:(ee=(0,f.id)(n()).items.length)>0&&!(ee%5)&&(I=!0),t((0,v.Ji)(L)),I&&t(N(L)),t((0,v.vd)()),e.next=89;break;case 80:if(e.prev=80,e.t1=e.catch(15),!(e.t1 instanceof Error&&"AbortError"===e.t1.name)){e.next=87;break}return t((0,v.$c)(!1)),t((0,v.vh)()),t((0,v.Nh)(void 0)),e.abrupt("return");case 87:te={type:"error",error:e.t1},t((0,v.a6)(te));case 89:return e.prev=89,t((0,v.$c)(!1)),C=null,e.finish(89);case 93:case"end":return e.stop()}}),e,null,[[15,80,89,93],[43,59,63,73],[64,,68,72]])})));return function(t,n){return e.apply(this,arguments)}}()},T=function(e){return function(t){t((0,v.CX)()),t((0,v.b2)(e)),t((0,v.qv)(!0)),t(O())}},I=function(){return function(){var e=(0,a.A)((0,s.A)().mark((function e(t,n){var r,o,a,u,l,c,d;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n(),o=(0,f.BF)(r),a=o.items,u=o.hasMore,l=o.loading,c=o.lastId,u&&!l){e.next=5;break}return e.abrupt("return");case 5:return t((0,v.dU)({loading:!0})),e.prev=6,e.next=9,p.A.get("".concat(b,"/conversations"),{params:{limit:20,after:c}});case 9:d=e.sent,t((0,v.dU)({items:[].concat((0,i.A)(a),(0,i.A)(d.data.data)),hasMore:d.data.has_more,lastId:d.data.last_id,loading:!1})),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(6),t((0,v.dU)({loading:!1})),t((0,v.Nh)(e.t0));case 17:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(t,n){return e.apply(this,arguments)}}()},R=function(){return function(){var e=(0,a.A)((0,s.A)().mark((function e(t,n){var r,i,o;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n(),i=(0,f.G_)(r),"history"==(o="chat"===i?"history":"chat")&&t(function(){var e=(0,a.A)((0,s.A)().mark((function e(t){var n;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t((0,v.r1)(!0)),e.prev=1,e.next=4,p.A.get("".concat(b,"/conversations"),{params:{limit:20}});case 4:n=e.sent,t((0,v.dU)({items:n.data.data,hasMore:n.data.has_more,lastId:n.data.last_id,loading:!1})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t((0,v.Nh)(e.t0));case 11:return e.prev=11,t((0,v.r1)(!1)),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,8,11,14]])})));return function(t){return e.apply(this,arguments)}}()),t((0,v.iY)(o));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},P=function(e){return function(){var t=(0,a.A)((0,s.A)().mark((function t(n,r){var i,o,a,u,l,c,d,h,m;return(0,s.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,o=r(),a=(0,f.BF)(o),u=a.items,l=a.hasMore,c=a.lastId,d=a.loading,t.next=5,p.A.delete("".concat(b,"/conversations/").concat(e));case 5:h=u.filter((function(t){return t.id!==e})),m=c===e?(null===(i=h[h.length-1])||void 0===i?void 0:i.id)||void 0:c,n((0,v.dU)({items:h,hasMore:l,lastId:m,loading:d})),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),n((0,v.Nh)(t.t0));case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}()},M=function(e){return function(){var t=(0,a.A)((0,s.A)().mark((function t(n,r){var i,o;return(0,s.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((0,f.V3)(r())!==e){t.next=4;break}return n((0,v.iY)("chat")),t.abrupt("return");case 4:return n((0,v.Ji)(e)),n((0,v.Qx)({items:[]})),n((0,v.r1)(!0)),n((0,v.iY)("chat")),t.prev=8,t.next=11,p.A.get("".concat(b,"/conversations/").concat(e,"/items"),{params:{order:"desc",limit:50}});case 11:i=t.sent,o=w(i.data.data).reverse(),n((0,v.Qx)({items:o,hasMore:i.data.has_more,lastId:i.data.last_id})),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(8),n((0,v.Nh)(t.t0));case 19:return t.prev=19,n((0,v.r1)(!1)),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[8,16,19,22]])})));return function(e,n){return t.apply(this,arguments)}}()},L=function(){return function(){var e=(0,a.A)((0,s.A)().mark((function e(t,n){var r,o,a,u,l,c,d,h,m;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n(),o=(0,f.V3)(r),a=(0,f.id)(r),u=a.items,l=a.lastId,c=a.hasMore,d=a.loading,o){e.next=5;break}return e.abrupt("return");case 5:if(c&&!d&&l){e.next=7;break}return e.abrupt("return");case 7:return t((0,v.Qx)({loading:!0})),t((0,v.Nh)(void 0)),e.prev=9,e.next=12,p.A.get("".concat(b,"/conversations/").concat(o,"/items"),{params:{order:"desc",limit:50,after:l}});case 12:h=e.sent,m=w(h.data.data).reverse(),t((0,v.Qx)({items:[].concat((0,i.A)(m),(0,i.A)(u)),hasMore:h.data.has_more,lastId:h.data.last_id})),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(9),t((0,v.Nh)(e.t0));case 20:return e.prev=20,t((0,v.Qx)({loading:!1})),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[9,17,20,23]])})));return function(t,n){return e.apply(this,arguments)}}()},D=function(){return function(e,t){var n=(0,f.D4)(t());e((0,v.qv)(!n))}},q=function(e){return function(){var t=(0,a.A)((0,s.A)().mark((function t(n,i){var o,a,u,l;return(0,s.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(0,f._o)(i()),a=(0,r.A)(e),t.prev=2,l=(0,s.A)().mark((function e(){var t;return(0,s.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=u.value,!o.some((function(e){return e.name===t.name&&e.size===t.size}))){e.next=3;break}return e.abrupt("return",1);case 3:n((0,v.ad)(t));case 4:case"end":return e.stop()}}),e)})),a.s();case 5:if((u=a.n()).done){t.next=11;break}return t.delegateYield(l(),"t0",7);case 7:if(!t.t0){t.next=9;break}return t.abrupt("continue",9);case 9:t.next=5;break;case 11:t.next=16;break;case 13:t.prev=13,t.t1=t.catch(2),a.e(t.t1);case 16:return t.prev=16,a.f(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})));return function(e,n){return t.apply(this,arguments)}}()}},87111:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsxs)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18"},e),{},{children:[(0,i.jsx)("g",{clipPath:"url(#ai-chat-icon_svg__a)",children:(0,i.jsx)("path",{fill:"url(#ai-chat-icon_svg__b)",d:"M14.625 11.25c.382 0 .716.256.815.625.261.975.96 1.674 1.935 1.935a.844.844 0 0 1 0 1.63 2.66 2.66 0 0 0-1.935 1.935.844.844 0 0 1-1.63 0 2.66 2.66 0 0 0-1.935-1.935.844.844 0 0 1 0-1.63 2.66 2.66 0 0 0 1.935-1.935l.048-.133a.84.84 0 0 1 .767-.492M7.875 0c.55 0 1.02.398 1.11.94.313 1.879.916 3.151 1.795 4.03s2.151 1.482 4.03 1.795a1.125 1.125 0 0 1 0 2.22c-1.879.313-3.151.916-4.03 1.795s-1.482 2.151-1.795 4.03a1.125 1.125 0 0 1-2.22 0c-.313-1.879-.916-3.151-1.795-4.03S2.82 9.298.94 8.985a1.125 1.125 0 0 1 0-2.22C2.82 6.452 4.091 5.85 4.97 4.97S6.452 2.82 6.765.94l.021-.1C6.914.35 7.36 0 7.875 0"})}),(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"ai-chat-icon_svg__b",x1:4.53,x2:16.294,y1:10.142,y2:5.661,gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{stopColor:"#5B82F6"}),(0,i.jsx)("stop",{offset:.881,stopColor:"#DD68F7"})]}),(0,i.jsx)("clipPath",{id:"ai-chat-icon_svg__a",children:(0,i.jsx)("path",{fill:"#fff",d:"M0 0h18v18H0z"})})]})]}))}},87709:(e,t,n)=>{"use strict";n.d(t,{g:()=>I});var r=n(9736),i=n(77810),o=n(76872),a=n(21211),s=n(1335),u=n(64922),l=n(72890),c=n(45760),d=n(14424),f=n(29717);(0,f.withNaming)({e:"__",m:"_",v:"_"});const h=(0,f.withNaming)({n:"gc-",e:"__",m:"_",v:"_"});var v=n(37988);const p=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),m=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),y=(0,v.N)({en:p,ru:m},"gc-item-selector"),g=h("item-selector");function x(e){return`${e}`}class A extends i.Component{static defaultProps={hideSelected:!0,selectorTitle:"",getItemId:x};renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)};renderItem=(e,t)=>{const n=this.renderItemTitle(e),r="string"==typeof n?n:void 0;return(0,u.jsxs)("div",{className:g("item",{active:t}),children:[(0,u.jsx)("span",{className:g("item-text"),title:r,children:n}),(0,u.jsx)(s.$,{view:"flat-secondary",size:"s",className:g("item-select"),onClick:this.onAddItem.bind(this,e),children:y("button_select")})]})};filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)};renderValueItem=(e,t)=>{const n=this.renderItemTitle(e),r="string"==typeof n?n:void 0;return(0,u.jsxs)("div",{className:g("value-item",{active:t}),children:[(0,u.jsx)("span",{className:g("value-item-text"),title:r,children:n}),(0,u.jsx)(s.$,{view:"flat-secondary",size:"s",className:g("value-item-remove"),onClick:()=>this.onRemoveItem(e),children:(0,u.jsx)(c.I,{data:l.A,size:16})})]})};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]}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)};onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)};onErase=()=>{this.onUpdate([])};onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)};onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(d.B.moveListElement(n,e,t))}};onUpdate=e=>{this.props.onUpdate(e)};render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,renderValueItem:r=this.renderValueItem,filterItem:i=this.filterItem,hideSelectAllButton:o}=this.props,[a,l]=this.getActualItems();return(0,u.jsxs)("div",{className:g(),children:[(0,u.jsxs)("div",{className:g("list"),children:[(0,u.jsxs)("div",{className:g("list-header"),children:[(0,u.jsx)("span",{className:g("list-title"),children:t}),!o&&(0,u.jsx)(s.$,{view:"flat",size:"s",disabled:0===a.length,onClick:this.onSelectAll,children:y("button_select-all")})]}),(0,u.jsx)(d.B,{items:a,renderItem:n,filterItem:i,filterPlaceholder:y("placeholder_search"),itemsHeight:196})]}),(0,u.jsxs)("div",{className:g("list"),children:[(0,u.jsxs)("div",{className:g("list-header"),children:[(0,u.jsx)("span",{className:g("list-title"),children:`${y("label_selected")}: ${e.length}`}),(0,u.jsx)(s.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase,children:y("button_deselect-all")})]}),(0,u.jsx)(d.B,{items:l,renderItem:r,filterItem:i,filterPlaceholder:y("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})]})]})}}var w=n(3659),b=n(40319);const _=function(e){return(0,u.jsx)("svg",(0,b.A)((0,b.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,u.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var E=(0,o.A)("yc-selector-control");function C(e){var t=e.value,n=e.placeholder;return t.length>0?(0,u.jsx)("span",{className:E("value"),children:t.join(", ")}):(0,u.jsx)("span",{className:E("placeholder"),children:n})}function j(e){var t=e.size,n=void 0===t?"s":t,r=e.width,o=e.label,a=e.focused,s=e.disabled,l=e.displayArrow,d=e.value,f=e.icon,h=e.badgeFocused,v=e.badgeRef,p=e.onBadgeClick,m=e.onClick,y=e.placeholder,g={};r&&(g.width=r);var x=i.useRef(null);return d?(0,u.jsxs)("div",{ref:x,className:E({size:n,focused:a,disabled:s}),style:g,onClick:m,children:[Boolean(o)&&(0,u.jsx)("span",{className:E("label"),children:o}),Boolean(f)&&(0,u.jsx)("div",{className:E("selected-item-icon"),children:f}),C({value:d,placeholder:y}),Boolean(d.length>0)&&(0,u.jsx)("div",{ref:v,className:E("badge",{focused:h}),onClick:p,children:d.length}),l&&(0,u.jsx)("div",{className:E("arrow"),children:(0,u.jsx)(c.I,{data:_})})]}):null}var k=n(92611);const S=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}'),N=(0,k.Kc)("yt:yc-column-selector",{en:S});var O=(0,o.A)("yc-column-selector"),T="bottom";function I(e){var t,n=e.className,o=e.switcher,l=e.disabled,c=e.controlWidth,d=e.items,f=e.value,h=e.onUpdate,v=e.renderItem,p=e.renderItemValue,m=e.getItemId,y=e.filterItem,g=e.popupPlacement,x=void 0===g?T:g,b=i.useRef(null),_=i.useState(!1),E=(0,r.A)(_,2),C=E[0],k=E[1],S=i.useState(!1),I=(0,r.A)(S,2),R=I[0],P=I[1],M=i.useState(),L=(0,r.A)(M,2),D=L[0],q=L[1];i.useEffect((function(){q(void 0)}),[d,f]),i.useEffect((function(){l&&(k(!1),q(void 0))}),[l]);var z=i.useCallback((function(e){q(e)}),[]),$=i.useCallback((function(){k(!1)}),[]),U=i.useCallback((function(){k(!1),q(void 0)}),[]),F=i.useCallback((function(){k(!1),q(void 0),D&&f!==D&&h(D)}),[D,h,f]);return(0,u.jsxs)("div",{className:O(null,n),children:[(0,u.jsx)("div",{className:O("control"),ref:b,onClick:function(){l||(k((function(e){return!e})),q(void 0),R||P(!0))},children:o||(0,u.jsx)(j,{displayArrow:!0,disabled:l,placeholder:N("label_placeholder"),value:(null==f||null===(t=f.map)||void 0===t?void 0:t.call(f,(function(e){return w.A.decode(e)})))||[],focused:C,width:c})}),R&&(0,u.jsxs)(a.z,{anchorElement:b.current,placement:x,open:C,onOpenChange:function(e){e||$()},children:[(0,u.jsx)(A,{selectorTitle:N("label_columns"),items:d,value:null!=D?D:f,onUpdate:z,getItemId:m,filterItem:y,renderItem:v,renderItemValue:p}),(0,u.jsxs)("div",{className:O("controls"),children:[(0,u.jsx)(s.$,{view:"flat",className:O("control"),onClick:U,children:N("button_cancel")}),(0,u.jsx)(s.$,{view:"action",className:O("control"),onClick:F,children:N("button_apply")})]})]})]})}},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"})}))}},91018:(e,t,n)=>{"use strict";n.d(t,{A3:()=>o,Gs:()=>i,kq:()=>s,yX:()=>a});var r=n(47999);const i=(0,r.om)("tab-list"),o=(0,r.om)("tab"),a=(0,r.om)("tab-panel"),s="data-tab"},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(66439)},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=4237.a6d263f6.chunk.js.map
|