@ytsaurus/ui 1.12.0 → 1.12.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.
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 869.c0b556ac.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[869],{69473:(t,e,n)=>{"use strict";n.d(e,{c:()=>f});var r=n(23680),i=n(89012),o=n(89526),a=n(71083),s=n(61661);function u(t){return e=t.start_time,n=t.finish_time,r=new Date(e).getTime(),i=(n?new Date(n):new Date).getTime(),s.Z.format.TimeDuration(i-r);var e,n,r,i}var l=n(32583),c=n(67557),f=o.memo((function(t){var e=t.query,n=t.className,s=function(t){var e=(0,o.useState)(u(t)),n=(0,r.Z)(e,2),i=n[0],s=n[1];return(0,o.useEffect)((function(){if(t.state!==a.oZ.DRAFT){if((0,l.xj)(t))s(t.finish_time?u(t):"-");else if(s(u(t)),!t.finish_time){var e=setInterval((function(){return s(u(t))}),1e3);return function(){clearInterval(e)}}}else s(null)}),[t.id,t.state,t.start_time]),i}(e);return s&&(0,c.jsx)(i._,{className:n,children:s})}))},46869:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Nc});var r=n(20240),i=n(23680),o=n(89526),a=n(45735),s=n(10440),u=n(1132),l=n(29648),c=n(13044),f=n(67290),h=n(19677),d=n(67557);const v=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},t),{},{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 .994Z",clipRule:"evenodd"})}))};var p=n(92070),m=n(68053),g=n(3302),y=n(48777),b=n(48872),x=n(33183),w=n(5247),_=n(59709),E=n(73207),S=n(19961),k=n(85005),O=n(22901),T=n(61661),j=n(80726),R=n(79144),A=n(59380),C=n(97723),N=(0,s.Z)("data-type-popup");function M(t){var e=t.children,n=t.type,r=t.hideIcon,i=t.className;return n?(0,d.jsx)(R.J,{className:N(null,i),tooltipClassName:N("tooltip"),content:n?(0,d.jsx)("div",{className:N("tooltip-container"),children:(0,d.jsx)(C.Z,(0,h.Z)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,d.jsxs)("span",{className:N("container"),children:[e,!r&&(0,d.jsx)(c.J,{className:N("icon"),data:A.Z,size:12})]})}):(0,d.jsx)("span",{className:N(null,i),children:e})}var I=n(7209),Z=n(15395),P=(0,s.Z)("yql-result-table"),L=Symbol("__index__");function D(t,e){return n=t,r=L,"object"===(0,I.Z)(n)&&n&&Reflect.has(n,r)?t[L]:e;var n,r}function z(){window.dispatchEvent(new Event("resize"))}var $={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:E.qA,stickyTop:0,syncHeadOnResize:!0},B=(0,h.Z)((0,h.Z)({},$),{},{displayIndices:!1}),U=[];function F(t){var e=t.className,n=t.header,a=void 0===n?U:n,s=t.rows,u=void 0===s?U:s,l=t.totals,c=void 0===l?U:l,f=t.showColumns,v=void 0===f?U:f,p=t.theme,m=void 0===p?"yandex-cloud":p,g=t.format,y=t.formatterSettings,b=t.defaultNumberAlign,w=void 0===b?j.Z.RIGHT:b,_=t.resultType,E=t.emptyDataMessage,k=t.message,O=t.isError,T=t.transpose,R=void 0!==T&&T,A=t.page,C=void 0===A?1:A,N=t.pageSize,I=void 0===N?u.length:N,F=t.startIndex,V=t.sortOrder,W=t.onSort,X=t.showFullValueInDialog,G=t.containerRef,K="function"==typeof W,J=o.useMemo((function(){var t=a.map((function(t){var e=t.name,n=t.displayName,r=t.type,i=void 0===r?{}:r;return{name:e,header:(0,d.jsx)(M,{type:i,children:null!=n?n:e}),className:t.key||t.sort?"is-key":void 0,accessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[e]},sortable:K&&Boolean(i.simple),sortAccessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[e].$sortValue},render:function(e){var n,r;if("function"==typeof t.render)return t.render(e);var i,a=e.value;if(!a)return(0,d.jsx)("span",{className:"unipika",children:"<unsupported data type>"});i=Object.prototype.hasOwnProperty.call(a,"$formattedValue")?a.$formattedValue:g(a,y);var s,u=function(t){return"string"==typeof t&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t}(null!==(n=a.$rawValue)&&void 0!==n?n:a.$value),l=null!==(r=a.$fullFormattedValue)&&void 0!==r?r:i;if("yql.string"===a.$type&&i.startsWith('<span class="quote">'))s=i;else{var c=i.split("\n");s=c.length>8?c.slice(0,5).join("\n"):i}var f=s!==l,h=a.$additions?(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)(x.x,{color:"light-hint",children:a.$additions})]}):null;return f?(0,d.jsxs)(Y,{rawValue:u,children:[X?(0,d.jsx)(o.Fragment,{children:(0,d.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:s}})}):(0,d.jsx)(q,{onClick:z,strippedDown:s,formattedValue:l}),h]}):(0,d.jsxs)(Y,{rawValue:u,children:[(0,d.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:i}}),h]})},align:i.numeric?w:void 0}}));return t}),[a,K,w,g,y,X]),Q=(C-1)*I,tt=K?1:null!=F?F:Q+1,et=o.useMemo((function(){return function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=t.map((function(t,e){return(0,h.Z)((0,r.Z)({},L,i+e),t)}));if(!n)return o;var a=(Array.isArray(n)?n:[n]).reduce((function(t,e){var n=e.columnId,r=e.order;return t[n]=r,t}),{}),s={};e.forEach((function(t){a[t.name]&&(s[t.name]=function(t,e){var n=e;return function(e,r){var i,o;return"function"==typeof t.sortAccessor&&(i=t.sortAccessor(e),o=t.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}}(t,a[t.name]))}));var u=Object.keys(a).map((function(t){return s[t]})).filter(Boolean);return u.length&&o.sort((function(t,e){var n=0;return u.some((function(r){return n=r(t,e),Boolean(n)})),n||t[L]-e[L]})),o}(u,J,V,tt)}),[u,J,V,tt]),nt=o.useMemo((function(){var t=v.map((function(t){return J.find((function(e){return e.name===t}))})).filter(Boolean),e=et.slice(Q,Q+I);if(!R)return[t,e,c];var n=e.map((function(t,e){return{name:String(Q+e),header:H(t),render:function(e){var n=e.value;return n.column.render({value:n.data,row:t})}}})).concat(c.map((function(t,e){var n=t.footerIndex;return{name:"footer".concat(e),header:String(n||e),render:function(t){var e=t.value;return e.column.render({value:e.data,footer:!0})}}}))),r=t.map((function(t){for(var e={name:t.name},n=Q;n<Q+I&&n!==et.length;n++)e[String(n)]={column:t,data:et[n][t.name]};return c.forEach((function(n,r){e["footer".concat(r)]={column:t,data:n[t.name]}})),e}));return[[{name:"name",header:"Name"}].concat((0,S.Z)(n)),r,[]]}),[v,et,Q,I,R,c,J]),rt=(0,i.Z)(nt,3),it=rt[0],ot=rt[1],at=rt[2];return"table"===_?(0,d.jsx)("div",{ref:G,className:P(null,e),children:(0,d.jsx)(Z.ZP,{columns:it,data:ot,footerData:0===at.length?void 0:at,settings:R?B:$,startIndex:tt,emptyDataMessage:E,theme:m,rowKey:D,sortOrder:V,onSort:W,visibleRowIndex:R?void 0:H})}):"cell"===_||"untyped"===_?(0,d.jsx)("div",{ref:G,className:P({mode:_},e),children:(0,d.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):k?(0,d.jsx)("div",{className:P("message",{error:O}),children:k}):null}function H(t){return T.Z.format.Number(t[L])}function q(t){var e=t.formattedValue,n=t.strippedDown,r=t.onClick,a=o.useState(!1),s=(0,i.Z)(a,2),u=s[0],l=s[1];return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?e:n}}),(0,d.jsx)("br",{}),(0,d.jsx)(k.r,{onClick:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){l((function(t){return!t})),null==r||r()})),children:u?"Show less":"Show more"})]})}var V=P("cell-copy-to-clipboard");function Y(t){var e=t.children,n=t.rawValue,r=o.useRef(null),a=o.useState(!1),s=(0,i.Z)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var t,e=null===(t=r.current)||void 0===t?void 0:t.parentElement;function n(){l(!0)}function i(t){null!=e&&e.contains(t.relatedTarget)||l(!1)}return null==e||e.addEventListener("mouseover",n),null==e||e.addEventListener("mouseout",i),function(){null==e||e.removeEventListener("mouseover",n),null==e||e.removeEventListener("mouseout",i)}}),[]),(0,d.jsxs)("span",{ref:r,children:[e,u&&n?(0,d.jsx)(O.m,{className:V,text:n,size:16}):null]})}var W=n(61837),X=n(47184),G=n.n(X),K={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}},J=o.memo((function(t){var e=function(t){var e,n,r=(0,o.useState)(void 0),a=(0,i.Z)(r,2),s=a[0],u=a[1];(0,o.useEffect)((function(){var e=setTimeout((function(){u(t)}),0);return function(){clearTimeout(e)}}),[t]);var l=(0,o.useMemo)((function(){var e,n;return null!==(e=t.settings)&&void 0!==e&&e.visibleColumns?null===(n=t.settings)||void 0===n?void 0:n.visibleColumns:t.columns.map((function(t){return t.name}))}),[null===(e=t.settings)||void 0===e?void 0:e.visibleColumns,s]),c=(0,o.useMemo)((function(){return 1+(t.page?t.page*t.settings.pageSize:0)}),[t.page,t.settings.pageSize]);return[t.results,t.columns,l,Boolean(null===(n=t.settings)||void 0===n?void 0:n.transposed),c]}(t.result),n=(0,i.Z)(e,5),r=n[0],a=n[1],s=n[2],u=n[3],l=n[4];return(0,d.jsx)(F,{format:W.CI,formatterSettings:K,header:a,rows:r,transpose:u,resultType:"table",showColumns:s,defaultNumberAlign:"right",startIndex:l,theme:E.rz})}),(function(t,e){var n,r,i,o;return t.result.columns===e.result.columns&&t.result.results===e.result.results&&G()(null===(n=t.result.settings)||void 0===n?void 0:n.visibleColumns,null===(r=e.result.settings)||void 0===r?void 0:r.visibleColumns)&&(null===(i=t.result.settings)||void 0===i?void 0:i.transposed)===(null===(o=e.result.settings)||void 0===o?void 0:o.transposed)})),Q=n(26194),tt=(0,s.Z)("query-result-scheme"),et={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:E.qA,stickyTop:0},nt=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(t){var e=t.row;return(0,d.jsx)("span",{className:tt("item"),children:(0,d.jsx)("span",{className:tt("name"),title:e.name,children:e.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(t){var e=t.row;return(0,d.jsx)(C.Z,(0,h.Z)({},e.type))}}],rt=o.memo((function(t){var e=t.result;return(0,d.jsx)(j.Z,{theme:"yandex-cloud",columns:nt,data:e.columns,startIndex:1,settings:et})}));function it(t){var e=t.result,n=t.className;return(0,d.jsxs)("div",{className:tt(null,n),children:[(0,d.jsx)(x.x,{variant:"subheader-2",as:"div",className:tt("title"),children:"Scheme"}),(0,d.jsx)("div",{className:tt("table-wrap"),children:(0,d.jsx)(rt,{result:e})})]})}var ot=n(54939),at=n(4423),st=n(89684),ut=(0,s.Z)("query-result-paginator"),lt=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function ct(t){var e=t.queryId,n=t.resultIndex,r=t.className,a=(0,p.I0)(),s=function(t,e){var n=(0,o.useState)({lastPage:0,pageSize:0}),r=(0,i.Z)(n,2),a=r[0],s=r[1],u=(0,p.v9)((function(n){return(0,w.mM)(n,t,e)}));return(0,o.useEffect)((function(){if(null!=u&&u.resultReady){var t=Math.ceil(((null==u?void 0:u.meta.data_statistics.row_count)||0)/((null==u?void 0:u.settings.pageSize)||1))-1;s({pageSize:(null==u?void 0:u.settings.pageSize)||0,lastPage:t})}}),[u]),[(null==u?void 0:u.page)||0,a]}(e,n),u=(0,i.Z)(s,2),l=u[0],c=u[1],f=c.pageSize,h=c.lastPage,v=(0,o.useCallback)((function(t){var r=(0,i.Z)(t,1)[0];a((0,st.MF)(e,n,{pageSize:Number(r)}))}),[a]),m=(0,o.useCallback)((function(t){a((0,st.QW)(e,n,t))}),[e]);return(0,d.jsxs)("div",{className:ut(null,r),children:[(0,d.jsx)(ot.P,{className:ut("control"),value:[f.toString()],options:lt,onUpdate:v}),(0,d.jsx)(at.Z,{className:ut("control"),value:l,min:0,max:h,onChange:m,step:1})]})}function ft(t){var e=t.freeze,n=t.children,r=t.placeholder,i=void 0===r?null:r;return(0,d.jsx)(o.Suspense,{fallback:i,children:(0,d.jsx)(ht,{freeze:e,children:n})})}function ht(t){var e,n,r=t.freeze,i=t.children,a=o.useRef({});if(r&&!a.current.promise)throw a.current.promise=new Promise((function(t){a.current.resolve=t})),a.current.promise;if(r)throw a.current.promise;return a.current.promise&&(null===(e=(n=a.current).resolve)||void 0===e||e.call(n),a.current.promise=void 0),(0,d.jsx)(o.Fragment,{children:i})}var dt=(0,s.Z)("not-render-until-first-visible");function vt(t){var e=t.hide,n=t.className,r=t.children,a=o.useState(Boolean(e)),s=(0,i.Z)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var t=requestAnimationFrame((function(){l(Boolean(e))}));return function(){cancelAnimationFrame(t)}}),[e]),(0,d.jsx)("div",{style:u?{display:"none"}:void 0,className:dt(null,n),children:(0,d.jsx)(ft,{freeze:u,children:r})})}var pt=(0,s.Z)("query-result-table");function mt(t){var e,n=t.result,r=null==n||null===(e=n.settings)||void 0===e?void 0:e.viewMode,i=function(t){var e=t.meta.data_statistics.row_count,n=t.meta.is_truncated,r=t.settings.pageSize;return{start:r*t.page+1,end:Math.min(r*t.page+r,e),total:e,truncated:n}}(n),o=i.start,a=i.end,s=i.total,u=i.truncated;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(vt,{hide:r!==Q.$.Scheme,children:(0,d.jsx)(it,{result:n})}),(0,d.jsxs)(vt,{hide:r!==Q.$.Table,children:[(0,d.jsx)("div",{className:pt("result-info"),children:(0,d.jsxs)(x.x,{children:["Rows ",o,"-",a," of ",s,"".concat(u?" (truncated)":"")]})}),(0,d.jsx)(J,{result:n})]})]})}var gt=o.memo((function(t){var e=t.query,n=t.index,r=(0,p.v9)((function(t){return(0,w.mM)(t,e.id,n)}));return(0,d.jsxs)("div",{className:pt(),children:[((null==r?void 0:r.state)===Q.I.Init||(null==r?void 0:r.state)===Q.I.Loading)&&(0,d.jsx)("div",{className:pt("loading"),children:(0,d.jsx)(f.a,{size:"m"})}),(null==r?void 0:r.resultReady)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(mt,{result:r}),r.settings.viewMode===Q.$.Table&&(0,d.jsx)(ct,{className:pt("pagination"),queryId:e.id,resultIndex:n})]}),(null==r?void 0:r.state)===Q.I.Error&&(0,d.jsx)(_.Z,{error:r.error})]})}),(function(t,e){return t.query.id===e.query.id&&t.index===e.index})),yt=n(69473),bt=n(48770),xt=n(78240),wt=n(32583),_t=(0,s.Z)("query-meta-info"),Et=o.memo((function(t){var e=t.query,n=t.className,r=(0,o.useMemo)((function(){return e&&(0,wt.Rw)(e)}),[e]),i=(0,p.I0)(),a=(0,o.useCallback)((function(){i((0,g.Xx)())}),[i]);return(0,d.jsxs)("div",{className:_t(null,n),children:[(0,d.jsx)(bt.J,{className:_t("item"),mode:"both",status:e.state}),(0,d.jsx)(yt.c,{query:e,className:_t("item")}),(0,d.jsx)(x.x,{className:_t("item"),children:T.Z.format.DateTime(e.start_time,{format:"short"})}),(0,d.jsxs)(x.x,{className:_t("item"),color:"secondary",children:["by ",e.user]}),r&&(0,d.jsxs)(l.z,{size:"s",onClick:a,children:[(0,d.jsx)(c.J,{data:xt.Z}),"Stop"]})]})})),St=n(32598),kt=n(31239),Ot=(0,s.Z)("query-meta-table"),Tt=Ot("title"),jt=Ot("value"),Rt=["query"];function At(t){var e=t.query,n=t.className,r=(0,o.useState)(null),a=(0,i.Z)(r,2),s=a[0],u=a[1],c=(0,o.useState)(!1),f=(0,i.Z)(c,2),h=f[0],v=f[1],p=(0,o.useMemo)((function(){return Object.entries(e).filter((function(t){var e=(0,i.Z)(t,1)[0];return!Rt.includes(e)})).map((function(t){var e=(0,i.Z)(t,2),n=e[0],r=e[1];return{title:n,value:"object"===(0,I.Z)(r)?(0,d.jsx)(l.z,{view:"outlined",onClick:function(){u(r),v(!0)},children:"View detals"}):r}}))}),[e]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("dl",{className:Ot(null,n),children:p.map((function(t){var e=Array.isArray(t.value)?t.value:[t.value];return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("dt",{className:Tt,children:T.Z.format.Readable(t.title)}),e.map((function(t,e){return(0,d.jsx)("dd",{className:jt,children:"boolean"==typeof t?String(t):t},e)}))]},t.title)}))}),(0,d.jsx)(kt.Z,{visible:h,disableBodyScrollLock:!0,onOutsideClick:function(){return v(!1)},onCancel:function(){return v(!1)},children:s&&(0,d.jsx)(St.Z,{value:s,settings:{}})})]})}var Ct=n(26530);const Nt=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},t),{},{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-1v-9zm12-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-1h5.91zm0 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 Mt,It=n(93712),Zt=n(75621),Pt=o.memo((function(t){var e=t.allColumns,n=t.columns,r=t.className,i=t.onChange,a=(0,o.useCallback)((function(t){i(t)}),[i]),s=(0,o.useMemo)((function(){return n||e.map((function(t){return t.name}))}),[e,n]),u=n&&s.length!==(null==n?void 0:n.length)?"action":"normal";return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(Zt.r,{className:r,renderItemValue:function(t){return t.displayName},getItemId:function(t){return t.name},value:s,items:e,switcher:(0,d.jsxs)(l.z,{size:"m",title:"Choose result columns",view:u,children:[(0,d.jsx)(c.J,{data:It.Z}),"Columns ",(0,d.jsx)(x.x,{color:"secondary",children:(null==s?void 0:s.length)+"/"+e.length})]}),onUpdate:a})})})),Lt=n(47061),Dt=n(59900),zt=n(24269),$t=n(38114),Bt=n(12731),Ut=n(70886),Ft=n(65907),Ht=n.n(Ft),qt=n(2652),Vt=n.n(qt),Yt=n(6370),Wt=n(47167),Xt=n(71083),Gt=n(98383),Kt=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"getDownloadParams",value:function(){var t=this.getOutputFormat(),e=t.value,n=t.error,r={output_format:e,dump_error_into_response:!0};return"schemaful_dsv"!==this.state.format&&(r.columns=this.prepareColumnsForColumnMode(!1)),{query:Ht().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var t=this.props.getDownloadBaseUrl,e=this.state,n=e.rowsMode,r=e.startRow,i=e.numRows,o=t("range"===n?{start:r,end:r+i}:void 0),a=this.getDownloadParams(),s=a.query,u=a.error;return{url:"".concat(o,"&").concat(s),error:u}}}]),n}(Wt.s);Mt=Kt,Kt.propTypes=(0,h.Z)((0,h.Z)({},(0,Bt.Z)((0,Ut.Z)(Mt),"propTypes",Mt)),{},{queryId:Vt().string.isRequired,resultIndex:Vt().number.isRequired,getDownloadBaseUrl:Vt().func});var Jt=o.memo((function(t){var e,n,r=t.queryId,a=t.resultIndex,s=t.allColumns,u=t.visibleColumns,l=t.className,c=(0,p.v9)(Yt.SY),f=(0,p.v9)((function(t){return(0,w.mM)(t,r,a)})),h=(0,Gt.O)(),v=null!=f&&f.resultReady&&(null==f?void 0:f.page)*(null==f||null===(e=f.settings)||void 0===e?void 0:e.pageSize)||0,m=(0,o.useMemo)((function(){return s.map((function(t){return{name:t.displayName,checked:!u||(null==u?void 0:u.includes(t.name))}}))}),[s,u]),g=(0,o.useState)(!1),y=(0,i.Z)(g,2),b=y[0],x=y[1];return(0,d.jsx)(Kt,{getDownloadBaseUrl:function(t){return h((0,Xt.C$)(c,r,a,t))},queryId:r,resultIndex:a,className:l,cluster:c,rowCount:null!=f&&f.resultReady?null==f?void 0:f.meta.data_statistics.row_count:0,allColumns:m,srcColumns:m,columns:m,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:b,handleShow:function(){return x(!0)},handleClose:function(){return x(!1)},offsetValue:v,isSchematicTable:!1})})),Qt=(0,s.Z)("query-result-actions"),te=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function ee(t){var e,n,r,i,a,s=t.query,u=t.resultIndex,f=(0,p.I0)(),v=(0,p.v9)((function(t){return(0,w.mM)(t,s.id,u)})),m=(0,o.useCallback)((function(){var t;f({type:st.YD,data:{queryId:s.id,index:u,settings:{transposed:!(null!=v&&null!==(t=v.settings)&&void 0!==t&&t.transposed)}}})}),[null==v?void 0:v.settings,f]),g=(0,o.useCallback)((function(t){f({type:st.YD,data:{queryId:s.id,index:u,settings:{viewMode:t}}})}),[null==v?void 0:v.settings,f]),y=(0,o.useCallback)((function(t){f({type:st.YD,data:{queryId:s.id,index:u,settings:(0,h.Z)((0,h.Z)({},null==v?void 0:v.settings),{},{visibleColumns:t})}})}),[null==v?void 0:v.settings,f]);return!0===(null==v?void 0:v.resultReady)?(0,d.jsxs)("div",{className:Qt(),children:[(null==v||null===(e=v.settings)||void 0===e?void 0:e.viewMode)===Q.$.Table&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.z,{className:Qt("item"),onClick:m,view:null!=v&&null!==(n=v.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,d.jsx)(c.J,{data:Nt,width:16})}),(0,d.jsx)(Pt,{className:Qt("item"),allColumns:v.columns,columns:null===(r=v.settings)||void 0===r?void 0:r.visibleColumns,onChange:y}),(0,d.jsx)(Jt,{queryId:s.id,resultIndex:u,className:Qt("item"),allColumns:v.columns,visibleColumns:null===(i=v.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,d.jsx)(Ct.E,{className:Qt("item"),options:te,value:null==v||null===(a=v.settings)||void 0===a?void 0:a.viewMode,onUpdate:g})]}):null}var ne=n(12576),re=n.n(ne),ie=n(75382),oe=n.n(ie),ae=n(92210),se=n.n(ae),ue=function(t){return t.ERROR="error",t.META="meta",t.RESULT="result",t.STATISTIC="statistic",t.PROGRESS="progress",t}({}),le=function(t){return"result/".concat(t)},ce=function(t){var e=t.split("/");return null!=e&&e[1]?parseInt(null==e?void 0:e[1],10):void 0},fe=n(29382),he=n(65455),de=n.n(he),ve=n(745);class pe extends Map{constructor(t,e=ge){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(me(this,t))}has(t){return super.has(me(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function me({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ge(t){return null!==t&&"object"==typeof t?t.valueOf():t}function ye(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const be=Symbol("implicit");function xe(){var t=new pe,e=[],n=[],r=be;function i(i){let o=t.get(i);if(void 0===o){if(r!==be)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new pe;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return xe(e,n).unknown(r)},ye.apply(i,arguments),i}var we=n(22195);function _e(t){return function(){return t}}const Ee=Math.abs,Se=Math.atan2,ke=Math.cos,Oe=Math.max,Te=Math.min,je=Math.sin,Re=Math.sqrt,Ae=1e-12,Ce=Math.PI,Ne=Ce/2,Me=2*Ce;function Ie(t){return t>=1?Ne:t<=-1?-Ne:Math.asin(t)}const Ze=Math.PI,Pe=2*Ze,Le=1e-6,De=Pe-Le;function ze(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class $e{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ze:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ze;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,f=l*l+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>Le)if(Math.abs(c*s-u*l)>Le&&i){let h=n-o,d=r-a,v=s*s+u*u,p=h*h+d*d,m=Math.sqrt(v),g=Math.sqrt(f),y=i*Math.tan((Ze-Math.acos((v+f-p)/(2*m*g)))/2),b=y/g,x=y/m;Math.abs(b-1)>Le&&this._append`L${t+b*l},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*h>l*d)},${this._x1=t+x*s},${this._y1=e+x*u}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${u},${l}`:(Math.abs(this._x1-u)>Le||Math.abs(this._y1-l)>Le)&&this._append`L${u},${l}`,n&&(f<0&&(f=f%Pe+Pe),f>De?this._append`A${n},${n},0,1,${c},${t-a},${e-s}A${n},${n},0,1,${c},${this._x1=u},${this._y1=l}`:f>Le&&this._append`A${n},${n},0,${+(f>=Ze)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Be(t){return t.innerRadius}function Ue(t){return t.outerRadius}function Fe(t){return t.startAngle}function He(t){return t.endAngle}function qe(t){return t&&t.padAngle}function Ve(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Re(s*s+u*u),c=l*u,f=-l*s,h=t+c,d=e+f,v=n+c,p=r+f,m=(h+v)/2,g=(d+p)/2,y=v-h,b=p-d,x=y*y+b*b,w=i-o,_=h*p-v*d,E=(b<0?-1:1)*Re(Oe(0,w*w*x-_*_)),S=(_*b-y*E)/x,k=(-_*y-b*E)/x,O=(_*b+y*E)/x,T=(-_*y+b*E)/x,j=S-m,R=k-g,A=O-m,C=T-g;return j*j+R*R>A*A+C*C&&(S=O,k=T),{cx:S,cy:k,x01:-c,y01:-f,x11:S*(i/w-1),y11:k*(i/w-1)}}function Ye(){var t=Be,e=Ue,n=_e(0),r=null,i=Fe,o=He,a=qe,s=null,u=function(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new $e(e)}(l);function l(){var l,c,f=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Ne,v=o.apply(this,arguments)-Ne,p=Ee(v-d),m=v>d;if(s||(s=l=u()),h<f&&(c=h,h=f,f=c),h>Ae)if(p>Me-Ae)s.moveTo(h*ke(d),h*je(d)),s.arc(0,0,h,d,v,!m),f>Ae&&(s.moveTo(f*ke(v),f*je(v)),s.arc(0,0,f,v,d,m));else{var g,y,b=d,x=v,w=d,_=v,E=p,S=p,k=a.apply(this,arguments)/2,O=k>Ae&&(r?+r.apply(this,arguments):Re(f*f+h*h)),T=Te(Ee(h-f)/2,+n.apply(this,arguments)),j=T,R=T;if(O>Ae){var A=Ie(O/f*je(k)),C=Ie(O/h*je(k));(E-=2*A)>Ae?(w+=A*=m?1:-1,_-=A):(E=0,w=_=(d+v)/2),(S-=2*C)>Ae?(b+=C*=m?1:-1,x-=C):(S=0,b=x=(d+v)/2)}var N=h*ke(b),M=h*je(b),I=f*ke(_),Z=f*je(_);if(T>Ae){var P,L=h*ke(x),D=h*je(x),z=f*ke(w),$=f*je(w);if(p<Ce)if(P=function(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,f=s-o,h=f*u-c*l;if(!(h*h<Ae))return[t+(h=(c*(e-o)-f*(t-i))/h)*u,e+h*l]}(N,M,z,$,L,D,I,Z)){var B=N-P[0],U=M-P[1],F=L-P[0],H=D-P[1],q=1/je(function(t){return t>1?0:t<-1?Ce:Math.acos(t)}((B*F+U*H)/(Re(B*B+U*U)*Re(F*F+H*H)))/2),V=Re(P[0]*P[0]+P[1]*P[1]);j=Te(T,(f-V)/(q-1)),R=Te(T,(h-V)/(q+1))}else j=R=0}S>Ae?R>Ae?(g=Ve(z,$,N,M,h,R,m),y=Ve(L,D,I,Z,h,R,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),R<T?s.arc(g.cx,g.cy,R,Se(g.y01,g.x01),Se(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,Se(g.y01,g.x01),Se(g.y11,g.x11),!m),s.arc(0,0,h,Se(g.cy+g.y11,g.cx+g.x11),Se(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,R,Se(y.y11,y.x11),Se(y.y01,y.x01),!m))):(s.moveTo(N,M),s.arc(0,0,h,b,x,!m)):s.moveTo(N,M),f>Ae&&E>Ae?j>Ae?(g=Ve(I,Z,L,D,f,-j,m),y=Ve(N,M,z,$,f,-j,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),j<T?s.arc(g.cx,g.cy,j,Se(g.y01,g.x01),Se(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,j,Se(g.y01,g.x01),Se(g.y11,g.x11),!m),s.arc(0,0,f,Se(g.cy+g.y11,g.cx+g.x11),Se(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,j,Se(y.y11,y.x11),Se(y.y01,y.x01),!m))):s.arc(0,0,f,_,w,m):s.lineTo(I,Z)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ce/2;return[ke(r)*n,je(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:_e(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:_e(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:_e(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:_e(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:_e(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:_e(+t),l):o},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:_e(+t),l):a},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function We(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Xe(t){return t}function Ge(){var t=Xe,e=We,n=null,r=_e(0),i=_e(Me),o=_e(0);function a(a){var s,u,l,c,f,h=(a=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(a)).length,d=0,v=new Array(h),p=new Array(h),m=+r.apply(this,arguments),g=Math.min(Me,Math.max(-Me,i.apply(this,arguments)-m)),y=Math.min(Math.abs(g)/h,o.apply(this,arguments)),b=y*(g<0?-1:1);for(s=0;s<h;++s)(f=p[v[s]=s]=+t(a[s],s,a))>0&&(d+=f);for(null!=e?v.sort((function(t,n){return e(p[t],p[n])})):null!=n&&v.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(g-h*b)/d:0;s<h;++s,m=c)u=v[s],c=m+((f=p[u])>0?f*l:0)+b,p[u]={data:a[u],index:s,value:f,startAngle:m,endAngle:c,padAngle:y};return p}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:_e(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:_e(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:_e(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:_e(+t),a):o},a}$e.prototype,Array.prototype.slice;var Ke=n(48614),Je=n(80374),Qe=n(73536);function tn(){tn=function(t,e){return new n(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function n(t,r,i){var o=new RegExp(t,r);return e.set(o,i||e.get(t)),(0,Je.Z)(o,n.prototype)}function r(t,n){var r=e.get(n);return Object.keys(r).reduce((function(e,n){var i=r[n];if("number"==typeof i)e[n]=t[i];else{for(var o=0;void 0===t[i[o]]&&o+1<i.length;)o++;e[n]=t[i[o]]}return e}),Object.create(null))}return(0,zt.Z)(n,RegExp),n.prototype.exec=function(e){var n=t.exec.call(this,e);if(n){n.groups=r(n,this);var i=n.indices;i&&(i.groups=r(i,this))}return n},n.prototype[Symbol.replace]=function(n,i){if("string"==typeof i){var o=e.get(this);return t[Symbol.replace].call(this,n,i.replace(/\$<([^>]+)>/g,(function(t,e){var n=o[e];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof i){var a=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!=(0,I.Z)(t[t.length-1])&&(t=[].slice.call(t)).push(r(t,a)),i.apply(this,t)}))}return t[Symbol.replace].call(this,n,i)},tn.apply(this,arguments)}var en=n(24998);function nn(t){return"number"==typeof t?Ke.ou.fromMillis(t):"string"==typeof t?Ke.ou.fromISO(t):t instanceof Date?Ke.ou.fromJSDate(t):Ke.ou.isDateTime(t)?t:Ke.ou.now()}var rn={NotStarted:{title:"Not started"},Started:{title:"Waiting"},InProgress:{title:"Running"},Finished:{title:"Completed"},Failed:{title:"Failed"},Aborted:{title:"Aborted"}},on=25;function an(t){return t.length>on?"…"+t.slice(-on):t}function sn(t,e){try{var n=Object.keys(e[e.length-1])[0];return"".concat(an(t),"\n(").concat(n,")")}catch(t){return""}}function un(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss.SSS",r=nn(t),i=nn(e),o=i.diff(r);return r>i?o.negate().toFormat(n):o.toFormat(n)}function ln(t){return t&&["Finished","Failed","Aborted"].indexOf(t)>=0}function cn(t){var e,n,r=t.type,i=t.node,o=t.colors,a=o.operation,s=o.text,u=document.createElement("div"),l=[],c=[],f=s.operationCount;if("update"===r)switch(null==i?void 0:i.state){case"Started":c.push({label:"Started",count:1}),l.push(a.started),n=a.startedBorder;break;case"Failed":c.push({label:"Failed",count:1}),l.push(a.failed),n=a.failedBorder;break;case"Aborted":c.push({label:"Failed",count:1}),l.push(a.aborted),n=a.abortedBorder;break;case"InProgress":var h,d,v=i.total||1,p=Math.round((null!==(h=i.running)&&void 0!==h?h:0)/v*100),m=Math.round((null!==(d=i.completed)&&void 0!==d?d:0)/v*100),g=Math.round(100-p-m);m>0&&(c.push({label:"Completed",count:m}),l.push(a.completed)),p>0&&(c.push({label:"Running",count:p}),l.push(a.running)),g>0&&(c.push({label:"Least",count:g}),l.push(a.started)),f=s.label,n=a.runningBorder;break;case"Finished":c.push({label:"Completed",count:1}),l.push(a.completed),n=a.completedBorder}else c.push({label:"Least",count:100}),l.push(a.new),n=a.newBorder;var y=xe(l),b=Math.min(80,80)/2,x=(0,we.Z)(u).append("svg").attr("xmlns","http://www.w3.org/2000/svg").attr("width",80).attr("height",80).attr("stroke",n).attr("stroke-width",2).append("g").attr("transform","translate(40,40)"),w=Ye().innerRadius(0).outerRadius(b-2),_=Ge().value((function(t){return t.count})).sort(null);if(x.selectAll("path").data(_(c)).enter().append("path").attr("d",w).attr("fill",(function(t){return y(t.data.label)})),i&&(null!==(e=i.total)&&void 0!==e?e:0)>0){var E,S=Number(null!==(E=i.total)&&void 0!==E?E:0),k=function(t){switch(Math.floor(Math.log10(t))+1){case 1:return 34;case 2:return 30;case 3:return 26;default:return 24}}(S);x.selectAll("text").data([i]).enter().append("text").text(S).attr("fill",f).attr("font-family","YS Text, Arial, sans-serif").attr("font-size","".concat(k)).attr("stroke-width","0").attr("transform","translate(0, ".concat(k/3,")")).attr("text-anchor","middle")}return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u.innerHTML)}function fn(t,e){var n,r=[],o=(0,ve.Z)(e);try{var a=function(){var e=(0,i.Z)(n.value,2),o=e[0],a=e[1],s=t.find((function(t){return t.Id===o}));if(s){var u=s.Pins.find((function(t){return t.Id===a}));u&&u.Type&&r.push({name:"".concat(s.Cluster,".`").concat(u.Table,"`"),type:u.Type})}};for(o.s();!(n=o.n()).done;)a()}catch(t){o.e(t)}finally{o.f()}return r}function hn(t,e,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[],a=0,s=Object.keys(e);a<s.length;a++){var u=s[a],l=t.get(u);if(!l&&i){var c=e[u],f="Node #".concat(u).concat(c.category?" (".concat(c.category,")"):"");l={id:u,level:0,title:f,label:an(null!=f?f:""),type:"op"}}if(l){var h,d,v=e[u];l.progress=v,v.stages&&!de()(v.stages)&&(ln(v.state)?l.label=an(null!==(h=l.title)&&void 0!==h?h:""):l.label=sn(null!==(d=l.title)&&void 0!==d?d:"",v.stages)),"function"==typeof n&&(l=n(l)),r&&(l.image=cn({type:"update",node:v,colors:r}),l.font={color:l.url?r.text.link:r.text.label}),o.push(l)}}o.length>0&&(i?t.update(o):t.updateOnly(o))}function dn(t,e){var n=[];t.forEach((function(t){if("in"===t.type||"out"===t.type)t.image=function(t){var e=t.table.fill1,n='\n <svg width="24" height="24" viewBox="0 0 24 24" fill="'.concat(e,'" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15 7H9v3.5h6V7zm1.5 0v3.5h6V7h-6zM15 12H9v3.5h6V12zm1.5 3.5V12h6v3.5h-6zM15 17H9v3.5h6V17zm1.5 3.5V17h6v3.5h-6zm0 1.5h-15A1.5 1.5 0 010 20.5v-17C0 2.67.67 2 1.5 2h21c.83 0 1.5.67 1.5 1.5v17c0 .83-.67 1.5-1.5 1.5h-6zm-9-10v3.5h-6V12h6zm0 5h-6v3.5h6V17zm0-6.5h-6V7h6v3.5z"/>\n </svg>');return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)}(e);else{var r=t.progress;t.font={color:null!=r&&r.remoteId?e.text.link:e.text.label},t.image=cn(r?{type:"update",node:r,colors:e}:{type:"new",colors:e})}n.push(t)}),{filter:function(t){return Boolean(t.type)}}),n.length>0&&t.updateOnly(n)}function vn(t,e){var n=[];t.forEach((function(t){n.push(e(t))})),n.length>0&&t.updateOnly(n)}function pn(t){return Boolean(t&&(t.Streams||t.InputColumns||t.InputKeyFilterColumns))}function mn(t){var e;return(null!==(e=null==t?void 0:t.total)&&void 0!==e?e:0)>0}function gn(t){return!de()(null==t?void 0:t.stages)}function yn(t){var e=t.progress;if(e){if(mn(e))return!0;if(gn(e))return!0}return pn(t.details)||Boolean(t.schemas)}function bn(t){var e=o.useState((function(){return wn(t)})),n=(0,i.Z)(e,2),r=n[0],a=n[1];return o.useEffect((function(){var e=!1,n=function(){e||a(wn(t))};return t.on("*",n),function(){e=!0,t.off("*",n)}}),[t]),r}var xn=Object.keys(rn);function wn(t){var e={};return t.forEach((function(t){var n;if("in"!==t.type&&"out"!==t.type){var r=(null===(n=t.progress)||void 0===n?void 0:n.state)||"NotStarted";void 0===e[r]&&(e[r]=0),e[r]+=1}})),xn.map((function(t){return{state:t,title:rn[t].title,count:e[t]||0}}))}function _n(t,e,n){for(var r=t.getConnectedNodes(n),i=new Set([n]),o=function(){var n,o=r.shift();if("string"==typeof o&&0===(null===(n=e.get(o))||void 0===n?void 0:n.size)){var a,s=t.getConnectedEdges(o),u=(0,ve.Z)(s);try{for(u.s();!(a=u.n()).done;){var l=a.value;i.has(l)||(i.add(l),r.push.apply(r,(0,S.Z)(t.getConnectedNodes(l).filter((function(t){return"string"==typeof t&&o!==t})))))}}catch(t){u.e(t)}finally{u.f()}}};r.length>0;)o();return i}function En(t,e,n){var r,i=t.getConnectedEdges(n),o=new Set,a=(0,ve.Z)(i);try{for(a.s();!(r=a.n()).done;){var s,u=_n(t,e,r.value),l=(0,ve.Z)(u);try{for(l.s();!(s=l.n()).done;){var c=s.value;o.add(c)}}catch(t){l.e(t)}finally{l.f()}}}catch(t){a.e(t)}finally{a.f()}return o}function Sn(){return o.useCallback((function(t){var e;if("in"===t.type||"out"===t.type){var n,r=function(t){var e=tn(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(t)||tn(/^(?:(\w+|\[[^\]]+\])\.\s*)?\[(\/*)([^\]]+)\](?::\[?([\w-]+)\]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(t)||tn(/^(['"])(\/\/)([^`]+)\1/,{quote:1,openingSlash:2,tablePath:3}).exec(t),n=null==e?void 0:e.groups;if(n){var r=n.cluster;r&&r.startsWith("`")&&(r=r.replace(/`/g,"")),r&&r.startsWith("[")&&(r=r.replace(/[[\]]/g,""));var i=function(t){try{return Qe.Z.YPath.parseRelative(function(t){return t.startsWith("//")?t.slice(1):t.startsWith("/")||0===t.length?t:"/".concat(t)}(t))}catch(t){return[]}}(n.openingSlash+n.tablePath).filter((function(t){var e=t.name;return Boolean(e)}));if(0===i.length)return null;var o=i.map((function(t){return t.name})).join("/");return o.startsWith("//")||(o=o.startsWith("/")?"/"+o:"//"+o),{cluster:r,isPathAbsolute:Boolean(n.openingSlash),path:o,view:n.view}}return null}(null!==(n=t.title)&&void 0!==n?n:"");r&&(t.url=(0,en.q)(r.cluster,r.path))}else null!==(e=t.progress)&&void 0!==e&&e.remoteId&&(t.url=function(t){var e,n=null===(e=t.progress)||void 0===e?void 0:e.remoteId;if(n){var r,i,o,a,s=n.split("/");return(r=s[0].split(".")[0],i=s[1],o=s[2],a="",void 0===o?a="/operations/".concat(encodeURIComponent(i)):"filter"===o&&(a="/operations?type=all&state=all&filter=".concat(encodeURIComponent(i))),"/".concat(r.split(".")[0]).concat(a))||void 0}}(t));return t}),[])}function kn(t,e){var n=e.operation,r=document.createElement("div"),i=[],o=[],a=null!=t?t:{},s=a.running,u=void 0===s?0:s,l=a.completed,c=void 0===l?0:l,f=a.total||1,h=Math.round(u/f*100),d=Math.round(c/f*100),v=Math.round(100-h-d);d>0&&(o.push({label:"Completed",count:d}),i.push(n.completed)),h>0&&(o.push({label:"Running",count:h}),i.push(n.running)),v>0&&(o.push({label:"Least",count:v}),i.push(n.started));var p=xe(i),m=Math.min(80,80)/2,g=(0,we.Z)(r).append("svg").attr("xmlns","http://www.w3.org/2000/svg").attr("viewBox","0 0 ".concat(80," ").concat(80)).append("g").attr("transform","translate(40,40)"),y=Ye().innerRadius(m-10).outerRadius(m),b=Ge().value((function(t){return t.count})).sort(null);return g.selectAll("path").data(b(o)).enter().append("path").attr("d",y).attr("fill",(function(t){return p(t.data.label)})),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r.innerHTML)}function On(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){e.forEach((function(e){"function"==typeof e?e(t):e&&(e.current=t)}))}}function Tn(t,e){if(0===t.length)return[];var n=function(t,e){var n=e.asc,r=e.selector;return r?t.sort((function(t,e){return function(t,e,n){return void 0===t||t>e?n?1:-1:void 0===e||t<e?n?-1:1:0}(r(t),r(e),n)})):t}(t,e);return n.map((function(t){return(0,h.Z)((0,h.Z)({},t),{},{children:Tn(t.children,e)})}))}function jn(t,e){var n,r=e.filter,i=e.selector,o=(n=r,n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).replace(/\s+/g,".*?");return Rn(t,new RegExp(o,"i"),i)}function Rn(t,e,n){return t.filter((function(t){return!!e.test(String(n(t)))||(t.children=Rn(t.children,e,n),t.children.length>0)}))}function An(t){return(0,h.Z)((0,h.Z)({},t),{},{children:t.children.map((function(t){return t.key}))})}function Cn(t){return t.reduce((function(t,e){return[].concat((0,S.Z)(t),[An(e)],(0,S.Z)(Cn(e.children)))}),[])}function Nn(t){return(0,S.Z)(t).map((function(t){return(0,h.Z)((0,h.Z)({},t),{},{children:Nn(t.children)})}))}var Mn=n(34849),In=n(45069),Zn=["data","columns","settings","tableState","onTableStateChange","filterInfo","sortInfo"],Pn=(0,s.Z)("collapsible-table"),Ln=(0,s.Z)("collapsible-table-cell");function Dn(t,e){var n=Cn(t),r="collapsed"!==e;return n.reduce((function(t,e){return t[e.key]=r,t}),{})}function zn(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e[t];if(!r||0===r.children.length)return 0===n?[]:[t];var i=r.children.reduce((function(t,r){return[].concat((0,S.Z)(t),(0,S.Z)(zn(r,e,n+1)))}),[]);return 0===n?i:[t].concat((0,S.Z)(i))}function $n(t,e){var n=function(t){return t.reduce((function(t,e){return t[e.key]=e,t}),{})}(t),r=Object.entries(e).filter((function(t){var e=(0,i.Z)(t,2);return e[0],!e[1]})).map((function(t){return(0,i.Z)(t,1)[0]}));if(0===r.length)return t;var o=r.reduce((function(t,e){return[].concat((0,S.Z)(t),(0,S.Z)(zn(e,n)))}),[]);return t.filter((function(t){return!o.includes(t.key)}))}function Bn(t,e,n){return Tn(jn(Nn(t),n),e)}var Un=(0,d.jsx)(c.J,{data:Mn.Z,size:10}),Fn=(0,d.jsx)(c.J,{data:In.Z,size:10});function Hn(t){var e=t.value,n=t.row,r=t.visible,a=t.onChange,s=o.useState(r),u=(0,i.Z)(s,2),c=u[0],f=u[1],h=n.children.length>0;o.useEffect((function(){f(r)}),[r]);var v=o.useCallback((function(){f((function(t){return"function"==typeof a&&a(n.key,!t),!t}))}),[n.key,a]);return(0,d.jsxs)("div",{className:Ln({collapsible:h,level:n.level>5?"max":String(n.level)}),children:[h?(0,d.jsx)("div",{className:Ln("toggler",{type:c?"collapse":"expand"}),children:(0,d.jsx)(l.z,{view:"flat-secondary",onClick:v,title:c?"collapse":"expand",extraProps:{"aria-expanded":c},children:c?Un:Fn})}):null,(0,d.jsx)("span",{className:Ln("value"),children:e})]})}function qn(t){var e=t.data,n=t.columns,a=t.settings,s=t.tableState,u=t.onTableStateChange,l=t.filterInfo,c=t.sortInfo,f=(0,fe.Z)(t,Zn),v=o.useState((function(){return Dn(e,s)})),p=(0,i.Z)(v,2),m=p[0],g=p[1],y=o.useCallback((function(t,e){g((function(n){return(0,h.Z)((0,h.Z)({},n),{},(0,r.Z)({},t,e))})),u("mixed")}),[u]),b=o.useMemo((function(){return Bn(e,c,l)}),[e,c,l]),x=o.useMemo((function(){return t=m,$n(Cn(b),t);var t}),[b,m]),w=o.useMemo((function(){return function(t,e,n){return t.map((function(t,r){return 0===r?(0,h.Z)((0,h.Z)({},t),{},{render:function(t){var r=e[t.row.key];return(0,d.jsx)(Hn,(0,h.Z)({onChange:n,visible:r},t))}}):t}))}(n,m,y)}),[n,m,y]);return o.useEffect((function(){"mixed"!==s&&g((function(t){var n=Dn(e,s);return G()(t,n)?t:n}))}),[e,s]),o.useEffect((function(){""!==l.filter&&u("expanded")}),[l.filter,u]),(0,d.jsx)("div",{className:Pn(),children:(0,d.jsx)(j.Z,(0,h.Z)({columns:w,data:x,settings:a},f))})}var Vn=["min","max","avg","sum","count"];function Yn(t){return"object"!==(0,I.Z)(t)||"object"===(0,I.Z)(t)&&null!==t&&(0===Object.values(t).length||"object"!==(0,I.Z)(Object.values(t)[0]))}function Wn(t){return!("object"===(0,I.Z)(t)&&null!==t&&Object.keys(t).some((function(t){return Vn.includes(t)})))}function Xn(t){if("object"!==(0,I.Z)(t)||!t)return t;var e={};return Object.keys(t).forEach((function(n){!function(t,e,n){for(var r=t,i=0;i<e.length-1;i++){var o=e[i];r[o]||(r[o]={}),r=r[o]}r[e[e.length-1]]=n}(e,n.split("/"),Xn(t[n]))})),e}function Gn(t){if(!t)return[];var e=function t(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=[],a=0,s=Object.entries(e);a<s.length;a++){var u=(0,i.Z)(s[a],2),l=u[0],c=u[1],f=Yn(c),d=""===n?l:"".concat(n,"/").concat(l),v=n||null,p=f?[]:t(c,d,r+1),m={key:d,name:l,level:r,children:p,parent:v};f&&(m=(0,h.Z)((0,h.Z)({},m),c)),(f&&!Wn(c)||p.length>0)&&o.push(m)}return o}(Xn(t));return e}function Kn(t){var e=t.value;return null!=e?e:"–"}var Jn=[{name:"name",header:"Metric",sortable:!1},{name:"min",header:"min",sortable:!1,align:"right",width:120,render:Kn},{name:"max",header:"max",sortable:!1,align:"right",width:120,render:Kn},{name:"avg",header:"avg",sortable:!1,align:"right",width:120,render:Kn},{name:"sum",header:"sum",sortable:!1,align:"right",width:120,render:Kn},{name:"count",header:"count",sortable:!1,align:"right",width:120,render:Kn}],Qn={displayIndices:!1,stickyHead:E.qA,stickyTop:0},tr=(0,s.Z)("yql-statistics-table");function er(t){var e,n=t.query,r=o.useState(""),a=(0,i.Z)(r,2),s=a[0],u=(a[1],o.useState("expanded")),l=(0,i.Z)(u,2),c=l[0],f=l[1],h=(0,o.useMemo)((function(){return function(t){return{filter:t,selector:function(t){return t.name}}}(s)}),[s]),v=(0,o.useMemo)((function(){return{asc:!0,selector:function(t){return t.name}}}),[]),p=(0,o.useMemo)((function(){var t;return Gn(null===(t=n.progress)||void 0===t?void 0:t.yql_statistics)}),[null===(e=n.progress)||void 0===e?void 0:e.yql_statistics]);return(0,d.jsx)("div",{className:tr(),children:(0,d.jsx)(qn,{theme:"yandex-cloud",data:p,columns:Jn,sortInfo:v,filterInfo:h,settings:Qn,tableState:c,onTableStateChange:f})})}var nr=o.createContext(void 0),rr=o.createContext(void 0),ir=o.createContext(void 0),or=o.createContext(void 0),ar=o.createContext(void 0),sr=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function ur(t){var e=t.plan,n=t.progress,r=t.children,a=t.defaultView,s=o.useMemo((function(){return sr}),[!1]),u=s[0].value,l=o.useState(null!=a?a:u),c=(0,i.Z)(l,2),f=c[0],h=c[1],v=f;return s.find((function(t){return t.value===v}))||(v=u),(0,d.jsx)(nr.Provider,{value:null!=e?e:null,children:(0,d.jsx)(ir.Provider,{value:s,children:(0,d.jsx)(rr.Provider,{value:v,children:(0,d.jsx)(or.Provider,{value:h,children:(0,d.jsx)(ar.Provider,{value:null!=n?n:null,children:r})})})})})}function lr(){var t=o.useContext(ar);if(void 0===t)throw new Error("useResultProgress must be used within a PlanProvider");return t}function cr(){var t=o.useContext(rr);if(void 0===t)throw new Error("usePlanView must be used within a PlanProvider");return t}var fr=function(t){return(t+1)%1e6};function hr(){return(0,o.useReducer)(fr,0)[1]}var dr=n(12442),vr=n(53755),pr=n(88047),mr=n.n(pr);const gr={top:0,right:0,bottom:0,left:0};var yr=n(31596),br=(0,s.Z)("yql-loader");function xr(t){var e=t.className,n=t.size,r=t.local,a=t.statical,s=t.delay,u=void 0===s?600:s,l=t.veil,c=o.useState(!1),h=(0,i.Z)(c,2),v=h[0],p=h[1];return o.useEffect((function(){var t=setTimeout((function(){p(!0)}),u);return function(){clearTimeout(t)}}),[]),v?(0,d.jsx)("div",{className:br({local:r,veil:l,statical:a},e),children:(0,d.jsx)(f.a,{size:n})}):null}var wr=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),_r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Er=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Sr="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Er):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},kr=["top","right","bottom","left","width","height","size","weight"],Or="undefined"!=typeof MutationObserver,Tr=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Sr(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){_r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Or?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){_r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;kr.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),jr=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Rr=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Er},Ar=Zr(0,0,0,0);function Cr(t){return parseFloat(t)||0}function Nr(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+Cr(t["border-"+n+"-width"])}),0)}var Mr="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Rr(t).SVGGraphicsElement}:function(t){return t instanceof Rr(t).SVGElement&&"function"==typeof t.getBBox};function Ir(t){return _r?Mr(t)?function(t){var e=t.getBBox();return Zr(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Ar;var r=Rr(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=Cr(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Cr(r.width),u=Cr(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Nr(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Nr(r,"top","bottom")+a)),!function(t){return t===Rr(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Zr(i.left,i.top,s,u)}(t):Ar}function Zr(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Pr=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Zr(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ir(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Lr=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return jr(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);jr(this,{target:t,contentRect:n})},Dr=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new wr,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Rr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Pr(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Rr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Lr(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),zr="undefined"!=typeof WeakMap?new WeakMap:new wr,$r=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Tr.getInstance(),r=new Dr(e,n,this);zr.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){$r.prototype[t]=function(){var e;return(e=zr.get(this))[t].apply(e,arguments)}}));const Br=void 0!==Er.ResizeObserver?Er.ResizeObserver:$r;var Ur=n(67120),Fr={grad:.9,turn:360,rad:360/(2*Math.PI)},Hr=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},qr=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},Vr=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),t>n?n:t>e?t:e},Yr=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Wr=function(t){return{r:Vr(t.r,0,255),g:Vr(t.g,0,255),b:Vr(t.b,0,255),a:Vr(t.a)}},Xr=function(t){return{r:qr(t.r),g:qr(t.g),b:qr(t.b),a:qr(t.a,3)}},Gr=/^#([0-9a-f]{3,8})$/i,Kr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Jr=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,o=Math.max(e,n,r),a=o-Math.min(e,n,r),s=a?o===e?(n-r)/a:o===n?2+(r-e)/a:4+(e-n)/a:0;return{h:60*(s<0?s+6:s),s:o?a/o*100:0,v:o/255*100,a:i}},Qr=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var o=Math.floor(e),a=r*(1-n),s=r*(1-(e-o)*n),u=r*(1-(1-e+o)*n),l=o%6;return{r:255*[r,s,a,a,u,r][l],g:255*[u,r,r,s,a,a][l],b:255*[a,a,u,r,r,s][l],a:i}},ti=function(t){return{h:Yr(t.h),s:Vr(t.s,0,100),l:Vr(t.l,0,100),a:Vr(t.a)}},ei=function(t){return{h:qr(t.h),s:qr(t.s),l:qr(t.l),a:qr(t.a,3)}},ni=function(t){return Qr((n=(e=t).s,{h:e.h,s:(n*=((r=e.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:e.a}));var e,n,r},ri=function(t){return{h:(e=Jr(t)).h,s:(i=(200-(n=e.s))*(r=e.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:e.a};var e,n,r,i},ii=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oi=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ai=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,si=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ui={string:[[function(t){var e=Gr.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?qr(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?qr(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=ai.exec(t)||si.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wr({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=ii.exec(t)||oi.exec(t);if(!e)return null;var n,r,i=ti({h:(n=e[1],r=e[2],void 0===r&&(r="deg"),Number(n)*(Fr[r]||1)),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)});return ni(i)},"hsl"]],object:[[function(t){var e=t.r,n=t.g,r=t.b,i=t.a,o=void 0===i?1:i;return Hr(e)&&Hr(n)&&Hr(r)?Wr({r:Number(e),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(t){var e=t.h,n=t.s,r=t.l,i=t.a,o=void 0===i?1:i;if(!Hr(e)||!Hr(n)||!Hr(r))return null;var a=ti({h:Number(e),s:Number(n),l:Number(r),a:Number(o)});return ni(a)},"hsl"],[function(t){var e=t.h,n=t.s,r=t.v,i=t.a,o=void 0===i?1:i;if(!Hr(e)||!Hr(n)||!Hr(r))return null;var a=function(t){return{h:Yr(t.h),s:Vr(t.s,0,100),v:Vr(t.v,0,100),a:Vr(t.a)}}({h:Number(e),s:Number(n),v:Number(r),a:Number(o)});return Qr(a)},"hsv"]]},li=function(t,e){for(var n=0;n<e.length;n++){var r=e[n][0](t);if(r)return[r,e[n][1]]}return[null,void 0]},ci=function(t,e){var n=ri(t);return{h:n.h,s:Vr(n.s+100*e,0,100),l:n.l,a:n.a}},fi=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},hi=function(t,e){var n=ri(t);return{h:n.h,s:n.s,l:Vr(n.l+100*e,0,100),a:n.a}},di=function(){function t(t){this.parsed=function(t){return"string"==typeof t?li(t.trim(),ui.string):"object"==typeof t&&null!==t?li(t,ui.object):[null,void 0]}(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return null!==this.parsed},t.prototype.brightness=function(){return qr(fi(this.rgba),2)},t.prototype.isDark=function(){return fi(this.rgba)<.5},t.prototype.isLight=function(){return fi(this.rgba)>=.5},t.prototype.toHex=function(){return e=(t=Xr(this.rgba)).r,n=t.g,r=t.b,o=(i=t.a)<1?Kr(qr(255*i)):"","#"+Kr(e)+Kr(n)+Kr(r)+o;var t,e,n,r,i,o},t.prototype.toRgb=function(){return Xr(this.rgba)},t.prototype.toRgbString=function(){return e=(t=Xr(this.rgba)).r,n=t.g,r=t.b,(i=t.a)<1?"rgba("+e+", "+n+", "+r+", "+i+")":"rgb("+e+", "+n+", "+r+")";var t,e,n,r,i},t.prototype.toHsl=function(){return ei(ri(this.rgba))},t.prototype.toHslString=function(){return e=(t=ei(ri(this.rgba))).h,n=t.s,r=t.l,(i=t.a)<1?"hsla("+e+", "+n+"%, "+r+"%, "+i+")":"hsl("+e+", "+n+"%, "+r+"%)";var t,e,n,r,i},t.prototype.toHsv=function(){return t=Jr(this.rgba),{h:qr(t.h),s:qr(t.s),v:qr(t.v),a:qr(t.a,3)};var t},t.prototype.invert=function(){return vi({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},t.prototype.saturate=function(t){return void 0===t&&(t=.1),vi(ci(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),vi(ci(this.rgba,-t))},t.prototype.grayscale=function(){return vi(ci(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),vi(hi(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),vi(hi(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){return"number"==typeof t?vi({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):qr(this.rgba.a,3);var e},t.prototype.hue=function(t){var e=ri(this.rgba);return"number"==typeof t?vi({h:t,s:e.s,l:e.l,a:e.a}):qr(e.h)},t.prototype.isEqual=function(t){return this.toHex()===vi(t).toHex()},t}(),vi=function(t){return t instanceof di?t:new di(t)},pi=[],mi=function(t){t.forEach((function(t){pi.indexOf(t)<0&&(t(di,ui),pi.push(t))}))};function gi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;return getComputedStyle(e).getPropertyValue(t)}mi([function(t,e){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};t.prototype.toName=function(e){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var i,a,s=r[this.toHex()];if(s)return s;if(null==e?void 0:e.closest){var u=this.toRgb(),l=1/0,c="black";if(!o.length)for(var f in n)o[f]=new t(n[f]).toRgb();for(var h in n){var d=(i=u,a=o[h],Math.pow(i.r-a.r,2)+Math.pow(i.g-a.g,2)+Math.pow(i.b-a.b,2));d<l&&(l=d,c=h)}return c}},e.string.push([function(e){var r=e.toLowerCase(),i="transparent"===r?"#0000":n[r];return i?new t(i).toRgb():null},"name"])}]);var yi=o.createContext(void 0);function bi(t){var e=t.children,n=t.container,r=(0,Ur.C)(),a=o.useState((function(){return xi(n)})),s=(0,i.Z)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(t){var e=xi(n);return G()(t,e)?t:e}))}),[r,n]),(0,d.jsx)(yi.Provider,{value:u,children:e})}function xi(t){var e=function(e){return n=gi("--yql-graph-color-".concat(e),null!=t?t:void 0),vi(n).toHex();var n};return{operation:{new:e("operation-new"),newBorder:e("operation-new-border"),newBackground:e("operation-new-background"),pending:e("operation-pending"),completed:e("operation-completed"),completedBorder:e("operation-completed-border"),completedBackground:e("operation-completed-background"),aborted:e("operation-aborted"),abortedBorder:e("operation-aborted-border"),abortedBackground:e("operation-aborted-background"),failed:e("operation-failed"),failedBorder:e("operation-failed-border"),failedBackground:e("operation-failed-background"),running:e("operation-running"),runningBorder:e("operation-running-border"),runningBackground:e("operation-running-background"),started:e("operation-started"),startedBorder:e("operation-started-border"),startedBackground:e("operation-started-background")},table:{fill1:e("table-fill1"),fill2:e("table-fill2")},edge:{color:e("edge"),highlight:e("edge-highlight")},text:{label:e("text-label"),link:e("text-link"),operationCount:e("text-operation-count")}}}function wi(){var t=o.useContext(yi);if(void 0===t)throw new Error("useGraphColors must be used within a GraphColorsProvider");return t}var _i=n(38497),Ei=(0,s.Z)("node-details-info");function Si(t){var e=t.Streams,n=t.InputColumns,r=t.InputKeyFilterColumns;return(0,d.jsxs)("div",{className:Ei(),children:[e&&(0,d.jsx)(_i.Z,{name:"Streams",size:"ns",collapsed:!1,children:(0,d.jsx)("div",{className:Ei("streams"),children:Object.keys(e).map((function(t){return(0,d.jsx)(ki,{name:t,data:e[t]},t)}))})}),(0,d.jsx)(Ti,{data:n,title:"InputColumns"}),(0,d.jsx)(Ti,{data:r,title:"InputKeyFilterColumns"})]})}function ki(t){var e=t.name,n=t.data;return(0,d.jsxs)("div",{className:Ei("entry"),children:[(0,d.jsx)("div",{className:Ei("entry-name"),children:e}),Array.isArray(n)&&(0,d.jsx)("div",{className:Ei("entry-items"),children:n.map((function(t,e){return(0,d.jsx)(Oi,(0,h.Z)({},t),e)}))})]})}function Oi(t){var e=t.Name,n=t.Children;return(0,d.jsxs)("div",{className:Ei("item"),children:[(0,d.jsx)(x.x,{className:Ei("item-name"),color:"complementary",children:e}),Array.isArray(n)&&(0,d.jsx)("div",{className:Ei("item-children"),children:n.map((function(t,e){return(0,d.jsx)("div",{className:Ei("item-group"),children:t.map((function(t,e){return(0,d.jsx)(Oi,(0,h.Z)({},t),e)}))},e)}))})]})}function Ti(t){var e,n=t.data,r=t.title;return n?function(t){return Array.isArray(t)&&t.some((function(t){return Array.isArray(t)}))}(n)?(0,d.jsx)(o.Fragment,{children:n.map((function(t,e){return t?(n=Array.isArray(t)?t:[t],(0,d.jsx)(_i.Z,{name:"".concat(r," #").concat(e+1),size:"ns",children:(0,d.jsx)(ji,{items:n,limit:20})},e)):null;var n}))}):(e=Array.isArray(n)?n:[n],(0,d.jsx)(_i.Z,{name:r,size:"ns",collapsed:!1,children:(0,d.jsx)(ji,{items:e,limit:20})})):null}function ji(t){var e,n=t.items,r=t.limit,a=t.className,s=o.useState(!1),u=(0,i.Z)(s,2),c=u[0],f=u[1],h=r&&!c?Math.min(n.length,r):n.length,v=n.length-h,p=0===h,m=v>0?n.slice(0,h):n;return(0,d.jsxs)("div",{className:Ei("columns",a),children:[m.map((function(t,e){return(0,d.jsx)("div",{className:Ei("columns-column"),children:(0,d.jsx)(x.x,{color:"complementary",children:t})},e)})),Boolean(v)&&(0,d.jsx)(l.z,{className:Ei("columns-expand"),onClick:function(t){t.stopPropagation(),f(!0)},children:(e=v,"Show ".concat(e," more items"))}),p&&(0,d.jsx)("div",{className:Ei("columns-empty"),children:"Empty list"})]})}var Ri=(0,s.Z)("node-jobs"),Ai=[{name:"status",header:"Status",sortable:!1,render:function(t){var e=t.row,n=t.footer;return(0,d.jsxs)("div",{className:Ri("item"),children:[(0,d.jsx)("div",{className:Ri("item-color",{status:e.status.toLowerCase()})}),(0,d.jsx)(x.x,{className:Ri("item-title"),color:n?"primary":"secondary",children:e.status})]})}},{name:"count",header:"Quantity",align:j.Z.RIGHT,sortable:!1}];function Ci(t){var e=t.running,n=void 0===e?0:e,r=t.completed,i=void 0===r?0:r,o=t.failed,a=void 0===o?0:o,s=t.aborted,u=void 0===s?0:s,l=t.total,c=void 0===l?0:l,f=[];return f.push({status:"Pending",count:c-n-i-a-u}),f.push({status:"Running",count:n}),f.push({status:"Completed",count:i}),f.push({status:"Failed",count:a}),f.push({status:"Aborted",count:u}),(0,d.jsx)("div",{className:Ri(),children:(0,d.jsx)(j.Z,{theme:"yandex-cloud",columns:Ai,data:f,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var Ni=n(91502),Mi=n.n(Ni),Ii=n(29583),Zi=n.n(Ii),Pi="StructType",Li="ListType",Di="StreamType",zi="TupleType",$i="DictType",Bi="DataType",Ui="VariantType",Fi="OptionalType",Hi="TaggedType",qi="VoidType",Vi="NullType",Yi="EmptyDictType",Wi="EmptyListType",Xi=["Void","Yson","Json","Null"],Gi=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],Ki=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],Ji=["String","Utf8","Json"];function Qi(t){return Gi.indexOf(t)>=0}function to(t){return Ki.indexOf(t)>=0}function eo(t){return Ji.indexOf(t)>=0}function no(t){return Array.isArray(t)&&t[0]===Li&&Array.isArray(t[1])}function ro(t){return Array.isArray(t)&&t[0]===zi&&Array.isArray(t[1])}function io(t){return Array.isArray(t)&&t[0]===Pi&&Array.isArray(t[1])}function oo(t){for(var e=t;e[0]===Fi;)e=e[1];if(e[0]===Pi){var n=Zi()(e[1]);return["Bins","Max","Min","WeightsSum"].every((function(t){return Object.prototype.hasOwnProperty.call(n,t)}))&&Array.isArray(n.Bins)&&n.Bins[0]===Li&&n.Bins[1][0]===Pi&&G()(Mi().apply(void 0,(0,S.Z)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function ao(t){return"Struct"===t.name}function so(t){return"Variant"===t.name}function uo(t){return Boolean(t.complex)}function lo(t){switch(t[0]){case Bi:return{name:t[1],simple:(n=t[1],Xi.indexOf(n)<0),numeric:Qi(t[1]),dateTime:to(t[1]),string:eo(t[1]),params:t.slice(2)};case Fi:return function(t){return t.optional&&(t.optionalLevel=(t.optionalLevel||1)+1),t.optional=!0,t}(lo(t[1]));case Hi:return function(t,e){return t.tagged=!0,t.tags=(t.tags||[]).concat(e),t}(lo(t[2]),t[1]);case $i:return t[2][0]===qi?{name:"Set",complex:!0,type:lo(t[1])}:{name:"Dict",complex:!0,type:t.slice(1).map(lo)};case Li:return{name:"List",complex:!0,type:lo(t[1])};case Yi:return{name:"EmptyDict"};case Wi:return{name:"EmptyList"};case Di:return{name:"Stream",complex:!0,type:lo(t[1])};case zi:return{name:"Tuple",complex:!0,type:t[1].map(lo)};case Pi:return{name:"Struct",complex:!0,struct:t[1].map((function(t){return{key:t[0],type:lo(t[1])}}))};case Ui:var e=function(t){var e=lo(t);switch(e.name){case"Tuple":return e.type.map((function(t,e){return{key:e,type:t}}));case"Struct":return e.struct;default:throw new Error("Invalid type in Variant type: ".concat(e.name))}}(t[1]);return e.every((function(t){return"Void"===t.type.name}))?{name:"Enum",complex:!0,type:e.map((function(t){return{name:t.key}}))}:{name:"Variant",complex:!0,struct:e};case qi:return{name:"Void"};case Vi:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var co=["level","defaultExpanded"],fo=(0,s.Z)("data-type"),ho=function(t){var e=t.entry,n=t.level;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:fo("struct-key"),children:e.key},"key")," : ",(0,d.jsx)(vo,(0,h.Z)({level:n},e.type),"type")]})};function vo(t){var e=t.level,n=void 0===e?0:e,r=t.defaultExpanded,a=(0,fe.Z)(t,co),s=o.useState(void 0===r?n<2:r),u=(0,i.Z)(s,2),l=u[0],c=u[1],f=a.optional,v=a.optionalLevel,p=a.name,m=a.tagged,g=a.tags,y=a.params,b=a.complex;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("span",{className:fo({optional:f,complex:b,"optional-multilevel":(null!=v?v:0)>0}),"data-optional":v?"optional × ".concat(v):void 0,onClick:function(){return c((function(t){return!t}))},children:[p,Array.isArray(y)&&y.length>0&&"(".concat(y.join(", "),")"),m&&g?g.map((function(t){return(0,d.jsx)("span",{className:fo("tag"),children:t},t)})):null]},"name"),uo(a)?(0,d.jsxs)("div",{className:fo("subtype",{expanded:l}),children:[(0,d.jsx)("span",{className:fo("ellipsis"),onClick:function(){return c((function(t){return!t}))}}),l&&(0,d.jsx)("div",{className:fo("content",{expanded:l}),children:ao(a)||so(a)?a.struct.map((function(t,e){return(0,d.jsx)(ho,{level:n+1,entry:t},e)})):(Array.isArray(a.type)?a.type:[a.type]).map((function(t,e){return(0,d.jsx)(vo,(0,h.Z)({level:n+1},t),e)}))})]},"subtype"):(0,d.jsx)("br",{},"separator")]})}const po=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,d.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12.75c0 .414.336.75.75.75h12.5a.75.75 0 0 0 0-1.5H1.75a.75.75 0 0 0-.75.75ZM1 8c0 .414.336.75.75.75h8.5a.75.75 0 0 0 0-1.5h-8.5A.75.75 0 0 0 1 8Zm.75-4a.75.75 0 0 1 0-1.5h2.5a.75.75 0 0 1 0 1.5h-2.5Z",clipRule:"evenodd"})}))},mo=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,d.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 3.25a.75.75 0 0 1 .75-.75h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 3.25ZM1 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 1 8Zm.75 4a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5h-2.5Z",clipRule:"evenodd"})}))};var go=n(33350),yo=(0,s.Z)("yql-schema-table"),bo=[{name:"name",header:"Name",sortable:!1,render:function(t){var e=t.row;if("function"==typeof e.onNameClick){var n=e.onNameClick;return(0,d.jsxs)(k.r,{className:yo("item"),view:"primary",onClick:function(){n(e.name)},children:[e.sort&&(0,d.jsx)(c.J,{className:yo("sort-icon"),data:e.sort.ascending?po:mo,size:16}),(0,d.jsx)("span",{className:yo("name"),title:e.name,children:e.name}),(0,d.jsx)(c.J,{className:yo("insert-icon"),data:go.Z,size:16})]})}return(0,d.jsxs)("span",{className:yo("item"),children:[e.sort&&(0,d.jsx)(c.J,{className:yo("sort-icon"),data:e.sort.ascending?po:mo,size:16}),(0,d.jsx)("span",{className:yo("name"),title:e.name,children:e.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(t){var e=t.row;return(0,d.jsx)(vo,(0,h.Z)({},e.type))}}];function xo(t){var e=t.className,n=t.schemaFields;return(0,d.jsx)("div",{className:yo(null,e),children:(0,d.jsx)(j.Z,{theme:"yandex-cloud",columns:bo,data:n,startIndex:1})})}var wo=["key"],_o=function(t){return Boolean(t.type.simple)},Eo=function(t){return Boolean(t.type.simple)};function So(t){if(function(t){return!!ro(t)&&t[1].length>0&&t[1].every((function(t){return oo(t)}))}(t))return["HistogramTupleType",t[1].map((function(t){return["HistogramType",t]}))];if(function(t){return!!no(t)&&oo(t[1])}(t))return["HistogramListType",["HistogramType",t[1]]];if(function(t){return!!io(t)&&t[1].length>0&&t[1].every((function(t){return oo(t[1])}))}(t))return["HistogramStructType",t[1].map((function(t){return["HistogramType",t[1],t[0]]}))];if(n=t,Array.isArray(n)&&n[0]===Ui&&(io(n[1])||ro(n[1]))){var e=t[1];if(ro(e))return[Ui,[e[0],e[1].map((function(t){return So(t)}))]];if(io(e))return[Ui,[e[0],e[1].map((function(t){return oo(t[1])?[t[0],["HistogramType",t[1],t[0]]]:t}))]]}var n;return oo(t)?["HistogramType",t]:t}function ko(t){if(!Array.isArray(t))return{resultType:"untyped"};var e,n=lo(t),r=function(t){return"List"===t.name}(n)?n.type:n,i=t;return no(i)&&(i=i[1]),io(i)&&(i=i[1]),function(t){return Array.isArray(t)&&t[0]===Fi&&Array.isArray(t[1])}(i)&&(i=i[1]),ao(r)&&Array.isArray(i)?{optional:Boolean(r.optional),resultType:no(t)?"table":"row",scheme:null!==(e=r.struct.map((function(t,e){var n=t.key,r=(0,fe.Z)(t,wo);return(0,h.Z)((0,h.Z)({},r),{},{index:e,name:"".concat(n),downloadable:_o(t),sortable:Eo(t)})})))&&void 0!==e?e:[],columns:i.map((function(t){return So(t[1])}))}:function(t){return"EmptyList"===t.name}(r)&&Array.isArray(i)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:t}}var Oo=(0,s.Z)("yql-node-schemas");function To(t){var e=t.className,n=t.schemas;return(0,d.jsxs)("div",{className:Oo(null,e),children:[n.inputs.length>0&&(0,d.jsx)(jo,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,d.jsx)(jo,{title:"Outputs",schemas:n.outputs})]})}function jo(t){var e=t.title,n=t.schemas;return(0,d.jsx)(_i.Z,{className:Oo("item",{title:!0}),size:"ss",name:e,collapsed:!1,children:(0,d.jsx)("div",{children:n.map((function(t){var e=t.name,r=ko(t.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,d.jsx)(_i.Z,{className:Oo("item",{schema:!0}),size:"ns",name:e,collapsed:1!==n.length,children:(0,d.jsx)("div",{children:(0,d.jsx)(xo,{schemaFields:i})},e)},e):null}))})})}var Ro=(0,s.Z)("node-stages"),Ao=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:j.Z.RIGHT,sortable:!1,width:115}];function Co(t){var e=t.stages,n=function(t,e,n){for(var r=[],o=(0,i.Z)(Object.entries(t[0])[0],2),a=o[0],s=o[1],u=s,l=1;l<t.length;l++){var c=(0,i.Z)(Object.entries(t[l])[0],2),f=c[0],h=c[1];r.push({stage:a,duration:un(s,h)}),a=f,s=h}var d=ln(e)?null!=n?n:s:void 0;return r.push({stage:a,duration:un(s,d)}),r.push({stage:"Total",duration:un(u,d),footerIndex:" "}),r}(void 0===e?[]:e,t.state,t.finishedAt);return(0,d.jsx)("div",{className:Ro(),children:(0,d.jsx)(j.Z,{theme:"yandex-cloud",rowClassName:No,columns:Ao,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function No(t,e,n,r){return Ro(r?"header":n?"footer":"row")}var Mo=(0,s.Z)("operation-node-info");function Io(t){var e,n=t.progress,r=t.details,a=t.schemas,s=t.containerRef,u=[];gn(n)&&u.push({value:"stages",content:"Stages"}),pn(r)&&u.push({value:"details",content:"Details"}),mn(n)&&u.push({value:"jobs",content:"Jobs"}),a&&u.push({value:"schemas",content:"Schemas"});var l=o.useState(null===(e=u[0])||void 0===e?void 0:e.value),c=(0,i.Z)(l,2),f=c[0],v=c[1];return(0,d.jsxs)("div",{ref:s,className:Mo(),children:[(0,d.jsx)("div",{children:u.length>1&&(0,d.jsx)(Ct.E,{className:Mo("selector"),value:f,options:u,onUpdate:v})}),"stages"===f&&(0,d.jsx)(Co,(0,h.Z)({},n)),"details"===f&&(0,d.jsx)(Si,(0,h.Z)({},r)),"jobs"===f&&(0,d.jsx)(Ci,(0,h.Z)({},n)),"schemas"===f&&a&&(0,d.jsx)(To,{className:Mo("schema"),schemas:a})]})}const Zo=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0V8.5Z",clipRule:"evenodd"})}))};var Po=n(12043),Lo=(0,s.Z)("legend");function Do(t){var e=t.className,n=t.orientation,r=t.nodes,i=t.children,o=bn(r);return(0,d.jsxs)("div",{className:Lo({orientation:n},e),children:[o.map((function(t){var e=t.state,n=t.title,r=t.count;return(0,d.jsxs)("div",{className:Lo("item"),children:[(0,d.jsx)("div",{className:Lo("item-color",{state:e.toLowerCase()})}),(0,d.jsxs)(x.x,{className:Lo("item-title"),color:"complementary",children:[n,r?(0,d.jsxs)("strong",{children:[" ",r]}):null]})]},e)})),i]})}function zo(t){var e=t.className,n=t.nodes,r=o.useState("collapsed"),a=(0,i.Z)(r,2),s=a[0],u=a[1];return(0,d.jsx)("div",{className:e,children:"collapsed"===s?(0,d.jsx)(l.z,{title:"Show legend",onClick:function(){u("expanded")},children:(0,d.jsx)(c.J,{data:Zo,size:16})}):(0,d.jsx)(Do,{nodes:n,children:(0,d.jsx)(l.z,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,d.jsx)(c.J,{data:Po.Z})})})})}var $o=n(88187),Bo=(0,s.Z)("vis-network");function Uo(t){var e=t.nodes,r=t.edges,a=t.options,s=t.className,u=t.getNetwork,l=o.useRef(null),c=o.useState(),f=(0,i.Z)(c,2),h=f[0],v=f[1];return o.useEffect((function(){var t;return n.e(980).then(n.t.bind(n,50430,23)).then((function(e){var n=e.Network;t=new n(l.current,{}),v(t)})),function(){var e;null===(e=t)||void 0===e||e.destroy()}}),[]),o.useEffect((function(){h&&(h.setData({nodes:e,edges:r}),h.once("afterDrawing",(function(){h.fit()})))}),[e,r,h]),o.useEffect((function(){h&&h.setOptions(a)}),[a,h]),o.useEffect((function(){h&&"function"==typeof u&&u(h)}),[u,h]),(0,d.jsx)("div",{ref:l,className:Bo(null,s)})}var Fo=(0,s.Z)("yql-plan-minimap");function Ho(t){var e=t.network,n=t.nodes,r=t.edges,a=t.options,s=t.className,u=function(t){return o.useMemo((function(){return(0,h.Z)((0,h.Z)({},t),{},{edges:(0,h.Z)((0,h.Z)({},t.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[t])}(a),l=o.useState(),c=(0,i.Z)(l,2),f=c[0],v=c[1],p=o.useRef(!1);!function(t){var e=t.network,n=t.minimap,r=t.nodes;o.useEffect((function(){var t=function(t){var i=t.edge,o=_n(e,r,i);null==n||n.selectEdges((0,S.Z)(o))},i=function(){null==n||n.unselectAll()},o=function(t){var i=t.node;if(i&&r.get(i)){var o=En(e,r,i);null==n||n.selectEdges((0,S.Z)(o))}},a=function(){null==n||n.unselectAll()};return e.on("hoverEdge",t),e.on("blurEdge",i),e.on("hoverNode",o),e.on("blurNode",a),function(){e.off("hoverEdge",t),e.off("blurEdge",i),e.off("hoverNode",o),e.off("blurNode",a)}}),[e,n,r])}({network:e,minimap:f,nodes:n});var m=function(t){var e=t.network,n=t.minimap,r=o.useRef(null);return o.useEffect((function(){var t=function(){n&&r.current&&function(t,e,n){var r=n.body.container,i=r.clientWidth,o=r.clientHeight,a=n.getScale(),s=e.getScale(),u=n.getViewPosition(),l=e.canvasToDOM(u);t.style.transform="translate(calc(".concat(l.x,"px - 50%), calc(").concat(l.y,"px - 50%))"),t.style.width="".concat(i/a*s,"px"),t.style.height="".concat(o/a*s,"px")}(r.current,n,e)};return e.on("afterDrawing",t),function(){e.off("afterDrawing",t)}}),[e,n]),r}({network:e,minimap:f});return o.useEffect((function(){var t=function(){p.current=!1};return window.addEventListener("mouseup",t),function(){window.removeEventListener("mouseup",t)}}),[]),o.useEffect((function(){f&&f.fit()}),[f]),(0,d.jsxs)($o.Z,{className:Fo(null,s),type:"action",children:[(0,d.jsx)(Uo,{nodes:n,edges:r,options:u,className:Fo("minimap"),getNetwork:v}),(0,d.jsx)("div",{className:Fo("wrapper"),onMouseDown:function(t){if(f){var n=f.DOMtoCanvas({x:t.nativeEvent.offsetX,y:t.nativeEvent.offsetY});e.moveTo({position:n}),p.current=!0}},onMouseMove:function(t){if(f&&p.current){var n=f.DOMtoCanvas({x:t.nativeEvent.offsetX,y:t.nativeEvent.offsetY});e.moveTo({position:n})}}}),(0,d.jsx)("div",{ref:m,className:Fo("radar")})]})}function qo(t,e){var n,r,i={},o=[],a=new Map,s=0,u=(0,ve.Z)(t);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,h.Z)({},l),in:[],out:[]}}}catch(t){u.e(t)}finally{u.f()}var f,d=(0,ve.Z)(e);try{for(d.s();!(f=d.n()).done;){var v=f.value,p=a.get(v.from),m=a.get(v.to);void 0!==p&&void 0!==m&&(i[p].out.push(m),i[m].in.push(p))}}catch(t){d.e(t)}finally{d.f()}return{graph:i,layering:o.filter(Boolean),levels:o.map((function(t,e){return t?e:-1})).filter((function(t){return-1!==t}))}}function Vo(t,e,n){for(var r=0,i=0;i<e.length;i++){var o,a=e[i],s=e[i+1],u=(0,ve.Z)(a);try{for(u.s();!(o=u.n()).done;){var l=o.value,c=t[l];if(c.rank=i,i!==e.length-1)for(var f=0;f<c.out.length;f++){var h=c.out[f];if(!s.has(h)){var d="".concat(h,"_").concat(r++),v={id:d,shape:"dot",size:0,level:n[i]};t[d]={node:v,in:[l],out:[],virtual:!0},s.add(d),c.out[f]=d,t[d].out.push(h),t[h].in[t[h].in.indexOf(l)]=d}}}}catch(t){u.e(t)}finally{u.f()}}}function Yo(t,e,n){var r,i=n.reduce((function(t,e,n){return t[e]=n,t}),{}),o=[],a=(0,ve.Z)(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,S.Z)(t[s].out.map((function(t){return i[t]})).sort((function(t,e){return t-e}))))}}catch(t){a.e(t)}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),f=0;return o.forEach((function(t){var e=t+u;for(c[e]++;e>0;)e%2&&(f+=c[e+1]),c[e=e-1>>1]++})),f}function Wo(t,e){for(var n=0,r=1;r<e.length;++r)n+=Yo(t,e[r-1],e[r]);return n}function Xo(t,e){var n=e.reduce((function(e,n,r){return t.includes(n)&&e.push(r),e}),[]);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 Go(t,e){for(var n=t.filter((function(t){return-1!==e[t]})).sort((function(t,n){return e[t]-e[n]})),r=0,i=0;i<n.length;r++)-1!==e[t[r]]&&(t[r]=n[i++])}function Ko(t,e,n){if(n%2==0)for(var r=1;r<e.length;r++){var i,o={},a=(0,ve.Z)(e[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=Xo(t[s].in,e[r-1])}}catch(t){a.e(t)}finally{a.f()}Go(e[r],o)}else for(var u=e.length-2;u>=0;u--){var l,c={},f=(0,ve.Z)(e[u]);try{for(f.s();!(l=f.n()).done;){var h=l.value;c[h]=Xo(t[h].out,e[u+1])}}catch(t){f.e(t)}finally{f.f()}Go(e[u],c)}}function Jo(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Qo(t,e,n){var r=0;return n>0&&(r+=Yo(t,e[n-1],e[n])),n<e.length-1&&(r+=Yo(t,e[n],e[n+1])),r}function ta(t,e){for(var n=!0,r=0;n&&r++<10;){n=!1;for(var i=0;i<e.length;i++)for(var o=e[i],a=Qo(t,e,i),s=0;s<o.length-1;s++){Jo(o,s,s+1);var u=Qo(t,e,i);a>u?(n=!0,a=u):Jo(o,s,s+1)}}}function ea(t,e,n){for(var r=function(t,e){for(var n=(0,S.Z)(e[0]),r=[],i=new Set(n);n.length>0;){var o=n.shift();if(void 0===o)break;var a=t[o],s=r[a.rank];s||(r[a.rank]=s=[]),s.push(o);var u,l=(0,ve.Z)(a.out);try{for(l.s();!(u=l.n()).done;){var c=u.value;i.has(c)||(i.add(c),n.push(c))}}catch(t){l.e(t)}finally{l.f()}}return r}(t,e),i=r.map((function(t){return(0,S.Z)(t)})),o=Wo(t,r),a=0,s=0;s<4&&a<24;a++,s++){Ko(t,r,a),n||ta(t,r);var u=Wo(t,r);o>u&&(o=u,i=r.map((function(t){return(0,S.Z)(t)})),s=0)}return i.forEach((function(e){e.forEach((function(e,n){t[e].order=n}))})),i}function na(t,e,n){var r=t[e];r||(t[e]=r=new Set),r.add(n)}function ra(t,e,n){return t[e]&&t[e].has(n)||t[n]&&t[n].has(e)}function ia(t,e,n,r,i){var o={},a=Object.keys(t).reduce((function(t,e){return t[e]=e,t}),{}),s=Object.keys(t).reduce((function(t,e){return t[e]=Number.POSITIVE_INFINITY,t}),{});function u(l){if(void 0===o[l]){o[l]=0;var c=l;do{var f=i?e.length-t[c].rank-1:t[c].rank,h=e[f].indexOf(c);if(h>0){var d=n[e[f][h-1]];u(d),a[l]===l&&(a[l]=a[d]),a[l]===a[d]?o[l]=Math.max(o[l],o[d]+100):s[a[d]]=Math.min(s[a[d]],o[l]-o[d]-100)}c=r[c]}while(c!==l)}}return Object.keys(t).forEach((function(t){n[t]===t&&u(t)})),Object.keys(t).forEach((function(t){o[t]=o[n[t]],s[a[n[t]]]<Number.POSITIVE_INFINITY&&(o[t]=o[t]+s[a[n[t]]])})),o}function oa(t,e){var n,r=function(t,e){var n={};return Object.entries(t).forEach((function(t){var e=(0,i.Z)(t,2),r=e[0];e[1].forEach((function(t){na(n,r,t)}))})),Object.entries(e).forEach((function(t){var e=(0,i.Z)(t,2),r=e[0];e[1].forEach((function(t){na(n,r,t)}))})),n}(function(t,e){var n={};return e.reduce((function(e,r){var i=0,o=0,a=e.length,s=r[r.length-1];return r.forEach((function(e,u){var l=function(t,e){if(t[e].virtual)return t[e].in.find((function(e){return t[e].virtual}))}(t,e),c=l?t[l].order:a;(l||e===s)&&(r.slice(o,u+1).forEach((function(e){t[e].in.forEach((function(r){var o=t[r],a=o.order;!(a<i||c<a)||o.virtual&&t[e].virtual||na(n,r,e)}))})),o=u+1,i=c)})),r})),n}(t,e),function(t,e){var n={};function r(e,r,i,o,a){for(var s=function(){var r=e[u];t[r].virtual&&t[r].in.forEach((function(e){var i=t[e];i.virtual&&(i.order<o||i.order>a)&&na(n,e,r)}))},u=r;u<i;u++)s()}return e.reduce((function(e,n){var i,o=-1,a=0;return n.forEach((function(s,u){if(t[s].virtual){var l=t[s].in;l.length&&(i=t[l[0]].order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,e.length)})),n})),n}(t,e)),o={};["u","d"].forEach((function(i){n="u"===i?e:(0,S.Z)(e).reverse(),["l","r"].forEach((function(e){"r"===e&&(n=n.map((function(t){return(0,S.Z)(t).reverse()})));var a=function(t,e,n,r){var i={},o={},a={};return e.forEach((function(t){t.forEach((function(t,e){i[t]=t,o[t]=t,a[t]=e}))})),e.forEach((function(e){var s=-1;e.forEach((function(e){var u=t[e][r];if(u.length){u.sort((function(t,e){return a[t]-a[e]}));for(var l=(u.length-1)/2,c=Math.floor(l),f=Math.ceil(l);c<=f;c++){var h=u[c];o[e]===e&&s<a[h]&&!ra(n,e,h)&&(o[h]=e,o[e]=i[e]=i[h],s=a[h])}}}))})),{root:i,align:o}}(t,n,r,"u"===i?"in":"out"),s=a.root,u=a.align,l=ia(t,n,s,u,"d"===i);"r"===e&&Object.keys(l).forEach((function(t){l[t]=-l[t]})),o[i+e]=l}))}));var a=function(t,e){return Object.values(e).reduce((function(t,e){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;Object.entries(e).forEach((function(t){var e=(0,i.Z)(t,2),o=(e[0],e[1]);n=Math.max(o+50,n),r=Math.min(o-50,r)}));var o=n-r;return t.min>o?{min:o,align:e}:t}),{min:Number.POSITIVE_INFINITY}).align}(0,o);return function(t,e){var n=Object.values(e),r=n.reduce((function(t,e){return Math.min(t,e)})),i=n.reduce((function(t,e){return Math.max(t,e)}));["u","d"].forEach((function(n){["l","r"].forEach((function(o){var a=t[n+o];if(a!==e){var s=Object.values(a),u="l"===o?r-s.reduce((function(t,e){return Math.min(t,e)})):i-s.reduce((function(t,e){return Math.max(t,e)}));u&&Object.keys(a).forEach((function(t){a[t]+=u}))}}))}))}(o,a),function(t,e){return Object.keys(t.ul).reduce((function(e,n){var r=Object.values(t).map((function(t){return t[n]})).sort((function(t,e){return t-e}));return e[n]=(r[1]+r[2])/2,e}),{})}(o)}function aa(t,e){var n=oa(t,e);Object.keys(n).forEach((function(e){t[e].node.y=n[e]}));var r=Object.values(n),i=1.7*Math.max(100,(r.reduce((function(t,e){return Math.max(t,e)}))-r.reduce((function(t,e){return Math.min(t,e)})))/e.length),o=0;e.forEach((function(e){e.forEach((function(e){t[e].node.x=o})),o+=i}))}function sa(t){var e=[],n=[];return Object.values(t).forEach((function(r){var i=r.node;if(r.virtual){if(!t[r.in[0]].virtual){var o=r.out[0];if(t[o].virtual)for(;t[t[o].out[0]].virtual;)o=t[o].out[0];var a=t[r.in[0]].node,s=t[o].node;if(t[o].virtual){var u=t[t[o].out[0]].node;a.y===i.y?s.y===u.y?n.push({from:a.id,to:u.id}):(e.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?(e.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:u.id,arrows:{from:!1}})):(e.push(i),e.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}):(e.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 e.push(i),r.out.forEach((function(e){if(!t[e].virtual){var r={from:i.id,to:t[e].node.id};n.push(r)}}))})),{nodes:e,edges:n}}function ua(t){return la.apply(this,arguments)}function la(){return(la=(0,vr.Z)(mr().mark((function t(e){var n,r,i,o,a,s,u,l;return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.nodes,r=e.edges,i=n.length>700||r.length>3e3,o=qo(n,r),a=o.graph,s=o.layering,u=o.levels,Vo(a,s,u),l=ea(a,s,i),aa(a,l),t.abrupt("return",sa(a));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ca=n(42840);const fa=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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 8Z",clipRule:"evenodd"})}))};var ha=n(6632);const da=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm0-4.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})}))};var va=(0,s.Z)("graph"),pa="".concat(va(),"_show-tooltip");function ma(t){var e=o.useRef(t);return e.current=t,e}var ga,ya,ba,xa,wa=(ga=function(t,e){if(t)if(e)t.redraw(),t.fit();else{var n=t.getScale();t.redraw(),t.moveTo({scale:n})}},ba=null,(xa=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];ya=e,null===ba&&(ba=requestAnimationFrame((function(){ba=null,ga.apply(void 0,(0,S.Z)(ya))})))}).cancel=function(){ba&&cancelAnimationFrame(ba),ba=null},xa);function _a(t){var e=t.isActive,n=t.className,r=t.graph,a=t.showMinimap,s=t.prepareNode,u=o.useState(),f=(0,i.Z)(u,2),v=f[0],p=f[1],m=o.useState(null),g=(0,i.Z)(m,2),y=g[0],b=g[1],w=wi(),_=function(t){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:t.edge.color,highlight:t.edge.highlight,inherit:!1,opacity:1},hoverWidth:.5,width:1,selectionWidth:.5,selfReference:{size:80}},nodes:{font:{color:t.text.label,size:16}},layout:{hierarchical:!1},interaction:{dragNodes:!1,navigationButtons:!1,hover:!0,hoverConnectedEdges:!1,selectable:!1,zoomSpeed:.5},physics:!1}}),[t])}(w),E=lr(),k=o.useState((function(){return new dr.DataSet})),O=(0,i.Z)(k,1)[0],T=o.useState((function(){return new dr.DataSet})),j=(0,i.Z)(T,1)[0],R=o.useState(!0),A=(0,i.Z)(R,2),C=A[0],N=A[1],M=hr(),I=o.useState(),Z=(0,i.Z)(I,2),P=Z[0],L=Z[1],D=o.useRef(null),z=o.useState(),$=(0,i.Z)(z,2),B=$[0],U=$[1],F=function(t={}){const{rect:e,contextElement:n}=t,r=o.useRef(gr),i=o.useRef({contextElement:n,getBoundingClientRect(){const{top:t,right:e,bottom:n,left:i}=r.current;return{top:t,right:e,bottom:n,left:i,width:e-i,height:n-t}}});if(i.current.contextElement=n,e){const{top:t=0,left:n=0,right:i=n,bottom:o=t}=e;r.current={top:t,right:i,bottom:o,left:n}}else r.current=gr;return i}(B?{rect:{top:B.position.y,left:B.position.x}}:void 0);o.useEffect((function(){var t=function(t){var e;null!==(e=D.current)&&void 0!==e&&e.contains(t.target)||U(void 0)};return B&&window.addEventListener("click",t),function(){window.removeEventListener("click",t)}}),[B]);var H=o.useRef();o.useEffect((function(){var t;return e&&(t=requestAnimationFrame((function(){v&&C&&(v.fit(),N(!1))}))),e||U(void 0),function(){cancelAnimationFrame(t)}}),[e,v,C]);var q=ma(w),V=ma(E),Y=ma(s);o.useEffect((function(){var t=!1;function e(){return(e=(0,vr.Z)(mr().mark((function t(){var e,n,i,o;return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ua(r);case 2:e=t.sent,n=e.nodes,i=e.edges,o=new dr.DataSet(n),V.current&&hn(o,V.current),dn(o,q.current),Y.current&&vn(o,Y.current),N(O.length!==o.length||j.length!==i.length),O.clear(),O.add(o.get()),j.clear(),j.add(i),M();case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return function(){return e.apply(this,arguments)}().catch((function(e){t||L(null!=e?e:"Unknown error")})),function(){t=!0}}),[r,j,O,M]),o.useEffect((function(){E&&(hn(O,E,Y.current,q.current),M())}),[E,O,M]),o.useEffect((function(){"function"==typeof s&&(vn(O,s),M())}),[s,O,M]),o.useEffect((function(){dn(O,w)}),[O,w]);var W=o.useRef(!0);return o.useLayoutEffect((function(){if(y&&v){var t=new Br((function(){wa(v,W.current)}));return t.observe(y),function(){t.unobserve(y)}}}),[y,v]),o.useEffect((function(){if(v){var t=function(t){var e=t.edge,n=_n(v,O,e);v.selectEdges((0,S.Z)(n))},e=function(){v.unselectAll()},n=function(t){var e=t.node;if(e){var n=O.get(e);if(H.current=null!=n?n:void 0,n){var r=En(v,O,e);if(v.selectEdges((0,S.Z)(r)),n.url&&(null==y||y.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==y||y.classList.add(pa),yn(n)){var i=v.getPosition(e),o=i.x,a=i.y,s=v.canvasToDOM({x:o+15,y:a}),u=v.canvasToDOM({x:o-15,y:a}),l=s,c="right";if(y){var f=y.getBoundingClientRect(),h=f.x,d=f.y,p=f.width;l.x+330>p&&(l=u,c="left"),l.x+=h,l.y+=d}U({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:c})}}}},r=function(){null==y||y.classList.remove(pa),null==y||y.style.removeProperty("cursor"),v.unselectAll(),U(void 0),H.current=void 0},i=function(){if(H.current){var t=H.current;t.url&&(0,ca.YQ)(t.url)}},o=function(){W.current=!1};return v.on("hoverEdge",t),v.on("blurEdge",e),v.on("hoverNode",n),v.on("blurNode",r),v.on("click",i),v.on("zoom",o),function(){v.off("hoverEdge",t),v.off("blurEdge",e),v.off("hoverNode",n),v.off("blurNode",r),v.off("click",i),v.off("zoom",o)}}}),[v,O,y]),P?(0,d.jsx)(x.x,{color:"danger",children:"".concat(P)}):(0,d.jsx)("div",{ref:b,className:va(null,n),children:0===O.length?(0,d.jsx)(xr,{size:"m",local:!0}):(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)(Uo,{nodes:O,edges:j,options:_,className:va("graph"),getNetwork:p}),v&&a?(0,d.jsx)(Ho,{className:va("minimap-wrapper"),network:v,nodes:O,edges:j,options:_}):null,(0,d.jsxs)("div",{className:va("toolbar"),children:[(0,d.jsx)(l.z,{className:va("toolbar-button"),onClick:function(){v&&(v.moveTo({scale:1.1*v.getScale()}),W.current=!1)},children:(0,d.jsx)(c.J,{data:ha.Z,size:16})}),(0,d.jsx)(l.z,{className:va("toolbar-button"),onClick:function(){v&&(v.moveTo({scale:v.getScale()/1.1}),W.current=!1)},children:(0,d.jsx)(c.J,{data:fa,size:16})}),(0,d.jsx)(l.z,{className:va("toolbar-button"),onClick:function(){null==v||v.fit(),W.current=!0},children:(0,d.jsx)(c.J,{data:da,size:16})}),(0,d.jsx)(zo,{nodes:O,className:va("toolbar-button",va("legend"))})]}),B&&e?(0,d.jsx)(yr.G,{anchorRef:F,open:!0,placement:B.placement,children:(0,d.jsx)(Io,(0,h.Z)((0,h.Z)({},B),{},{containerRef:D}))}):null]})})}var Ea=n(20195),Sa=n.n(Ea),ka=n(64436),Oa=n(84613),Ta=n(53638),ja=n(85464),Ra=n(7516),Aa=[ja.Z7,2*ja.Z7,5*ja.Z7,10*ja.Z7,20*ja.Z7,30*ja.Z7,60*ja.Z7,120*ja.Z7,180*ja.Z7,360*ja.Z7,720*ja.Z7,ja.v0,2*ja.v0,3*ja.v0,ja.g0,2*ja.g0,ja.iL,2*ja.iL,3*ja.iL,ja.ty];function Ca(t,e){var n=(t+e-(new Date).getTimezoneOffset()*ja.Z7)%e;if(e>=ja.g0){var r=(0,Ra.J)(t-n+e);return e>=ja.ty?r=r.startOf("year"):e>=ja.iL?r=r.startOf("month"):e>=ja.g0&&(r=r.startOf("week")),r.valueOf()}return t-n+e}function Na(t,e){var n=(0,Ra.J)(t);return e>=ja.ty?n.add(e/ja.ty,"year").valueOf():e>=ja.iL?n.add(e/ja.iL,"month").valueOf():e>=ja.g0?n.add(e/ja.g0,"week").valueOf():t+e}function Ma(t){for(var e,n,r=t.leftBound,i=t.rightBound,o=t.width,a=t.range,s=t.calcTimestamp,u=o/(i-r),l=t.initialTimestamp||Ca(r,a),c=[];l<i;){var f=(l-r)*u;s?c.push({point:f,timestamp:l,formatted:(e=l,n=void 0,n=(0,Ra.J)(e),n.isSame(n.startOf("day"))?n.format("YYYY-MM-DD"):n.format("HH:mm"))}):c.push({point:f}),l=Na(l,a)}return c}function Ia(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return function(r){return"M".concat(Math.floor(r.point-t/2)," ").concat(n,"v").concat(e,"h").concat(t,"V").concat(n,"z")}}function Za(t,e){var n={capture:!0};function r(e){e.stopPropagation(),t(e)}function i(t){document.body.style.pointerEvents="auto",document.removeEventListener("mouseup",i,n),document.removeEventListener("mousemove",r,n),t.stopPropagation(),e(t)}return function(t){document.body.style.pointerEvents="none",document.addEventListener("mouseup",i,n),document.addEventListener("mousemove",r,n),t.preventDefault(),t.stopPropagation()}}function Pa(t,e){var n=t.start,r=t.end,i=e.multiplier,o=e.ratio,a=void 0===o?.5:o,s=e.maxRange,u=e.minRange,l=r-n,c=n*(1-a)+r*a;return l=i>1?Math.min(l*i,s):Math.max(l*i,u),{start:Math.round(c-l*a),end:Math.round(c+l*(1-a))}}function La(t){return{start:t.leftBound,end:t.rightBound}}function Da(t){return{start:t.from,end:t.to}}var za=(0,s.Z)("yc-timeline-ruler"),$a=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){var t;(0,Lt.Z)(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))).state={},t._refRuler=function(e){t.ruler=e,t.onResize()},t.zoomIn=function(){t.zoomSelection(.5)},t.zoomOut=function(){t.zoomSelection(2)},t.onSelectionHandleMouseDown=function(e){var n=t.props.minRange,i=function(i){if(!isNaN(t.x)){var o=i.clientX,a=t.positionToTimeOffset(o-t.x),s=Math.min(a,t.props.rightBound-t.props[e]),u=Math.max(s,t.props.leftBound-t.props[e]);switch(e){case"to":u=Math.max(u,t.props.from-t.props.to+n);break;case"from":u=Math.min(u,t.props.to-t.props.from-n)}requestAnimationFrame((function(){isNaN(t.x)||t.setState((0,r.Z)({},"".concat(e,"Offset"),u))}))}},o=function(){if(t.x=void 0,t.state["".concat(e,"Offset")]){var n=t.state[e];t.props.onUpdateSelection((0,r.Z)({},e,n)),t.setState({fromOffset:void 0,toOffset:void 0})}};return function(e){0===e.button&&(t.x=e.clientX,Za(i,o)(e))}},t.onSelectionMouseDown=function(e){0===e.button&&(t.x=e.clientX,Za((function(e){if(!isNaN(t.x)){var n=e.clientX,r=t.positionToTimeOffset(n-t.x),i=Math.min(r,t.props.rightBound-t.props.to),o=Math.max(i,t.props.leftBound-t.props.from);requestAnimationFrame((function(){isNaN(t.x)||t.setState({fromOffset:o,toOffset:o})}))}}),(function(){t.x=void 0;var e=t.state,n=e.fromOffset,r=e.toOffset;if(n||r){var i=t.state,o=i.from,a=i.to;t.props.onUpdateSelection({from:o,to:a}),t.setState({fromOffset:void 0,toOffset:void 0})}}))(e))},t.onRulerMouseDown=function(e){0===e.button&&(t.x=e.clientX,Za(t.onRulerMouseMove,t.onRulerMouseUp)(e))},t.onRulerMouseMove=function(e){if(!isNaN(t.x)){var n=e.clientX,r=t.positionToTimeOffset(n-t.x),i=Math.min(r,t.props.rightBound-t.props.to),o=Math.max(i,t.props.leftBound-t.props.from);requestAnimationFrame((function(){isNaN(t.x)||t.setState({timeOffset:-o})}))}},t.onRulerMouseUp=function(){if(t.x=void 0,t.state.timeOffset){var e=t.state,n=e.leftBound,r=e.rightBound;t.props.onUpdateBounds({leftBound:n,rightBound:r}),t.setState({timeOffset:void 0})}},t.onRulerWheel=function(e){var n=e.currentTarget.getBoundingClientRect(),r=(e.clientX-n.left)/n.width;e.deltaY>0?t.zoomBounds(2,r):t.zoomBounds(.5,r)},t.onResize=function(){t.ruler&&t.ruler.clientWidth!==t.state.width&&t.setState({width:t.ruler.clientWidth})},t}return(0,Dt.Z)(n,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize)}},{key:"getRatio",value:function(){return this.state.ratio}},{key:"timeToPosition",value:function(t){var e=this.state;return(t-e.leftBound)*e.ratio}},{key:"positionToTimeOffset",value:function(t){var e=this.state.ratio;return Math.round(t/e)}},{key:"getTotalHeight",value:function(){var t=this.props,e=t.height;return t.belowSvgHeight+e}},{key:"getMinorTicks",value:function(){var t=this.state,e=t.width,n=t.leftBound,r=t.rightBound,i=t.range;return{ticks:Ma({leftBound:n,rightBound:r,range:i,width:e,calcTimestamp:!0}),microTicks:Ma({leftBound:n,rightBound:r,range:i/10,width:e,initialTimestamp:Ca(n-i,i)})}}},{key:"zoomBounds",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=this.props,o=i.maxRange,a=i.minRange,s=Pa(La(this.props),{maxRange:o,minRange:a,multiplier:t,ratio:r});n=Da(this.props),(e=s).start>n.start&&(e.end+=n.start-e.start,e.start=n.start),e.end<n.end&&(e.start+=n.end-e.end,e.end=n.end),this.props.onUpdateBounds({leftBound:s.start,rightBound:s.end})}},{key:"zoomSelection",value:function(t){var e=this.props,n=e.maxRange,r=e.minRange,i=e.zoomFixedPoint,o=e.zoomSticksToNow,a=Pa(La(this.props),{multiplier:t,maxRange:n,minRange:r}),s=Da(this.props),u=Pa(s,{multiplier:t,maxRange:n,minRange:r,ratio:i});if(o){var l=Date.now();Math.abs(l-s.end)<3e4&&(u.start+=l-u.end,u.end=l)}this.props.onUpdateBounds({from:u.start,to:u.end,leftBound:a.start,rightBound:a.end})}},{key:"renderNow",value:function(){var t=this.getTotalHeight(),e=this.state.width,n=Math.round(this.timeToPosition(Date.now()));return n>e-4?null:(0,d.jsx)("path",{className:za("now-tick"),d:"M".concat(n-1," 0 V").concat(t,"h2V0z")})}},{key:"renderRuler",value:function(){var t=this.state,e=t.width,n=t.leftBound,r=t.rightBound;if(!e)return null;var i=this.props,o=i.height,a=i.belowSvg,s=this.getMinorTicks(),u=s.ticks,l=s.microTicks,c=this.state,f=c.from,h=c.to,v=this.getTotalHeight();return(0,d.jsxs)("div",{onMouseDown:this.onRulerMouseDown,onWheel:this.onRulerWheel,className:za("container"),children:[(0,d.jsxs)("svg",{className:za("ruler-svg"),viewBox:"0 0 ".concat(e," ").concat(v),width:e,height:v,children:[Boolean(this.props.displayNow)&&this.renderNow(),(0,d.jsx)("path",{className:za("ruler-border"),d:"M0 1 V".concat(o-1,"h1V1z M").concat(e," 1V").concat(o-1,"h-1V1z")}),(0,d.jsx)("path",{className:za("ticks-major"),d:u.map(Ia(1,7,1)).join("")}),(0,d.jsx)("path",{className:za("ticks-major"),d:u.map(Ia(1,7,o-8)).join("")}),(0,d.jsx)("path",{className:za("ticks-minor"),d:l.map(Ia(1,4,1)).join("")}),(0,d.jsx)("path",{className:za("ticks-minor"),d:l.map(Ia(1,4,o-5)).join("")}),a&&a({width:e,height:o,totalHeight:v,leftBound:n,rightBound:r})]}),(0,d.jsx)("div",{className:za("controls-container"),style:{height:o},children:(0,d.jsx)("div",{className:za("labels-minor"),children:u.map((function(t){return(0,d.jsx)("span",{className:za("label-minor"),style:{left:t.point},children:t.formatted},t.timestamp)}))})}),(0,d.jsxs)("div",{className:za("selection"),onMouseDown:this.onSelectionMouseDown,style:{left:this.timeToPosition(f),width:this.timeToPosition(h)-this.timeToPosition(f)},children:[(0,d.jsx)("div",{className:za("selection-interactive"),style:{height:o}}),(0,d.jsx)("div",{className:za("selection-handle",{position:"left"}),onMouseDown:this.onSelectionHandleMouseDown("from")}),(0,d.jsx)("div",{className:za("selection-handle",{position:"right"}),onMouseDown:this.onSelectionHandleMouseDown("to")})]})]})}},{key:"render",value:function(){var t=this.props,e=t.titles,n=t.hasZoomButtons,r=t.hasNowButton;return(0,d.jsxs)("div",{className:za(),children:[n&&(0,d.jsxs)("div",{className:za("zoom"),children:[(0,d.jsx)(l.z,{view:"flat",size:"l",className:za("zoom-button"),title:e.zoomOut,onClick:this.zoomOut,children:(0,d.jsx)(c.J,{data:fa,size:16,height:"100%"})}),(0,d.jsx)(l.z,{view:"flat",size:"l",className:za("zoom-button"),title:e.zoomIn,onClick:this.zoomIn,children:(0,d.jsx)(c.J,{data:ha.Z,size:16,height:"100%"})})]}),(0,d.jsx)("div",{className:za("ruler"),ref:this._refRuler,children:this.renderRuler()}),r&&(0,d.jsx)(l.z,{view:"flat",size:"l",title:e.now,className:za("now-button"),onClick:this.props.onNowReset,children:(0,Ta.Z)("label_now")})]})}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=e.width,r=e.timeOffset,i=void 0===r?0:r,o=e.fromOffset,a=void 0===o?0:o,s=e.toOffset,u=void 0===s?0:s,l=t.leftBound,c=t.rightBound,f=t.from,h=t.to,d=t.minRange,v=Math.max(c-l||0,d),p=n/v,m=function(t,e){for(var n=0;n<Aa.length;n++)if(e*Aa[n]>t)return Aa[n];return ja.ty*Math.ceil(t/(6*ja.ty))}(v,Math.round(n/80));return{width:n,leftBound:l+i,rightBound:c+i,from:f+a,to:h+u,totalRange:v,ratio:p,range:m}}}]),n}(o.Component);$a.defaultProps={displayNow:!0,maxRange:50*ja.ty,minRange:5*ja.Z7,height:40,titles:{},hasZoomButtons:!0,hasNowButton:!0,belowSvgHeight:0,zoomFixedPoint:.5};var Ba=(0,s.Z)("yc-timeline"),Ua={hasPicker:!0,hasRuler:!0,hasDatePicker:!0,padding:0,wrapper:function(t){var e=t.picker,n=t.ruler;return(0,d.jsxs)("div",{className:Ba(),children:[e,n]})},maxSelectionToBoundsRatio:50},Fa=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){var t;(0,Lt.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).state={},t.setTime=function(e){var n=(0,h.Z)((0,h.Z)({},t.state),e),r=n.leftBound,i=n.rightBound;t.onBoundsUpdate({leftBound:r,rightBound:i}),t.setState({leftBound:r,rightBound:i}),t.onUpdate(e)},t.onShortcut=function(e,n){var r=(0,ja.DF)(e),i=r.from,o=r.to;t.props.onUpdate&&o!==i&&t.props.onUpdate({from:i,to:o,shortcut:n,shortcutValue:e})},t.onNowReset=function(){var e=t.props,n=e.from,r=e.to,i=Date.now();t.props.onUpdate&&t.props.onUpdate({from:i-r+n,to:i,nowReset:!0})},t.onRefreshUpdate=function(e){t.props.onRefreshUpdate&&t.props.onRefreshUpdate(e)},t}return(0,Dt.Z)(n,[{key:"onUpdate",value:function(t){var e=(0,h.Z)((0,h.Z)({},this.props),t),n=e.from,r=e.to;!this.props.onUpdate||!n&&!r||n===this.props.from&&r===this.props.to||this.props.onUpdate({from:n,to:r})}},{key:"onBoundsUpdate",value:function(t){if(this.props.onBoundsUpdate){var e=this.state,n=e.leftBound,r=e.rightBound;t.leftBound===n&&t.rightBound===r||this.props.onBoundsUpdate(t)}}},{key:"renderRuler",value:function(){if(!1===this.props.hasRuler)return null;var t=this.state,e=t.leftBound,n=t.rightBound,r=this.props,i=r.from,o=r.to,a=r.hasRulerNowButton,s=r.hasRulerZoomButtons,u=r.belowSvg,l=r.belowSvgHeight,c=r.zoomCoeffs,f=r.zoomFixedPoint,h=r.zoomSticksToNow,v=r.minRange,p=r.maxRange;return(0,d.jsx)($a,{leftBound:e,rightBound:n,from:i,to:o,hasNowButton:a,hasZoomButtons:s,onNowReset:this.onNowReset,onUpdateBounds:this.setTime,onUpdateSelection:this.setTime,minRange:v,maxRange:p,belowSvg:u,belowSvgHeight:l,zoomCoeffs:c,zoomFixedPoint:f,zoomSticksToNow:h})}},{key:"renderPicker",value:function(){if(!1===this.props.hasPicker)return null;var t=this.props,e=t.from,n=t.to,r=t.shortcut,i=t.shortcuts,o=t.topShortcuts,a=t.hasDatePicker,s=t.refreshInterval,u=t.refreshIntervals;return(0,d.jsx)(Oa.z,{from:e,to:n,hasDatePicker:a,shortcuts:i,refreshInterval:s,shortcut:r,refreshIntervals:u,topShortcuts:o,onUpdate:this.setTime,onRefreshUpdate:this.onRefreshUpdate,onShortcut:this.onShortcut})}},{key:"render",value:function(){var t=this.state,e=t.leftBound,n=t.rightBound;return this.props.wrapper({picker:this.renderPicker(),ruler:this.renderRuler(),leftBound:e,rightBound:n})}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.from,r=t.to,i=t.padding,o=t.maxSelectionToBoundsRatio,a=Math.min(Number(e.leftBound)||n,n),s=Math.max(Number(e.rightBound)||r,r),u=r-n,l=(s-a)/u;if(l>o&&(a=n-(n-a)*o/l,s=r+(s-r)*o/l),i){var c=Math.min(1/(1-i),2),f=Math.round(u*c/2),h=Math.round(n+u/2);if(s-a<2*f)a=Math.round(h-f),s=Math.round(h+f);else{var d=s-a,v=Math.round(d*(1-1/c)/2);a>n-v&&(s=(a=n-v)+d),s<r+v&&(a=(s=r+v)-d)}}return t.onBoundsUpdate&&(a===e.leftBound&&s===e.rightBound||t.onBoundsUpdate({leftBound:a,rightBound:s})),{leftBound:a,rightBound:s}}}]),n}(o.Component);Fa.calculateShortcutTime=ja.DF,Fa.defaultProps=Ua;var Ha=n(14771),qa=36e5,Va=24*qa,Ya=30*Va,Wa=365*Va,Xa=function(t){return t.CREATED="CREATED",t.PROCESSING="PROCESSING",t.PROCESSED="PROCESSED",t.FAILED="FAILED",t}({});function Ga(t,e,n,r,i){var o="".concat(e.eventsCount);t.measureText(o).width<i&&(t.fillStyle=fs.resolveCssValue(fs.COUNTER_FONT_COLOR),t.fillText(o,n,r+fs.COUNTER_FONT_CENTER_OFFSET))}var Ka,Ja,Qa,ts=function(t){return t.INFO="INFO",t.QUEUED="QUEUED",t.DEPRECATED="DEPRECATED",t.OK="OK",t.WARNING="WARNING",t.DANGER="DANGER",t.MUTED="MUTED",t.DELETED="DELETED",t}({}),es="#333",ns="#777",rs="#FFF",is="#08F",os="#3D5",as="#D30",ss="#F80",us="#A5A",ls=globalThis.document.body,cs=window.getComputedStyle(ls),fs={ZOOM_MIN:5e3,ZOOM_MAX:2*Ya,PRIMARY_BACKGROUND_COLOR:rs,BOUNDARY_MARK_COLOR:es,PRIMARY_MARK_COLOR:ns,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:os,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:ns,RULER_TEXT_OUTLINE_COLOR:rs,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:es,RULER_WEEKEND_COLOR:as,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:is,SELECTION_BG_COLOR:is,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,TRACK_HEIGHT:25,OVERLAPPING_THRESHOLD:8,GRID_STROKE_WIDTH:1,eventStatusColors:(Ka={},(0,r.Z)(Ka,ts.INFO,is),(0,r.Z)(Ka,ts.QUEUED,us),(0,r.Z)(Ka,ts.DEPRECATED,ss),(0,r.Z)(Ka,ts.OK,os),(0,r.Z)(Ka,ts.WARNING,ss),(0,r.Z)(Ka,ts.DANGER,as),(0,r.Z)(Ka,ts.MUTED,ns),(0,r.Z)(Ka,ts.DELETED,as),Ka),groupStatusColors:(Ja={},(0,r.Z)(Ja,ts.INFO,is),(0,r.Z)(Ja,ts.QUEUED,us),(0,r.Z)(Ja,ts.DEPRECATED,ss),(0,r.Z)(Ja,ts.OK,os),(0,r.Z)(Ja,ts.WARNING,ss),(0,r.Z)(Ja,ts.DANGER,as),(0,r.Z)(Ja,ts.MUTED,ns),(0,r.Z)(Ja,ts.DELETED,as),Ja),regionStateColors:(Qa={},(0,r.Z)(Qa,Xa.CREATED,is),(0,r.Z)(Qa,Xa.PROCESSING,"#fe5"),(0,r.Z)(Qa,Xa.PROCESSED,os),(0,r.Z)(Qa,Xa.FAILED,as),Qa),resolveCssValue:function(t){if("string"!=typeof t||!t)return t;if(t.startsWith("var(")&&t.endsWith(")")){var e,n=t.substring(4,t.length-1),r=(null===(e=globalThis.document)||void 0===e?void 0:e.documentElement).style.getPropertyValue(n);if(""!==r)return r;var i=cs.getPropertyValue(n);return""!==i?i:n}return t}},hs=function(){function t(e){(0,Lt.Z)(this,t),this.host=void 0,this.canvasApi=void 0,this.host=e,this.canvasApi=e.getCanvasApiUnsafe()}return(0,Dt.Z)(t,[{key:"render",value:function(t){}},{key:"hostConnected",value:function(){}}]),t}();function ds(t){return-1!==navigator.userAgent.indexOf("Mac OS")?t.metaKey:t.ctrlKey}var vs=function(){};function ps(t,e,n){return t>=e&&t<=n}function ms(t,e,n,r){return e-t>r-n?ps(n,t,e)||ps(r,t,e):ps(t,n,r)||ps(e,n,r)}function gs(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(t){return t},a=Math.abs(i-r),s=function(t,e,n){var r=Math.abs(n-e);return e<n?(t-e)/r:(t-n)/r}(t,e,n);return r<i?r+o(s)*a:i+o(1-s)*a}function ys(t,e,n){return t>n?n:t<e?e:t}function bs(t,e){return t-t%e}function xs(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return t>=e-n&&t<=e+n}var ws=n(67320),_s=n.n(ws),Es=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,Lt.Z)(this,t),this._axes=[],this._sortedAxes=void 0,this._axesById=void 0,this.axes=e,n&&n.identityFunction&&(this.getIdentity=n.identityFunction)}return(0,Dt.Z)(t,[{key:"getIdentity",value:function(t){return t.id}},{key:"axes",get:function(){return this._axes},set:function(t){t!==this._axes&&(this._axes=t,this._sortedAxes=void 0,this._axesById=void 0)}},{key:"sortedAxes",get:function(){return this._sortedAxes||(this._sortedAxes=this._axes.slice().sort((function(t,e){return t.top-e.top}))),this._sortedAxes}},{key:"axesById",get:function(){var t=this;return this._axesById||(this._axesById=this._axes.reduce((function(e,n){return e[t.getIdentity(n)]=n,e}),{})),this._axesById}}]),t}(),Ss=n(87322),ks=n.n(Ss),Os=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){var t;(0,Lt.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).height=fs.RULER_HEADER_HEIGHT,t}return(0,Dt.Z)(n,[{key:"render",value:function(t){t.useStaticTransform();var e=t.ctx,n=t.start,r=t.end,i=t.canvas,o=t.pixelRatio;e.fillStyle=fs.resolveCssValue(fs.PRIMARY_BACKGROUND_COLOR),e.fillRect(0,0,i.width,this.height);var a=[0,0,e.canvas.width/o,this.height],s=a[0],u=a[1],l=a[2],c=a[3];function f(t){return gs(+t,n,r,0,l)}function h(t){return gs(t,u,u+l,n,r)}function d(t,n,r,i,o){e.strokeStyle=fs.resolveCssValue(fs.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(t);+s<n;s=r.step(s)){var u=ks()(s).format(r.format),c=f(s);c>10&&c<l&&(a||(a=s),e.fillStyle=r.color&&r.color(s)||o,e.strokeText(u,c,i),e.fillText(u,c,i))}var d=h(10),v=ks()(d).format(r.format),p=ys(10,-1/0,f(a||n)-e.measureText(v).width-5);e.fillStyle=r.color&&r.color(d)||o,e.strokeText(v,p,i),e.fillText(v,p,i)}e.font=fs.RULER_FONT,e.lineJoin="miter",e.miterLimit=2,e.lineWidth=1;for(var v,p,m=r-n,g=0,y=Rs.length;g<y;g+=1)if(!(m>Rs[g].domain)){for(var b=0,x=ks()(0);+x<m;x=Rs[g].step(x))gs(+x,0,m,u,u+l)>0&&(b+=fs.RULER_LABEL_SPACING);if(!(b>l)){p=(v=Rs[g]).sup||Rs[g+1];break}}v&&d(n,r,v,s+fs.RULER_LABEL_POS,fs.resolveCssValue(fs.RULER_PRIMARY_TEXT_COLOR)),p&&d(n,r,p,s+fs.RULER_SUP_LABEL_POS,fs.resolveCssValue(fs.RULER_SECONDARY_TEXT_COLOR)),e.strokeStyle=fs.resolveCssValue(fs.RULER_BORDER_COLOR),e.beginPath(),e.moveTo(u,s+c+.5),e.lineTo(u+l,s+c+.5),e.stroke()}}]),n}(hs),Ts={start:function(t){return ks()(t).startOf("hour")},step:function(t){return ks()(t).add(1,"hour")},format:"HH"},js={start:function(t){return ks()(t).startOf("day")},step:function(t){return ks()(t).add(1,"day")},color:function(t){var e=ks()(t).day();return 6===e||0===e?fs.resolveCssValue(fs.RULER_WEEKEND_COLOR):null},format:"MMM D"},Rs=[{domain:1e3,start:function(t){return ks()(t).startOf("millisecond")},step:function(t){return ks()(t).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(t){return ks()(t).startOf("second")},step:function(t){return ks()(t).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(t){return ks()(t).startOf("second")},step:function(t){return ks()(t).add(1,"second")},format:"ss[′′]",sup:{start:function(t){var e=ks()(t).startOf("minute");return e.subtract(e.minute()%5,"minute")},step:function(t){return ks()(t).add(5,"minute")},format:"mm[′]"}},{domain:qa,start:function(t){var e=ks()(t).startOf("minute");return e.subtract(e.minute()%5,"minute")},step:function(t){return ks()(t).add(5,"minute")},format:"mm[′]",sup:Ts},{domain:Va,start:function(t){var e=ks()(t).startOf("minute");return e.subtract(e.minute()%15,"minute")},step:function(t){return ks()(t).add(15,"minute")},format:"mm[′]",sup:Ts},{domain:Va,start:function(t){return ks()(t).startOf("hour")},step:function(t){return ks()(t).add(1,"hour")},format:"HH",sup:js},{domain:Ya,start:function(t){var e=ks()(t).startOf("hour");return e.subtract(e.hour()%4,"hour")},step:function(t){return ks()(t).add(4,"hour")},format:"HH",sup:js},{domain:Ya,start:function(t){return ks()(t).startOf("day")},step:function(t){return ks()(t).add(1,"day")},color:function(t){var e=ks()(t).day();return 6===e||0===e?fs.resolveCssValue(fs.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(t){return ks()(t).startOf("month")},step:function(t){return ks()(t).add(1,"month")},format:"MMM YYYY"}},{domain:6*Ya,start:function(t){return ks()(t).startOf("week").add(1,"day")},step:function(t){return ks()(t).add(1,"week")},format:"D"},{domain:Wa,start:function(t){return ks()(t).startOf("month")},step:function(t){return ks()(t).add(1,"month")},format:"MMM",sup:{start:function(t){return ks()(t).startOf("year")},step:function(t){return ks()(t).add(1,"year")},format:"YYYY"}},{domain:10*Wa,start:function(t){var e=ks()(t).startOf("month");return e.subtract(e.month()%3,"month")},step:function(t){return ks()(t).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(t){return ks()(t).startOf("year")},step:function(t){return ks()(t).add(1,"year")},format:"YYYY"}],As=function(t){return t[t.STRAIGHT=0]="STRAIGHT",t[t.DASHED=1]="DASHED",t}({}),Cs=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Lt.Z)(this,n),(r=e.call(this,t)).trackHeight=fs.TRACK_HEIGHT,r.strokeMode=As.STRAIGHT,r.axesIndex=void 0,Object.assign((0,Ha.Z)(r),i),r.axesIndex=new Es([],{identityFunction:i.identityFunction}),r}return(0,Dt.Z)(n,[{key:"axes",get:function(){return this.axesIndex.axes},set:function(t){this.axesIndex.axes=t}},{key:"axesById",get:function(){return this.axesIndex.axesById}},{key:"getAxisTrackPosition",value:function(t,e){var n=ys(e,0,t.tracksCount-1);return t.top+this.trackHeight*n+this.trackHeight/2}},{key:"render",value:function(t){var e,n=(null===(e=t.getComponent(Os))||void 0===e?void 0:e.height)||0,r=t.ctx;this.strokeMode===As.DASHED&&r.setLineDash([5,3]),t.useScrollTransform(),r.translate(0,n);var i=t.canvas.width;r.strokeStyle=fs.resolveCssValue(fs.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,ve.Z)(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(t){a.e(t)}finally{a.f()}r.stroke(),r.setLineDash([0,0])}}]),n}(hs),Ns=(0,Dt.Z)((function t(){(0,Lt.Z)(this,t),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),Ms=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"render",value:function(t,e,n,r,i,o){if(1===e.eventsCount)t.beginPath(),t.fillStyle=fs.resolveCssValue(fs.eventStatusColors[e.status]),t.arc(r,o,5,0,2*Math.PI),n&&(t.strokeStyle=fs.resolveCssValue(fs.SELECTION_OUTLINE_COLOR),t.lineWidth=fs.SELECTION_OUTLINE_THICKNESS,t.stroke()),t.fill();else if(e.eventsCount>1){t.fillStyle=fs.resolveCssValue(fs.groupStatusColors[e.status]),t.beginPath(),t.arc(r,o,6,Math.PI/2,3*Math.PI/2),t.arc(i,o,6,3*Math.PI/2,Math.PI/2),t.closePath(),n&&(t.strokeStyle=fs.resolveCssValue(fs.SELECTION_OUTLINE_COLOR),t.lineWidth=fs.SELECTION_OUTLINE_THICKNESS,t.stroke()),t.fill();var a=Math.max(r,fs.COUNTER_PADDING);Ga(t,e,a,o,i-a)}}},{key:"getHitbox",value:function(t,e,n){return this.hitboxResult.left=e-6,this.hitboxResult.right=n+6,this.hitboxResult}}]),n}(Ns),Is=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"render",value:function(t,e,n,r,i,o){if(1===e.eventsCount){var a=o-3,s=Math.max(i-r,5);n&&(t.strokeStyle=fs.resolveCssValue(fs.SELECTION_OUTLINE_COLOR),t.lineWidth=fs.SELECTION_OUTLINE_THICKNESS,t.strokeRect(r,a,s,6)),t.fillStyle=fs.resolveCssValue(fs.eventStatusColors[e.status]),t.fillRect(r,a,s,6)}else if(e.eventsCount>1){var u=o-6,l=Math.max(i-r,5);n&&(t.strokeStyle=fs.resolveCssValue(fs.SELECTION_OUTLINE_COLOR),t.lineWidth=fs.SELECTION_OUTLINE_THICKNESS,t.strokeRect(r,u,l,12)),t.fillStyle=fs.resolveCssValue(fs.groupStatusColors[e.status]),t.fillRect(r,u,l,12);var c=Math.max(r+fs.COUNTER_PADDING,fs.COUNTER_PADDING);Ga(t,e,c,o,i-c)}}},{key:"getHitbox",value:function(t,e,n){return this.hitboxResult.left=e,this.hitboxResult.right=e+Math.max(n-e,5),this.hitboxResult}}]),n}(Ns),Zs=["renderers"],Ps=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Lt.Z)(this,n),(r=e.call(this,t)).eventHitboxPadding=fs.EVENT_HITBOX_PADDING,r.eventCounterFont=fs.COUNTER_FONT,r.allowMultipleSelection=!0,r.handleCanvasMouseup=function(t){var e=r.getEventsAtPoint(t.offsetX,t.offsetY);e.length>0?r.selectEvents([e[0]],{append:ds(t),toggle:!0}):r.selectEvents([])},r.handleCanvasContextmenu=function(t){t.preventDefault();var e=r.getEventsAtPoint(t.offsetX,t.offsetY),n=e.length>0?e[0]:void 0;r.host.dispatchEvent(new CustomEvent("openContextmenu",{detail:{event:n,relativeX:t.clientX,relativeY:t.clientY}}))},r.getEventIdentity=function(t){return"".concat(t.axisId,":").concat(t.from,"-").concat(t.to)},r.renderers=new Map([["event",new Ms],["process",new Is]]),r.maxIndexTreeWidth=16,r.index=new(_s())(r.maxIndexTreeWidth),r._selectedEvents=new Set,r._events=[];var o=i.renderers,a=(0,fe.Z)(i,Zs);if(Object.assign((0,Ha.Z)(r),a),o)for(var s in o)r.registerRenderer(s,o[s]);return r.canvasApi.canvas.addEventListener("mouseup",r.handleCanvasMouseup),r.canvasApi.canvas.addEventListener("contextmenu",r.handleCanvasContextmenu),r}return(0,Dt.Z)(n,[{key:"events",get:function(){return this._events},set:function(t){this._events=t,this.rebuildIndex()}},{key:"registerRenderer",value:function(t,e){this.renderers.set(t,e)}},{key:"getRenderer",value:function(t){return this.renderers.get(t)}},{key:"getEventsAt",value:function(t){var e,n=this.canvasApi,r=-((null===(e=n.getComponent(Os))||void 0===e?void 0:e.height)||0)+n.canvasScrollTop;return this.index.search({minX:n.positionToTime(t.left-this.eventHitboxPadding),maxX:n.positionToTime(t.right+this.eventHitboxPadding),minY:t.top+r-this.eventHitboxPadding,maxY:t.bottom+r+this.eventHitboxPadding}).map((function(t){return t.event}))}},{key:"getEventsAtPoint",value:function(t,e){return this.getEventsAt(new DOMRect(t-3,e-3,6,6))}},{key:"selectedEvents",get:function(){var t=this;return this.events.filter((function(e){return t.isSelectedEvent(e)}))}},{key:"isSelectedEvent",value:function(t){if(!t)return!1;var e=this.getEventIdentity(t);return this._selectedEvents.has(e)}},{key:"selectEvents",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._selectedEvents;e.append||n.clear();var r=e.toggle?function(t){n.has(t)?n.delete(t):n.add(t)}:function(t){return n.add(t)};if(this.allowMultipleSelection){var i,o=(0,ve.Z)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;r(this.getEventIdentity(a))}}catch(t){o.e(t)}finally{o.f()}}else t.length>0&&(n.size>0&&!n.has(t[0])&&n.clear(),t.length>0&&r(this.getEventIdentity(t[0])));this.host.dispatchEvent(new CustomEvent("eventsSelected",{detail:{events:this.selectedEvents}})),this.host.scheduleTimelineRender()}},{key:"selectEventsAt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.selectEvents(this.getEventsAt(t),e)}},{key:"render",value:function(t){var e,n=t.getComponent(Cs),r=(null===(e=t.getComponent(Os))||void 0===e?void 0:e.height)||0;if(n){var i=n.axesById;t.useScrollTransform();var o=t.ctx,a=function(e){return t.timeToPosition(e)};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 f=n.getAxisTrackPosition(c,l.trackIndex);if(c&&ms(t.start,t.end,l.from,l.to)){var h=t.timeToPosition(l.from),d=t.timeToPosition(l.to);this.runRenderer(o,l,this.isSelectedEvent(l),h,d,f,c.height,a)}}}}}},{key:"runRenderer",value:function(t,e,n,r,i,o,a,s,u){var l;null===(l=this.renderers)||void 0===l||null===(l=l.get(e.renderType))||void 0===l||l.render(t,e,n,r,i,o,a,s,u)}},{key:"rebuildIndex",value:function(){var t=this.canvasApi.getComponent(Cs),e=this._events.map((function(e){var n=t.axesById[e.axisId],r=t.getAxisTrackPosition(n,e.trackIndex),i=e.from;return{minX:i,maxX:e.to?e.to:i+1,minY:r-t.trackHeight/2,maxY:r+t.trackHeight/2,event:e}}));this.index.clear(),this.index.load(e)}}]),n}(hs),Ls=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Lt.Z)(this,n),(r=e.call(this,t)).borderColor=fs.SELECTION_OUTLINE_COLOR,r.innerColor=fs.SELECTION_BG_COLOR,r.handleCanvasMousedown=function(t){if(ds(t)){t.stopPropagation(),t.stopImmediatePropagation();var e=r.canvasApi.canvas.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,o=function(t){var o=t.clientX-e.left,a=t.clientY-e.top;Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))>3&&(r.area=new DOMRect(n,i,o-n,a-i),r.host.scheduleTimelineRender())};document.addEventListener("mousemove",o),document.addEventListener("mouseup",(function t(){r.area&&(r.onSelected(r.area),r.area=void 0,r.host.scheduleTimelineRender()),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",t)}))}},r.area=void 0,r.onSelected=function(t){var e=r.canvasApi.getComponent(Ps);e&&e.selectEventsAt(t)},Object.assign((0,Ha.Z)(r),i),r.canvasApi.canvas.addEventListener("mousedown",r.handleCanvasMousedown),r}return(0,Dt.Z)(n,[{key:"render",value:function(t){if(this.area){var e=this.area,n=t.ctx;t.useStaticTransform(),n.strokeStyle=fs.resolveCssValue(this.borderColor),n.fillStyle=fs.resolveCssValue(this.innerColor),n.lineWidth=2,n.beginPath(),n.strokeRect(e.x,e.y,e.width,e.height);var r=n.globalAlpha;n.globalAlpha=.1,n.fillRect(e.x,e.y,e.width,e.height),n.globalAlpha=r}}}]),n}(hs),Ds=(n(38172),n(76897)),zs=n.n(Ds);new WeakMap;var $s=function(){function t(e,n){(0,Lt.Z)(this,t),this.from=e,this.to=n}return(0,Dt.Z)(t,[{key:"set",value:function(t,e){return this.from=t,this.to=e,this}},{key:"align",value:function(t){return this.from=bs(this.from,t),this.to=bs(this.to,t),this}},{key:"contain",value:function(e){return new t(Math.min(this.from,e.from),Math.max(this.to,e.to))}},{key:"subtract",value:function(){for(var e=[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,ve.Z)(e);try{for(c.s();!(s=c.n()).done;){var f=s.value;ms(f.from,f.to,u.from,u.to)?(f.from<u.from&&l.push(new t(f.from,u.from)),f.to>u.to&&l.push(new t(u.to,f.to))):l.push(f)}}catch(t){c.e(t)}finally{c.f()}e=l}return e.sort((function(t,e){return t.from-e.from}))}},{key:"clone",value:function(){return new t(this.from,this.to)}},{key:"length",get:function(){return this.to-this.from}},{key:"equals",value:function(t){return xs(this.from,t.from,.1)&&xs(this.to,t.to,.1)}}]),t}(),Bs=function(){function t(e){(0,Lt.Z)(this,t),this.getAxisIdentity=function(t){return t.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new $s(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=mr().mark((function t(){return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield([],"t0",1);case 1:case"end":return t.stop()}}),t)})),this.mapEvent=void 0,this.mergeEvents=vs,this.finalizeEvent=vs,this.overlapThreshold=fs.OVERLAPPING_THRESHOLD,this.onVisibleEventsChanged=vs,Object.assign(this,e),this.axesIndex=new Es([],{identityFunction:this.getAxisIdentity})}return(0,Dt.Z)(t,[{key:"getRawEvents",set:function(t){this._getRawEvents=t,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"axes",get:function(){return this.axesIndex.axes},set:function(t){this.axesIndex.axes=t,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"timeRange",get:function(){return this._timeRange},set:function(t){var e=this._timeRange;this._timeRange=t,xs(t.length,e.length,.1)||this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"viewportWidth",set:function(t){this._viewportWidth=t,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"recalcVisibility",value:function(){this.visibleEvents.length=0;for(var t=this.foldedEvents,e=0,n=t.length;e<n;e+=1){var r=t[e];ms(this._timeRange.from,this._timeRange.to,r.from,r.to||r.from)&&this.visibleEvents.push(r)}return this.visibleEvents}},{key:"clampEventTrackIndex",value:function(t,e){return ys(t.trackIndex,-1,e.tracksCount-1)}},{key:"foldEvents",value:function(){var t=this;this.foldedEvents.length=0;var e,n=this._getRawEvents(),r=this.axesIndex.axes.reduce((function(e,n){return e[t.getAxisIdentity(n)]=[],e}),{}),i=Object.create(null),o=(0,ve.Z)(n);try{for(o.s();!(e=o.n()).done;){var a=e.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=ys(l,0,u.tracksCount-1),i.trackIndex=l}var f=r[s][l];f?this.isOverlapping(f,i)?(f.eventsCount+=i.eventsCount,f.from=Math.min(f.from,i.from),f.to=Math.max(f.to,i.to),this.mergeEvents(f,i)):(this.finalizeEvent(f),this.foldedEvents.push(f),r[s][l]=i,i=Object.create(null)):(r[s][l]=i,i=Object.create(null))}}}catch(t){o.e(t)}finally{o.f()}for(var h=0,d=Object.values(r);h<d.length;h++){var v,p=d[h],m=(0,ve.Z)(p);try{for(m.s();!(v=m.n()).done;){var g=v.value;g&&(this.finalizeEvent(g),this.foldedEvents.push(g))}}catch(t){m.e(t)}finally{m.f()}}}},{key:"isOverlapping",value:function(t,e){return ms(t.from,t.to,e.from,e.to)||this.timeToWidth(e.from-t.to)<=this.overlapThreshold}},{key:"timeToWidth",value:function(t){return t*this._viewportWidth/this._timeRange.length}}]),t}(),Us=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(t){var r;return(0,Lt.Z)(this,n),(r=e.call(this,t)).handleTimeRangeChanged=zs()((function(t){r.mapper.timeRange.equals(t)||(r.mapper.timeRange=t)}),250),r.handleVisibleEventsChanged=function(t){r.canvasApi.getComponent(Ps).events=t,r.host.scheduleTimelineRender()},r.mapper=void 0,r.events=[],r.mapper=new Bs({mapEvent:function(t,e){Object.assign(t,e)},onVisibleEventsChanged:r.handleVisibleEventsChanged}),r}return(0,Dt.Z)(n,[{key:"appendEvents",value:function(t){this.events=this.events.concat(t),this.notifyMapperEvents()}},{key:"setEvents",value:function(t){this.events=t,this.notifyMapperEvents()}},{key:"axes",get:function(){return this.mapper.axes},set:function(t){if(t!==this.mapper.axes){var e=this.canvasApi.getComponent(Cs);e&&(e.axes=t),this.mapper.axes=t}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new $s(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var t=new $s(this.host.start,this.host.end);this.handleTimeRangeChanged(t)}},{key:"notifyMapperEvents",value:function(){var t=mr().mark(n),e=this.events;function n(){return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e,"t0",1);case 1:case"end":return t.stop()}}),t)}this.mapper.getRawEvents=n}}]),n}(hs),Fs=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"render",value:function(t){for(var e,n,r=(null===(e=t.getComponent(Os))||void 0===e?void 0:e.height)||0,i=t.canvas,o=t.start,a=t.end,s=t.pixelRatio,u=r,l=i.width/s,c=i.height-r,f=a-o,h=0,d=qs.length;h<d;h+=1)if(!(f>qs[h].domain)){for(var v=0,p=ks()(0);+p<f;p=qs[h].step(p))gs(+p,0,f,0,0+l)>0&&(v+=fs.RULER_GRID_SPACING);if(!(v>l+40)){n=qs[h];break}}t.useStaticTransform(),t.ctx.lineJoin="miter",t.ctx.miterLimit=2,t.ctx.lineWidth=1,this.renderLevel(t.ctx,u,0,l,c,o,a,n)}},{key:"renderLevel",value:function(t,e,n,r,i,o,a,s){t.lineWidth=fs.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(gs(+u,o,a,n,n+r));t.beginPath(),t.strokeStyle=s.style(u),t.moveTo(l,e),t.lineTo(l,e+i),t.stroke()}}}]),n}(hs);function Hs(t,e){return function(n){return n[e]()%t==0?fs.resolveCssValue(fs.PRIMARY_MARK_COLOR):fs.resolveCssValue(fs.SECONDARY_MARK_COLOR)}}var qs=[{domain:qa,style:Hs(5,"minute"),start:function(t){return ks()(t).startOf("minute")},step:function(t){return t.add(1,"minute")}},{domain:Va,style:function(t){return 0===t.hour()&&0===t.minute()?fs.resolveCssValue(fs.BOUNDARY_MARK_COLOR):t.minute()%4==0?fs.resolveCssValue(fs.PRIMARY_MARK_COLOR):fs.resolveCssValue(fs.SECONDARY_MARK_COLOR)},start:function(t){var e=ks()(t).startOf("minute");return e.subtract(e.minute()%15,"minute")},step:function(t){return t.add(15,"minute")}},{domain:Ya,style:function(t){return 0===t.hour()?fs.resolveCssValue(fs.BOUNDARY_MARK_COLOR):t.hour()%4==0?fs.resolveCssValue(fs.PRIMARY_MARK_COLOR):fs.resolveCssValue(fs.SECONDARY_MARK_COLOR)},start:function(t){return ks()(t).startOf("hour")},step:function(t){return t.add(1,"hour")}},{domain:Wa,style:function(t){return 1===t.date()?fs.resolveCssValue(fs.BOUNDARY_MARK_COLOR):1===t.day()?fs.resolveCssValue(fs.PRIMARY_MARK_COLOR):fs.resolveCssValue(fs.SECONDARY_MARK_COLOR)},start:function(t){return ks()(t).startOf("day")},step:function(t){return t.add(1,"day")}},{domain:5*Wa,style:Hs(3,"month"),start:function(t){return ks()(t).startOf("month")},step:function(t){return ks()(t).add(1,"month")}},{domain:1/0,style:function(){return fs.resolveCssValue(fs.PRIMARY_MARK_COLOR)},start:function(t){return ks()(t).startOf("year")},step:function(t){return t.add(1,"year")}}];const Vs=window,Ys=Vs.ShadowRoot&&(void 0===Vs.ShadyCSS||Vs.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ws=Symbol(),Xs=new WeakMap;class Gs{constructor(t,e,n){if(this._$cssResult$=!0,n!==Ws)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ys&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=Xs.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Xs.set(e,t))}return t}toString(){return this.cssText}}const Ks=Ys?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new Gs("string"==typeof t?t:t+"",void 0,Ws))(e)})(t):t;var Js;const Qs=window,tu=Qs.trustedTypes,eu=tu?tu.emptyScript:"",nu=Qs.reactiveElementPolyfillSupport,ru={toAttribute(t,e){switch(e){case Boolean:t=t?eu:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},iu=(t,e)=>e!==t&&(e==e||t==t),ou={attribute:!0,type:String,converter:ru,reflect:!1,hasChanged:iu},au="finalized";class su extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const r=this._$Ep(n,e);void 0!==r&&(this._$Ev.set(r,n),t.push(r))})),t}static createProperty(t,e=ou){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||ou}static finalize(){if(this.hasOwnProperty(au))return!1;this[au]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(Ks(t))}else void 0!==t&&e.push(Ks(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{Ys?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const n=document.createElement("style"),r=Vs.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=ou){var r;const i=this.constructor._$Ep(t,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:ru).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=r.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:ru;this._$El=i,this[i]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||iu)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var uu;su[au]=!0,su.elementProperties=new Map,su.elementStyles=[],su.shadowRootOptions={mode:"open"},null==nu||nu({ReactiveElement:su}),(null!==(Js=Qs.reactiveElementVersions)&&void 0!==Js?Js:Qs.reactiveElementVersions=[]).push("1.6.3");const lu=window,cu=lu.trustedTypes,fu=cu?cu.createPolicy("lit-html",{createHTML:t=>t}):void 0,hu="$lit$",du=`lit$${(Math.random()+"").slice(9)}$`,vu="?"+du,pu=`<${vu}>`,mu=document,gu=()=>mu.createComment(""),yu=t=>null===t||"object"!=typeof t&&"function"!=typeof t,bu=Array.isArray,xu="[ \t\n\f\r]",wu=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_u=/-->/g,Eu=/>/g,Su=RegExp(`>|${xu}(?:([^\\s"'>=/]+)(${xu}*=${xu}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ku=/'/g,Ou=/"/g,Tu=/^(?:script|style|textarea|title)$/i,ju=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Ru=ju(1),Au=(ju(2),Symbol.for("lit-noChange")),Cu=Symbol.for("lit-nothing"),Nu=new WeakMap,Mu=mu.createTreeWalker(mu,129,null,!1);function Iu(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==fu?fu.createHTML(e):e}class Zu{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const a=t.length-1,s=this.parts,[u,l]=((t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":"",a=wu;for(let e=0;e<n;e++){const n=t[e];let s,u,l=-1,c=0;for(;c<n.length&&(a.lastIndex=c,u=a.exec(n),null!==u);)c=a.lastIndex,a===wu?"!--"===u[1]?a=_u:void 0!==u[1]?a=Eu:void 0!==u[2]?(Tu.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Su):void 0!==u[3]&&(a=Su):a===Su?">"===u[0]?(a=null!=i?i:wu,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?Su:'"'===u[3]?Ou:ku):a===Ou||a===ku?a=Su:a===_u||a===Eu?a=wu:(a=Su,i=void 0);const f=a===Su&&t[e+1].startsWith("/>")?" ":"";o+=a===wu?n+pu:l>=0?(r.push(s),n.slice(0,l)+hu+n.slice(l)+du+f):n+du+(-2===l?(r.push(void 0),e):f)}return[Iu(t,o+(t[n]||"<?>")+(2===e?"</svg>":"")),r]})(t,e);if(this.el=Zu.createElement(u,n),Mu.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=Mu.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith(hu)||e.startsWith(du)){const n=l[o++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+hu).split(du),e=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?$u:"?"===e[1]?Uu:"@"===e[1]?Fu:zu})}else s.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(Tu.test(r.tagName)){const t=r.textContent.split(du),e=t.length-1;if(e>0){r.textContent=cu?cu.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],gu()),Mu.nextNode(),s.push({type:2,index:++i});r.append(t[e],gu())}}}else if(8===r.nodeType)if(r.data===vu)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(du,t+1));)s.push({type:7,index:i}),t+=du.length-1}i++}}static createElement(t,e){const n=mu.createElement("template");return n.innerHTML=t,n}}function Pu(t,e,n=t,r){var i,o,a,s;if(e===Au)return e;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=yu(e)?void 0:e._$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(t),u._$AT(t,n,r)),void 0!==r?(null!==(a=(s=n)._$Co)&&void 0!==a?a:s._$Co=[])[r]=u:n._$Cl=u),void 0!==u&&(e=Pu(t,u._$AS(t,e.values),u,r)),e}class Lu{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:mu).importNode(n,!0);Mu.currentNode=i;let o=Mu.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let e;2===u.type?e=new Du(o,o.nextSibling,this,t):1===u.type?e=new u.ctor(o,u.name,u.strings,this,t):6===u.type&&(e=new Hu(o,this,t)),this._$AV.push(e),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=Mu.nextNode(),a++)}return Mu.currentNode=mu,i}v(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class Du{constructor(t,e,n,r){var i;this.type=2,this._$AH=Cu,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cp=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Pu(this,t,e),yu(t)?t===Cu||null==t||""===t?(this._$AH!==Cu&&this._$AR(),this._$AH=Cu):t!==this._$AH&&t!==Au&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>bu(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Cu&&yu(this._$AH)?this._$AA.nextSibling.data=t:this.$(mu.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Zu.createElement(Iu(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{const t=new Lu(i,this),e=t.u(this.options);t.v(n),this.$(e),this._$AH=t}}_$AC(t){let e=Nu.get(t.strings);return void 0===e&&Nu.set(t.strings,e=new Zu(t)),e}T(t){bu(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new Du(this.k(gu()),this.k(gu()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class zu{constructor(t,e,n,r,i){this.type=1,this._$AH=Cu,this._$AN=void 0,this.element=t,this.name=e,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=Cu}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=Pu(this,t,e,0),o=!yu(t)||t!==this._$AH&&t!==Au,o&&(this._$AH=t);else{const r=t;let a,s;for(t=i[0],a=0;a<i.length-1;a++)s=Pu(this,r[n+a],e,a),s===Au&&(s=this._$AH[a]),o||(o=!yu(s)||s!==this._$AH[a]),s===Cu?t=Cu:t!==Cu&&(t+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(t)}j(t){t===Cu?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class $u extends zu{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Cu?void 0:t}}const Bu=cu?cu.emptyScript:"";class Uu extends zu{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Cu?this.element.setAttribute(this.name,Bu):this.element.removeAttribute(this.name)}}class Fu extends zu{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=Pu(this,t,e,0))&&void 0!==n?n:Cu)===Au)return;const r=this._$AH,i=t===Cu&&r!==Cu||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==Cu&&(r===Cu||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class Hu{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Pu(this,t)}}const qu=lu.litHtmlPolyfillSupport;var Vu,Yu;null==qu||qu(Zu,Du),(null!==(uu=lu.litHtmlVersions)&&void 0!==uu?uu:lu.litHtmlVersions=[]).push("2.8.0");class Wu extends su{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let a=o._$litPart$;if(void 0===a){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new Du(e.insertBefore(gu(),t),t,void 0,null!=n?n:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Au}}Wu.finalized=!0,Wu._$litElement$=!0,null===(Vu=globalThis.litElementHydrateSupport)||void 0===Vu||Vu.call(globalThis,{LitElement:Wu});const Xu=globalThis.litElementPolyfillSupport;null==Xu||Xu({LitElement:Wu}),(null!==(Yu=globalThis.litElementVersions)&&void 0!==Yu?Yu:globalThis.litElementVersions=[]).push("3.3.3");var Gu,Ku=function(){function t(e){(0,Lt.Z)(this,t),this.canvas=void 0,this.ctx=void 0,this.notifyBoundsChanged=void 0,this.notifyScrollTopChanged=void 0,this.timeline=void 0,Object.assign(this,e),this.canvas=e.timeline.renderRoot.querySelector("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx.globalAlpha=1}return(0,Dt.Z)(t,[{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 bs(Date.now(),1e3)}},{key:"timeToPosition",value:function(t){var e=this.width;return gs(t,this.timeline.start,this.timeline.end,0,e)||0}},{key:"positionToTime",value:function(t){return gs(t,0,this.width,this.timeline.start,this.timeline.end)}},{key:"widthToTime",value:function(t){return this.positionToTime(t)-this.start}},{key:"clear",value:function(){this.ctx.fillStyle=fs.resolveCssValue(fs.PRIMARY_BACKGROUND_COLOR),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}},{key:"useStaticTransform",value:function(){var t=this.pixelRatio;this.ctx.setTransform(t,0,0,t,0,0)}},{key:"useScrollTransform",value:function(){var t=this.pixelRatio;this.ctx.setTransform(t,0,0,t,0,-this.canvasScrollTop*t)}},{key:"getComponent",value:function(t){return this.timeline.getComponentUnsafe(t)}}]),t}(),Ju=function(t){(0,zt.Z)(r,t);var e,n=(0,$t.Z)(r);function r(){var t;return(0,Lt.Z)(this,r),(t=n.call(this)).start=void 0,t.end=void 0,t.canvasScrollTop=void 0,t.canvasLastWidth=void 0,t.canvasLastHeight=void 0,t.isZoomAllowed=void 0,t.handleWindowResize=function(){t.updateCanvasSize()},t.handleCanvasMousedown=function(e){e.stopPropagation(),e.preventDefault();var n=e.pageX,r=e.pageY,i=t.start,o=t.canvasScrollTop,a=t.end-i,s=t.canvasApi.canvas.width/t.canvasApi.pixelRatio,u=0,l=function(e){var l=(e.pageX-n)/s*a;t.notifyBoundsChanged(i-l,i-l+a);var c=e.pageY-r;Math.abs(c)>.1&&t.notifyScrollTopChanged(ys(o-c,0,1/0)),u=Math.sqrt(Math.pow(e.pageX-n,2)+Math.pow(c,2))};document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function t(e){u>2&&e.stopPropagation(),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",t,{capture:!0})}),{capture:!0})},t.handleCanvasWheel=function(e){e.stopPropagation(),e.preventDefault();var n=t.canvasApi;if(e.shiftKey||t.isZoomAllowed){var r=t.start,i=t.end,o=i-r,a=!1;if(Math.abs(e.deltaY)>2)if(e.shiftKey){a=!0;var s=o*e.deltaY*fs.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=e.offsetX/n.canvas.width,l=ys(o*(e.deltaY>0?1.15:.9),fs.ZOOM_MIN,fs.ZOOM_MAX);r=Math.round(t.start-(l-o)*u),i=Math.round(t.end+(l-o)*(1-u))}if(!a&&0!==e.deltaX){var c=(i-r)*e.deltaX*fs.WHEEL_PAN_SPEED;r+=c,i+=c}r===t.start&&i===t.end||t.notifyBoundsChanged(r,i)}},t.canvasApi=void 0,t.isTimelineRenderScheduled=!1,t.components=[],t.sizeUpdateTimerId=void 0,t.notifyBoundsChanged=function(e,n){t.dispatchEvent(new CustomEvent("boundsChanged",{detail:{start:e,end:n}}))},t.notifyScrollTopChanged=function(e){t.dispatchEvent(new CustomEvent("scrollTopChanged",{detail:{scrollTop:e}}))},t.canvasLastWidth=0,t.canvasLastHeight=0,t.start=0,t.end=Ya,t.canvasScrollTop=0,t.isZoomAllowed=!0,t}return(0,Dt.Z)(r,[{key:"render",value:function(){return Ru(Gu||(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 "],e||(e=t.slice(0)),Gu=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),this.start,this.end,this.canvasScrollTop);var t,e}},{key:"shouldUpdate",value:function(t){return(t.has("start")||t.has("end")||t.has("canvasScrollTop"))&&this.scheduleTimelineRender(),(0,Bt.Z)((0,Ut.Z)(r.prototype),"shouldUpdate",this).call(this,t)}},{key:"connectedCallback",value:function(){(0,Bt.Z)((0,Ut.Z)(r.prototype),"connectedCallback",this).call(this),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Bt.Z)((0,Ut.Z)(r.prototype),"disconnectedCallback",this).call(this)}},{key:"getComponentUnsafe",value:function(t){return this.components.find((function(e){return e instanceof t}))}},{key:"getComponent",value:(e=(0,vr.Z)(mr().mark((function t(e){return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateComplete;case 2:return t.abrupt("return",this.getComponentUnsafe(e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getCanvasApiUnsafe",value:function(){return this.canvasApi}},{key:"initComponents",value:function(){this.components=this.createComponents();var t,e=(0,ve.Z)(this.components);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.addController(n)}}catch(t){e.e(t)}finally{e.f()}}},{key:"firstUpdated",value:function(t){(0,Bt.Z)((0,Ut.Z)(r.prototype),"firstUpdated",this).call(this,t),this.canvasApi=new Ku({timeline:this,notifyBoundsChanged:this.notifyBoundsChanged,notifyScrollTopChanged:this.notifyScrollTopChanged}),this.initComponents();var e=this.canvasApi.canvas;e.addEventListener("mousedown",this.handleCanvasMousedown),e.addEventListener("wheel",this.handleCanvasWheel)}},{key:"init",value:function(){var t=this;this.canvasLastWidth=0,this.canvasLastHeight=0,this.updateComplete.then((function(){window.addEventListener("resize",t.handleWindowResize),t.sizeUpdateTimerId=window.setInterval((function(){(t.offsetHeight!==t.canvasLastHeight||t.offsetWidth!==t.canvasLastWidth)&&(t.updateCanvasSize(),t.canvasLastWidth=t.offsetWidth,t.canvasLastHeight=t.offsetHeight)}),2e3),t.updateCanvasSize()}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.handleWindowResize),clearInterval(this.sizeUpdateTimerId)}},{key:"reset",value:function(){var t=this;this.destroy(),requestAnimationFrame((function(){return t.init()}))}},{key:"scheduleTimelineRender",value:function(){var t=this;this.isTimelineRenderScheduled||(this.isTimelineRenderScheduled=!0,requestAnimationFrame((function(){t.renderTimeline(),t.isTimelineRenderScheduled=!1})))}},{key:"renderTimeline",value:function(){var t=this.canvasApi;t.useStaticTransform(),t.clear();var e,n=(0,ve.Z)(this.components);try{for(n.s();!(e=n.n()).done;)e.value.render(t)}catch(t){n.e(t)}finally{n.f()}}},{key:"updateCanvasSize",value:function(){var t=this.canvasApi,e=null==t?void 0:t.canvas;e&&(e.width=Math.floor(this.offsetWidth*t.pixelRatio),e.height=Math.floor(this.offsetHeight*t.pixelRatio),this.canvasLastWidth=e.width,this.canvasLastHeight=e.height,this.scheduleTimelineRender())}}],[{key:"properties",get:function(){return{start:{type:Number},end:{type:Number},canvasScrollTop:{type:Number},isZoomAllowed:{type:Boolean}}}}]),r}(Wu);const Qu=new Set(["children","wcType"]);class tl extends o.Component{get element(){return this._element}getTag(){let t;return"function"==typeof this.props.wcType?t=this.props.wcType.name.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase():"string"==typeof this.props.wcType&&(t=this.props.wcType),t}render(){const t=this.getTag();if(!t)throw'"wcType" must be set!';const e={};for(const t of Object.keys(this.props))t&&!0===this.props[t]&&(e[t]=!0);return o.createElement(t,Object.assign(Object.assign({},e),{ref:t=>this.setRef(t)}),this.props.children)}setRef(t){t?(t!==this._element&&this.cleanUp(),this._element=t,this.syncProps(this.props)):this.cleanUp(),this.props.innerRef&&("function"==typeof this.props.innerRef?this.props.innerRef(t):this.props.innerRef.current=t)}cleanUp(){if(this._element){for(const t in this.props)this.props.hasOwnProperty(t)&&this.isEventProp(t,this.props[t])&&this.removeEventListener(t,this.props[t]);this._element=null}}componentDidUpdate(t){const e={};for(const n in this.props)this.props.hasOwnProperty(n)&&(t[n]&&t[n]===this.props[n]||(e[n]=this.props[n],t[n]&&this.isEventProp(n,t[n])&&this.removeEventListener(n,t[n])));for(const e in t)t.hasOwnProperty(e)&&!this.props[e]&&this.isEventProp(e,t[e])&&this.removeEventListener(e,t[e]);this.syncProps(e)}syncProps(t){if(this._element)for(const e in t)Qu.has(e)||(this.isEventProp(e,t[e])&&this.addEventListener(e,t[e]),this._element[e]=t[e])}isEventProp(t,e){return t&&"function"==typeof e}addEventListener(t,e){let n=t;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.addEventListener(n,e)}removeEventListener(t,e){let n=t;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.removeEventListener(n,e)}}function el(t,e){if(t&&e)return e-t==0?"0s":e-t<1e3?"<1s":un(t,e,"h:mm:ss")}var nl=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"render",value:function(t,e,n,r,i,o){var a=o-8,s=Math.max(i-r,4),u=16,l=el(e.from,e.to),c=r,f=0;if(0===e.trackIndex&&Object.keys(e.colors).length>1){for(var h=1;h<Object.keys(e.colors).length;h++){var d=s*e.colors[h].percentage;h===Object.keys(e.colors).length-1&&(d=Math.max(s*e.colors[h].percentage,4)),t.fillStyle=fs.resolveCssValue(e.colors[h].color),t.fillRect(c,a,d,u),c+=d,f+=d}if(1===e.eventsCount&&e.borderColor&&(function(t){var e=t.ctx,n=t.x0,r=t.y0,i=t.width,o=t.height,a=t.color;e.fillStyle=a,e.beginPath(),e.lineTo(n-1,r+o+5+1),e.lineTo(n+10,r+o+1),e.lineTo(n-1,r+o+1),e.fill(),e.beginPath(),e.lineTo(n+i+1,r+o+5+1),e.lineTo(n+i-10,r+o+1),e.lineTo(n+i+1,r+o+1),e.fill()}({ctx:t,x0:r,y0:a,width:f||s,height:u,color:fs.resolveCssValue(e.borderColor)}),t.strokeStyle=fs.resolveCssValue(e.borderColor),t.lineWidth=2,t.strokeRect(r,a,f||s,u),e.backgroundColor)){var v=(fs.TRACK_HEIGHT-u)/3;t.fillStyle=fs.resolveCssValue(e.backgroundColor),t.fillRect(r-v,a-v,(f||s)+2*v,fs.TRACK_HEIGHT*Object.keys(e.colors).length-v)}}else{var p=e.colors[e.trackIndex].color;t.fillStyle=fs.resolveCssValue(p),t.fillRect(r,a,s,u)}n&&(t.strokeStyle=fs.resolveCssValue(fs.SELECTION_OUTLINE_COLOR),t.lineWidth=fs.SELECTION_OUTLINE_THICKNESS,t.strokeRect(r,a,f||s,u)),l&&function(t,e,n,r){t.fillStyle=fs.resolveCssValue(fs.COUNTER_FONT_COLOR),t.fillText(e,n+fs.COUNTER_PADDING,r+fs.COUNTER_FONT_CENTER_OFFSET)}(t,l,r+Math.max(f,s),o)}},{key:"getHitbox",value:function(t,e,n){return this.hitboxResult.left=e,this.hitboxResult.right=e+Math.max(n-e,4),this.hitboxResult}}]),n}(Ns),rl=function(t){(0,zt.Z)(n,t);var e=(0,$t.Z)(n);function n(){return(0,Lt.Z)(this,n),e.apply(this,arguments)}return(0,Dt.Z)(n,[{key:"events",set:function(t){this.getComponent(Us).then((function(e){null==e||e.setEvents(t)}))}},{key:"axes",set:function(t){this.getComponent(Us).then((function(e){e&&(e.axes=t)}))}},{key:"theme",set:function(t){this.setTimelineConfig(),this.scheduleTimelineRender()}},{key:"updateCanvasSize",value:function(){if(this.offsetHeight)return(0,Bt.Z)((0,Ut.Z)(n.prototype),"updateCanvasSize",this).call(this)}},{key:"createComponents",value:function(){this.setTimelineConfig();var t=new Ps(this);return t.registerRenderer("operation",new nl),[new Fs(this),new Cs(this),t,new Ls(this),new Us(this)]}},{key:"setTimelineConfig",value:function(){fs.ZOOM_MAX=3*Wa,fs.PRIMARY_BACKGROUND_COLOR=gi("--yc-color-base-background"),fs.SECONDARY_MARK_COLOR=gi("--yc-color-line-generic"),fs.BOUNDARY_MARK_COLOR=gi("--yc-color-line-generic"),fs.PRIMARY_MARK_COLOR=gi("--yc-color-line-generic-hover"),fs.COUNTER_FONT_COLOR=gi("--yc-color-text-complementary")}}]),n}(Ju);customElements.define("my-timeline-canvas",rl);var il=(t=>{const e=o.forwardRef(((t,e)=>o.createElement(tl,Object.assign({wcType:"my-timeline-canvas",innerRef:e},t))));return e})();function ol(){return ol=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ol.apply(this,arguments)}var al,sl=["bottom","height","left","right","top","width"],ul=new Map,ll=function t(){var e=[];ul.forEach((function(t,n){var r=n.getBoundingClientRect();(function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),sl.some((function(n){return t[n]!==e[n]}))})(r,t.rect)&&(t.rect=r,e.push(t))})),e.forEach((function(t){t.callbacks.forEach((function(e){return e(t.rect)}))})),al=window.requestAnimationFrame(t)},cl="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function fl(t,e){var n=e.rect;return t.height!==n.height||t.width!==n.width?n:t}var hl=function(t,e){void 0===e&&(e={width:0,height:0});var n=o.useState(t.current),r=n[0],i=n[1],a=o.useReducer(fl,e),s=a[0],u=a[1],l=o.useRef(!1);return cl((function(){t.current!==r&&i(t.current)})),cl((function(){if(r&&!l.current){l.current=!0;var t=r.getBoundingClientRect();u({rect:t})}}),[r]),o.useEffect((function(){if(r){var t,e,n=(t=r,e=function(t){u({rect:t})},{observe:function(){var n=0===ul.size;ul.has(t)?ul.get(t).callbacks.push(e):ul.set(t,{rect:void 0,hasRectChanged:!1,callbacks:[e]}),n&&ll()},unobserve:function(){var n=ul.get(t);if(n){var r=n.callbacks.indexOf(e);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||ul.delete(t),ul.size||cancelAnimationFrame(al)}}});return n.observe(),function(){n.unobserve()}}}),[r]),s},dl=["align"],vl=function(){return 50},pl=function(t){return t},ml=function(t,e){return t[e?"offsetWidth":"offsetHeight"]},gl=function(t){for(var e=Math.max(t.start-t.overscan,0),n=Math.min(t.end+t.overscan,t.size-1),r=[],i=e;i<=n;i++)r.push(i);return r},yl=function(t){var e,n=t.size,r=void 0===n?0:n,i=t.estimateSize,a=void 0===i?vl:i,s=t.overscan,u=void 0===s?1:s,l=t.paddingStart,c=void 0===l?0:l,f=t.paddingEnd,h=void 0===f?0:f,d=t.parentRef,v=t.horizontal,p=void 0!==v&&v,m=t.scrollToFn,g=t.useObserver,y=t.initialRect,b=t.onScrollElement,x=t.scrollOffsetFn,w=t.keyExtractor,_=void 0===w?pl:w,E=t.measureSize,S=void 0===E?ml:E,k=t.rangeExtractor,O=void 0===k?gl:k,T=p?"width":"height",j=p?"scrollLeft":"scrollTop",R=o.useRef({outerSize:0,scrollOffset:0,measurements:[],totalSize:0}),A=o.useState(0),C=A[0],N=A[1];R.current.scrollOffset=C;var M=(g||hl)(d,y)[T];R.current.outerSize=M;var I=o.useCallback((function(t){d.current&&(d.current[j]=t)}),[d,j]),Z=m||I,P=o.useCallback((function(t){Z(t,I)}),[I,Z]),L=o.useState({}),D=L[0],z=L[1],$=o.useCallback((function(){return z({})}),[]),B=o.useRef([]),U=o.useMemo((function(){var t=B.current.length>0?Math.min.apply(Math,B.current):0;B.current=[];for(var e=R.current.measurements.slice(0,t),n=t;n<r;n++){var i=_(n),o=D[i],s=e[n-1]?e[n-1].end:c,u="number"==typeof o?o:a(n),l=s+u;e[n]={index:n,start:s,size:u,end:l,key:i}}return e}),[a,D,c,r,_]),F=((null==(e=U[r-1])?void 0:e.end)||c)+h;R.current.measurements=U,R.current.totalSize=F;var H=b?b.current:d.current,q=o.useRef(x);q.current=x,cl((function(){if(H){var t=function(t){var e=q.current?q.current(t):H[j];N(e)};return t(),H.addEventListener("scroll",t,{capture:!1,passive:!0}),function(){H.removeEventListener("scroll",t)}}N(0)}),[H,j]);var V=function(t){for(var e=t.measurements,n=t.outerSize,r=t.scrollOffset,i=e.length-1,o=bl(0,i,(function(t){return e[t].start}),r),a=o;a<i&&e[a].end<r+n;)a++;return{start:o,end:a}}(R.current),Y=V.start,W=V.end,X=o.useMemo((function(){return O({start:Y,end:W,overscan:u,size:U.length})}),[Y,W,u,U.length,O]),G=o.useRef(S);G.current=S;var K=o.useMemo((function(){for(var t=[],e=function(e,n){var r=X[e],i=ol({},U[r],{measureRef:function(t){if(t){var e=G.current(t,p);if(e!==i.size){var n=R.current.scrollOffset;i.start<n&&I(n+(e-i.size)),B.current.push(r),z((function(t){var n;return ol({},t,((n={})[i.key]=e,n))}))}}}});t.push(i)},n=0,r=X.length;n<r;n++)e(n);return t}),[X,I,p,U]),J=o.useRef(!1);cl((function(){J.current&&z({}),J.current=!0}),[a]);var Q=o.useCallback((function(t,e){var n=(void 0===e?{align:"start"}:e).align,r=R.current,i=r.scrollOffset,o=r.outerSize;"auto"===n&&(n=t<=i?"start":t>=i+o?"end":"start"),"start"===n?P(t):"end"===n?P(t-o):"center"===n&&P(t-o/2)}),[P]),tt=o.useCallback((function(t,e){var n=void 0===e?{align:"auto"}:e,i=n.align,o=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(n,dl),a=R.current,s=a.measurements,u=a.scrollOffset,l=a.outerSize,c=s[Math.max(0,Math.min(t,r-1))];if(c){if("auto"===i)if(c.end>=u+l)i="end";else{if(!(c.start<=u))return;i="start"}var f="center"===i?c.start+c.size/2:"end"===i?c.end:c.start;Q(f,ol({align:i},o))}}),[Q,r]),et=o.useCallback((function(t,e){tt(t,e),requestAnimationFrame((function(){tt(t,e)}))}),[tt]);return{virtualItems:K,totalSize:F,scrollToOffset:Q,scrollToIndex:et,measure:$}},bl=function(t,e,n,r){for(;t<=e;){var i=(t+e)/2|0,o=n(i);if(o<r)t=i+1;else{if(!(o>r))return i;e=i-1}}return t>0?t-1:0},xl=(0,s.Z)("yq-virtual-list"),wl=3;function _l(t){var e=t.listRef,n=t.className,r=t.containerRef,a=t.scrollRef,s=t.wrapperClassName,u=t.items,l=t.itemHeight,c=void 0===l?40:l,f=t.renderItem,h=t.itemWrapper,v=t.itemClassName,p=t.itemKey,m=t.activeItemIndex,g=t.selectedItemKey,y=t.onItemClick,b=t.onWrapperScroll,x=t.canFetchMore,w=t.isFetchingMore,_=t.fetchMore,E=t.loaderHeight,S=void 0===E?40:E,k=t.alwaysShowActiveItem,O=t.headerClassName,T=t.renderHeader,j=o.useState(),R=(0,i.Z)(j,2),A=R[0],C=R[1],N=o.useRef(null);o.useEffect((function(){k&&(!A||A>u.length-1)&&C(0)}),[u,A,k]);var M=o.useRef(null),Z=o.useRef(null),P=yl({size:x?u.length+1:u.length,estimateSize:o.useCallback((function(t){return t>=u.length?S:"function"==typeof c?c(u[t],t):c}),[c,S,u.length,"function"==typeof c?u:void 0]),keyExtractor:function(t){return t===u.length?"loader":"function"==typeof p?p(u[t],t):t},overscan:wl,parentRef:Z});o.useImperativeHandle(e,(function(){return{resetSizes:function(){P.measure()}}}),[P.measure]),o.useEffect((function(){var t=P.virtualItems.slice(-1),e=(0,i.Z)(t,1)[0];e&&e.index===u.length&&x&&!w&&(null==_||_())}),[x,_,u.length,w,P.virtualItems]);var L=function(){k||N.current||(N.current=window.setTimeout((function(){C(void 0),N.current=null}),50))},D=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t.preventDefault(),C((function(r){var i=function(t,e,n,r){var i=t.length,o=n,a=r;o>=i?(o=i-1,a=-1):o<0&&(o=0,a=1);for(var s=0;s<i&&o>=0&&o<i;s++){var u=t[o],l="object"===(0,I.Z)(u)&&null!==u&&"disabled"in u&&u.disabled;if(t[o]&&!l)return o;-1!==(o+=a)&&o!==i||void 0===e||(o=n+(a=-a))}}(u,r,(null!=r?r:n)+e,Math.sign(e));return void 0!==i&&(P.scrollToIndex(i),M.current&&M.current.contains(t.target)&&M.current!==t.target&&M.current.focus()),i}))};return(0,d.jsxs)("div",{ref:On(M,r),tabIndex:0,className:xl(null,n),onFocus:function(){N.current&&(clearTimeout(N.current),N.current=null)},onBlur:L,onMouseLeave:L,onKeyDown:function(t){if(0!==P.virtualItems.length){var e=Math.max(1,P.virtualItems.length-2*wl),n=P.virtualItems[0].index;switch(t.key){case"ArrowDown":D(t,1,n-1);break;case"ArrowUp":D(t,-1,n);break;case"PageDown":D(t,e,n);break;case"PageUp":D(t,-e,n);break;case"Home":D(t,-(A||0));break;case"End":D(t,u.length-(A||0)-1);break;case"Enter":"number"==typeof A&&y&&t.target===t.currentTarget&&void 0!==u[A]&&(t.preventDefault(),y(u[A],A,void 0,!0))}}},children:[(0,d.jsx)("div",{className:xl("header",O),children:"function"==typeof T?T():null}),(0,d.jsx)("div",{className:xl("list",s),ref:On(Z,a),onScroll:b,children:(0,d.jsx)("div",{style:{height:"".concat(P.totalSize,"px"),width:"100%",position:"relative"},children:P.virtualItems.map((function(t){if(t.index>u.length-1)return(0,d.jsx)("div",{ref:t.measureRef,className:xl("item",{loader:!0}),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(S,"px"),transform:"translateY(".concat(t.start,"px)")},children:(0,d.jsx)(xr,{local:!0,size:"s"})},"loader");var e,n=u[t.index],r="function"==typeof c?c(n,t.index):c,i=!1;n&&"object"===(0,I.Z)(n)&&(e=n,"disabled","object"===(0,I.Z)(e)&&e&&Reflect.has(e,"disabled"))&&(i=Boolean(n.disabled));var a=A===t.index||m===t.index,s=g===t.key;return o.createElement(null!=h?h:"div",{key:t.key,ref:t.measureRef,className:xl("item",{active:a,selected:s,clickable:"function"==typeof y&&!i},"function"==typeof v?v(n,t.index):v),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(r,"px"),transform:"translateY(".concat(t.start,"px)")},onMouseMove:i?void 0:function(){C(t.index)},onClick:i?void 0:function(e){null==y||y(n,t.index,e)}},"function"==typeof f?f(n,t.index,{active:a,selected:s}):function(t){return String(t)}(n))}))})})]})}var El=n(88965),Sl={sortOrder:{},sortColumns:[]};function kl(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return i?t:Sl;var a=t.sortOrder,s=t.sortColumns,u=s,l=a[e],c=n;if(l&&(c=l===n||o?"ascending"===l?"descending":"ascending":void 0),!i)return c?{sortOrder:(0,r.Z)({},e,c),sortColumns:[e]}:Sl;a[e];var f=(0,fe.Z)(a,[e].map(El.Z));return c?(f[e]=c,new Set(s).has(e)||(u=[].concat((0,S.Z)(s),[e]))):u=s.filter((function(t){return t!==e})),{sortOrder:f,sortColumns:u}}var Ol=(0,s.Z)("table"),Tl=(0,d.jsx)("svg",{className:Ol("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,d.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),jl=(0,d.jsx)("svg",{className:Ol("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,d.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function Rl(t){switch(t){case"ascending":return Tl;case"descending":return jl;default:return null}}function Al(t){var e=t.sortOrder,n=t.sortIndex,r=t.sortable,i=t.defaultOrder;return r?(0,d.jsx)("span",{className:Ol("sort-icon",{shadow:!e}),"data-index":n,children:Rl(e||i)}):null}var Cl=50;function Nl(t){var e=t.columns,n=t.sortOrder,r=t.sortColumns,i=t.sortable,a=t.defaultOrder,s=t.onSort;function u(t){return i&&t.sortable?function(e){null==s||s(t,e.ctrlKey||e.metaKey)}:void 0}return(0,d.jsx)(o.Fragment,{children:e.map((function(t,e){var o=t.className,s=t.name,l=t.header,c=t.title,f=t.align,v=t.customStyle,p=t.width,m=t.minWidth,g=void 0===m?Cl:m,y=t.maxWidth,b="number"==typeof p?"0 0 ".concat(p,"px"):"1 0 ".concat(g,"px");return(0,d.jsx)("div",{className:Ol("th",{sortable:i&&t.sortable,align:f},o),title:"string"==typeof c?c:void 0,"data-index":e,style:(0,h.Z)({flex:b,maxWidth:y},null==v?void 0:v({header:!0,name:s})),onClick:u(t),children:(0,d.jsxs)("div",{className:Ol("head-cell"),children:[null!=l?l:s,(0,d.jsx)(Al,{sortable:i&&t.sortable,defaultOrder:t.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function Ml(t){var e=t.columns,n=t.row,r=t.index,i=t.active,o=t.selected;return e.map((function(t,e){var a=t.name,s=t.className,u=t.align,l=t.sortable,c=t.title,f=t.accessor,v=t.width,p=t.minWidth,m=void 0===p?Cl:p,g=t.maxWidth,y=t.customStyle,b=t.render,x=t.onClick,w="function"==typeof f?f(n):n[t.name],_="number"==typeof v?"0 0 ".concat(v,"px"):"1 0 ".concat(m,"px");return(0,d.jsx)("div",{className:Ol("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,h.Z)({flex:_,maxWidth:g},null==y?void 0:y({row:n,index:r,name:a,header:!1})),onClick:function(){null==x||x(n,t)},children:(0,d.jsx)("div",{className:Ol("row-cell"),children:"function"==typeof b?b({value:w,row:n,index:r,active:i,selected:o}):w})},e)}))}var Il=o.memo((function(t){var e=t.row,n=t.index,r=t.columns,i=t.render,a=t.active,s=t.selected;return(0,d.jsx)(o.Fragment,{children:"function"==typeof i?i({row:e,index:n,columns:r,render:function(){return Ml({columns:r,row:e,index:n,active:a,selected:s})},active:a,selected:s}):Ml({columns:r,row:e,index:n,active:a,selected:s})})}));function Zl(t){var e=t.containerRef,n=t.className,r=t.view,a=void 0===r?"default":r,s=t.columns,u=t.data,l=t.rowWrapper,c=t.rowHeight,f=t.renderRow,v=t.rowClassName,p=t.rowKey,m=t.alwaysShowActiveRow,g=t.activeRowIndex,y=t.selectedRowKey,b=t.headerClassName,x=t.headerHeight,w=t.onSort,_=t.initialSortOrder,E=t.onRowClick,S=t.settings,k=void 0===S?{}:S,O=k.sortable,T=void 0===O||O,j=k.defaultOrder,R=void 0===j?"ascending":j,A=k.disableSortReset,C=void 0!==A&&A,N=t.canFetchMore,M=t.isFetchingMore,I=t.fetchMore,Z=t.onWrapperScroll,P=t.scrollRef,L=o.useState((function(){return function(t){return t?(Array.isArray(t)?t:[t]).reduce((function(t,e){return kl(t,e.name,e.order,!0)}),Sl):Sl}(_)})),D=(0,i.Z)(L,2),z=D[0],$=D[1],B=o.useRef(null),U=o.useCallback((function(t,e){var n,r,i=kl(z,t.name,t.defaultOrder||R,e,C);$(i),w&&w((r=(n=i).sortOrder,n.sortColumns.map((function(t){return{name:t,order:r[t]}}))))}),[R,C,w,z]),F=o.useCallback((function(){return(0,d.jsx)(Nl,(0,h.Z)((0,h.Z)({},z),{},{sortable:T,defaultOrder:R,columns:s,onSort:U}))}),[s,R,U,z,T]),H=o.useCallback((function(t,e,n){var r=n.active,i=n.selected;return(0,d.jsx)(Il,{row:t,index:e,columns:s,active:r,selected:i,render:f})}),[s,f]);o.useEffect((function(){var t,e=s.reduce((function(t,e){var n=e.width,r=e.minWidth;return t+(null!=n?n:void 0===r?Cl:r)}),0)+30;null===(t=B.current)||void 0===t||t.style.setProperty("--table-min-width","".concat(e,"px"))}),[s]);var q=o.useCallback((function(t,e){return Ol("row","function"==typeof v?v(t,e):v)}),[v]);return(0,d.jsx)(_l,{containerRef:On(B,e),className:Ol({view:a},n),wrapperClassName:Ol("table"),headerClassName:Ol("head",b),headerHeight:x,renderHeader:F,itemWrapper:l,items:u,onItemClick:E,itemClassName:q,itemHeight:c,loaderHeight:c,renderItem:H,itemKey:p,alwaysShowActiveItem:m,activeItemIndex:g,selectedItemKey:y,canFetchMore:N,isFetchingMore:M,fetchMore:I,onWrapperScroll:Z,scrollRef:P})}var Pl=(0,s.Z)("node-name");function Ll(t){var e=t.node,n=t.className,r=(0,d.jsx)("span",{title:e.title,children:e.label});return e.url&&(r=(0,d.jsxs)(k.r,{href:e.url,title:e.title,target:"_blank",children:[e.label,"in"===e.type||"out"===e.type&&(0,d.jsx)(x.x,{color:"secondary",children:" (".concat(e.type,")")})]})),(0,d.jsxs)("span",{className:Pl("name",n),children:[r,yn(e)&&(0,d.jsx)(R.J,{className:Pl("operation-node-info"),tooltipContentClassName:Pl("operation-node-info-popup"),content:(0,d.jsx)(Io,(0,h.Z)({},e)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,d.jsx)(c.J,{className:Pl("icon"),data:Zo,size:12})})]})}var Dl=(0,s.Z)("timeline"),zl=(0,d.jsx)(c.J,{data:function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,d.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.06Z",clipRule:"evenodd"})}))},size:14}),$l=(0,d.jsx)(c.J,{data:function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,d.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))},size:14}),Bl=(0,d.jsx)(c.J,{data:function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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-.75h-5.5Zm.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.75h5.5Z",clipRule:"evenodd"})}))},size:14});function Ul(t){var e=t.onRulerUpdate,n=t.from,r=t.to,i=t.disabled,o=void 0!==i&&i;return(0,d.jsx)(l.z,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){e({from:n,to:r})},disabled:o,children:Bl})}function Fl(t){var e=t.isCommonButton,n=t.disabled,r=t.onClick,i=t.isExpanded,o=e?"Expand all":"Expand",a=e?"Collapse all":"Collapse",s=n?"No items to expand":"";return(0,d.jsx)("span",{title:s,children:(0,d.jsx)(l.z,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?zl:$l})})}function Hl(t){var e=t.nameHeader,n=t.controlsHeader,r=t.onRulerUpdate,i=t.onExpandAxis;return[{name:"status",header:"Status",width:110,sortable:!1,render:function(t){var e=t.row,n=e.node;return e.isEvent?null:(0,d.jsx)("span",{className:Dl("row-status"),children:(0,d.jsx)(x.x,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,d.jsx)(ql,{progress:n.progress})})})}},{name:"name",header:null!=e?e:"Name",sortable:!1,width:220,align:"right",render:function(t){var e=t.row,n=e.isEvent,r=e.name,i=e.id,o=e.isExpanded,a=e.node;return n?(0,d.jsx)("div",{className:Dl("event-name"),title:r,children:r}):(0,d.jsx)("div",{className:Dl("aside-item",{expanded:o}),children:(0,d.jsx)(Ll,{node:a,className:Dl("node-name")})},i)}},{name:"controls",header:null!=n?n:"",sortable:!1,width:60,render:function(t){var e=t.row,n=e.node,o=e.isExpanded,a=e.from,s=e.to,u=e.id,l=e.isExpandable;return"in"===n.type||"out"===n.type?null:(0,d.jsxs)("div",{children:[(0,d.jsx)(Ul,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,d.jsx)(Fl,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function ql(t){var e,n=t.progress,r=null!==(e=null==n?void 0:n.state)&&void 0!==e?e:"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:Dl("node-status"),children:[(0,d.jsx)(Vl,{state:r,progress:n}),(0,d.jsx)("span",{children:"InProgress"===r?"".concat(rn[r].title,": ").concat(u,"%"):rn[r].title})]})}function Vl(t){var e=t.state,n=t.progress,r=wi();return"InProgress"===e?(0,d.jsx)("img",{className:Dl("node-status-icon"),src:kn(n,r)}):(0,d.jsx)("div",{className:Dl("node-status-icon",{state:e.toLowerCase()})})}function Yl(t){var e,n,r,i,o,a;return(0,d.jsx)("div",{className:Dl("aside-header"),children:(0,d.jsx)(Zl,{columns:Hl({controlsHeader:(n=t.onRulerUpdate,r=t.onExpandAll,i=t.isSomeAxesCollapsed,o=t.tableItems,a=o.some((function(t){return t.isExpandable})),(0,d.jsxs)("div",{children:[(0,d.jsx)(Ul,{onRulerUpdate:n}),(0,d.jsx)(Fl,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(e=t.blocksQuantity,(0,d.jsx)("span",{children:["Name (".concat(e," block)"),"Name (".concat(e," blocks)"),"Name (".concat(e," blocks)"),"Name (no blocks)"][e]})),onRulerUpdate:t.onRulerUpdate,onExpandAxis:t.onExpandAxis}),data:t.tableItems,rowClassName:Dl("table-row"),rowHeight:25,headerHeight:27,className:Dl("table"),onWrapperScroll:t.onSidebarScroll,scrollRef:t.sidebarRef})})}var Wl=n(58399),Xl=n.n(Wl),Gl=n(73),Kl=n.n(Gl),Jl=n(65853),Ql=n.n(Jl),tc=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),t>n?n:t>e?t:e},ec=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},nc=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},rc=96.422,ic=82.521,oc=216/24389,ac=24389/27,sc=function(t){var e=function(t){var e=ec(t.r),n=ec(t.g),r=ec(t.b);return function(t){return{x:tc(t.x,0,rc),y:tc(t.y,0,100),z:tc(t.z,0,ic),a:tc(t.a)}}(function(t){return{x:1.0478112*t.x+.0228866*t.y+-.050127*t.z,y:.0295424*t.x+.9904844*t.y+-.0170491*t.z,z:-.0092345*t.x+.0150436*t.y+.7521316*t.z,a:t.a}}({x:100*(.4124564*e+.3575761*n+.1804375*r),y:100*(.2126729*e+.7151522*n+.072175*r),z:100*(.0193339*e+.119192*n+.9503041*r),a:t.a}))}(t),n=e.x/rc,r=e.y/100,i=e.z/ic;return n=n>oc?Math.cbrt(n):(ac*n+16)/116,{l:116*(r=r>oc?Math.cbrt(r):(ac*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>oc?Math.cbrt(i):(ac*i+16)/116)),alpha:e.a}},uc=6e4,lc={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function cc(t){var e=t.from,n=t.to;return Math.max(n-e,uc)}mi([function(t){function e(t,e,n){void 0===n&&(n=5);for(var r=[],i=1/(n-1),o=0;o<=n-1;o++)r.push(t.mix(e,i*o));return r}t.prototype.mix=function(e,n){void 0===n&&(n=.5);var r=e instanceof t?e:new t(e),i=function(t,e,n){var r,i=sc(t),o=sc(e);return function(t){var e=(t.l+16)/116,n=t.a/500+e,r=e-t.b/200;return function(t){var e,n,r=.9555766*(e=t).x+-.0230393*e.y+.0631636*e.z,i=-.0282895*e.x+1.0099416*e.y+.0210077*e.z,o=.0122982*e.x+-.020483*e.y+1.3299098*e.z;return n={r:nc(.032404542*r-.015371385*i-.004985314*o),g:nc(-.00969266*r+.018760108*i+41556e-8*o),b:nc(556434e-9*r-.002040259*i+.010572252*o),a:t.a},{r:tc(n.r,0,255),g:tc(n.g,0,255),b:tc(n.b,0,255),a:tc(n.a)}}({x:(Math.pow(n,3)>oc?Math.pow(n,3):(116*n-16)/ac)*rc,y:100*(t.l>8?Math.pow((t.l+16)/116,3):t.l/ac),z:(Math.pow(r,3)>oc?Math.pow(r,3):(116*r-16)/ac)*ic,a:t.alpha})}({l:tc((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:tc(r.alpha)})}(this.toRgb(),r.toRgb(),n);return new t(i)},t.prototype.tints=function(t){return e(this,"#fff",t)},t.prototype.shades=function(t){return e(this,"#000",t)},t.prototype.tones=function(t){return e(this,"#808080",t)}}]);var fc=(0,s.Z)("timeline");const hc=function(t){var e=t.graph,n=t.prepareNode,r=lr(),a=(0,Ur.C)(),s=wi(),u=o.useState((function(){return new dr.DataSet})),l=(0,i.Z)(u,1)[0],c=o.useState({}),f=(0,i.Z)(c,2),v=f[0],p=f[1],m=o.useState(new Set),g=(0,i.Z)(m,2),y=g[0],b=g[1],x=o.useState(""),w=(0,i.Z)(x,2),_=w[0],E=w[1],k=o.useState(),O=(0,i.Z)(k,2),T=O[0],j=O[1],R=bn(l),A=o.useRef(r);A.current=r;var C=o.useRef(n);C.current=n,o.useEffect((function(){l.clear(),l.add(e.nodes),A.current&&hn(l,A.current,C.current,void 0,!1),p({})}),[l,e]),o.useEffect((function(){r&&(hn(l,r,C.current,void 0,!1),p({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&(vn(l,n),p({}))}),[l,n]);var N=o.useMemo((function(){var t,e=Sa()(A.current,(function(t,e){var n=e.startedAt?new Date(e.startedAt).getTime():1/0;return Math.min(n,t)}),1/0),n=l?function(t){var e=t.nodes,n=t.colors,r=t.theme,o=t.queryStartedAtMillis,a=1/0,s=[];e.forEach((function(t){var e,o,u=t.progress,l={id:t.id,label:null!==(e=t.label)&&void 0!==e?e:"",events:[],level:Number(t.level),node:t,isExpandable:!1};if(u){var c="0";"InProgress"===u.state?c=(new Date).toString():u.finishedAt?c=u.finishedAt:u.stages&&u.stages.length>0&&(c=Object.values(u.stages[u.stages.length-1])[0]);var f=null!==(o=u.startedAt)&&void 0!==o?o:"0",d=new Date(f).getTime(),v=new Date(c).getTime(),p=u.state,m=null!=p?p:"NotStarted";a=Math.min(d,a);var g=(0,h.Z)((0,h.Z)({},l),{},{from:d,to:v,status:m}),y=function(t){var e=t.stages,n=t.axisId,r=t.dataProgressFinishedAt,o=t.dataProgressStartedAt,a=new Date(o).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},f=0;return u.push((0,h.Z)((0,h.Z)({},c),{},{trackIndex:f++,from:a,to:s,id:l++})),e&&Object.values(e).forEach((function(t,n){var s,d,v=null!==(s=e[n+1])&&void 0!==s?s:{},p=(0,i.Z)(Object.entries(t)[0],2),m=p[0],g=p[1],y=null!==(d=Object.values(v)[0])&&void 0!==d?d:r;0===n&&o!==g&&u.push((0,h.Z)((0,h.Z)({},c),{},{trackIndex:f++,from:a,to:new Date(g).getTime(),name:"init",id:l++})),u.push((0,h.Z)((0,h.Z)({},c),{},{trackIndex:f++,from:new Date(g).getTime(),to:new Date(y).getTime(),name:m,id:l++}))})),u}({stages:null==u?void 0:u.stages,dataProgressFinishedAt:c,dataProgressStartedAt:f,axisId:t.id});g.isExpandable=y.length>1;var b=n.operation[lc[m]],x=n.operation["".concat(lc[m],"Border")],w=n.operation["".concat(lc[m],"Background")],_=function(t){var e=t.events,n=t.theme,r=t.eventMajorColor,i=t.operationDuration,o={},a=e.length,s=(0,S.Z)(e);s.sort((function(t,e){var n=t.to-t.from;return e.to-e.from-n}));var u=vi(r),l=("light"===n?u.tints(a+2):u.tones(a+2)).map((function(t){return t.toHex()}));return e.forEach((function(t){var e=t.to-t.from,n=s.findIndex((function(e){return e.id===t.id}));o[t.trackIndex]={percentage:i>0?e/i:1,color:l[n]}})),o}({theme:r,events:y,eventMajorColor:b,operationDuration:v-d});g.events=y.map((function(t){return(0,h.Z)((0,h.Z)({},t),{},{colors:_,borderColor:x,backgroundColor:w})})),s.push(g)}else s.push((0,h.Z)((0,h.Z)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=Ql()(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[lc.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:e}):[],r=null!==(t=n.map((function(t){var e;return null!==(e=t.events)&&void 0!==e?e:[]})).flat())&&void 0!==t?t:[];return{axes:n,events:r}}),[l,s,a,v]),M=N.axes,I=N.events,Z=function(t){var e=o.useState({}),n=(0,i.Z)(e,2),r=n[0],a=r.start,s=r.end,u=n[1],l=o.useRef(!1),c=o.useRef(!1),f=o.useMemo((function(){var e,n=Kl()(t,"from"),r=null!==(e=Xl()(t,"to"))&&void 0!==e?e: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()}}),[t]),h=function(t){var e=t.queryStart,n=t.queryEnd,r=t.from,i=t.to;if(!e)return{};var o=cc({from:e,to:n});if(!r||!i)return{start:e,end:e+o};var a=Math.min(cc({from:r,to:i}),o);return e&&r<e||r>n?{start:e,end:e+a}:n<i||e&&e>i?{start:n-a,end:n}:{start:r,end:r+a}}({from:a,to:s,queryStart:f.queryStart,queryEnd:f.queryEnd}),d=h.start,v=h.end;return!c.current||a||s||(l.current=!l.current),c.current=Boolean(a||s),[{timelineStart:d,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(M),P=(0,i.Z)(Z,2),L=P[0],D=L.timelineStart,z=L.timelineEnd,$=L.timelineRulerKey,B=P[1],U=o.useMemo((function(){var t,e=_.toLowerCase().trim(),n=[],r=!1,i=(0,ve.Z)(M);try{for(i.s();!(t=i.n()).done;){var o=t.value;if((!e||o.label.toLowerCase().includes(e))&&(!T||o.status===T)){var a=!!o.isExpandable&&y.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,h.Z)((0,h.Z)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(t){i.e(t)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[M,_,T,y]),F=U.filteredAxes,H=U.isSomeAxesCollapsed,q=o.useMemo((function(){var t=0;return F.map((function(e){var n=fs.TRACK_HEIGHT*e.tracksCount,r={id:e.id,top:t,height:n,tracksCount:e.tracksCount};return t+=n,r}))}),[F]),V=o.useRef(null),Y=o.useState(0),W=(0,i.Z)(Y,2),X=W[0],G=W[1],K=function(t){var e=t.from,n=t.to;B({start:e,end:n})},J=o.useMemo((function(){var t=[];return F.forEach((function(e){var n;t.push(e),e.isExpanded&&(null===(n=e.events)||void 0===n||n.forEach((function(n,r){0!==r&&t.push((0,h.Z)((0,h.Z)({},n),{},{node:e.node,isEvent:!0}))})))})),t}),[F]);return(0,d.jsxs)("div",{className:fc(),children:[(0,d.jsxs)("div",{className:fc("filters"),children:[(0,d.jsx)(ka.o,{className:fc("filters-search"),hasClear:!0,value:_,onUpdate:E,placeholder:"Filter by name"}),(0,d.jsx)(ot.P,{className:fc("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:T?[T]:[],options:R.map((function(t){var e=t.state,n=t.title,r=t.count;return{value:e,content:"".concat(n).concat(r>0?" (".concat(r,")"):"")}})),width:230,hasClear:!0,onUpdate:function(t){j(t[0])}})]}),(0,d.jsxs)("div",{className:fc("content-wrapper"),children:[(0,d.jsx)(Yl,{tableItems:J,isSomeAxesCollapsed:H,blocksQuantity:F.length,onExpandAll:function(){if(H){var t=new Set(M.filter((function(t){return t.isExpandable})).map((function(t){return t.id})));b(t)}else b(new Set)},onSidebarScroll:function(){V.current&&G(V.current.scrollTop)},onRulerUpdate:K,sidebarRef:V,onExpandAxis:function(t){var e=new Set(y);e.has(t)?e.delete(t):e.add(t),b(e)}}),D&&z&&(0,d.jsxs)("div",{className:fc("container"),children:[(0,d.jsx)("div",{className:fc("ruler-wrapper"),children:(0,d.jsx)(Fa,{from:D,to:z,onUpdate:K,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:uc},$)}),Boolean(q.length)&&(0,d.jsx)(il,{className:fc("timeline"),canvasScrollTop:X,scrollTopChanged:function(t){V.current&&(V.current.scrollTop=t.detail.scrollTop)},start:D,end:z,boundsChanged:function(t){K({from:t.detail.start,to:t.detail.end})},axes:q,events:I,theme:a})]})]})]})};var dc=(0,s.Z)("plan");const vc=o.memo((function(t){var e=t.isActive,n=t.className,r=t.prepareNode,a=function(){var t=o.useContext(nr);if(void 0===t)throw new Error("useResultPlan must be used within a PlanProvider");return t}(),s=o.useState(!1),u=(0,i.Z)(s,2),l=u[0],c=u[1],f=cr(),h=o.useMemo((function(){return a?function(t){var e,n=t.Basic,r=t.Detailed,i=[],o=[],a=(0,ve.Z)(n.nodes);try{var s=function(){var t,n=e.value,o="op"===n.type?n.name.replace(/!/g,""):n.name,a=null==r||null===(t=r.Operations)||void 0===t?void 0:t.find((function(t){return t.Id===n.id})),s={inputs:[],outputs:[]};null!=r&&r.Providers&&(null!=a&&a.Inputs&&Array.isArray(null==a?void 0:a.Inputs)&&(s.inputs=fn(r.Providers,a.Inputs)),null!=a&&a.Outputs&&Array.isArray(null==a?void 0:a.Outputs)&&(s.outputs=fn(r.Providers,a.Outputs))),i.push({id:n.id,level:Number(n.level),title:o,type:n.type,label:an(o),shape:"image",details:a,schemas:s.inputs.length>0||s.outputs.length>0?s:void 0})};for(a.s();!(e=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}return n.links.forEach((function(t){o.push({from:t.source,to:t.target})})),{nodes:i,edges:o}}(a):void 0}),[a]);if(!h)return null;var v=h.nodes.length>250;return(0,d.jsx)("div",{className:dc(null,n),children:(0,d.jsxs)(bi,{children:[(0,d.jsx)(vt,{hide:"graph"!==f,className:dc("graph"),children:v&&!l?(0,d.jsx)(pc,{showGraph:c,graph:h}):(0,d.jsx)(_a,{isActive:e&&"graph"===f,graph:h,showMinimap:!0,prepareNode:r})}),(0,d.jsx)(vt,{hide:"timeline"!==f,className:dc("table"),children:(0,d.jsx)(hc,{graph:h,prepareNode:r})})]})})}));function pc(t){var e=t.showGraph,n=t.graph,r=lr(),a=o.useState((function(){return new dr.DataSet})),s=(0,i.Z)(a,1)[0],u=hr(),c=o.useRef(r);c.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),c.current&&hn(s,c.current),u()}),[s,n,u]),o.useEffect((function(){r&&(hn(s,r),u())}),[s,r,u]);var f=n.nodes.length>700||n.edges.length>3e3;return(0,d.jsxs)("div",{className:dc("graph-info"),children:[f?(0,d.jsxs)(x.x,{children:["The plan of this operation is way too large to be visualized in browser.",(0,d.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,d.jsxs)(x.x,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,d.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,d.jsx)("br",{}),(0,d.jsx)(l.z,{className:dc("graph-info-button"),onClick:function(){e(!0)},children:f?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,d.jsx)(Do,{nodes:s,orientation:"vertical",className:dc("legend")})]})}function mc(){var t=cr(),e=function(){var t=o.useContext(ir);if(void 0===t)throw new Error("usePlanView must be used within a PlanProvider");return t}(),n=function(){var t=o.useContext(or);if(void 0===t)throw new Error("useSetPlanView must be used within a PlanProvider");return t}();return(0,d.jsx)(Ct.E,{options:e,value:t,onUpdate:function(t){n(t)}})}var gc=(0,s.Z)("query-results");function yc(t){var e=t.query,n=t.activeResultParams,r=(0,p.I0)();return(0,o.useEffect)((function(){n&&r((0,st.Oj)(n.queryId,n.resultIndex))}),[n,r]),(0,d.jsx)(gt,{query:e,index:(null==n?void 0:n.resultIndex)||0})}var bc=o.memo((function(t){var e,n,r=t.query,a=t.className,s=t.toolbar,u=t.minimized,l=void 0!==u&&u,c=function(t){var e=(0,o.useState)(ue.META),n=(0,i.Z)(e,2),r=n[0],a=n[1],s=(0,o.useState)(void 0),u=(0,i.Z)(s,2),l=u[0],c=u[1],f=(0,p.I0)(),h=(0,p.v9)((function(e){return(0,w.uL)(e,(null==t?void 0:t.id)||"")})),v=(0,o.useMemo)((function(){return r===ue.RESULT?le((null==l?void 0:l.resultIndex)||0):r}),[r,l]),m=(0,o.useCallback)((function(t,e){if(function(t){return t.startsWith("result/")}(t)){a(ue.RESULT);var n=e||(null==l?void 0:l.queryId);c(n?{queryId:n,resultIndex:ce(t)||0}:void 0)}else a(t),c(void 0)}),[l]),g=(0,o.useMemo)((function(){var e,n;if(!t)return[];var r=[{id:ue.META,title:"Meta"}],i=!(null!==(e=t.progress)&&void 0!==e&&null!==(e=e.yql_plan)&&void 0!==e&&e.Basic.nodes.length||null!==(n=t.progress)&&void 0!==n&&null!==(n=n.yql_plan)&&void 0!==n&&null!==(n=n.Basic.links)&&void 0!==n&&n.length);if(t.progress&&!i&&r.unshift({id:ue.PROGRESS,title:"Progress"}),t.state===Xt.oZ.FAILED)r.unshift({id:ue.ERROR,title:"Error"});else if(t.state===Xt.oZ.COMPLETED){var o;null!==(o=t.progress)&&void 0!==o&&o.yql_statistics&&r.unshift({id:ue.STATISTIC,title:"Statistics"}),r.unshift.apply(r,(0,S.Z)(re()(t.result_count,(function(e){var n;return h&&h[e]&&oe()(h[e],"error")&&(n=(0,d.jsx)(bt.s,{status:Xt.oZ.FAILED,className:"query-status_tabs"})),{id:le(e),title:1===t.result_count?"Result":"Result #".concat(e+1),icon:n}}))))}return r}),[t,h]),y=se()(Xt.Lh,(function(e){return(null==t?void 0:t.state)===e}));return(0,o.useEffect)((function(){var e;t&&f((0,st.Fx)(t)),m(null==g||null===(e=g[0])||void 0===e?void 0:e.id,null==t?void 0:t.id)}),[f,null==t?void 0:t.id,y]),[g,m,{activeTabId:v,category:r,activeResultParams:l}]}(r),f=(0,i.Z)(c,3),h=f[0],v=f[1],m=f[2],g=m.activeTabId,y=m.category,x=m.activeResultParams,E=null==x?void 0:x.resultIndex;return r?(0,d.jsxs)("div",{className:gc(null,a),children:[(0,d.jsxs)("div",{className:gc("meta"),children:[(0,d.jsx)(Et,{className:gc("meta-info"),query:r}),(0,d.jsx)("div",{className:gc("toolbar"),children:s})]}),(0,d.jsx)(vt,{className:gc("result",{minimized:l}),hide:l,children:(0,d.jsxs)(ur,{plan:null===(e=r.progress)||void 0===e?void 0:e.yql_plan,progress:null===(n=r.progress)||void 0===n?void 0:n.yql_progress,defaultView:"graph",children:[(0,d.jsxs)("div",{className:gc("header"),children:[(0,d.jsx)(b.m,{className:gc("tabs"),items:h,activeTab:g,onSelectTab:function(t){return v(t,null==r?void 0:r.id)}}),y===ue.RESULT&&Number.isInteger(E)&&(0,d.jsx)("div",{className:gc("tab_actions"),children:(0,d.jsx)(ee,{query:r,resultIndex:null!=E?E:0})}),y===ue.PROGRESS&&(0,d.jsx)(mc,{})]}),(0,d.jsxs)("div",{className:gc("content"),children:[(0,d.jsx)(vt,{hide:y!==ue.RESULT&&!Number.isInteger(E),className:gc("result-wrap"),children:(0,d.jsx)(yc,{query:r,activeResultParams:x})}),y===ue.ERROR&&(0,d.jsx)(_.Z,{error:r.error}),y===ue.META&&(0,d.jsx)(At,{query:r}),(0,d.jsx)(vt,{hide:y!==ue.STATISTIC,children:(0,d.jsx)(er,{query:r})}),y===ue.PROGRESS&&(0,d.jsx)(xc,{isActive:!0})]})]})}),(0,d.jsx)("div",{})]}):null}));function xc(t){var e=t.isActive;return(0,d.jsx)(vc,{isActive:e,prepareNode:Sn()})}const wc=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,d.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 3Zm-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-3h-7Z",clipRule:"evenodd"})}))},_c=function(t){return(0,d.jsx)("svg",(0,h.Z)((0,h.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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.5ZM2.5 9V5A1.5 1.5 0 0 1 4 3.5h8A1.5 1.5 0 0 1 13.5 5v4h-11ZM1 11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H4a3 3 0 0 0-3 3v6Z",clipRule:"evenodd"})}))};var Ec=n(89442),Sc=n(13978),kc=n(40601),Oc=n.n(kc),Tc=n(80971),jc=n.n(Tc),Rc=(0,s.Z)("query-container"),Ac=o.memo((function(t){var e,n=t.onStartQuery,r=(0,o.useRef)(),i=(0,p.v9)(m.pm),s=(0,p.v9)(m.m7),f=(0,p.v9)(m.Sw),h=(0,p.v9)(m.Hr),y=(0,o.useRef)(void 0),b=null===(e=r.current)||void 0===e?void 0:e.getModel();(0,o.useEffect)((function(){var t,e;null===(t=r.current)||void 0===t||t.focus(),null===(e=r.current)||void 0===e||e.setScrollTop(0)}),[r.current,null==i?void 0:i.id]),(0,o.useEffect)((function(){if(b){var t,e,n=[],i=[];Oc()(h,(function(t){var e=t.attributes,r=t.message,o=new u.Range(e.start_position.row,e.start_position.column,e.end_position.row,e.end_position.column),a=o.startLineNumber,s=o.startColumn,l=o.endLineNumber,c=o.endColumn,f={message:r,severity:u.MarkerSeverity.Error,startLineNumber:a,startColumn:s,endLineNumber:l,endColumn:c};n.push(f);var h={range:o,options:{isWholeLine:!0,className:Rc("error-line")}};i.push(h)})),u.editor.setModelMarkers(b,"query-tracker",n),null===(t=y.current)||void 0===t||t.clear(),y.current=null===(e=r.current)||void 0===e?void 0:e.createDecorationsCollection(jc()(i,(function(t){return t.range.startLineNumber})))}}),[h,b]);var x=(0,o.useMemo)((function(){return{fontSize:14,language:f,renderWhitespace:"boundary",minimap:{enabled:!0}}}),[f]),w=(0,p.I0)(),_=(0,o.useCallback)((function(t){w((0,g.Cp)({query:t,error:void 0}))}),[w]),E=(0,o.useCallback)((function(){w((0,g.Vn)(n))}),[w,n]);return(0,d.jsxs)("div",{className:Rc("query"),children:[(0,d.jsx)(a.Z,{editorRef:r,value:s||"",language:"yql",className:Rc("editor"),onChange:_,monacoConfig:x}),(0,d.jsx)("div",{className:Rc("actions"),children:(0,d.jsx)("div",{className:"query-run-action",children:(0,d.jsxs)(l.z,{qa:"qt-run",className:"query-run-action-button",view:"action",onClick:E,children:[(0,d.jsx)(c.J,{data:v}),"Run"]})})})]})})),Cc=o.memo((function(t){var e=t.query,n=t.resultViewMode,r=t.setResultViewMode;return(0,d.jsx)(bc,{query:e,className:Rc("results"),minimized:"minimized"===n,toolbar:(0,d.jsxs)(d.Fragment,{children:["split"===n?(0,d.jsx)(l.z,{className:Rc("meta-action"),view:"flat",onClick:function(){return r("full")},children:(0,d.jsx)(c.J,{data:wc,size:16})}):(0,d.jsx)(l.z,{className:Rc("meta-action"),view:"flat",onClick:function(){return r("split")},children:(0,d.jsx)(c.J,{data:_c,size:16})}),"minimized"!==n&&(0,d.jsx)(l.z,{className:Rc("meta-action"),view:"flat",onClick:function(){return r("minimized")},children:(0,d.jsx)(c.J,{data:Po.Z,size:16})})]})})}));function Nc(t){var e=t.onStartQuery,n=function(){var t=(0,p.v9)(m.l5),e=(0,o.useContext)(Ec.M),n=(0,p.I0)(),r=(0,o.useMemo)((function(){return function(t){var e=(0,i.Z)(t,1)[0];n({type:g.VN,data:(0,Sc.Q)(e)})}}),[n]);return(0,o.useEffect)((function(){if(e&&t&&(0,wt.$)(t))return e.watch([t],r)}),[e,t,r]),t}(),a=(0,o.useState)("minimized"),s=(0,i.Z)(a,2),u=s[0],l=s[1],c=(0,o.useState)([50,50]),h=(0,i.Z)(c,2),v=h[0],b=h[1];(0,o.useEffect)((function(){l("split")}),[null==n?void 0:n.id]);var x=(0,p.v9)(m.ec),w=(0,p.v9)(m.K5);return(0,d.jsxs)(d.Fragment,{children:[w&&(0,d.jsx)("div",{className:Rc("loading"),children:(0,d.jsx)(f.a,{})}),(0,d.jsxs)(y.Z,{className:Rc((0,r.Z)({},u,!0)),direction:y.Z.VERTICAL,onResizeEnd:b,getInitialSizes:function(){return v},children:["full"!==u&&(0,d.jsx)(Ac,{onStartQuery:e}),(null==n?void 0:n.id)&&x&&(0,d.jsx)(Cc,{query:n,setResultViewMode:l,resultViewMode:u})]})]})}},48770:(t,e,n)=>{"use strict";n.d(e,{s:()=>x,J:()=>w});var r=n(20240),i=n(89526),o=n(29402);n(57064);const a=(0,o.Ge)("spin"),s=i.forwardRef((function(t,e){const{size:n="m",style:r,className:o,qa:s}=t;return i.createElement("div",{ref:e,style:r,className:a({size:n},o),"data-qa":s},i.createElement("div",{className:a("inner")}))}));var u,l=n(13044),c=n(10440),f=n(61661),h=n(98833),d=n(59380),v=n(78240),p=n(69792),m=n(71083),g=n(67557),y=(0,c.Z)("query-status"),b=(u={},(0,r.Z)(u,m.oZ.DRAFT,p.Z),(0,r.Z)(u,m.oZ.FAILED,d.Z),(0,r.Z)(u,m.oZ.ABORTED,v.Z),(0,r.Z)(u,m.oZ.COMPLETED,h.Z),u);function x(t){var e=t.status,n=t.className;return m.YO.includes(e)?(0,g.jsx)(s,{size:"s",className:y("icon-container",{loading:!0},n)}):b[e]?(0,g.jsx)(l.J,{className:y("icon-container",(0,r.Z)({},e.toLocaleLowerCase(),!0),n),data:b[e],size:16}):(0,g.jsx)(g.Fragment,{children:e})}var w=function(t){var e=t.mode,n=t.status,r=t.className;return(0,g.jsxs)("div",{className:y(null,r),children:[("icon"===e||"both"===e)&&(0,g.jsx)(x,{status:n}),("text"===e||"both"===e)&&f.Z.format.Readable(n)]})}},89442:(t,e,n)=>{"use strict";n.d(e,{v:()=>p,M:()=>v});var r=n(89526),i=n(53755),o=n(47061),a=n(59900),s=n(88047),u=n.n(s),l=n(32583),c=function(){function t(e){var n=this;(0,o.Z)(this,t),this.intervaTime=1e3,this.watchedQueries=new Map,this.intervalKey=void 0,this.loading=!1,this.requestQueryList=void 0,this.run=(0,i.Z)(u().mark((function t(){var e,r;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(e=Array.from(n.watchedQueries.keys()))&&e.length){t.next=4;break}return n.intervalKey=void 0,t.abrupt("return");case 4:return n.loading=!0,t.prev=5,t.next=8,n.requestQueryList(e);case 8:null==(r=t.sent)||r.forEach((function(t){var e=n.watchedQueries.get(t.id);null==e||e.forEach((function(e){return e([t])})),(0,l.$)(t)||n.unsubscribe(t.id)})),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),console.error(t.t0);case 15:return t.prev=15,n.loading=!1,n.intervalKey=void 0,n.start(),t.finish(15);case 20:case"end":return t.stop()}}),t,null,[[5,12,15,20]])}))),this.requestQueryList=e}return(0,a.Z)(t,[{key:"watch",value:function(t,e){var n=this,r=t.map((function(t){if(n.watchedQueries.has(t.id)){var r=n.watchedQueries.get(t.id);null==r||r.add(e)}else n.subscribe(t.id,e);return function(){return n.removeHandler(t.id,e)}}));return function(){r.forEach((function(t){return t()}))}}},{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(t,e){this.watchedQueries.set(t,new Set([e])),this.start()}},{key:"unsubscribe",value:function(t){this.watchedQueries.delete(t),0===this.watchedQueries.size&&this.stop()}},{key:"removeHandler",value:function(t,e){var n=this.watchedQueries.get(t);n&&n.delete(e)}}]),t}(),f=n(71083),h=n(98383),d=n(67557),v=(0,r.createContext)(new c((function(){return Promise.resolve([])}))),p=function(t){var e=t.children,n=(0,h.O)(),i=(0,r.useMemo)((function(){return new c((function(t){return n((0,f.Re)(t))}))}),[n]);return(0,d.jsx)(v.Provider,{value:i,children:e})}},33350:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(19677),i=n(67557);const o=function(t){return(0,i.jsx)("svg",(0,r.Z)((0,r.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.77 10.73a.717.717 0 0 0 .01-.01l3.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.5l1.044-1.044Z",clipRule:"evenodd"})}))}},6632:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(19677),i=n(67557);const o=function(t){return(0,i.jsx)("svg",(0,r.Z)((0,r.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{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.75Z",clipRule:"evenodd"})}))}},12043:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(19677),i=n(67557);const o=function(t){return(0,i.jsx)("svg",(0,r.Z)((0,r.Z)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},t),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}},88187:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(89526),i=n(29402),o=n(7462);n(60350);const a=(0,i.Ge)("card"),s=r.forwardRef((function(t,e){const{type:n="container",theme:i,view:s,size:u="m",children:l,className:c,onClick:f,disabled:h,selected:d,style:v,qa:p}=t,m="selection"===n,g="container"===n,y=("action"===n||m)&&Boolean(f)&&!(h||d),b=g?"normal":void 0,x=g||m?"outlined":void 0,w=y?f:void 0,{onKeyDown:_}=(0,o.b)(f);return r.createElement("div",{style:v,ref:e,role:y?"button":void 0,className:a({theme:i||b,view:s||x,type:n,selected:d,size:u,disabled:h,clickable:y},c),onClick:w,onKeyDown:y?_:void 0,tabIndex:y?0:void 0,"data-qa":p},l)}))},30067:function(t){t.exports=function(){"use strict";function t(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-u*c/s+f)),Math.min(o,Math.floor(r+(s-u)*c/s+f)),a)}var h=n[r],d=i,v=o;for(e(n,i,r),a(n[o],h)>0&&e(n,i,o);d<v;){for(e(n,d,v),d++,v--;a(n[d],h)<0;)d++;for(;a(n[v],h)>0;)v--}0===a(n[i],h)?e(n,i,v):e(n,++v,o),v<=r&&(i=v+1),r<=v&&(o=v-1)}}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}return function(e,r,i,o,a){t(e,r,i||0,o||e.length-1,a||n)}}()},67320:(t,e,n)=>{"use strict";t.exports=i,t.exports.default=i;var r=n(30067);function i(t,e){if(!(this instanceof i))return new i(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],u(i,t.leaf?r(o):o);return i}function u(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,e,n,i,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=i||(a=e+Math.ceil((n-e)/i/2)*i,r(t,a,e,n,o),s.push(e,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!v(t,e))return n;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i<o;i++)a=e.children[i],v(t,s=e.leaf?r(a):a)&&(e.leaf?n.push(a):d(t,s)?this._all(a,n):u.push(a));e=u.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!v(t,e))return!1;for(var r,i,o,a,s=[];e;){for(r=0,i=e.children.length;r<i;r++)if(o=e.children[r],v(t,a=e.leaf?n(o):o)){if(e.leaf||d(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=p([]),this},remove:function(t,e){if(!t)return this;for(var n,r,i,a,s=this.data,u=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),a=!0),s.leaf&&-1!==(i=o(t,s.children,e)))return s.children.splice(i,1),l.push(s),this._condense(l),this;a||s.leaf||!d(s,u)?r?(n++,s=r.children[n],a=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,r){var i,o=n-e+1,s=this._maxEntries;if(o<=s)return a(i=p(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),(i=p([])).leaf=!1,i.height=r;var u,l,c,f,h=Math.ceil(o/s),d=h*Math.ceil(Math.sqrt(s));for(m(t,e,n,d,this.compareMinX),u=e;u<=n;u+=d)for(m(t,u,c=Math.min(u+d-1,n),h,this.compareMinY),l=u;l<=c;l+=h)f=Math.min(l+h-1,c),i.children.push(this._build(t,l,f,r-1));return a(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){for(var i,o,a,s,u,l,c,h,d,v;r.push(e),!e.leaf&&r.length-1!==n;){for(c=h=1/0,i=0,o=e.children.length;i<o;i++)u=f(a=e.children[i]),d=t,v=a,(l=(Math.max(v.maxX,d.maxX)-Math.min(v.minX,d.minX))*(Math.max(v.maxY,d.maxY)-Math.min(v.minY,d.minY))-u)<h?(h=l,c=u<c?u:c,s=a):l===h&&u<c&&(c=u,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var r=this.toBBox,i=n?t:r(t),o=[],a=this._chooseSubtree(i,this.data,e,o);for(a.children.push(t),u(a,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=p(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,a,u,l,c,h,d,v,p,m,g,y;for(l=c=1/0,r=e;r<=n-e;r++)d=i=s(t,0,r,this.toBBox),v=o=s(t,r,n,this.toBBox),void 0,void 0,void 0,void 0,p=Math.max(d.minX,v.minX),m=Math.max(d.minY,v.minY),g=Math.min(d.maxX,v.maxX),y=Math.min(d.maxY,v.maxY),a=Math.max(0,g-p)*Math.max(0,y-m),u=f(i)+f(o),a<l?(l=a,h=r,c=u<c?u:c):a===l&&u<c&&(c=u,h=r);return h},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,o,a=this.toBBox,l=s(t,0,e,a),c=s(t,n-e,n,a),f=h(l)+h(c);for(i=e;i<n-e;i++)o=t.children[i],u(l,t.leaf?a(o):o),f+=h(l);for(i=n-e-1;i>=e;i--)o=t.children[i],u(c,t.leaf?a(o):o),f+=h(c);return f},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)u(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},12442:function(t,e,n){!function(t){function e(t,e){if(!(t instanceof e))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(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var o={exports:{}},a=function(t){return t&&t.Math==Math&&t},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(t){try{return!!t()}catch(t){return!0}},l=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=l,f=Function.prototype,h=f.apply,d=f.call,v="object"==typeof Reflect&&Reflect.apply||(c?d.bind(h):function(){return d.apply(h,arguments)}),p=l,m=Function.prototype,g=m.call,y=p&&m.bind.bind(g,g),b=p?y:function(t){return function(){return g.apply(t,arguments)}},x=b,w=x({}.toString),_=x("".slice),E=function(t){return _(w(t),8,-1)},S=E,k=b,O=function(t){if("Function"===S(t))return k(t)},T="object"==typeof document&&document.all,j={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},R=j.all,A=j.IS_HTMLDDA?function(t){return"function"==typeof t||t===R}:function(t){return"function"==typeof t},C={},N=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),M=l,I=Function.prototype.call,Z=M?I.bind(I):function(){return I.apply(I,arguments)},P={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,z=D&&!L.call({1:2},1);P.f=z?function(t){var e=D(this,t);return!!e&&e.enumerable}:L;var $,B,U=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},F=u,H=E,q=Object,V=b("".split),Y=F((function(){return!q("z").propertyIsEnumerable(0)}))?function(t){return"String"==H(t)?V(t,""):q(t)}:q,W=function(t){return null==t},X=W,G=TypeError,K=function(t){if(X(t))throw G("Can't call method on "+t);return t},J=Y,Q=K,tt=function(t){return J(Q(t))},et=A,nt=j.all,rt=j.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:et(t)||t===nt}:function(t){return"object"==typeof t?null!==t:et(t)},it={},ot=it,at=s,st=A,ut=function(t){return st(t)?t:void 0},lt=function(t,e){return arguments.length<2?ut(ot[t])||ut(at[t]):ot[t]&&ot[t][e]||at[t]&&at[t][e]},ct=b({}.isPrototypeOf),ft="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ht=s,dt=ft,vt=ht.process,pt=ht.Deno,mt=vt&&vt.versions||pt&&pt.version,gt=mt&&mt.v8;gt&&(B=($=gt.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!B&&dt&&(!($=dt.match(/Edge\/(\d+)/))||$[1]>=74)&&($=dt.match(/Chrome\/(\d+)/))&&(B=+$[1]);var yt=B,bt=yt,xt=u,wt=!!Object.getOwnPropertySymbols&&!xt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&bt&&bt<41})),_t=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Et=lt,St=A,kt=ct,Ot=Object,Tt=_t?function(t){return"symbol"==typeof t}:function(t){var e=Et("Symbol");return St(e)&&kt(e.prototype,Ot(t))},jt=String,Rt=function(t){try{return jt(t)}catch(t){return"Object"}},At=A,Ct=Rt,Nt=TypeError,Mt=function(t){if(At(t))return t;throw Nt(Ct(t)+" is not a function")},It=Mt,Zt=W,Pt=function(t,e){var n=t[e];return Zt(n)?void 0:It(n)},Lt=Z,Dt=A,zt=rt,$t=TypeError,Bt={exports:{}},Ut=s,Ft=Object.defineProperty,Ht="__core-js_shared__",qt=s[Ht]||function(t,e){try{Ft(Ut,t,{value:e,configurable:!0,writable:!0})}catch(n){Ut[t]=e}return e}(Ht,{}),Vt=qt;(Bt.exports=function(t,e){return Vt[t]||(Vt[t]=void 0!==e?e:{})})("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 Yt=Bt.exports,Wt=K,Xt=Object,Gt=function(t){return Xt(Wt(t))},Kt=Gt,Jt=b({}.hasOwnProperty),Qt=Object.hasOwn||function(t,e){return Jt(Kt(t),e)},te=b,ee=0,ne=Math.random(),re=te(1..toString),ie=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ee+ne,36)},oe=Yt,ae=Qt,se=ie,ue=wt,le=_t,ce=s.Symbol,fe=oe("wks"),he=le?ce.for||ce:ce&&ce.withoutSetter||se,de=function(t){return ae(fe,t)||(fe[t]=ue&&ae(ce,t)?ce[t]:he("Symbol."+t)),fe[t]},ve=Z,pe=rt,me=Tt,ge=Pt,ye=TypeError,be=de("toPrimitive"),xe=function(t,e){if(!pe(t)||me(t))return t;var n,r=ge(t,be);if(r){if(void 0===e&&(e="default"),n=ve(r,t,e),!pe(n)||me(n))return n;throw ye("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&Dt(n=t.toString)&&!zt(r=Lt(n,t)))return r;if(Dt(n=t.valueOf)&&!zt(r=Lt(n,t)))return r;if("string"!==e&&Dt(n=t.toString)&&!zt(r=Lt(n,t)))return r;throw $t("Can't convert object to primitive value")}(t,e)},we=Tt,_e=function(t){var e=xe(t,"string");return we(e)?e:e+""},Ee=rt,Se=s.document,ke=Ee(Se)&&Ee(Se.createElement),Oe=function(t){return ke?Se.createElement(t):{}},Te=Oe,je=!N&&!u((function(){return 7!=Object.defineProperty(Te("div"),"a",{get:function(){return 7}}).a})),Re=N,Ae=Z,Ce=P,Ne=U,Me=tt,Ie=_e,Ze=Qt,Pe=je,Le=Object.getOwnPropertyDescriptor;C.f=Re?Le:function(t,e){if(t=Me(t),e=Ie(e),Pe)try{return Le(t,e)}catch(t){}if(Ze(t,e))return Ne(!Ae(Ce.f,t,e),t[e])};var De=u,ze=A,$e=/#|\.prototype\./,Be=function(t,e){var n=Fe[Ue(t)];return n==qe||n!=He&&(ze(e)?De(e):!!e)},Ue=Be.normalize=function(t){return String(t).replace($e,".").toLowerCase()},Fe=Be.data={},He=Be.NATIVE="N",qe=Be.POLYFILL="P",Ve=Be,Ye=Mt,We=l,Xe=O(O.bind),Ge=function(t,e){return Ye(t),void 0===e?t:We?Xe(t,e):function(){return t.apply(e,arguments)}},Ke={},Je=N&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qe=rt,tn=String,en=TypeError,nn=function(t){if(Qe(t))return t;throw en(tn(t)+" is not an object")},rn=N,on=je,an=Je,sn=nn,un=_e,ln=TypeError,cn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,hn="enumerable",dn="configurable",vn="writable";Ke.f=rn?an?function(t,e,n){if(sn(t),e=un(e),sn(n),"function"==typeof t&&"prototype"===e&&"value"in n&&vn in n&&!n[vn]){var r=fn(t,e);r&&r[vn]&&(t[e]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:hn in n?n[hn]:r[hn],writable:!1})}return cn(t,e,n)}:cn:function(t,e,n){if(sn(t),e=un(e),sn(n),on)try{return cn(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ln("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var pn=Ke,mn=U,gn=N?function(t,e,n){return pn.f(t,e,mn(1,n))}:function(t,e,n){return t[e]=n,t},yn=s,bn=v,xn=O,wn=A,_n=C.f,En=Ve,Sn=it,kn=Ge,On=gn,Tn=Qt,jn=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return bn(t,this,arguments)};return e.prototype=t.prototype,e},Rn=function(t,e){var n,r,i,o,a,s,u,l,c,f=t.target,h=t.global,d=t.stat,v=t.proto,p=h?yn:d?yn[f]:(yn[f]||{}).prototype,m=h?Sn:Sn[f]||On(Sn,f,{})[f],g=m.prototype;for(o in e)r=!(n=En(h?o:f+(d?".":"#")+o,t.forced))&&p&&Tn(p,o),s=m[o],r&&(u=t.dontCallGetSet?(c=_n(p,o))&&c.value:p[o]),a=r&&u?u:e[o],r&&typeof s==typeof a||(l=t.bind&&r?kn(a,yn):t.wrap&&r?jn(a):v&&wn(a)?xn(a):a,(t.sham||a&&a.sham||s&&s.sham)&&On(l,"sham",!0),On(m,o,l),v&&(Tn(Sn,i=f+"Prototype")||On(Sn,i,{}),On(Sn[i],o,a),t.real&&g&&(n||!g[o])&&On(g,o,a)))},An=Rn,Cn=N,Nn=Ke.f;An({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!Cn},{defineProperty:Nn});var Mn=it.Object,In=o.exports=function(t,e,n){return Mn.defineProperty(t,e,n)};Mn.defineProperty.sham&&(In.sham=!0);var Zn=o.exports,Pn=Zn,Ln=i(Pn),Dn=E,zn=Array.isArray||function(t){return"Array"==Dn(t)},$n=Math.ceil,Bn=Math.floor,Un=Math.trunc||function(t){var e=+t;return(e>0?Bn:$n)(e)},Fn=function(t){var e=+t;return e!=e||0===e?0:Un(e)},Hn=Fn,qn=Math.min,Vn=function(t){return function(t){return t>0?qn(Hn(t),9007199254740991):0}(t.length)},Yn=TypeError,Wn=function(t){if(t>9007199254740991)throw Yn("Maximum allowed index exceeded");return t},Xn=_e,Gn=Ke,Kn=U,Jn=function(t,e,n){var r=Xn(e);r in t?Gn.f(t,r,Kn(0,n)):t[r]=n},Qn={};Qn[de("toStringTag")]="z";var tr="[object z]"===String(Qn),er=tr,nr=A,rr=E,ir=de("toStringTag"),or=Object,ar="Arguments"==rr(function(){return arguments}()),sr=er?rr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=or(t),ir))?n:ar?rr(e):"Object"==(r=rr(e))&&nr(e.callee)?"Arguments":r},ur=A,lr=qt,cr=b(Function.toString);ur(lr.inspectSource)||(lr.inspectSource=function(t){return cr(t)});var fr=lr.inspectSource,hr=b,dr=u,vr=A,pr=sr,mr=fr,gr=function(){},yr=[],br=lt("Reflect","construct"),xr=/^\s*(?:class|function)\b/,wr=hr(xr.exec),_r=!xr.exec(gr),Er=function(t){if(!vr(t))return!1;try{return br(gr,yr,t),!0}catch(t){return!1}},Sr=function(t){if(!vr(t))return!1;switch(pr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _r||!!wr(xr,mr(t))}catch(t){return!0}};Sr.sham=!0;var kr=!br||dr((function(){var t;return Er(Er.call)||!Er(Object)||!Er((function(){t=!0}))||t}))?Sr:Er,Or=zn,Tr=kr,jr=rt,Rr=de("species"),Ar=Array,Cr=function(t,e){return new(function(t){var e;return Or(t)&&(e=t.constructor,(Tr(e)&&(e===Ar||Or(e.prototype))||jr(e)&&null===(e=e[Rr]))&&(e=void 0)),void 0===e?Ar:e}(t))(0===e?0:e)},Nr=u,Mr=yt,Ir=de("species"),Zr=function(t){return Mr>=51||!Nr((function(){var e=[];return(e.constructor={})[Ir]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Pr=Rn,Lr=u,Dr=zn,zr=rt,$r=Gt,Br=Vn,Ur=Wn,Fr=Jn,Hr=Cr,qr=Zr,Vr=yt,Yr=de("isConcatSpreadable"),Wr=Vr>=51||!Lr((function(){var t=[];return t[Yr]=!1,t.concat()[0]!==t})),Xr=function(t){if(!zr(t))return!1;var e=t[Yr];return void 0!==e?!!e:Dr(t)};Pr({target:"Array",proto:!0,arity:1,forced:!Wr||!qr("concat")},{concat:function(t){var e,n,r,i,o,a=$r(this),s=Hr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Xr(o=-1===e?a:arguments[e]))for(i=Br(o),Ur(u+i),n=0;n<i;n++,u++)n in o&&Fr(s,u,o[n]);else Ur(u+1),Fr(s,u++,o);return s.length=u,s}});var Gr=sr,Kr=String,Jr=function(t){if("Symbol"===Gr(t))throw TypeError("Cannot convert a Symbol value to a string");return Kr(t)},Qr={},ti=Fn,ei=Math.max,ni=Math.min,ri=function(t,e){var n=ti(t);return n<0?ei(n+e,0):ni(n,e)},ii=tt,oi=ri,ai=Vn,si=function(t){return function(e,n,r){var i,o=ii(e),a=ai(o),s=oi(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},ui={includes:si(!0),indexOf:si(!1)},li={},ci=Qt,fi=tt,hi=ui.indexOf,di=li,vi=b([].push),pi=function(t,e){var n,r=fi(t),i=0,o=[];for(n in r)!ci(di,n)&&ci(r,n)&&vi(o,n);for(;e.length>i;)ci(r,n=e[i++])&&(~hi(o,n)||vi(o,n));return o},mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gi=pi,yi=mi,bi=Object.keys||function(t){return gi(t,yi)},xi=N,wi=Je,_i=Ke,Ei=nn,Si=tt,ki=bi;Qr.f=xi&&!wi?Object.defineProperties:function(t,e){Ei(t);for(var n,r=Si(e),i=ki(e),o=i.length,a=0;o>a;)_i.f(t,n=i[a++],r[n]);return t};var Oi,Ti=lt("document","documentElement"),ji=ie,Ri=Yt("keys"),Ai=function(t){return Ri[t]||(Ri[t]=ji(t))},Ci=nn,Ni=Qr,Mi=mi,Ii=li,Zi=Ti,Pi=Oe,Li="prototype",Di="script",zi=Ai("IE_PROTO"),$i=function(){},Bi=function(t){return"<"+Di+">"+t+"</"+Di+">"},Ui=function(t){t.write(Bi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Fi=function(){try{Oi=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Fi="undefined"!=typeof document?document.domain&&Oi?Ui(Oi):(e=Pi("iframe"),n="java"+Di+":",e.style.display="none",Zi.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Bi("document.F=Object")),t.close(),t.F):Ui(Oi);for(var r=Mi.length;r--;)delete Fi[Li][Mi[r]];return Fi()};Ii[zi]=!0;var Hi=Object.create||function(t,e){var n;return null!==t?($i[Li]=Ci(t),n=new $i,$i[Li]=null,n[zi]=t):n=Fi(),void 0===e?n:Ni.f(n,e)},qi={},Vi=pi,Yi=mi.concat("length","prototype");qi.f=Object.getOwnPropertyNames||function(t){return Vi(t,Yi)};var Wi={},Xi=ri,Gi=Vn,Ki=Jn,Ji=Array,Qi=Math.max,to=function(t,e,n){for(var r=Gi(t),i=Xi(e,r),o=Xi(void 0===n?r:n,r),a=Ji(Qi(o-i,0)),s=0;i<o;i++,s++)Ki(a,s,t[i]);return a.length=s,a},eo=E,no=tt,ro=qi.f,io=to,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Wi.f=function(t){return oo&&"Window"==eo(t)?function(t){try{return ro(t)}catch(t){return io(oo)}}(t):ro(no(t))};var ao={};ao.f=Object.getOwnPropertySymbols;var so=gn,uo=function(t,e,n,r){return r&&r.enumerable?t[e]=n:so(t,e,n),t},lo=Ke,co=function(t,e,n){return lo.f(t,e,n)},fo={},ho=de;fo.f=ho;var vo,po,mo,go=it,yo=Qt,bo=fo,xo=Ke.f,wo=function(t){var e=go.Symbol||(go.Symbol={});yo(e,t)||xo(e,t,{value:bo.f(t)})},_o=Z,Eo=lt,So=de,ko=uo,Oo=function(){var t=Eo("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=So("toPrimitive");e&&!e[r]&&ko(e,r,(function(t){return _o(n,this)}),{arity:1})},To=sr,jo=tr?{}.toString:function(){return"[object "+To(this)+"]"},Ro=tr,Ao=Ke.f,Co=gn,No=Qt,Mo=jo,Io=de("toStringTag"),Zo=function(t,e,n,r){if(t){var i=n?t:t.prototype;No(i,Io)||Ao(i,Io,{configurable:!0,value:e}),r&&!Ro&&Co(i,"toString",Mo)}},Po=A,Lo=s.WeakMap,Do=Po(Lo)&&/native code/.test(String(Lo)),zo=s,$o=rt,Bo=gn,Uo=Qt,Fo=qt,Ho=Ai,qo=li,Vo="Object already initialized",Yo=zo.TypeError,Wo=zo.WeakMap;if(Do||Fo.state){var Xo=Fo.state||(Fo.state=new Wo);Xo.get=Xo.get,Xo.has=Xo.has,Xo.set=Xo.set,vo=function(t,e){if(Xo.has(t))throw Yo(Vo);return e.facade=t,Xo.set(t,e),e},po=function(t){return Xo.get(t)||{}},mo=function(t){return Xo.has(t)}}else{var Go=Ho("state");qo[Go]=!0,vo=function(t,e){if(Uo(t,Go))throw Yo(Vo);return e.facade=t,Bo(t,Go,e),e},po=function(t){return Uo(t,Go)?t[Go]:{}},mo=function(t){return Uo(t,Go)}}var Ko={set:vo,get:po,has:mo,enforce:function(t){return mo(t)?po(t):vo(t,{})},getterFor:function(t){return function(e){var n;if(!$o(e)||(n=po(e)).type!==t)throw Yo("Incompatible receiver, "+t+" required");return n}}},Jo=Ge,Qo=Y,ta=Gt,ea=Vn,na=Cr,ra=b([].push),ia=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=7==t,s=5==t||o;return function(u,l,c,f){for(var h,d,v=ta(u),p=Qo(v),m=Jo(l,c),g=ea(p),y=0,b=f||na,x=e?b(u,g):n||a?b(u,0):void 0;g>y;y++)if((s||y in p)&&(d=m(h=p[y],y,v),t))if(e)x[y]=d;else if(d)switch(t){case 3:return!0;case 5:return h;case 6:return y;case 2:ra(x,h)}else switch(t){case 4:return!1;case 7:ra(x,h)}return o?-1:r||i?i:x}},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=Rn,sa=s,ua=Z,la=b,ca=N,fa=wt,ha=u,da=Qt,va=ct,pa=nn,ma=tt,ga=_e,ya=Jr,ba=U,xa=Hi,wa=bi,_a=qi,Ea=Wi,Sa=ao,ka=C,Oa=Ke,Ta=Qr,ja=P,Ra=uo,Aa=co,Ca=Yt,Na=li,Ma=ie,Ia=de,Za=fo,Pa=wo,La=Oo,Da=Zo,za=Ko,$a=oa.forEach,Ba=Ai("hidden"),Ua="Symbol",Fa="prototype",Ha=za.set,qa=za.getterFor(Ua),Va=Object[Fa],Ya=sa.Symbol,Wa=Ya&&Ya[Fa],Xa=sa.TypeError,Ga=sa.QObject,Ka=ka.f,Ja=Oa.f,Qa=Ea.f,ts=ja.f,es=la([].push),ns=Ca("symbols"),rs=Ca("op-symbols"),is=Ca("wks"),os=!Ga||!Ga[Fa]||!Ga[Fa].findChild,as=ca&&ha((function(){return 7!=xa(Ja({},"a",{get:function(){return Ja(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Ka(Va,e);r&&delete Va[e],Ja(t,e,n),r&&t!==Va&&Ja(Va,e,r)}:Ja,ss=function(t,e){var n=ns[t]=xa(Wa);return Ha(n,{type:Ua,tag:t,description:e}),ca||(n.description=e),n},us=function(t,e,n){t===Va&&us(rs,e,n),pa(t);var r=ga(e);return pa(n),da(ns,r)?(n.enumerable?(da(t,Ba)&&t[Ba][r]&&(t[Ba][r]=!1),n=xa(n,{enumerable:ba(0,!1)})):(da(t,Ba)||Ja(t,Ba,ba(1,{})),t[Ba][r]=!0),as(t,r,n)):Ja(t,r,n)},ls=function(t,e){pa(t);var n=ma(e),r=wa(n).concat(ds(n));return $a(r,(function(e){ca&&!ua(cs,n,e)||us(t,e,n[e])})),t},cs=function(t){var e=ga(t),n=ua(ts,this,e);return!(this===Va&&da(ns,e)&&!da(rs,e))&&(!(n||!da(this,e)||!da(ns,e)||da(this,Ba)&&this[Ba][e])||n)},fs=function(t,e){var n=ma(t),r=ga(e);if(n!==Va||!da(ns,r)||da(rs,r)){var i=Ka(n,r);return!i||!da(ns,r)||da(n,Ba)&&n[Ba][r]||(i.enumerable=!0),i}},hs=function(t){var e=Qa(ma(t)),n=[];return $a(e,(function(t){da(ns,t)||da(Na,t)||es(n,t)})),n},ds=function(t){var e=t===Va,n=Qa(e?rs:ma(t)),r=[];return $a(n,(function(t){!da(ns,t)||e&&!da(Va,t)||es(r,ns[t])})),r};fa||(Ya=function(){if(va(Wa,this))throw Xa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ya(arguments[0]):void 0,e=Ma(t),n=function(t){this===Va&&ua(n,rs,t),da(this,Ba)&&da(this[Ba],e)&&(this[Ba][e]=!1),as(this,e,ba(1,t))};return ca&&os&&as(Va,e,{configurable:!0,set:n}),ss(e,t)},Ra(Wa=Ya[Fa],"toString",(function(){return qa(this).tag})),Ra(Ya,"withoutSetter",(function(t){return ss(Ma(t),t)})),ja.f=cs,Oa.f=us,Ta.f=ls,ka.f=fs,_a.f=Ea.f=hs,Sa.f=ds,Za.f=function(t){return ss(Ia(t),t)},ca&&Aa(Wa,"description",{configurable:!0,get:function(){return qa(this).description}})),aa({global:!0,constructor:!0,wrap:!0,forced:!fa,sham:!fa},{Symbol:Ya}),$a(wa(is),(function(t){Pa(t)})),aa({target:Ua,stat:!0,forced:!fa},{useSetter:function(){os=!0},useSimple:function(){os=!1}}),aa({target:"Object",stat:!0,forced:!fa,sham:!ca},{create:function(t,e){return void 0===e?xa(t):ls(xa(t),e)},defineProperty:us,defineProperties:ls,getOwnPropertyDescriptor:fs}),aa({target:"Object",stat:!0,forced:!fa},{getOwnPropertyNames:hs}),La(),Da(Ya,Ua),Na[Ba]=!0;var vs=wt&&!!Symbol.for&&!!Symbol.keyFor,ps=Rn,ms=lt,gs=Qt,ys=Jr,bs=Yt,xs=vs,ws=bs("string-to-symbol-registry"),_s=bs("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!xs},{for:function(t){var e=ys(t);if(gs(ws,e))return ws[e];var n=ms("Symbol")(e);return ws[e]=n,_s[n]=e,n}});var Es=Rn,Ss=Qt,ks=Tt,Os=Rt,Ts=vs,js=Yt("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!Ts},{keyFor:function(t){if(!ks(t))throw TypeError(Os(t)+" is not a symbol");if(Ss(js,t))return js[t]}});var Rs=b([].slice),As=zn,Cs=A,Ns=E,Ms=Jr,Is=b([].push),Zs=Rn,Ps=lt,Ls=v,Ds=Z,zs=b,$s=u,Bs=A,Us=Tt,Fs=Rs,Hs=wt,qs=String,Vs=Ps("JSON","stringify"),Ys=zs(/./.exec),Ws=zs("".charAt),Xs=zs("".charCodeAt),Gs=zs("".replace),Ks=zs(1..toString),Js=/[\uD800-\uDFFF]/g,Qs=/^[\uD800-\uDBFF]$/,tu=/^[\uDC00-\uDFFF]$/,eu=!Hs||$s((function(){var t=Ps("Symbol")();return"[null]"!=Vs([t])||"{}"!=Vs({a:t})||"{}"!=Vs(Object(t))})),nu=$s((function(){return'"\\udf06\\ud834"'!==Vs("\udf06\ud834")||'"\\udead"'!==Vs("\udead")})),ru=function(t,e){var n=Fs(arguments),r=function(t){if(Cs(t))return t;if(As(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?Is(n,i):"number"!=typeof i&&"Number"!=Ns(i)&&"String"!=Ns(i)||Is(n,Ms(i))}var o=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(As(this))return e;for(var r=0;r<o;r++)if(n[r]===t)return e}}}(e);if(Bs(r)||void 0!==t&&!Us(t))return n[1]=function(t,e){if(Bs(r)&&(e=Ds(r,this,qs(t),e)),!Us(e))return e},Ls(Vs,null,n)},iu=function(t,e,n){var r=Ws(n,e-1),i=Ws(n,e+1);return Ys(Qs,t)&&!Ys(tu,i)||Ys(tu,t)&&!Ys(Qs,r)?"\\u"+Ks(Xs(t,0),16):t};Vs&&Zs({target:"JSON",stat:!0,arity:3,forced:eu||nu},{stringify:function(t,e,n){var r=Fs(arguments),i=Ls(eu?ru:Vs,null,r);return nu&&"string"==typeof i?Gs(i,Js,iu):i}});var ou=ao,au=Gt;Rn({target:"Object",stat:!0,forced:!wt||u((function(){ou.f(1)}))},{getOwnPropertySymbols:function(t){var e=ou.f;return e?e(au(t)):[]}}),wo("asyncIterator"),wo("hasInstance"),wo("isConcatSpreadable"),wo("iterator"),wo("match"),wo("matchAll"),wo("replace"),wo("search"),wo("species"),wo("split");var su=Oo;wo("toPrimitive"),su();var uu=lt,lu=Zo;wo("toStringTag"),lu(uu("Symbol"),"Symbol"),wo("unscopables"),Zo(s.JSON,"JSON",!0);var cu,fu,hu,du=it.Symbol,vu={},pu=N,mu=Qt,gu=Function.prototype,yu=pu&&Object.getOwnPropertyDescriptor,bu=mu(gu,"name"),xu={EXISTS:bu,PROPER:bu&&"something"===function(){}.name,CONFIGURABLE:bu&&(!pu||pu&&yu(gu,"name").configurable)},wu=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),_u=Qt,Eu=A,Su=Gt,ku=wu,Ou=Ai("IE_PROTO"),Tu=Object,ju=Tu.prototype,Ru=ku?Tu.getPrototypeOf:function(t){var e=Su(t);if(_u(e,Ou))return e[Ou];var n=e.constructor;return Eu(n)&&e instanceof n?n.prototype:e instanceof Tu?ju:null},Au=u,Cu=A,Nu=rt,Mu=Hi,Iu=Ru,Zu=uo,Pu=de("iterator"),Lu=!1;[].keys&&("next"in(hu=[].keys())?(fu=Iu(Iu(hu)))!==Object.prototype&&(cu=fu):Lu=!0);var Du=!Nu(cu)||Au((function(){var t={};return cu[Pu].call(t)!==t}));Cu((cu=Du?{}:Mu(cu))[Pu])||Zu(cu,Pu,(function(){return this}));var zu={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Lu},$u=zu.IteratorPrototype,Bu=Hi,Uu=U,Fu=Zo,Hu=vu,qu=function(){return this},Vu=b,Yu=Mt,Wu=A,Xu=String,Gu=TypeError,Ku=nn,Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return Vu(Yu(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Ku(n),function(t){if("object"==typeof t||Wu(t))return t;throw Gu("Can't set "+Xu(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Qu=Rn,tl=Z,el=Ru,nl=Zo,rl=uo,il=vu,ol=xu.PROPER,al=zu.BUGGY_SAFARI_ITERATORS,sl=de("iterator"),ul="keys",ll="values",cl="entries",fl=function(){return this},hl=function(t,e,n,r,i,o,a){!function(t,e,n,r){var i=e+" Iterator";t.prototype=Bu($u,{next:Uu(+!r,n)}),Fu(t,i,!1,!0),Hu[i]=qu}(n,e,r);var s,u,l,c=function(t){if(t===i&&p)return p;if(!al&&t in d)return d[t];switch(t){case ul:case ll:case cl:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,d=t.prototype,v=d[sl]||d["@@iterator"]||i&&d[i],p=!al&&v||c(i),m="Array"==e&&d.entries||v;if(m&&(s=el(m.call(new t)))!==Object.prototype&&s.next&&(nl(s,f,!0,!0),il[f]=fl),ol&&i==ll&&v&&v.name!==ll&&(h=!0,p=function(){return tl(v,this)}),i)if(u={values:c(ll),keys:o?p:c(ul),entries:c(cl)},a)for(l in u)(al||h||!(l in d))&&rl(d,l,u[l]);else Qu({target:e,proto:!0,forced:al||h},u);return a&&d[sl]!==p&&rl(d,sl,p,{name:i}),il[e]=p,u},dl=function(t,e){return{value:t,done:e}},vl=tt,pl=vu,ml=Ko;Ke.f;var gl=hl,yl=dl,bl="Array Iterator",xl=ml.set,wl=ml.getterFor(bl);gl(Array,"Array",(function(t,e){xl(this,{type:bl,target:vl(t),index:0,kind:e})}),(function(){var t=wl(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,yl(void 0,!0)):yl("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),pl.Arguments=pl.Array;var _l=s,El=sr,Sl=gn,kl=vu,Ol=de("toStringTag");for(var Tl 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 jl=_l[Tl],Rl=jl&&jl.prototype;Rl&&El(Rl)!==Ol&&Sl(Rl,Ol,Tl),kl[Tl]=kl.Array}var Al=du;wo("dispose");var Cl=Al;wo("asyncDispose");var Nl=Rn,Ml=b,Il=lt("Symbol"),Zl=Il.keyFor,Pl=Ml(Il.prototype.valueOf);Nl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Zl(Pl(t))}catch(t){return!1}}});for(var Ll=Rn,Dl=Yt,zl=lt,$l=b,Bl=Tt,Ul=de,Fl=zl("Symbol"),Hl=Fl.isWellKnown,ql=zl("Object","getOwnPropertyNames"),Vl=$l(Fl.prototype.valueOf),Yl=Dl("wks"),Wl=0,Xl=ql(Fl),Gl=Xl.length;Wl<Gl;Wl++)try{var Kl=Xl[Wl];Bl(Fl[Kl])&&Ul(Kl)}catch(t){}Ll({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(Hl&&Hl(t))return!0;try{for(var e=Vl(t),n=0,r=ql(Yl),i=r.length;n<i;n++)if(Yl[r[n]]==e)return!0}catch(t){}return!1}}),wo("matcher"),wo("metadataKey"),wo("observable"),wo("metadata"),wo("patternMatch"),wo("replaceAll");var Jl=Cl,Ql=i(Jl),tc=b,ec=Fn,nc=Jr,rc=K,ic=tc("".charAt),oc=tc("".charCodeAt),ac=tc("".slice),sc=function(t){return function(e,n){var r,i,o=nc(rc(e)),a=ec(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=oc(o,a))<55296||r>56319||a+1===s||(i=oc(o,a+1))<56320||i>57343?t?ic(o,a):r:t?ac(o,a,a+2):i-56320+(r-55296<<10)+65536}},uc=(sc(!1),sc(!0)),lc=Jr,cc=Ko,fc=hl,hc=dl,dc="String Iterator",vc=cc.set,pc=cc.getterFor(dc);fc(String,"String",(function(t){vc(this,{type:dc,string:lc(t),index:0})}),(function(){var t,e=pc(this),n=e.string,r=e.index;return r>=n.length?hc(void 0,!0):(t=uc(n,r),e.index+=t.length,hc(t,!1))}));var mc=fo.f("iterator"),gc=mc,yc=i(gc);function bc(t){return bc="function"==typeof Ql&&"symbol"==typeof yc?function(t){return typeof t}:function(t){return t&&"function"==typeof Ql&&t.constructor===Ql&&t!==Ql.prototype?"symbol":typeof t},bc(t)}var xc=i(fo.f("toPrimitive"));function wc(t){var e=function(t,e){if("object"!==bc(t)||null===t)return t;var n=t[xc];if(void 0!==n){var r=n.call(t,"string");if("object"!==bc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===bc(e)?e:String(e)}function _c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Ln(t,wc(r.key),r)}}function Ec(t,e,n){return e&&_c(t.prototype,e),n&&_c(t,n),Ln(t,"prototype",{writable:!1}),t}function Sc(t,e,n){return(e=wc(e))in t?Ln(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kc=b,Oc=Mt,Tc=rt,jc=Qt,Rc=Rs,Ac=l,Cc=Function,Nc=kc([].concat),Mc=kc([].join),Ic={},Zc=Ac?Cc.bind:function(t){var e=Oc(this),n=e.prototype,r=Rc(arguments,1),i=function(){var n=Nc(r,Rc(arguments));return this instanceof i?function(t,e,n){if(!jc(Ic,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";Ic[e]=Cc("C,a","return new C("+Mc(r,",")+")")}return Ic[e](t,n)}(e,n.length,n):e.apply(t,n)};return Tc(n)&&(i.prototype=n),i},Pc=Zc;Rn({target:"Function",proto:!0,forced:Function.bind!==Pc},{bind:Pc});var Lc=it,Dc=function(t){return Lc[t+"Prototype"]},zc=Dc("Function").bind,$c=ct,Bc=zc,Uc=Function.prototype,Fc=function(t){var e=t.bind;return t===Uc||$c(Uc,t)&&e===Uc.bind?Bc:e},Hc=i(Fc),qc=Mt,Vc=Gt,Yc=Y,Wc=Vn,Xc=TypeError,Gc=function(t){return function(e,n,r,i){qc(n);var o=Vc(e),a=Yc(o),s=Wc(o),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw Xc("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},Kc={left:Gc(!1),right:Gc(!0)},Jc=u,Qc=function(t,e){var n=[][t];return!!n&&Jc((function(){n.call(null,e||function(){return 1},1)}))},tf="undefined"!=typeof process&&"process"==E(process),ef=Kc.left;Rn({target:"Array",proto:!0,forced:!tf&&yt>79&&yt<83||!Qc("reduce")},{reduce:function(t){var e=arguments.length;return ef(this,t,e,e>1?arguments[1]:void 0)}});var nf=Dc("Array").reduce,rf=ct,of=nf,af=Array.prototype,sf=i((function(t){var e=t.reduce;return t===af||rf(af,t)&&e===af.reduce?of:e})),uf=oa.filter;Rn({target:"Array",proto:!0,forced:!Zr("filter")},{filter:function(t){return uf(this,t,arguments.length>1?arguments[1]:void 0)}});var lf=Dc("Array").filter,cf=ct,ff=lf,hf=Array.prototype,df=i((function(t){var e=t.filter;return t===hf||cf(hf,t)&&e===hf.filter?ff:e})),vf=oa.map;Rn({target:"Array",proto:!0,forced:!Zr("map")},{map:function(t){return vf(this,t,arguments.length>1?arguments[1]:void 0)}});var pf=Dc("Array").map,mf=ct,gf=pf,yf=Array.prototype,bf=i((function(t){var e=t.map;return t===yf||mf(yf,t)&&e===yf.map?gf:e})),xf=zn,wf=Vn,_f=Wn,Ef=Ge,Sf=function(t,e,n,r,i,o,a,s){for(var u,l,c=i,f=0,h=!!a&&Ef(a,s);f<r;)f in n&&(u=h?h(n[f],f,e):n[f],o>0&&xf(u)?(l=wf(u),c=Sf(t,e,u,l,c,o-1)-1):(_f(c+1),t[c]=u),c++),f++;return c},kf=Sf,Of=Mt,Tf=Gt,jf=Vn,Rf=Cr;Rn({target:"Array",proto:!0},{flatMap:function(t){var e,n=Tf(this),r=jf(n);return Of(t),(e=Rf(n,0)).length=kf(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var Af=Dc("Array").flatMap,Cf=ct,Nf=Af,Mf=Array.prototype,If=i((function(t){var e=t.flatMap;return t===Mf||Cf(Mf,t)&&e===Mf.flatMap?Nf:e})),Zf=function(){function t(n,r,i){var o,a,s;e(this,t),Sc(this,"_source",void 0),Sc(this,"_transformers",void 0),Sc(this,"_target",void 0),Sc(this,"_listeners",{add:Hc(o=this._add).call(o,this),remove:Hc(a=this._remove).call(a,this),update:Hc(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Ec(t,[{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(t){var e;return sf(e=this._transformers).call(e,(function(t,e){return e(t)}),t)}},{key:"_add",value:function(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}},{key:"_update",value:function(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}},{key:"_remove",value:function(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}]),t}(),Pf=function(){function t(n){e(this,t),Sc(this,"_source",void 0),Sc(this,"_transformers",[]),this._source=n}return Ec(t,[{key:"filter",value:function(t){return this._transformers.push((function(e){return df(e).call(e,t)})),this}},{key:"map",value:function(t){return this._transformers.push((function(e){return bf(e).call(e,t)})),this}},{key:"flatMap",value:function(t){return this._transformers.push((function(e){return If(e).call(e,t)})),this}},{key:"to",value:function(t){return new Zf(this._source,this._transformers,t)}}]),t}(),Lf=Z,Df=nn,zf=Pt,$f=function(t,e,n){var r,i;Df(t);try{if(!(r=zf(t,"return"))){if("throw"===e)throw n;return n}r=Lf(r,t)}catch(t){i=!0,r=t}if("throw"===e)throw n;if(i)throw r;return Df(r),n},Bf=nn,Uf=$f,Ff=vu,Hf=de("iterator"),qf=Array.prototype,Vf=function(t){return void 0!==t&&(Ff.Array===t||qf[Hf]===t)},Yf=sr,Wf=Pt,Xf=W,Gf=vu,Kf=de("iterator"),Jf=function(t){if(!Xf(t))return Wf(t,Kf)||Wf(t,"@@iterator")||Gf[Yf(t)]},Qf=Z,th=Mt,eh=nn,nh=Rt,rh=Jf,ih=TypeError,oh=function(t,e){var n=arguments.length<2?rh(t):e;if(th(n))return eh(Qf(n,t));throw ih(nh(t)+" is not iterable")},ah=Ge,sh=Z,uh=Gt,lh=function(t,e,n,r){try{return r?e(Bf(n)[0],n[1]):e(n)}catch(e){Uf(t,"throw",e)}},ch=Vf,fh=kr,hh=Vn,dh=Jn,vh=oh,ph=Jf,mh=Array,gh=de("iterator"),yh=!1;try{var bh=0,xh={next:function(){return{done:!!bh++}},return:function(){yh=!0}};xh[gh]=function(){return this},Array.from(xh,(function(){throw 2}))}catch(t){}var wh=function(t,e){if(!e&&!yh)return!1;var n=!1;try{var r={};r[gh]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n};Rn({target:"Array",stat:!0,forced:!wh((function(t){Array.from(t)}))},{from:function(t){var e=uh(t),n=fh(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ah(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=ph(e),d=0;if(!h||this===mh&&ch(h))for(a=hh(e),s=n?new this(a):mh(a);a>d;d++)f=o?i(e[d],d):e[d],dh(s,d,f);else for(c=(l=vh(e,h)).next,s=n?new this:[];!(u=sh(c,l)).done;d++)f=o?lh(l,i,[u.value,d],!0):u.value,dh(s,d,f);return s.length=d,s}});var _h=it.Array.from,Eh=i(_h),Sh=i(Jf),kh=i(it.Object.getOwnPropertySymbols),Oh={exports:{}},Th=Rn,jh=u,Rh=tt,Ah=C.f,Ch=N;Th({target:"Object",stat:!0,forced:!Ch||jh((function(){Ah(1)})),sham:!Ch},{getOwnPropertyDescriptor:function(t,e){return Ah(Rh(t),e)}});var Nh=it.Object,Mh=Oh.exports=function(t,e){return Nh.getOwnPropertyDescriptor(t,e)};Nh.getOwnPropertyDescriptor.sham&&(Mh.sham=!0);var Ih=i(Oh.exports),Zh=lt,Ph=qi,Lh=ao,Dh=nn,zh=b([].concat),$h=Zh("Reflect","ownKeys")||function(t){var e=Ph.f(Dh(t)),n=Lh.f;return n?zh(e,n(t)):e},Bh=$h,Uh=tt,Fh=C,Hh=Jn;Rn({target:"Object",stat:!0,sham:!N},{getOwnPropertyDescriptors:function(t){for(var e,n,r=Uh(t),i=Fh.f,o=Bh(r),a={},s=0;o.length>s;)void 0!==(n=i(r,e=o[s++]))&&Hh(a,e,n);return a}});var qh=i(it.Object.getOwnPropertyDescriptors),Vh={exports:{}},Yh=Rn,Wh=N,Xh=Qr.f;Yh({target:"Object",stat:!0,forced:Object.defineProperties!==Xh,sham:!Wh},{defineProperties:Xh});var Gh=it.Object,Kh=Vh.exports=function(t,e){return Gh.defineProperties(t,e)};Gh.defineProperties.sham&&(Kh.sham=!0);var Jh=i(Vh.exports),Qh=i(Zn);Rn({target:"Array",stat:!0},{isArray:zn});var td=it.Array.isArray,ed=i(td),nd=Rn,rd=zn,id=kr,od=rt,ad=ri,sd=Vn,ud=tt,ld=Jn,cd=de,fd=Rs,hd=Zr("slice"),dd=cd("species"),vd=Array,pd=Math.max;nd({target:"Array",proto:!0,forced:!hd},{slice:function(t,e){var n,r,i,o=ud(this),a=sd(o),s=ad(t,a),u=ad(void 0===e?a:e,a);if(rd(o)&&(n=o.constructor,(id(n)&&(n===vd||rd(n.prototype))||od(n)&&null===(n=n[dd]))&&(n=void 0),n===vd||void 0===n))return fd(o,s,u);for(r=new(void 0===n?vd:n)(pd(u-s,0)),i=0;s<u;s++,i++)s in o&&ld(r,i,o[s]);return r.length=i,r}});var md=Dc("Array").slice,gd=ct,yd=md,bd=Array.prototype,xd=function(t){var e=t.slice;return t===bd||gd(bd,t)&&e===bd.slice?yd:e},wd=xd,_d=i(wd),Ed=i(_h);function Sd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kd(t,e){var n;if(t){if("string"==typeof t)return Sd(t,e);var r=_d(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Ed(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sd(t,e):void 0}}function Od(t,e){return function(t){if(ed(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==Ql&&Sh(t)||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||kd(t,e)||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 Td(t){return function(t){if(ed(t))return Sd(t)}(t)||function(t){if(void 0!==Ql&&null!=Sh(t)||null!=t["@@iterator"])return Ed(t)}(t)||kd(t)||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 jd=i(Al),Rd=Dc("Array").concat,Ad=ct,Cd=Rd,Nd=Array.prototype,Md=i((function(t){var e=t.concat;return t===Nd||Ad(Nd,t)&&e===Nd.concat?Cd:e})),Id=i(xd);Rn({target:"Reflect",stat:!0},{ownKeys:$h});var Zd=i(it.Reflect.ownKeys),Pd=i(td),Ld=Gt,Dd=bi;Rn({target:"Object",stat:!0,forced:u((function(){Dd(1)}))},{keys:function(t){return Dd(Ld(t))}});var zd=i(it.Object.keys),$d=oa.forEach,Bd=Qc("forEach")?[].forEach:function(t){return $d(this,t,arguments.length>1?arguments[1]:void 0)};Rn({target:"Array",proto:!0,forced:[].forEach!=Bd},{forEach:Bd});var Ud=Dc("Array").forEach,Fd=sr,Hd=Qt,qd=ct,Vd=Ud,Yd=Array.prototype,Wd={DOMTokenList:!0,NodeList:!0},Xd=function(t){var e=t.forEach;return t===Yd||qd(Yd,t)&&e===Yd.forEach||Hd(Wd,Fd(t))?Vd:e},Gd=i(Xd),Kd=Rn,Jd=zn,Qd=b([].reverse),tv=[1,2];Kd({target:"Array",proto:!0,forced:String(tv)===String(tv.reverse())},{reverse:function(){return Jd(this)&&(this.length=this.length),Qd(this)}});var ev=Dc("Array").reverse,nv=ct,rv=ev,iv=Array.prototype,ov=function(t){var e=t.reverse;return t===iv||nv(iv,t)&&e===iv.reverse?rv:e},av=i(ov),sv=N,uv=zn,lv=TypeError,cv=Object.getOwnPropertyDescriptor,fv=sv&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),hv=Rt,dv=TypeError,vv=function(t,e){if(!delete t[e])throw dv("Cannot delete property "+hv(e)+" of "+hv(t))},pv=Rn,mv=Gt,gv=ri,yv=Fn,bv=Vn,xv=fv?function(t,e){if(uv(t)&&!cv(t,"length").writable)throw lv("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},wv=Wn,_v=Cr,Ev=Jn,Sv=vv,kv=Zr("splice"),Ov=Math.max,Tv=Math.min;pv({target:"Array",proto:!0,forced:!kv},{splice:function(t,e){var n,r,i,o,a,s,u=mv(this),l=bv(u),c=gv(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Tv(Ov(yv(e),0),l-c)),wv(l+n-r),i=_v(u,r),o=0;o<r;o++)(a=c+o)in u&&Ev(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:Sv(u,s);for(o=l;o>l-r+n;o--)Sv(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]:Sv(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return xv(u,l-r+n),i}});var jv=Dc("Array").splice,Rv=ct,Av=jv,Cv=Array.prototype,Nv=i((function(t){var e=t.splice;return t===Cv||Rv(Cv,t)&&e===Cv.splice?Av:e})),Mv=N,Iv=b,Zv=Z,Pv=u,Lv=bi,Dv=ao,zv=P,$v=Gt,Bv=Y,Uv=Object.assign,Fv=Object.defineProperty,Hv=Iv([].concat),qv=!Uv||Pv((function(){if(Mv&&1!==Uv({b:1},Uv(Fv({},"a",{enumerable:!0,get:function(){Fv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Uv({},t)[n]||Lv(Uv({},e)).join("")!=r}))?function(t,e){for(var n=$v(t),r=arguments.length,i=1,o=Dv.f,a=zv.f;r>i;)for(var s,u=Bv(arguments[i++]),l=o?Hv(Lv(u),o(u)):Lv(u),c=l.length,f=0;c>f;)s=l[f++],Mv&&!Zv(a,u,s)||(n[s]=u[s]);return n}:Uv,Vv=qv;Rn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Vv},{assign:Vv});var Yv=i(it.Object.assign),Wv=Gt,Xv=Ru,Gv=wu;Rn({target:"Object",stat:!0,forced:u((function(){Xv(1)})),sham:!Gv},{getPrototypeOf:function(t){return Xv(Wv(t))}});var Kv=it.Object.getPrototypeOf;Rn({target:"Object",stat:!0,sham:!N},{create:Hi});var Jv=it.Object,Qv=function(t,e){return Jv.create(t,e)},tp=i(Qv),ep=it,np=v;ep.JSON||(ep.JSON={stringify:JSON.stringify});var rp=i((function(t,e,n){return np(ep.JSON.stringify,null,arguments)})),ip="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,op=TypeError,ap=function(t,e){if(t<e)throw op("Not enough arguments");return t},sp=s,up=v,lp=A,cp=ip,fp=ft,hp=Rs,dp=ap,vp=sp.Function,pp=/MSIE .\./.test(fp)||cp&&function(){var t=sp.Bun.version.split(".");return t.length<3||0==t[0]&&(t[1]<3||3==t[1]&&0==t[2])}(),mp=function(t,e){var n=e?2:1;return pp?function(r,i){var o=dp(arguments.length,1)>n,a=lp(r)?r:vp(r),s=o?hp(arguments,n):[],u=o?function(){up(a,this,s)}:a;return e?t(u,i):t(u)}:t},gp=Rn,yp=s,bp=mp(yp.setInterval,!0);gp({global:!0,bind:!0,forced:yp.setInterval!==bp},{setInterval:bp});var xp=Rn,wp=s,_p=mp(wp.setTimeout,!0);xp({global:!0,bind:!0,forced:wp.setTimeout!==_p},{setTimeout:_p});var Ep=i(it.setTimeout),Sp={exports:{}};!function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(Sp);var kp,Op=i(Sp.exports);function Tp(){return Tp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Tp.apply(this,arguments)}function jp(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Rp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}kp="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var Ap,Cp=kp,Np=["","webkit","Moz","MS","ms","o"],Mp="undefined"==typeof document?{style:{}}:document.createElement("div"),Ip=Math.round,Zp=Math.abs,Pp=Date.now;function Lp(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<Np.length;){if((r=(n=Np[o])?n+i:e)in t)return r;o++}}Ap="undefined"==typeof window?{}:window;var Dp=Lp(Mp.style,"touchAction"),zp=void 0!==Dp,$p="compute",Bp="auto",Up="manipulation",Fp="none",Hp="pan-x",qp="pan-y",Vp=function(){if(!zp)return!1;var t={},e=Ap.CSS&&Ap.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return t[n]=!e||Ap.CSS.supports("touch-action",n)})),t}(),Yp="ontouchstart"in Ap,Wp=void 0!==Lp(Ap,"PointerEvent"),Xp=Yp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Gp="touch",Kp="mouse",Jp=25,Qp=1,tm=4,em=8,nm=1,rm=2,im=4,om=8,am=16,sm=rm|im,um=om|am,lm=sm|um,cm=["x","y"],fm=["clientX","clientY"];function hm(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function dm(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function vm(t,e){return t.indexOf(e)>-1}var pm=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===$p&&(t=this.compute()),zp&&this.manager.element.style&&Vp[t]&&(this.manager.element.style[Dp]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return hm(this.manager.recognizers,(function(e){dm(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(vm(t,Fp))return Fp;var e=vm(t,Hp),n=vm(t,qp);return e&&n?Fp:e||n?e?Hp:qp:vm(t,Up)?Up:Bp}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=vm(r,Fp)&&!Vp[Fp],o=vm(r,qp)&&!Vp[qp],a=vm(r,Hp)&&!Vp[Hp];if(i){var s=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&n&sm||a&&n&um?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function mm(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function gm(t){var e=t.length;if(1===e)return{x:Ip(t[0].clientX),y:Ip(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:Ip(n/e),y:Ip(r/e)}}function ym(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:Ip(t.pointers[n].clientX),clientY:Ip(t.pointers[n].clientY)},n++;return{timeStamp:Pp(),pointers:e,center:gm(e),deltaX:t.deltaX,deltaY:t.deltaY}}function bm(t,e,n){n||(n=cm);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function xm(t,e,n){n||(n=cm);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function wm(t,e){return t===e?nm:Zp(t)>=Zp(e)?t<0?rm:im:e<0?om:am}function _m(t,e,n){return{x:e/t||0,y:n/t||0}}function Em(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&Qp&&r-i==0,a=e&(tm|em)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=ym(e)),i>1&&!n.firstMultiple?n.firstMultiple=ym(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=gm(r);e.timeStamp=Pp(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=xm(s,u),e.distance=bm(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Qp&&o.eventType!==tm||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=wm(e.deltaX,e.deltaY);var l,c,f=_m(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=f.x,e.overallVelocityY=f.y,e.overallVelocity=Zp(f.x)>Zp(f.y)?f.x:f.y,e.scale=a?(l=a.pointers,bm((c=r)[0],c[1],fm)/bm(l[0],l[1],fm)):1,e.rotation=a?function(t,e){return xm(e[1],e[0],fm)+xm(t[1],t[0],fm)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(e.eventType!==em&&(s>Jp||void 0===a.velocity)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,c=_m(s,u,l);r=c.x,i=c.y,n=Zp(c.x)>Zp(c.y)?c.x:c.y,o=wm(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var h,d=t.element,v=e.srcEvent;mm(h=v.composedPath?v.composedPath()[0]:v.path?v.path[0]:v.target,d)&&(d=h),e.target=d}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Sm(t){return t.trim().split(/\s+/g)}function km(t,e,n){hm(Sm(e),(function(e){t.addEventListener(e,n,!1)}))}function Om(t,e,n){hm(Sm(e),(function(e){t.removeEventListener(e,n,!1)}))}function Tm(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var jm=function(){function t(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){dm(t.options.enable,[t])&&n.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&km(this.element,this.evEl,this.domHandler),this.evTarget&&km(this.target,this.evTarget,this.domHandler),this.evWin&&km(Tm(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Om(this.element,this.evEl,this.domHandler),this.evTarget&&Om(this.target,this.evTarget,this.domHandler),this.evWin&&Om(Tm(this.element),this.evWin,this.domHandler)},t}();function Rm(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}var Am={pointerdown:Qp,pointermove:2,pointerup:tm,pointercancel:em,pointerout:em},Cm={2:Gp,3:"pen",4:Kp,5:"kinect"},Nm="pointerdown",Mm="pointermove pointerup pointercancel";Ap.MSPointerEvent&&!Ap.PointerEvent&&(Nm="MSPointerDown",Mm="MSPointerMove MSPointerUp MSPointerCancel");var Im=function(t){function e(){var n,r=e.prototype;return r.evEl=Nm,r.evWin=Mm,(n=t.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return jp(e,t),e.prototype.handler=function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Am[r],o=Cm[t.pointerType]||t.pointerType,a=o===Gp,s=Rm(e,t.pointerId,"pointerId");i&Qp&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):i&(tm|em)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))},e}(jm);function Zm(t){return Array.prototype.slice.call(t,0)}function Pm(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];Rm(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}var Lm={touchstart:Qp,touchmove:2,touchend:tm,touchcancel:em},Dm=function(t){function e(){var n;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).targetIds={},n}return jp(e,t),e.prototype.handler=function(t){var e=Lm[t.type],n=zm.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Gp,srcEvent:t})},e}(jm);function zm(t,e){var n,r,i=Zm(t.touches),o=this.targetIds;if(e&(2|Qp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Zm(t.changedTouches),s=[],u=this.target;if(r=i.filter((function(t){return mm(t.target,u)})),e===Qp)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]),e&(tm|em)&&delete o[a[n].identifier],n++;return s.length?[Pm(r.concat(s),"identifier",!0),s]:void 0}var $m={mousedown:Qp,mousemove:2,mouseup:tm},Bm=function(t){function e(){var n,r=e.prototype;return r.evEl="mousedown",r.evWin="mousemove mouseup",(n=t.apply(this,arguments)||this).pressed=!1,n}return jp(e,t),e.prototype.handler=function(t){var e=$m[t.type];e&Qp&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=tm),this.pressed&&(e&tm&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Kp,srcEvent:t}))},e}(jm),Um=2500;function Fm(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),Um)}}function Hm(t,e){t&Qp?(this.primaryTouch=e.changedPointers[0].identifier,Fm.call(this,e)):t&(tm|em)&&Fm.call(this,e)}function qm(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}var Vm=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).handler=function(t,e,n){var i=n.pointerType===Gp,o=n.pointerType===Kp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Hm.call(Rp(Rp(r)),e,n);else if(o&&qm.call(Rp(Rp(r)),n))return;r.callback(t,e,n)}},r.touch=new Dm(r.manager,r.handler),r.mouse=new Bm(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return jp(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(jm);function Ym(t,e,n){return!!Array.isArray(t)&&(hm(t,n[e],n),!0)}var Wm=32,Xm=1;function Gm(t,e){var n=e.manager;return n?n.get(t):t}function Km(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Jm=function(){function t(t){void 0===t&&(t={}),this.options=Tp({enable:!0},t),this.id=Xm++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Cp(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Ym(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Gm(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Ym(t,"dropRecognizeWith",this)||(t=Gm(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Ym(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Rm(e,t=Gm(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Ym(t,"dropRequireFailure",this))return this;t=Gm(t,this);var e=Rm(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Km(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Km(n))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Wm},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=Cp({},t);if(!dm(this.options.enable,[this,e]))return this.reset(),void(this.state=Wm);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Qm=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,Tp({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Up]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distance<n.threshold,o=t.deltaTime<n.time;if(this.reset(),t.eventType&Qp&&0===this.count)return this.failTimeout();if(i&&o&&r){if(t.eventType!==tm)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<n.interval,s=!this.pCenter||bm(this.pCenter,t.center)<n.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),n.interval),2):8}return Wm},n.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=Wm}),this.options.interval),Wm},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))},e}(Jm),tg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tp({pointers:1},e))||this}jp(e,t);var n=e.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(n&em||!i)?16|e:r||i?n&tm?8|e:2&e?4|e:2:Wm},e}(Jm);function eg(t){return t===am?"down":t===om?"up":t===rm?"left":t===im?"right":""}var ng=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,Tp({event:"pan",threshold:10,pointers:1,direction:lm},e))||this).pX=null,n.pY=null,n}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){var t=this.options.direction,e=[];return t&sm&&e.push(qp),t&um&&e.push(Hp),e},n.directionTest=function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(e.direction&sm?(i=0===o?nm:o<0?rm:im,n=o!==this.pX,r=Math.abs(t.deltaX)):(i=0===a?nm:a<0?om:am,n=a!==this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},n.attrTest=function(t){return tg.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},n.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var n=eg(e.direction);n&&(e.additionalEvent=this.options.event+n),t.prototype.emit.call(this,e)},e}(tg),rg=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},e))||this}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){return ng.prototype.getTouchAction.call(this)},n.attrTest=function(e){var n,r=this.options.direction;return r&(sm|um)?n=e.overallVelocity:r&sm?n=e.overallVelocityX:r&um&&(n=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Zp(n)>this.options.velocity&&e.eventType&tm},n.emit=function(t){var e=eg(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(tg),ig=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tp({event:"pinch",threshold:0,pointers:2},e))||this}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Fp]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},n.emit=function(e){if(1!==e.scale){var n=e.scale<1?"in":"out";e.additionalEvent=this.options.event+n}t.prototype.emit.call(this,e)},e}(tg),og=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Tp({event:"rotate",threshold:0,pointers:2},e))||this}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Fp]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(tg),ag=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,Tp({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,n._input=null,n}jp(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Bp]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distance<n.threshold,o=t.deltaTime>n.time;if(this._input=t,!i||!r||t.eventType&(tm|em)&&!o)this.reset();else if(t.eventType&Qp)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),n.time);else if(t.eventType&tm)return 8;return Wm},n.reset=function(){clearTimeout(this._timer)},n.emit=function(t){8===this.state&&(t&&t.eventType&tm?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Pp(),this.manager.emit(this.options.event,this._input)))},e}(Jm),sg={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)"}},ug=[[og,{enable:!1}],[ig,{enable:!1},["rotate"]],[rg,{direction:sm}],[ng,{direction:sm},["swipe"]],[Qm],[Qm,{event:"doubletap",taps:2},["tap"]],[ag]];function lg(t,e){var n,r=t.element;r.style&&(hm(t.options.cssProps,(function(i,o){n=Lp(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}var cg=function(){function t(t,e){var n=this;this.options=Cp({},sg,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(Wp?Im:Xp?Dm:Yp?Vm:Bm))(this,Em),this.touchAction=new pm(this,this.options.touchAction),lg(this,!0),hm(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return Cp(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(e.curRecognizer=null,i=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(e.curRecognizer=n,i=n),o++}},e.get=function(t){if(t instanceof Jm)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(Ym(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Ym(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,r=Rm(n,e);-1!==r&&(n.splice(r,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return hm(Sm(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return hm(Sm(t),(function(t){e?n[t]&&n[t].splice(Rm(n[t],e),1):delete n[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var n=document.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},e.destroy=function(){this.element&&lg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),fg={touchstart:Qp,touchmove:2,touchend:tm,touchcancel:em},hg=function(t){function e(){var n,r=e.prototype;return r.evTarget="touchstart",r.evWin="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).started=!1,n}return jp(e,t),e.prototype.handler=function(t){var e=fg[t.type];if(e===Qp&&(this.started=!0),this.started){var n=dg.call(this,t,e);e&(tm|em)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Gp,srcEvent:t})}},e}(jm);function dg(t,e){var n=Zm(t.touches),r=Zm(t.changedTouches);return e&(tm|em)&&(n=Pm(n.concat(r),"identifier",!0)),[n,r]}function vg(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.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),t.apply(this,arguments)}}var pg=vg((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&void 0===t[r[i]])&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),mg=vg((function(t,e){return pg(t,e,!0)}),"merge","Use `assign`.");function gg(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&Cp(r,n)}function yg(t,e){return function(){return t.apply(e,arguments)}}var bg=function(){var t=function(t,e){return void 0===e&&(e={}),new cg(t,Tp({recognizers:ug.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=lm,t.DIRECTION_DOWN=am,t.DIRECTION_LEFT=rm,t.DIRECTION_RIGHT=im,t.DIRECTION_UP=om,t.DIRECTION_HORIZONTAL=sm,t.DIRECTION_VERTICAL=um,t.DIRECTION_NONE=nm,t.DIRECTION_DOWN=am,t.INPUT_START=Qp,t.INPUT_MOVE=2,t.INPUT_END=tm,t.INPUT_CANCEL=em,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=Wm,t.Manager=cg,t.Input=jm,t.TouchAction=pm,t.TouchInput=Dm,t.MouseInput=Bm,t.PointerEventInput=Im,t.TouchMouseInput=Vm,t.SingleTouchInput=hg,t.Recognizer=Jm,t.AttrRecognizer=tg,t.Tap=Qm,t.Pan=ng,t.Swipe=rg,t.Pinch=ig,t.Rotate=og,t.Press=ag,t.on=km,t.off=Om,t.each=hm,t.merge=mg,t.extend=pg,t.bindFn=yg,t.assign=Cp,t.inherit=gg,t.bindFn=yg,t.prefixed=Lp,t.toArray=Zm,t.inArray=Rm,t.uniqueArray=Pm,t.splitStr=Sm,t.boolOrFn=dm,t.hasParent=mm,t.addEventListeners=km,t.removeEventListeners=Om,t.defaults=Cp({},sg,{preset:ug}),t}();function xg(t,e){var n=void 0!==jd&&Sh(t)||t["@@iterator"];if(!n){if(Pd(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return wg(t,e);var r=Id(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Eh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wg(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _g=jd("DELETE");function Eg(){var t=Sg.apply(void 0,arguments);return Og(t),t}function Sg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length<2)return e[0];var r;if(e.length>2)return Sg.apply(void 0,Md(r=[Eg(e[0],e[1])]).call(r,Td(Id(e).call(e,2))));var i,o=e[0],a=e[1],s=xg(Zd(a));try{for(s.s();!(i=s.n()).done;){var u=i.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===_g?delete o[u]:null===o[u]||null===a[u]||"object"!==bc(o[u])||"object"!==bc(a[u])||Pd(o[u])||Pd(a[u])?o[u]=kg(a[u]):o[u]=Sg(o[u],a[u]))}}catch(t){s.e(t)}finally{s.f()}return o}function kg(t){return Pd(t)?bf(t).call(t,(function(t){return kg(t)})):"object"===bc(t)&&null!==t?Sg({},t):t}function Og(t){for(var e=0,n=zd(t);e<n.length;e++){var r=n[e];t[r]===_g?delete t[r]:"object"===bc(t[r])&&null!==t[r]&&Og(t[r])}}var Tg="undefined"!=typeof window?window.Hammer||bg:function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}()};function jg(t){var e,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:t,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=Tg(this._dom.overlay);r.on("tap",Hc(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Gd(i).call(i,(function(t){r.on(t,(function(t){t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",n._onClick)}))),this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&n.deactivate()}}Op(jg.prototype),jg.current=null,jg.prototype.destroy=function(){var t,e;this.deactivate();var n,r=xg(av(t=Nv(e=this._cleanupQueue).call(e,0)).call(t));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(t){r.e(t)}finally{r.f()}},jg.prototype.activate=function(){jg.current&&jg.current.deactivate(),jg.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)},jg.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")},jg.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};var Rg=kr,Ag=Rt,Cg=TypeError,Ng=function(t){if(Rg(t))return t;throw Cg(Ag(t)+" is not a constructor")},Mg=Rn,Ig=v,Zg=Zc,Pg=Ng,Lg=nn,Dg=rt,zg=Hi,$g=u,Bg=lt("Reflect","construct"),Ug=Object.prototype,Fg=[].push,Hg=$g((function(){function t(){}return!(Bg((function(){}),[],t)instanceof t)})),qg=!$g((function(){Bg((function(){}))})),Vg=Hg||qg;Mg({target:"Reflect",stat:!0,forced:Vg,sham:Vg},{construct:function(t,e){Pg(t),Lg(e);var n=arguments.length<3?t:Pg(arguments[2]);if(qg&&!Hg)return Bg(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return Ig(Fg,r,e),new(Ig(Zg,t,r))}var i=n.prototype,o=zg(Dg(i)?i:Ug),a=Ig(t,o,e);return Dg(a)?a:o}});var Yg=i(it.Reflect.construct);function Wg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Xg=Qv,Gg=i(Xg);Rn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Kg=it.Object.setPrototypeOf,Jg=i(Kg),Qg=i(Fc);function ty(t,e){var n;return ty=Jg?Qg(n=Jg).call(n):function(t,e){return t.__proto__=e,t},ty(t,e)}function ey(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Gg(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Ln(t,"prototype",{writable:!1}),e&&ty(t,e)}function ny(t,e){if(e&&("object"===bc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wg(t)}var ry=Kv,iy=i(ry);function oy(t){var e;return oy=Jg?Qg(e=iy).call(e):function(t){return t.__proto__||iy(t)},oy(t)}var ay={exports:{}},sy={exports:{}};!function(t){var e=Jl,n=gc;function r(i){return t.exports=r="function"==typeof e&&"symbol"==typeof n?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(sy);var uy=sy.exports,ly=Xd,cy=Qt,fy=$h,hy=C,dy=Ke,vy=rt,py=gn,my=Error,gy=b("".replace),yy=String(my("zxcasd").stack),by=/\n\s*at [^:]*:[^\n]*/,xy=by.test(yy),wy=U,_y=!u((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",wy(1,7)),7!==t.stack)})),Ey=gn,Sy=_y,ky=Error.captureStackTrace,Oy=Ge,Ty=Z,jy=nn,Ry=Rt,Ay=Vf,Cy=Vn,Ny=ct,My=oh,Iy=Jf,Zy=$f,Py=TypeError,Ly=function(t,e){this.stopped=t,this.result=e},Dy=Ly.prototype,zy=function(t,e,n){var r,i,o,a,s,u,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),p=Oy(e,c),m=function(t){return r&&Zy(r,"normal",t),new Ly(!0,t)},g=function(t){return f?(jy(t),v?p(t[0],t[1],m):p(t[0],t[1])):v?p(t,m):p(t)};if(h)r=t.iterator;else if(d)r=t;else{if(!(i=Iy(t)))throw Py(Ry(t)+" is not iterable");if(Ay(i)){for(o=0,a=Cy(t);a>o;o++)if((s=g(t[o]))&&Ny(Dy,s))return s;return new Ly(!1)}r=My(t,i)}for(u=h?t.next:r.next;!(l=Ty(u,r)).done;){try{s=g(l.value)}catch(t){Zy(r,"throw",t)}if("object"==typeof s&&s&&Ny(Dy,s))return s}return new Ly(!1)},$y=Jr,By=Rn,Uy=ct,Fy=Ru,Hy=Ju,qy=Hi,Vy=gn,Yy=U,Wy=function(t,e,n,r){Sy&&(ky?ky(t,e):Ey(t,"stack",function(t,e){if(xy&&"string"==typeof t&&!my.prepareStackTrace)for(;e--;)t=gy(t,by,"");return t}(n,r)))},Xy=zy,Gy=de("toStringTag"),Ky=Error,Jy=[].push,Qy=function(t,e){var n,r=Uy(tb,this);Hy?n=Hy(Ky(),r?Fy(this):tb):(n=r?this:qy(tb),Vy(n,Gy,"Error")),void 0!==e&&Vy(n,"message",function(t,e){return void 0===t?arguments.length<2?"":e:$y(t)}(e)),Wy(n,Qy,n.stack,1),arguments.length>2&&function(t,e){vy(e)&&"cause"in e&&py(t,"cause",e.cause)}(n,arguments[2]);var i=[];return Xy(t,Jy,{that:i}),Vy(n,"errors",i),n};Hy?Hy(Qy,Ky):function(t,e,n){for(var r=fy(e),i=dy.f,o=hy.f,a=0;a<r.length;a++){var s=r[a];cy(t,s)||n&&cy(n,s)||i(t,s,o(e,s))}}(Qy,Ky,{name:!0});var tb=Qy.prototype=qy(Ky.prototype,{constructor:Yy(1,Qy),message:Yy(1,""),name:Yy(1,"AggregateError")});By({global:!0,constructor:!0,arity:2},{AggregateError:Qy});var eb,nb,rb,ib,ob=lt,ab=co,sb=N,ub=de("species"),lb=function(t){var e=ob(t);sb&&e&&!e[ub]&&ab(e,ub,{configurable:!0,get:function(){return this}})},cb=ct,fb=TypeError,hb=function(t,e){if(cb(e,t))return t;throw fb("Incorrect invocation")},db=nn,vb=Ng,pb=W,mb=de("species"),gb=function(t,e){var n,r=db(t).constructor;return void 0===r||pb(n=db(r)[mb])?e:vb(n)},yb=/(?:ipad|iphone|ipod).*applewebkit/i.test(ft),bb=s,xb=v,wb=Ge,_b=A,Eb=Qt,Sb=u,kb=Ti,Ob=Rs,Tb=Oe,jb=ap,Rb=yb,Ab=tf,Cb=bb.setImmediate,Nb=bb.clearImmediate,Mb=bb.process,Ib=bb.Dispatch,Zb=bb.Function,Pb=bb.MessageChannel,Lb=bb.String,Db=0,zb={},$b="onreadystatechange";Sb((function(){eb=bb.location}));var Bb=function(t){if(Eb(zb,t)){var e=zb[t];delete zb[t],e()}},Ub=function(t){return function(){Bb(t)}},Fb=function(t){Bb(t.data)},Hb=function(t){bb.postMessage(Lb(t),eb.protocol+"//"+eb.host)};Cb&&Nb||(Cb=function(t){jb(arguments.length,1);var e=_b(t)?t:Zb(t),n=Ob(arguments,1);return zb[++Db]=function(){xb(e,void 0,n)},nb(Db),Db},Nb=function(t){delete zb[t]},Ab?nb=function(t){Mb.nextTick(Ub(t))}:Ib&&Ib.now?nb=function(t){Ib.now(Ub(t))}:Pb&&!Rb?(ib=(rb=new Pb).port2,rb.port1.onmessage=Fb,nb=wb(ib.postMessage,ib)):bb.addEventListener&&_b(bb.postMessage)&&!bb.importScripts&&eb&&"file:"!==eb.protocol&&!Sb(Hb)?(nb=Hb,bb.addEventListener("message",Fb,!1)):nb=$b in Tb("script")?function(t){kb.appendChild(Tb("script"))[$b]=function(){kb.removeChild(this),Bb(t)}}:function(t){setTimeout(Ub(t),0)});var qb={set:Cb,clear:Nb},Vb=function(){this.head=null,this.tail=null};Vb.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Yb,Wb,Xb,Gb,Kb,Jb=Vb,Qb=/ipad|iphone|ipod/i.test(ft)&&"undefined"!=typeof Pebble,tx=/web0s(?!.*chrome)/i.test(ft),ex=s,nx=Ge,rx=C.f,ix=qb.set,ox=Jb,ax=yb,sx=Qb,ux=tx,lx=tf,cx=ex.MutationObserver||ex.WebKitMutationObserver,fx=ex.document,hx=ex.process,dx=ex.Promise,vx=rx(ex,"queueMicrotask"),px=vx&&vx.value;if(!px){var mx=new ox,gx=function(){var t,e;for(lx&&(t=hx.domain)&&t.exit();e=mx.get();)try{e()}catch(t){throw mx.head&&Yb(),t}t&&t.enter()};ax||lx||ux||!cx||!fx?!sx&&dx&&dx.resolve?((Gb=dx.resolve(void 0)).constructor=dx,Kb=nx(Gb.then,Gb),Yb=function(){Kb(gx)}):lx?Yb=function(){hx.nextTick(gx)}:(ix=nx(ix,ex),Yb=function(){ix(gx)}):(Wb=!0,Xb=fx.createTextNode(""),new cx(gx).observe(Xb,{characterData:!0}),Yb=function(){Xb.data=Wb=!Wb}),px=function(t){mx.head||Yb(),mx.add(t)}}var yx=px,bx=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},xx=s.Promise,wx="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,_x=!wx&&!tf&&"object"==typeof window&&"object"==typeof document,Ex=s,Sx=xx,kx=A,Ox=Ve,Tx=fr,jx=de,Rx=_x,Ax=wx,Cx=yt,Nx=Sx&&Sx.prototype,Mx=jx("species"),Ix=!1,Zx=kx(Ex.PromiseRejectionEvent),Px=Ox("Promise",(function(){var t=Tx(Sx),e=t!==String(Sx);if(!e&&66===Cx)return!0;if(!Nx.catch||!Nx.finally)return!0;if(!Cx||Cx<51||!/native code/.test(t)){var n=new Sx((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Mx]=r,!(Ix=n.then((function(){}))instanceof r))return!0}return!e&&(Rx||Ax)&&!Zx})),Lx={CONSTRUCTOR:Px,REJECTION_EVENT:Zx,SUBCLASSING:Ix},Dx={},zx=Mt,$x=TypeError,Bx=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw $x("Bad Promise constructor");e=t,n=r})),this.resolve=zx(e),this.reject=zx(n)};Dx.f=function(t){return new Bx(t)};var Ux,Fx,Hx=Rn,qx=tf,Vx=s,Yx=Z,Wx=uo,Xx=Zo,Gx=lb,Kx=Mt,Jx=A,Qx=rt,tw=hb,ew=gb,nw=qb.set,rw=yx,iw=bx,ow=Jb,aw=Ko,sw=xx,uw=Dx,lw="Promise",cw=Lx.CONSTRUCTOR,fw=Lx.REJECTION_EVENT,hw=aw.getterFor(lw),dw=aw.set,vw=sw&&sw.prototype,pw=sw,mw=vw,gw=Vx.TypeError,yw=Vx.document,bw=Vx.process,xw=uw.f,ww=xw,_w=!!(yw&&yw.createEvent&&Vx.dispatchEvent),Ew="unhandledrejection",Sw=function(t){var e;return!(!Qx(t)||!Jx(e=t.then))&&e},kw=function(t,e){var n,r,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(a||(2===e.rejection&&Aw(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(gw("Promise-chain cycle")):(r=Sw(n))?Yx(r,n,u,l):u(n)):l(o)}catch(t){c&&!i&&c.exit(),l(t)}},Ow=function(t,e){t.notified||(t.notified=!0,rw((function(){for(var n,r=t.reactions;n=r.get();)kw(n,t);t.notified=!1,e&&!t.rejection&&jw(t)})))},Tw=function(t,e,n){var r,i;_w?((r=yw.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Vx.dispatchEvent(r)):r={promise:e,reason:n},!fw&&(i=Vx["on"+t])?i(r):t===Ew&&function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},jw=function(t){Yx(nw,Vx,(function(){var e,n=t.facade,r=t.value;if(Rw(t)&&(e=iw((function(){qx?bw.emit("unhandledRejection",r,n):Tw(Ew,n,r)})),t.rejection=qx||Rw(t)?2:1,e.error))throw e.value}))},Rw=function(t){return 1!==t.rejection&&!t.parent},Aw=function(t){Yx(nw,Vx,(function(){var e=t.facade;qx?bw.emit("rejectionHandled",e):Tw("rejectionhandled",e,t.value)}))},Cw=function(t,e,n){return function(r){t(e,r,n)}},Nw=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Ow(t,!0))},Mw=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw gw("Promise can't be resolved itself");var r=Sw(e);r?rw((function(){var n={done:!1};try{Yx(r,e,Cw(Mw,n,t),Cw(Nw,n,t))}catch(e){Nw(n,e,t)}})):(t.value=e,t.state=1,Ow(t,!1))}catch(e){Nw({done:!1},e,t)}}};cw&&(mw=(pw=function(t){tw(this,mw),Kx(t),Yx(Ux,this);var e=hw(this);try{t(Cw(Mw,e),Cw(Nw,e))}catch(t){Nw(e,t)}}).prototype,(Ux=function(t){dw(this,{type:lw,done:!1,notified:!1,parent:!1,reactions:new ow,rejection:!1,state:0,value:void 0})}).prototype=Wx(mw,"then",(function(t,e){var n=hw(this),r=xw(ew(this,pw));return n.parent=!0,r.ok=!Jx(t)||t,r.fail=Jx(e)&&e,r.domain=qx?bw.domain:void 0,0==n.state?n.reactions.add(r):rw((function(){kw(r,n)})),r.promise})),Fx=function(){var t=new Ux,e=hw(t);this.promise=t,this.resolve=Cw(Mw,e),this.reject=Cw(Nw,e)},uw.f=xw=function(t){return t===pw||void 0===t?new Fx(t):ww(t)}),Hx({global:!0,constructor:!0,wrap:!0,forced:cw},{Promise:pw}),Xx(pw,lw,!1,!0),Gx(lw);var Iw=xx,Zw=Lx.CONSTRUCTOR||!wh((function(t){Iw.all(t).then(void 0,(function(){}))})),Pw=Z,Lw=Mt,Dw=Dx,zw=bx,$w=zy;Rn({target:"Promise",stat:!0,forced:Zw},{all:function(t){var e=this,n=Dw.f(e),r=n.resolve,i=n.reject,o=zw((function(){var n=Lw(e.resolve),o=[],a=0,s=1;$w(t,(function(t){var u=a++,l=!1;s++,Pw(n,e,t).then((function(t){l||(l=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Bw=Rn,Uw=Lx.CONSTRUCTOR;xx&&xx.prototype,Bw({target:"Promise",proto:!0,forced:Uw,real:!0},{catch:function(t){return this.then(void 0,t)}});var Fw=Z,Hw=Mt,qw=Dx,Vw=bx,Yw=zy;Rn({target:"Promise",stat:!0,forced:Zw},{race:function(t){var e=this,n=qw.f(e),r=n.reject,i=Vw((function(){var i=Hw(e.resolve);Yw(t,(function(t){Fw(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Ww=Z,Xw=Dx;Rn({target:"Promise",stat:!0,forced:Lx.CONSTRUCTOR},{reject:function(t){var e=Xw.f(this);return Ww(e.reject,void 0,t),e.promise}});var Gw=nn,Kw=rt,Jw=Dx,Qw=function(t,e){if(Gw(t),Kw(e)&&e.constructor===t)return e;var n=Jw.f(t);return(0,n.resolve)(e),n.promise},t_=Rn,e_=xx,n_=Lx.CONSTRUCTOR,r_=Qw,i_=lt("Promise"),o_=!n_;t_({target:"Promise",stat:!0,forced:!0},{resolve:function(t){return r_(o_&&this===i_?e_:this,t)}});var a_=Z,s_=Mt,u_=Dx,l_=bx,c_=zy;Rn({target:"Promise",stat:!0,forced:Zw},{allSettled:function(t){var e=this,n=u_.f(e),r=n.resolve,i=n.reject,o=l_((function(){var n=s_(e.resolve),i=[],o=0,a=1;c_(t,(function(t){var s=o++,u=!1;a++,a_(n,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||r(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var f_=Z,h_=Mt,d_=lt,v_=Dx,p_=bx,m_=zy,g_="No one promise resolved";Rn({target:"Promise",stat:!0,forced:Zw},{any:function(t){var e=this,n=d_("AggregateError"),r=v_.f(e),i=r.resolve,o=r.reject,a=p_((function(){var r=h_(e.resolve),a=[],s=0,u=1,l=!1;m_(t,(function(t){var c=s++,f=!1;u++,f_(r,e,t).then((function(t){f||l||(l=!0,i(t))}),(function(t){f||l||(f=!0,a[c]=t,--u||o(new n(a,g_)))}))})),--u||o(new n(a,g_))}));return a.error&&o(a.value),r.promise}});var y_=Rn,b_=xx,x_=u,w_=lt,__=A,E_=gb,S_=Qw,k_=b_&&b_.prototype;y_({target:"Promise",proto:!0,real:!0,forced:!!b_&&x_((function(){k_.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=E_(this,w_("Promise")),n=__(t);return this.then(n?function(n){return S_(e,t()).then((function(){return n}))}:t,n?function(n){return S_(e,t()).then((function(){throw n}))}:t)}});var O_=it.Promise,T_=Dx,j_=bx;Rn({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=T_.f(this),n=j_(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var R_=O_,A_=ov;!function(t){var e=uy.default,n=Pn,r=Jl,i=Xg,o=ry,a=ly,s=Kg,u=R_,l=A_,c=wd;function f(){t.exports=f=function(){return h},t.exports.__esModule=!0,t.exports.default=t.exports;var h={},d=Object.prototype,v=d.hasOwnProperty,p=n||function(t,e,n){t[e]=n.value},m="function"==typeof r?r:{},g=m.iterator||"@@iterator",y=m.asyncIterator||"@@asyncIterator",b=m.toStringTag||"@@toStringTag";function x(t,e,r){return n(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{x({},"")}catch(t){x=function(t,e,n){return t[e]=n}}function w(t,e,n,r){var o=e&&e.prototype instanceof S?e:S,a=i(o.prototype),s=new P(r||[]);return p(a,"_invoke",{value:N(t,n,s)}),a}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}h.wrap=w;var E={};function S(){}function k(){}function O(){}var T={};x(T,g,(function(){return this}));var j=o&&o(o(L([])));j&&j!==d&&v.call(j,g)&&(T=j);var R=O.prototype=S.prototype=i(T);function A(t){var e;a(e=["next","throw","return"]).call(e,(function(e){x(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,n){function r(i,o,a,s){var u=_(t[i],t,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==e(c)&&v.call(c,"__await")?n.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):n.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;p(this,"_invoke",{value:function(t,e){function o(){return new n((function(n,i){r(t,e,n,i)}))}return i=i?i.then(o,o):o()}})}function N(t,e,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=M(a,n);if(s){if(s===E)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=_(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===E)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function M(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),E;var i=_(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,E;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,E):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,E)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],a(t).call(t,I,this),this.reset(!0)}function L(t){if(t){var e=t[g];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(v.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:D}}function D(){return{value:void 0,done:!0}}return k.prototype=O,p(R,"constructor",{value:O,configurable:!0}),p(O,"constructor",{value:k,configurable:!0}),k.displayName=x(O,b,"GeneratorFunction"),h.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},h.mark=function(t){return s?s(t,O):(t.__proto__=O,x(t,b,"GeneratorFunction")),t.prototype=i(R),t},h.awrap=function(t){return{__await:t}},A(C.prototype),x(C.prototype,y,(function(){return this})),h.AsyncIterator=C,h.async=function(t,e,n,r,i){void 0===i&&(i=u);var o=new C(w(t,e,n,r),i);return h.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},A(R),x(R,b,"Generator"),x(R,g,(function(){return this})),x(R,"toString",(function(){return"[object Generator]"})),h.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return l(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},h.values=L,P.prototype={constructor:P,reset:function(t){var e;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(e=this.tryEntries).call(e,Z),!t)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 t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.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(t,e){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"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,E):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),Z(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;Z(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),E}},h}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports}(ay);var C_=(0,ay.exports)(),N_=C_;try{regeneratorRuntime=C_}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=C_:Function("r","regeneratorRuntime = r")(C_)}var M_=i(N_),I_={exports:{}},Z_=u((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),P_=u,L_=rt,D_=E,z_=Z_,$_=Object.isExtensible,B_=P_((function(){$_(1)}))||z_?function(t){return!!L_(t)&&(!z_||"ArrayBuffer"!=D_(t))&&(!$_||$_(t))}:$_,U_=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),F_=Rn,H_=b,q_=li,V_=rt,Y_=Qt,W_=Ke.f,X_=qi,G_=Wi,K_=B_,J_=U_,Q_=!1,tE=ie("meta"),eE=0,nE=function(t){W_(t,tE,{value:{objectID:"O"+eE++,weakData:{}}})},rE=I_.exports={enable:function(){rE.enable=function(){},Q_=!0;var t=X_.f,e=H_([].splice),n={};n[tE]=1,t(n).length&&(X_.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===tE){e(r,i,1);break}return r},F_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:G_.f}))},fastKey:function(t,e){if(!V_(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Y_(t,tE)){if(!K_(t))return"F";if(!e)return"E";nE(t)}return t[tE].objectID},getWeakData:function(t,e){if(!Y_(t,tE)){if(!K_(t))return!0;if(!e)return!1;nE(t)}return t[tE].weakData},onFreeze:function(t){return J_&&Q_&&K_(t)&&!Y_(t,tE)&&nE(t),t}};q_[tE]=!0;var iE=I_.exports,oE=Rn,aE=s,sE=iE,uE=u,lE=gn,cE=zy,fE=hb,hE=A,dE=rt,vE=Zo,pE=Ke.f,mE=oa.forEach,gE=N,yE=Ko.set,bE=Ko.getterFor,xE=function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),a=i?"set":"add",s=aE[t],u=s&&s.prototype,l={};if(gE&&hE(s)&&(o||u.forEach&&!uE((function(){(new s).entries().next()})))){var c=(r=e((function(e,n){yE(fE(e,c),{type:t,collection:new s}),null!=n&&cE(n,e[a],{that:e,AS_ENTRIES:i})}))).prototype,f=bE(t);mE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in u)||o&&"clear"==t||lE(c,t,(function(n,r){var i=f(this).collection;if(!e&&o&&!dE(n))return"get"==t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),o||pE(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(e,t,i,a),sE.enable();return vE(r,t,!1,!0),l[t]=r,oE({global:!0,forced:!0},l),o||n.setStrong(r,t,i),r},wE=uo,_E=Hi,EE=co,SE=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:wE(t,r,e[r],n);return t},kE=Ge,OE=hb,TE=W,jE=zy,RE=hl,AE=dl,CE=lb,NE=N,ME=iE.fastKey,IE=Ko.set,ZE=Ko.getterFor,PE={getConstructor:function(t,e,n,r){var i=t((function(t,i){OE(t,o),IE(t,{type:e,index:_E(null),first:void 0,last:void 0,size:0}),NE||(t.size=0),TE(i)||jE(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,a=ZE(e),s=function(t,e,n){var r,i,o=a(t),s=u(t,e);return s?s.value=n:(o.last=s={index:i=ME(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),NE?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},u=function(t,e){var n,r=a(t),i=ME(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return SE(o,{clear:function(){for(var t=a(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,NE?t.size=0:this.size=0},delete:function(t){var e=this,n=a(e),r=u(e,t);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),NE?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=a(this),r=kE(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),SE(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),NE&&EE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=ZE(e),o=ZE(r);RE(t,e,(function(t,e){IE(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?AE("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,AE(void 0,!0))}),n?"entries":"values",!n,!0),CE(e)}};xE("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),PE);var LE=i(it.Map),DE=oa.some;Rn({target:"Array",proto:!0,forced:!Qc("some")},{some:function(t){return DE(this,t,arguments.length>1?arguments[1]:void 0)}});var zE=Dc("Array").some,$E=ct,BE=zE,UE=Array.prototype,FE=i((function(t){var e=t.some;return t===UE||$E(UE,t)&&e===UE.some?BE:e})),HE=Dc("Array").keys,qE=sr,VE=Qt,YE=ct,WE=HE,XE=Array.prototype,GE={DOMTokenList:!0,NodeList:!0},KE=i((function(t){var e=t.keys;return t===XE||YE(XE,t)&&e===XE.keys||VE(GE,qE(t))?WE:e})),JE=to,QE=Math.floor,tS=function(t,e){var n=t.length,r=QE(n/2);return n<8?eS(t,e):nS(t,tS(JE(t,0,r),e),tS(JE(t,r),e),e)},eS=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},nS=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t},rS=tS,iS=ft.match(/firefox\/(\d+)/i),oS=!!iS&&+iS[1],aS=/MSIE|Trident/.test(ft),sS=ft.match(/AppleWebKit\/(\d+)\./),uS=!!sS&&+sS[1],lS=Rn,cS=b,fS=Mt,hS=Gt,dS=Vn,vS=vv,pS=Jr,mS=u,gS=rS,yS=Qc,bS=oS,xS=aS,wS=yt,_S=uS,ES=[],SS=cS(ES.sort),kS=cS(ES.push),OS=mS((function(){ES.sort(void 0)})),TS=mS((function(){ES.sort(null)})),jS=yS("sort"),RS=!mS((function(){if(wS)return wS<70;if(!(bS&&bS>3)){if(xS)return!0;if(_S)return _S<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){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++)ES.push({k:e+r,v:n})}for(ES.sort((function(t,e){return e.v-t.v})),r=0;r<ES.length;r++)e=ES[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));lS({target:"Array",proto:!0,forced:OS||!TS||!jS||!RS},{sort:function(t){void 0!==t&&fS(t);var e=hS(this);if(RS)return void 0===t?SS(e):SS(e,t);var n,r,i=[],o=dS(e);for(r=0;r<o;r++)r in e&&kS(i,e[r]);for(gS(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:pS(e)>pS(n)?1:-1}}(t)),n=dS(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)vS(e,r++);return e}});var AS=Dc("Array").sort,CS=ct,NS=AS,MS=Array.prototype,IS=i((function(t){var e=t.sort;return t===MS||CS(MS,t)&&e===MS.sort?NS:e})),ZS=Dc("Array").values,PS=sr,LS=Qt,DS=ct,zS=ZS,$S=Array.prototype,BS={DOMTokenList:!0,NodeList:!0},US=i((function(t){var e=t.values;return t===$S||DS($S,t)&&e===$S.values||LS(BS,PS(t))?zS:e})),FS=i(mc),HS=Dc("Array").entries,qS=sr,VS=Qt,YS=ct,WS=HS,XS=Array.prototype,GS={DOMTokenList:!0,NodeList:!0},KS=i((function(t){var e=t.entries;return t===XS||YS(XS,t)&&e===XS.entries||VS(GS,qS(t))?WS:e}));let JS;const QS=new Uint8Array(16);function tk(){if(!JS&&(JS="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!JS))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return JS(QS)}const ek=[];for(let t=0;t<256;++t)ek.push((t+256).toString(16).slice(1));var nk={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rk(t,e,n){if(nk.randomUUID&&!e&&!t)return nk.randomUUID();const r=(t=t||{}).random||(t.rng||tk)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return function(t,e=0){return ek[t[e+0]]+ek[t[e+1]]+ek[t[e+2]]+ek[t[e+3]]+"-"+ek[t[e+4]]+ek[t[e+5]]+"-"+ek[t[e+6]]+ek[t[e+7]]+"-"+ek[t[e+8]]+ek[t[e+9]]+"-"+ek[t[e+10]]+ek[t[e+11]]+ek[t[e+12]]+ek[t[e+13]]+ek[t[e+14]]+ek[t[e+15]]}(r)}function ik(t){return"string"==typeof t||"number"==typeof t}var ok=function(){function t(n){e(this,t),Sc(this,"delay",void 0),Sc(this,"max",void 0),Sc(this,"_queue",[]),Sc(this,"_timeout",null),Sc(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ec(t,[{key:"setOptions",value:function(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,n=0;n<e.length;n++){var r=e[n];r.original?t[r.name]=r.original:delete t[r.name]}this._extended=null}}},{key:"replace",value:function(t,e){var n=this,r=t[e];if(!r)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.queue({args:e,fn:r,context:this})}}},{key:"queue",value:function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var t=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Ep((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;Gd(t=Nv(e=this._queue).call(e,0)).call(t,(function(t){t.fn.apply(t.context||t.fn,t.args||[])}))}}],[{key:"extend",value:function(e,n){var r=new t(n);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.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:e[a]}),r.replace(e,a)}return r._extended={object:e,methods:i},r}}]),t}(),ak=function(){function t(){e(this,t),Sc(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Sc(this,"subscribe",t.prototype.on),Sc(this,"unsubscribe",t.prototype.off)}return Ec(t,[{key:"_trigger",value:function(t,e,n){var r,i;if("*"===t)throw new Error("Cannot trigger event *");Gd(r=Md(i=[]).call(i,Td(this._subscribers[t]),Td(this._subscribers["*"]))).call(r,(function(r){r(t,e,null!=n?n:null)}))}},{key:"on",value:function(t,e){"function"==typeof e&&this._subscribers[t].push(e)}},{key:"off",value:function(t,e){var n;this._subscribers[t]=df(n=this._subscribers[t]).call(n,(function(t){return t!==e}))}}]),t}();xE("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),PE);var sk,uk=i(it.Set),lk=i(oh);function ck(t,e){var n=void 0!==jd&&Sh(t)||t["@@iterator"];if(!n){if(Pd(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return fk(t,e);var r=Id(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Eh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fk(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function fk(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}sk=FS;var hk=function(){function t(n){e(this,t),Sc(this,"_pairs",void 0),this._pairs=n}return Ec(t,[{key:sk,value:M_.mark((function t(){var e,n,r,i,o;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ck(this._pairs),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=Od(n.value,2),i=r[0],o=r[1],t.next=7,[i,o];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"entries",value:M_.mark((function t(){var e,n,r,i,o;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ck(this._pairs),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=Od(n.value,2),i=r[0],o=r[1],t.next=7,[i,o];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"keys",value:M_.mark((function t(){var e,n,r,i;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ck(this._pairs),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=Od(n.value,1),i=r[0],t.next=7,i;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"values",value:M_.mark((function t(){var e,n,r,i;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ck(this._pairs),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=Od(n.value,2),i=r[1],t.next=7,i;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var t;return bf(t=Td(this._pairs)).call(t,(function(t){return t[0]}))}},{key:"toItemArray",value:function(){var t;return bf(t=Td(this._pairs)).call(t,(function(t){return t[1]}))}},{key:"toEntryArray",value:function(){return Td(this._pairs)}},{key:"toObjectMap",value:function(){var t,e=tp(null),n=ck(this._pairs);try{for(n.s();!(t=n.n()).done;){var r=Od(t.value,2),i=r[0],o=r[1];e[i]=o}}catch(t){n.e(t)}finally{n.f()}return e}},{key:"toMap",value:function(){return new LE(this._pairs)}},{key:"toIdSet",value:function(){return new uk(this.toIdArray())}},{key:"toItemSet",value:function(){return new uk(this.toItemArray())}},{key:"cache",value:function(){return new t(Td(this._pairs))}},{key:"distinct",value:function(t){var e,n=new uk,r=ck(this._pairs);try{for(r.s();!(e=r.n()).done;){var i=Od(e.value,2),o=i[0],a=i[1];n.add(t(a,o))}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"filter",value:function(e){var n=this._pairs;return new t(Sc({},FS,M_.mark((function t(){var r,i,o,a,s;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=ck(n),t.prev=1,r.s();case 3:if((i=r.n()).done){t.next=10;break}if(o=Od(i.value,2),a=o[0],s=o[1],!e(s,a)){t.next=8;break}return t.next=8,[a,s];case 8:t.next=3;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),r.e(t.t0);case 15:return t.prev=15,r.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[1,12,15,18]])}))))}},{key:"forEach",value:function(t){var e,n=ck(this._pairs);try{for(n.s();!(e=n.n()).done;){var r=Od(e.value,2),i=r[0];t(r[1],i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"map",value:function(e){var n=this._pairs;return new t(Sc({},FS,M_.mark((function t(){var r,i,o,a,s;return M_.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=ck(n),t.prev=1,r.s();case 3:if((i=r.n()).done){t.next=9;break}return o=Od(i.value,2),a=o[0],s=o[1],t.next=7,[a,e(s,a)];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),r.e(t.t0);case 14:return t.prev=14,r.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[1,11,14,17]])}))))}},{key:"max",value:function(t){var e=lk(this._pairs),n=e.next();if(n.done)return null;for(var r=n.value[1],i=t(n.value[1],n.value[0]);!(n=e.next()).done;){var o=Od(n.value,2),a=o[0],s=o[1],u=t(s,a);u>i&&(i=u,r=s)}return r}},{key:"min",value:function(t){var e=lk(this._pairs),n=e.next();if(n.done)return null;for(var r=n.value[1],i=t(n.value[1],n.value[0]);!(n=e.next()).done;){var o=Od(n.value,2),a=o[0],s=o[1],u=t(s,a);u<i&&(i=u,r=s)}return r}},{key:"reduce",value:function(t,e){var n,r=ck(this._pairs);try{for(r.s();!(n=r.n()).done;){var i=Od(n.value,2),o=i[0];e=t(e,i[1],o)}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"sort",value:function(e){var n=this;return new t(Sc({},FS,(function(){var t;return lk(IS(t=Td(n._pairs)).call(t,(function(t,n){var r=Od(t,2),i=r[0],o=r[1],a=Od(n,2),s=a[0],u=a[1];return e(o,u,i,s)})))})))}}]),t}();function dk(t,e){var n=zd(t);if(kh){var r=kh(t);e&&(r=df(r).call(r,(function(e){return Ih(t,e).enumerable}))),n.push.apply(n,r)}return n}function vk(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?Gd(n=dk(Object(i),!0)).call(n,(function(e){Sc(t,e,i[e])})):qh?Jh(t,qh(i)):Gd(r=dk(Object(i))).call(r,(function(e){Qh(t,e,Ih(i,e))}))}return t}function pk(t,e){var n=void 0!==jd&&Sh(t)||t["@@iterator"];if(!n){if(Pd(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return mk(t,e);var r=Id(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Eh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mk(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function mk(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var gk=function(t){ey(r,t);var n=function(t){var e=function(){if("undefined"==typeof Reflect||!Yg)return!1;if(Yg.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yg(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=oy(t);if(e){var i=oy(this).constructor;n=Yg(r,arguments,i)}else n=r.apply(this,arguments);return ny(this,n)}}(r);function r(t,i){var o;return e(this,r),Sc(Wg(o=n.call(this)),"flush",void 0),Sc(Wg(o),"length",void 0),Sc(Wg(o),"_options",void 0),Sc(Wg(o),"_data",void 0),Sc(Wg(o),"_idProp",void 0),Sc(Wg(o),"_queue",null),t&&!Pd(t)&&(i=t,t=[]),o._options=i||{},o._data=new LE,o.length=0,o._idProp=o._options.fieldId||"id",t&&t.length&&o.add(t),o.setOptions(i),o}return Ec(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=ok.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"===bc(t.queue)&&this._queue.setOptions(t.queue)))}},{key:"add",value:function(t,e){var n,r=this,i=[];if(Pd(t)){var o=bf(t).call(t,(function(t){return t[r._idProp]}));if(FE(o).call(o,(function(t){return r._data.has(t)})))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=t.length;a<s;a++)n=this._addItem(t[a]),i.push(n)}else{if(!t||"object"!==bc(t))throw new Error("Unknown dataType");n=this._addItem(t),i.push(n)}return i.length&&this._trigger("add",{items:i},e),i}},{key:"update",value:function(t,e){var n=this,r=[],i=[],o=[],a=[],s=this._idProp,u=function(t){var e=t[s];if(null!=e&&n._data.has(e)){var u=t,l=Yv({},n._data.get(e)),c=n._updateItem(u);i.push(c),a.push(u),o.push(l)}else{var f=n._addItem(t);r.push(f)}};if(Pd(t))for(var l=0,c=t.length;l<c;l++)t[l]&&"object"===bc(t[l])?u(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!t||"object"!==bc(t))throw new Error("Unknown dataType");u(t)}if(r.length&&this._trigger("add",{items:r},e),i.length){var f={items:i,oldData:o,data:a};this._trigger("update",f,e)}return Md(r).call(r,i)}},{key:"updateOnly",value:function(t,e){var n,r=this;Pd(t)||(t=[t]);var i=bf(n=bf(t).call(t,(function(t){var e=r._data.get(t[r._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}}))).call(n,(function(t){var e=t.oldData,n=t.update,i=e[r._idProp],o=function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Eg.apply(void 0,Md(e=[{},t]).call(e,r))}(e,n);return r._data.set(i,o),{id:i,oldData:e,updatedData:o}}));if(i.length){var o={items:bf(i).call(i,(function(t){return t.id})),oldData:bf(i).call(i,(function(t){return t.oldData})),data:bf(i).call(i,(function(t){return t.updatedData}))};return this._trigger("update",o,e),o.items}return[]}},{key:"get",value:function(t,e){var n=void 0,r=void 0,i=void 0;ik(t)?(n=t,i=e):Pd(t)?(r=t,i=e):i=t;var o,a=i&&"Object"===i.returnType?"Object":"Array",s=i&&df(i),u=[],l=void 0,c=void 0,f=void 0;if(null!=n)(l=this._data.get(n))&&s&&!s(l)&&(l=void 0);else if(null!=r)for(var h=0,d=r.length;h<d;h++)null==(l=this._data.get(r[h]))||s&&!s(l)||u.push(l);else for(var v,p=0,m=(c=Td(KE(v=this._data).call(v))).length;p<m;p++)f=c[p],null==(l=this._data.get(f))||s&&!s(l)||u.push(l);if(i&&i.order&&null==n&&this._sort(u,i.order),i&&i.fields){var g=i.fields;if(null!=n&&null!=l)l=this._filterFields(l,g);else for(var y=0,b=u.length;y<b;y++)u[y]=this._filterFields(u[y],g)}if("Object"==a){for(var x={},w=0,_=u.length;w<_;w++){var E=u[w];x[E[this._idProp]]=E}return x}return null!=n?null!==(o=l)&&void 0!==o?o:null:u}},{key:"getIds",value:function(t){var e=this._data,n=t&&df(t),r=t&&t.order,i=Td(KE(e).call(e)),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 f=0,h=a.length;f<h;f++)o.push(a[f][this._idProp])}else for(var d=0,v=i.length;d<v;d++){var p=i[d],m=this._data.get(p);null!=m&&n(m)&&o.push(m[this._idProp])}else if(r){for(var g=[],y=0,b=i.length;y<b;y++){var x=i[y];g.push(e.get(x))}this._sort(g,r);for(var w=0,_=g.length;w<_;w++)o.push(g[w][this._idProp])}else for(var E=0,S=i.length;E<S;E++){var k=i[E],O=e.get(k);null!=O&&o.push(O[this._idProp])}return o}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(t,e){var n=e&&df(e),r=this._data,i=Td(KE(r).call(r));if(e&&e.order)for(var o=this.get(e),a=0,s=o.length;a<s;a++){var u=o[a];t(u,u[this._idProp])}else for(var l=0,c=i.length;l<c;l++){var f=i[l],h=this._data.get(f);null==h||n&&!n(h)||t(h,f)}}},{key:"map",value:function(t,e){for(var n=e&&df(e),r=[],i=this._data,o=Td(KE(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(t(l,u))}return e&&e.order&&this._sort(r,e.order),r}},{key:"_filterFields",value:function(t,e){var n;return t?sf(n=Pd(e)?e:zd(e)).call(n,(function(e,n){return e[n]=t[n],e}),{}):t}},{key:"_sort",value:function(t,e){if("string"==typeof e){var n=e;IS(t).call(t,(function(t,e){var r=t[n],i=e[n];return r>i?1:r<i?-1:0}))}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");IS(t).call(t,e)}}},{key:"remove",value:function(t,e){for(var n=[],r=[],i=Pd(t)?t:[t],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},e),n}},{key:"_remove",value:function(t){var e;if(ik(t)?e=t:t&&"object"===bc(t)&&(e=t[this._idProp]),null!=e&&this._data.has(e)){var n=this._data.get(e)||null;return this._data.delete(e),--this.length,n}return null}},{key:"clear",value:function(t){for(var e,n=Td(KE(e=this._data).call(e)),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},t),n}},{key:"max",value:function(t){var e,n,r=null,i=null,o=pk(US(e=this._data).call(e));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[t];"number"==typeof s&&(null==i||s>i)&&(r=a,i=s)}}catch(t){o.e(t)}finally{o.f()}return r||null}},{key:"min",value:function(t){var e,n,r=null,i=null,o=pk(US(e=this._data).call(e));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[t];"number"==typeof s&&(null==i||s<i)&&(r=a,i=s)}}catch(t){o.e(t)}finally{o.f()}return r||null}},{key:"distinct",value:function(t){for(var e=this._data,n=Td(KE(e).call(e)),r=[],i=0,o=0,a=n.length;o<a;o++){for(var s=n[o],u=e.get(s)[t],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(t){var e=function(t,e){return null==t[e]&&(t[e]=rk()),t}(t,this._idProp),n=e[this._idProp];if(this._data.has(n))throw new Error("Cannot add item: item with id "+n+" already exists");return this._data.set(n,e),++this.length,n}},{key:"_updateItem",value:function(t){var e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+rp(t)+")");var n=this._data.get(e);if(!n)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,vk(vk({},n),t)),e}},{key:"stream",value:function(t){if(t){var e=this._data;return new hk(Sc({},FS,M_.mark((function n(){var r,i,o,a;return M_.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=pk(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(o=i.value,null==(a=e.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 hk(Sc({},FS,Hc(n=KS(this._data)).call(n,this._data)))}}]),r}(ak);function yk(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var bk=function(t){ey(r,t);var n=function(t){var e=function(){if("undefined"==typeof Reflect||!Yg)return!1;if(Yg.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Yg(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=oy(t);if(e){var i=oy(this).constructor;n=Yg(r,arguments,i)}else n=r.apply(this,arguments);return ny(this,n)}}(r);function r(t,i){var o,a;return e(this,r),Sc(Wg(a=n.call(this)),"length",0),Sc(Wg(a),"_listener",void 0),Sc(Wg(a),"_data",void 0),Sc(Wg(a),"_ids",new uk),Sc(Wg(a),"_options",void 0),a._options=i||{},a._listener=Hc(o=a._onEvent).call(o,Wg(a)),a.setData(t),a}return Ec(r,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(t){if(this._data){this._data.off&&this._data.off("*",this._listener);var e=this._data.getIds({filter:df(this._options)}),n=this._data.get(e);this._ids.clear(),this.length=0,this._trigger("remove",{items:e,oldData:n})}if(null!=t){this._data=t;for(var r=this._data.getIds({filter:df(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 gk;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var t=this._data.getIds({filter:df(this._options)}),e=Td(this._ids),n={},r=[],i=[],o=[],a=0,s=t.length;a<s;a++){var u=t[a];n[u]=!0,this._ids.has(u)||(r.push(u),this._ids.add(u))}for(var l=0,c=e.length;l<c;l++){var f=e[l],h=this._data.get(f);null==h?console.error("If you see this, report it please."):n[f]||(i.push(f),o.push(h),this._ids.delete(f))}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(t,e){if(null==this._data)return null;var n,r=null;ik(t)||Pd(t)?(r=t,n=e):n=t;var i=Yv({},this._options,n),o=df(this._options),a=n&&df(n);return o&&a&&(i.filter=function(t){return o(t)&&a(t)}),null==r?this._data.get(i):this._data.get(r,i)}},{key:"getIds",value:function(t){if(this._data.length){var e,n=df(this._options),r=null!=t?df(t):null;return e=r?n?function(t){return n(t)&&r(t)}:r:n,this._data.getIds({filter:e,order:t&&t.order})}return[]}},{key:"forEach",value:function(t,e){if(this._data){var n,r,i=df(this._options),o=e&&df(e);r=o?i?function(t){return i(t)&&o(t)}:o:i,Gd(n=this._data).call(n,t,{filter:r,order:e&&e.order})}}},{key:"map",value:function(t,e){if(this._data){var n,r,i=df(this._options),o=e&&df(e);return r=o?i?function(t){return i(t)&&o(t)}:o:i,bf(n=this._data).call(n,t,{filter:r,order:e&&e.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(t){var e;return this._data.stream(t||Sc({},FS,Hc(e=KE(this._ids)).call(e,this._ids)))}},{key:"dispose",value:function(){var t;null!==(t=this._data)&&void 0!==t&&t.off&&this._data.off("*",this._listener);var e,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(t,e){var n=void 0!==jd&&Sh(t)||t["@@iterator"];if(!n){if(Pd(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return yk(t,e);var r=Id(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Eh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yk(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Zd(r.prototype));try{for(o.s();!(e=o.n()).done;){var a=e.value;Qh(this,a,i)}}catch(t){o.e(t)}finally{o.f()}}},{key:"_onEvent",value:function(t,e,n){if(e&&e.items&&this._data){var r=e.items,i=[],o=[],a=[],s=[],u=[],l=[];switch(t){case"add":for(var c=0,f=r.length;c<f;c++){var h=r[c];this.get(h)&&(this._ids.add(h),i.push(h))}break;case"update":for(var d=0,v=r.length;d<v;d++){var p=r[d];this.get(p)?this._ids.has(p)?(o.push(p),u.push(e.data[d]),s.push(e.oldData[d])):(this._ids.add(p),i.push(p)):this._ids.has(p)&&(this._ids.delete(p),a.push(p),l.push(e.oldData[d]))}break;case"remove":for(var m=0,g=r.length;m<g;m++){var y=r[m];this._ids.has(y)&&(this._ids.delete(y),a.push(y),l.push(e.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}(ak);function xk(t,e){return"object"===bc(e)&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof Gd(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof bf(e)&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}t.DELETE=_g,t.DataSet=gk,t.DataStream=hk,t.DataView=bk,t.Queue=ok,t.createNewDataPipeFrom=function(t){return new Pf(t)},t.isDataSetLike=xk,t.isDataViewLike=function(t,e){return"object"===bc(e)&&null!==e&&t===e.idProp&&"function"==typeof Gd(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof bf(e)&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&xk(t,e.getDataSet())}}(e)}}]);
3
+ //# sourceMappingURL=869.c0b556ac.chunk.js.map