@mongodb-js/compass-aggregations 8.26.0 → 8.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1 -1
- package/dist/index.css +1176 -632
- package/dist/index.js +5 -5
- package/package.json +26 -26
package/dist/browser.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see browser.js.LICENSE.txt */
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AggregationsPlugin=t():e.AggregationsPlugin=t()}(self,(function(){return(()=>{var e={9388:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var s={},o=[],a=0;a<e.length;a++){var u=e[a],l=i.base?u[0]+i.base:u[0],c=s[l]||0,p="".concat(l," ").concat(c);s[l]=c+1;var h=n(p),d={css:u[1],media:u[2],sourceMap:u[3]};-1!==h?(t[h].references++,t[h].updater(d)):t.push({identifier:p,updater:r(d,i),references:1}),o.push(p)}return o}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=i(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var u=i(e,r),l=0;l<s.length;l++){var c=n(s[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}s=u}}},1914:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},370:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},6566:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},6053:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i=n.css,r=n.media,s=n.sourceMap;r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},6682:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4719:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Aggregations:()=>sv,CreateViewPlugin:()=>oy,DuplicateViewPlugin:()=>hy,PipelineStorage:()=>lr,StageEditor:()=>Dd,activate:()=>by,configureCreateViewStore:()=>my,configureStore:()=>Dv,deactivate:()=>Ey,default:()=>wy,metadata:()=>gy});var i=n(9497),r=n.n(i),s=n(23),o=n.n(s);function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}var l=o().shape({trySubscribe:o().func.isRequired,tryUnsubscribe:o().func.isRequired,notifyNestedSubs:o().func.isRequired,isSubscribed:o().func.isRequired}),c=o().shape({subscribe:o().func.isRequired,dispatch:o().func.isRequired,getState:o().func.isRequired});r().forwardRef;const p=function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",r=function(t){u(s,t);var r=s.prototype;function s(n,i){var r;return(r=t.call(this,n,i)||this)[e]=n.store,r}return r.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.render=function(){return i.Children.only(this.props.children)},s}(i.Component);return r.propTypes={store:c.isRequired,children:o().element.isRequired},r.childContextTypes=((t={})[e]=c.isRequired,t[n]=l,t),r}();function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}var m=n(3463),g=n.n(m),v=n(7677),y=n.n(v),x=n(3920),b=null,E={notify:function(){}},w=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=E}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=b,e=b},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},get:function(){return t},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==b&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=E)},e}(),C=void 0!==r().forwardRef,S=0,A={};function D(){}var _=Object.prototype.hasOwnProperty;function k(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(k(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!_.call(t,n[r])||!k(e[n[r]],t[n[r]]))return!1;return!0}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var O="function"==typeof Symbol&&Symbol.observable||"@@observable",R=function(){return Math.random().toString(36).substring(7).split("").join(".")},M={INIT:"@@redux/INIT"+R(),REPLACE:"@@redux/REPLACE"+R(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+R()}};function L(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function B(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(P(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(P(1));return n(B)(e,t)}if("function"!=typeof e)throw new Error(P(2));var r=e,s=t,o=[],a=o,u=!1;function l(){a===o&&(a=o.slice())}function c(){if(u)throw new Error(P(3));return s}function p(e){if("function"!=typeof e)throw new Error(P(4));if(u)throw new Error(P(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(P(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),o=null}}}function h(e){if(!L(e))throw new Error(P(7));if(void 0===e.type)throw new Error(P(8));if(u)throw new Error(P(9));try{u=!0,s=r(s,e)}finally{u=!1}for(var t=o=a,n=0;n<t.length;n++)(0,t[n])();return e}function d(e){if("function"!=typeof e)throw new Error(P(10));r=e,h({type:M.REPLACE})}function f(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(P(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[O]=function(){return this},e}return h({type:M.INIT}),(i={dispatch:h,subscribe:p,getState:c,replaceReducer:d})[O]=f,i}function j(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:M.INIT}))throw new Error(P(12));if(void 0===n(void 0,{type:M.PROBE_UNKNOWN_ACTION()}))throw new Error(P(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var i=!1,r={},a=0;a<o.length;a++){var u=o[a],l=n[u],c=e[u],p=l(c,t);if(void 0===p)throw t&&t.type,new Error(P(14));r[u]=p,i=i||p!==c}return(i=i||o.length!==Object.keys(e).length)?r:e}}function V(e,t){return function(){return t(e.apply(this,arguments))}}function z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(P(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},s=t.map((function(e){return e(r)}));return i=z.apply(void 0,s)(n.dispatch),N(N({},n),{},{dispatch:i})}}}function U(e){return function(t,n){var i=e(t,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function W(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function K(e,t){return function(t,n){n.displayName;var i=function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)};return i.dependsOnOwnProps=!0,i.mapToProps=function(t,n){i.mapToProps=e,i.dependsOnOwnProps=W(e);var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=W(r),r=i(t,n)),r},i}}function $(e,t,n){return d({},n,e,t)}const G=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var i,r=n.pure,s=n.areMergedPropsEqual,o=!1;return function(t,n,a){var u=e(t,n,a);return o?r&&s(u,i)||(i=u):(o=!0,i=u),i}}}(e):void 0},function(e){return e?void 0:function(){return $}}];function H(e,t,n,i){return function(r,s){return n(e(r,s),t(i,s),s)}}function J(e,t,n,i,r){var s,o,a,u,l,c=r.areStatesEqual,p=r.areOwnPropsEqual,h=r.areStatePropsEqual,d=!1;return function(r,f){return d?function(r,d){var f,m,g=!p(d,o),v=!c(r,s);return s=r,o=d,g&&v?(a=e(s,o),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):g?(e.dependsOnOwnProps&&(a=e(s,o)),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):v?(f=e(s,o),m=!h(f,a),a=f,m&&(l=n(a,u,o)),l):l}(r,f):(a=e(s=r,o=f),u=t(i,o),l=n(a,u,o),d=!0,l)}}function X(e,t,n){for(var i=t.length-1;i>=0;i--){var r=t[i](e);if(r)return r}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function Z(e,t){return e===t}const Y=(ee=(Q={}).connectHOC,te=void 0===ee?function(e,t){var n,r;void 0===t&&(t={});var s=t,o=s.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,p=s.methodName,m=void 0===p?"connectAdvanced":p,v=s.renderCountProp,b=void 0===v?void 0:v,E=s.shouldHandleStateChanges,_=void 0===E||E,k=s.storeKey,T=void 0===k?"store":k,F=s.withRef,I=void 0!==F&&F,N=f(s,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=T+"Subscription",O=S++,R=((n={})[T]=c,n[P]=l,n),M=((r={})[P]=l,r);return function(t){y()((0,x.isValidElementType)(t),"You must pass a component to the function returned by "+m+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",r=a(n),s=d({},N,{getDisplayName:a,methodName:m,renderCountProp:b,shouldHandleStateChanges:_,storeKey:T,withRef:I,displayName:r,wrappedComponentName:n,WrappedComponent:t}),o=function(n){function o(e,t){var i;return(i=n.call(this,e,t)||this).version=O,i.state={},i.renderCount=0,i.store=e[T]||t[T],i.propsMode=Boolean(e[T]),i.setWrappedInstance=i.setWrappedInstance.bind(h(h(i))),y()(i.store,'Could not find "'+T+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+T+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}u(o,n);var a=o.prototype;return a.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},a.componentDidMount=function(){_&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.componentWillReceiveProps=function(e){this.selector.run(e)},a.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=D,this.store=null,this.selector.run=D,this.selector.shouldComponentUpdate=!1},a.getWrappedInstance=function(){return y()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+m+"() call."),this.wrappedInstance},a.setWrappedInstance=function(e){this.wrappedInstance=e},a.initSelector=function(){var t=e(this.store.dispatch,s);this.selector=function(e,t){var n={run:function(i){try{var r=e(t.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},a.initSubscription=function(){if(_){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new w(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(A)):this.notifyNestedSubs()},a.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.addExtraProps=function(e){if(!(I||b||this.propsMode&&this.subscription))return e;var t=d({},e);return I&&(t.ref=this.setWrappedInstance),b&&(t[b]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},a.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return(0,i.createElement)(t,this.addExtraProps(e.props))},o}(i.Component);return C&&(o.prototype.UNSAFE_componentWillReceiveProps=o.prototype.componentWillReceiveProps,delete o.prototype.componentWillReceiveProps),o.WrappedComponent=t,o.displayName=r,o.childContextTypes=M,o.contextTypes=R,o.propTypes=R,g()(o,t)}}:ee,ie=void 0===(ne=Q.mapStateToPropsFactories)?[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:U((function(){return{}}))}]:ne,se=void 0===(re=Q.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:U((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?U((function(t){return function(e,t){if("function"==typeof e)return V(e,t);if("object"!=typeof e||null===e)throw new Error(P(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=V(r,t))}return n}(e,t)})):void 0}]:re,ae=void 0===(oe=Q.mergePropsFactories)?G:oe,le=void 0===(ue=Q.selectorFactory)?function(e,t){var n=t.initMapStateToProps,i=t.initMapDispatchToProps,r=t.initMergeProps,s=f(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,s),a=i(e,s),u=r(e,s);return(s.pure?J:H)(o,a,u,e,s)}:ue,function(e,t,n,i){void 0===i&&(i={});var r=i,s=r.pure,o=void 0===s||s,a=r.areStatesEqual,u=void 0===a?Z:a,l=r.areOwnPropsEqual,c=void 0===l?T:l,p=r.areStatePropsEqual,h=void 0===p?T:p,m=r.areMergedPropsEqual,g=void 0===m?T:m,v=f(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=X(e,ie,"mapStateToProps"),x=X(t,se,"mapDispatchToProps"),b=X(n,ae,"mergeProps");return te(le,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:b,pure:o,areStatesEqual:u,areOwnPropsEqual:c,areStatePropsEqual:h,areMergedPropsEqual:g},v))});var Q,ee,te,ne,ie,re,se,oe,ae,ue,le,ce=n(2779),pe=n.n(ce);const he=require("@mongodb-js/compass-components"),de=require("hadron-react-buttons");var fe=n(9388),me=n.n(fe),ge=n(6053),ve=n.n(ge),ye=n(1914),xe=n.n(ye),be=n(6566),Ee=n.n(be),we=n(370),Ce=n.n(we),Se=n(6682),Ae=n.n(Se),De=n(3981),_e={};_e.styleTagTransform=Ae(),_e.setAttributes=Ee(),_e.insert=xe().bind(null,"head"),_e.domAPI=ve(),_e.insertStyleElement=Ce(),me()(De.Z,_e);const ke=De.Z&&De.Z.locals?De.Z.locals:void 0;class Te extends i.PureComponent{static displayName="RestorePipelineButtonComponent";static propTypes={clickHandler:o().func.isRequired};render(){const e=pe()({btn:!0,"btn-xs":!0,"btn-default":!0,[ke["restore-pipeline-button"]]:!0});return r().createElement("div",{className:pe()(ke["restore-pipeline"])},r().createElement(de.TextButton,{text:"Open",className:e,clickHandler:this.props.clickHandler}))}}const Fe=Te;var Ie=n(1101),Ne={};Ne.styleTagTransform=Ae(),Ne.setAttributes=Ee(),Ne.insert=xe().bind(null,"head"),Ne.domAPI=ve(),Ne.insertStyleElement=Ce(),me()(Ie.Z,Ne);const Pe=Ie.Z&&Ie.Z.locals?Ie.Z.locals:void 0;class Oe extends i.PureComponent{static displayName="DeletePipelineButtonComponent";static propTypes={clickHandler:o().func.isRequired};render(){const e=pe()({btn:!0,"btn-xs":!0,"btn-default":!0,[Pe["delete-pipeline-button"]]:!0});return r().createElement("div",{className:pe()(Pe["delete-pipeline"])},r().createElement(de.IconButton,{title:"Delete",className:e,iconClassName:"fa fa-trash-o",clickHandler:this.props.clickHandler}))}}const Re=Oe;var Me=n(7866);Me.MongoLogManager;const Le=Me.MongoLogWriter,Be=Me.mongoLogId;var je=n(4283),Ve=n.n(je),ze=n(8957),qe=n.n(ze);function Ue(e,t,n){e?.callQuiet?.(t,n),"undefined"!=typeof process&&"function"==typeof process.emit&&process.emit(t,n)}function We(e){const t=Ve()?n(5727):null,i=new Le("",null,{write(e,n){Ue(t,"compass:log",{line:e}),n()},end(e){e()}}),r=async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.g?.hadronApp?.isFeatureEnabled("trackUsageStatistics");if(!r)return;const s={event:e,properties:i};"function"==typeof i&&(s.properties=await i()),Ue(t,"compass:track",s)},s=qe()(`mongodb-compass:${e.toLowerCase()}`);return i.on("log",(e=>{let{s:t,ctx:n,msg:i,attr:r}=e;s(i,r?{s:t,ctx:n,...r}:{s:t,ctx:n})})),{log:i.bindComponent(e),mongoLogId:Be,debug:s,track:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((()=>r(...t))).catch((e=>s("track failed",e)))}}}const Ke=We;var $e=n(2099),Ge={};Ge.styleTagTransform=Ae(),Ge.setAttributes=Ee(),Ge.insert=xe().bind(null,"head"),Ge.domAPI=ve(),Ge.insertStyleElement=Ce(),me()($e.Z,Ge);const He=$e.Z&&$e.Z.locals?$e.Z.locals:void 0,{track:Je}=We("COMPASS-AGGREGATIONS-UI");class Xe extends i.PureComponent{static displayName="SavePipelineCardComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,deletePipeline:o().func.isRequired,objectID:o().string.isRequired,name:o().string.isRequired};handleDelete=()=>{this.props.deletePipeline(this.props.objectID),Je("Aggregation Deleted",{id:this.props.objectID,screen:"aggregations"})};restoreClickHandler=()=>{this.props.restorePipelineFrom(this.props.objectID),this.props.restorePipelineModalToggle(1)};render(){return r().createElement("div",{className:pe()(He["save-pipeline-card"]),"data-pipeline-object-id":this.props.objectID},r().createElement("div",{className:pe()(He["save-pipeline-card-title"])},this.props.name),r().createElement(Fe,{clickHandler:this.restoreClickHandler}),r().createElement(Re,{clickHandler:this.handleDelete}))}}const Ze=Xe;var Ye=n(9593),Qe={};Qe.styleTagTransform=Ae(),Qe.setAttributes=Ee(),Qe.insert=xe().bind(null,"head"),Qe.domAPI=ve(),Qe.insertStyleElement=Ce(),me()(Ye.Z,Qe);const et=Ye.Z&&Ye.Z.locals?Ye.Z.locals:void 0;class tt extends i.Component{static displayName="SavePipelineComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,deletePipeline:o().func.isRequired,savedPipelinesListToggle:o().func.isRequired,savedPipeline:o().object.isRequired};handleSavedPipelinesClose=()=>{this.props.savedPipelinesListToggle(0)};render(){const e=this.props.savedPipeline.pipelines.map(((e,t)=>r().createElement(Ze,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,name:e.name,objectID:e.id,key:t}))),t=pe()({[et["save-pipeline"]]:!0,[et["save-pipeline-is-visible"]]:this.props.savedPipeline.isListVisible});return r().createElement("div",{className:t},r().createElement("div",{className:pe()(et["save-pipeline-header"])},r().createElement("div",{id:"saved-pipeline-header-title"},"Saved Pipelines"),r().createElement(de.IconButton,{title:"Close Saved Pipelines",className:"btn btn-xs btn-default",iconClassName:"fa fa-times",clickHandler:this.handleSavedPipelinesClose})),r().createElement("div",{className:pe()(et["save-pipeline-cards"])},e))}}const nt=tt,it=6e4,rt=1e5,st={$addFields:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/#pipe._S_addFields",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value."},$bucket:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucket/#pipe._S_bucket",tooltip:"Categorizes incoming documents into groups, called buckets, based on specified boundaries."},$bucketAuto:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#pipe._S_bucketAuto",tooltip:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible."},$collStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/collStats/#pipe._S_collStats",tooltip:"Returns statistics regarding a collection or view."},$count:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/count/#pipe._S_count",tooltip:"Returns a count of the number of documents at this stage of the aggregation pipeline."},$currentOp:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/#pipe._S_currentOp",tooltip:""},$densify:{link:"https://docs.mongodb.com/rapid/reference/operator/aggregation/densify",tooltip:"Creates new documents in a sequence of documents where certain values in a field are missing."},$documents:{link:"https://docs.mongodb.com/v5.1/reference/operator/aggregation/documents/#mongodb-pipeline-pipe.-documents",tooltip:"Returns literal documents from input values."},$facet:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/facet/#pipe._S_facet",tooltip:"Allows for multiple parallel aggregations to be specified."},$geoNear:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear",tooltip:"Returns documents based on proximity to a geospatial point."},$graphLookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#pipe._S_graphLookup",tooltip:"Performs a recursive search on a collection. To each output document, adds a new array field that contains the traversal results of the recursive search for that document."},$group:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/group/#pipe._S_group",tooltip:"Groups documents by a specified expression."},$indexStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/#pipe._S_indexStats",tooltip:"Returns statistics regarding the use of each index for the collection."},$limit:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/limit/#pipe._S_limit",tooltip:"Limits the number of documents that flow into subsequent stages."},$listLocalSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/#pipe._S_listLocalSessions",tooltip:""},$listSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listSessions/#pipe._S_listSessions",tooltip:""},$lookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#pipe._S_lookup",tooltip:"Performs a join between two collections."},$match:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/match/#pipe._S_match",tooltip:"Filters the document stream to allow only matching documents to pass through to subsequent stages."},$merge:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/merge/#pipe._S_merge",tooltip:"Merges the resulting documents into a collection, optionally overriding existing documents."},$out:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/out/#pipe._S_out",tooltip:"Writes the result of a pipeline to a new or existing collection."},$project:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/project/#pipe._S_project",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields."},$redact:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact",tooltip:"Restricts the content for each document based on information stored in the documents themselves."},$replaceRoot:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceRoot/#pipe._S_replaceRoot",tooltip:"Replaces a document with the specified embedded document."},$replaceWith:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/",tooltip:"Replaces a document with the specified embedded document."},$sample:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample",tooltip:"Randomly selects the specified number of documents from its input."},$search:{link:"https://docs.atlas.mongodb.com/reference/full-text-search/query-syntax/#pipe._S_search",tooltip:"Performs a full-text search on the specified field(s)."},$searchMeta:{link:"https://docs.atlas.mongodb.com/reference/atlas-search/query-syntax-dupl/#mongodb-pipeline-pipe.-searchMeta",tooltip:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query."},$set:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/set/#pipe._S_set",tooltip:"Adds new fields to documents."},$skip:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/skip/#pipe._S_skip",tooltip:"Skips a specified number of documents before advancing to the next stage."},$sort:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#pipe._S_sort",tooltip:"Reorders the document stream by a specified sort key and direction."},$sortByCount:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/#pipe._S_sortByCount",tooltip:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group."},$unset:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unset/",tooltip:"Removes or excludes fields from documents."},$unwind:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind",tooltip:"Outputs a new document for each element in a specified array. "}};var ot=n(6252),at={};at.styleTagTransform=Ae(),at.setAttributes=Ee(),at.insert=xe().bind(null,"head"),at.domAPI=ve(),at.insertStyleElement=Ce(),me()(ot.Z,at);const ut=ot.Z&&ot.Z.locals?ot.Z.locals:void 0;class lt extends i.PureComponent{static displayName="Settings";static propTypes={isAtlasDeployed:o().bool.isRequired,isCommenting:o().bool.isRequired,isExpanded:o().bool.isRequired,limit:o().number.isRequired,largeLimit:o().number.isRequired,maxTimeMS:o().number.isRequired,settings:o().object.isRequired,toggleSettingsIsExpanded:o().func.isRequired,toggleSettingsIsCommentMode:o().func.isRequired,setSettingsSampleSize:o().func.isRequired,setSettingsMaxTimeMS:o().func.isRequired,setSettingsLimit:o().func.isRequired,applySettings:o().func.isRequired,runStage:o().func.isRequired};onCancelClicked(e){e.preventDefault(),e.stopPropagation(),this.props.toggleSettingsIsExpanded()}onCommentModeClicked(){this.props.toggleSettingsIsCommentMode()}onSampleSizeChanged(e){this.props.setSettingsSampleSize(parseInt(e.currentTarget.value,10))}onMaxTimeoutChanged(e){this.props.setSettingsMaxTimeMS(parseInt(e.currentTarget.value,10))}onLimitChanged(e){this.props.setSettingsLimit(parseInt(e.currentTarget.value,10))}onApplyClicked(e){e.preventDefault(),e.stopPropagation(),this.props.applySettings(),this.props.runStage(0,!0),this.props.toggleSettingsIsExpanded()}renderLargeLimit(){if(!this.props.isAtlasDeployed){let e=this.props.largeLimit;return this.props.settings.isDirty&&(e=this.props.settings.limit),r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-limit"},"Limit"),r().createElement("div",{id:"aggregation-limit-description"},r().createElement(he.Description,null,"Limits input documents before $group, $bucket, and $bucketAuto stages. Set a limit to make the preview run faster."),r().createElement(he.Description,null,"Note: this setting is only applied for the document previews, it is not applied when the pipeline is run."))),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-limit","aria-describedby":"aggregation-limit-description",type:"number",min:"0",placeholder:rt,value:e,onChange:this.onLimitChanged.bind(this)})))}}renderFields(){let e=this.props.isCommenting,t=this.props.limit;return this.props.settings.isDirty&&(e=this.props.settings.isCommentMode,t=this.props.settings.sampleSize),r().createElement("div",{className:pe()(ut.body)},r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-comment-mode"},"Comment Mode"),r().createElement(he.Description,{id:"aggregation-comment-mode-description"},"When enabled, adds helper comments to each stage. Only applies to new stages.")),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-comment-mode","aria-describedby":"aggregation-comment-mode-description",type:"checkbox",checked:e,onChange:this.onCommentModeClicked.bind(this)}))),r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-sample-size"},"Number of Preview Documents"),r().createElement(he.Description,{id:"aggregation-sample-size-description"},"Specify the number of documents to show in the preview.")),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-sample-size","aria-describedby":"aggregation-sample-size-description",type:"number",min:"0",placeholder:10,value:t,onChange:this.onSampleSizeChanged.bind(this)}))),this.renderLargeLimit())}render(){return this.props.isExpanded?r().createElement("div",{className:pe()(ut.container)},r().createElement("div",{className:pe()(ut.header)},r().createElement("div",{className:pe()(ut["header-title"])},"Settings"),r().createElement("div",{className:pe()(ut["header-btn-group"])},r().createElement(de.TextButton,{id:"aggregations-settings-cancel",className:"btn btn-default btn-xs",text:"Cancel",clickHandler:this.onCancelClicked.bind(this)}),r().createElement(de.TextButton,{id:"aggregation-settings-apply",className:"btn btn-primary btn-xs",text:"Apply",clickHandler:this.onApplyClicked.bind(this)}))),this.renderFields()):null}}const ct=lt,{track:pt}=We("COMPASS-AGGREGATIONS-UI");class ht extends i.Component{static displayName="RestorePipelineModalComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,openPipelineById:o().func.isRequired,restorePipeline:o().object.isRequired};onRestorePipelineModalToggle=()=>{this.props.restorePipelineModalToggle(0)};openPipeline=()=>{const e=this.props.restorePipeline.pipelineObjectID;pt("Aggregation Opened",{id:e,screen:"aggregations"}),this.props.openPipelineById(e)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to open this pipeline?",open:this.props.restorePipeline.isModalVisible,onConfirm:this.openPipeline,onCancel:this.onRestorePipelineModalToggle,buttonText:"Open Pipeline",trackingId:"restore_pipeline_modal"},"Opening this project will abandon ",r().createElement("b",null,"unsaved")," changes to the current pipeline you are building.")}}const dt=ht;var ft=n(5287),mt={};mt.styleTagTransform=Ae(),mt.setAttributes=Ee(),mt.insert=xe().bind(null,"head"),mt.domAPI=ve(),mt.insertStyleElement=Ce(),me()(ft.Z,mt);const gt=ft.Z&&ft.Z.locals?ft.Z.locals:void 0;class vt extends i.PureComponent{static displayName="ImportPipelineComponent";static propTypes={isOpen:o().bool.isRequired,closeImport:o().func.isRequired,changeText:o().func.isRequired,createNew:o().func.isRequired,text:o().string.isRequired,error:o().string};renderError(){if(this.props.error)return r().createElement("div",{className:gt["import-pipeline-error"]},this.props.error)}render(){return r().createElement(he.ConfirmationModal,{title:"New Pipeline From Plain Text",open:this.props.isOpen,onConfirm:this.props.createNew,onCancel:this.props.closeImport,buttonText:"Create New",submitDisabled:""===this.props.text,trackingId:"import_pipeline_modal"},r().createElement("div",{className:gt["import-pipeline-note"]},"Supports MongoDB Shell syntax. Pasting a pipeline will create a new pipeline."),r().createElement("div",{className:gt["import-pipeline-editor"]},r().createElement(he.Editor,{variant:he.EditorVariant.Shell,text:this.props.text,onChangeText:this.props.changeText,options:{minLines:10},name:"import-pipeline-editor"})),this.renderError())}}const yt=vt;var xt=n(1570),bt={};bt.styleTagTransform=Ae(),bt.setAttributes=Ee(),bt.insert=xe().bind(null,"head"),bt.domAPI=ve(),bt.insertStyleElement=Ce(),me()(xt.Z,bt);const Et=xt.Z&&xt.Z.locals?xt.Z.locals:void 0;class wt extends i.PureComponent{static displayName="ConfirmImportPipelineComponent";static propTypes={isConfirmationNeeded:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,closeImport:o().func.isRequired,confirmNew:o().func.isRequired,runStage:o().func.isRequired};onConfirm=()=>{this.props.confirmNew(),this.props.isAutoPreviewing&&this.props.runStage(0,!0)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isConfirmationNeeded,onConfirm:this.onConfirm,onCancel:this.props.closeImport,buttonText:"Confirm",trackingId:"confirm_import_pipeline_modal"},r().createElement("div",{className:Et["confirm-import-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const Ct=wt;class St extends i.PureComponent{static displayName="SavingPipelineModalComponent";static propTypes={isOpen:o().bool.isRequired,isSaveAs:o().bool.isRequired,name:o().string.isRequired,savingPipelineCancel:o().func.isRequired,savingPipelineApply:o().func.isRequired,savingPipelineNameChanged:o().func.isRequired,saveCurrentPipeline:o().func.isRequired,clonePipeline:o().func.isRequired};onNameChanged(e){this.props.savingPipelineNameChanged(e.currentTarget.value)}onSubmit(e){e.preventDefault(),e.stopPropagation(),this.save()}save(){this.props.isSaveAs&&this.props.clonePipeline(),this.props.savingPipelineApply(),this.props.saveCurrentPipeline()}render(){const e=this.props.isSaveAs?"Save Pipeline As...":"Save Pipeline";return r().createElement(he.ConfirmationModal,{title:e,open:this.props.isOpen,onConfirm:this.save.bind(this),onCancel:this.props.savingPipelineCancel,buttonText:"Save",submitDisabled:""===this.props.name,trackingId:"save_pipeline_modal"},r().createElement("form",{onSubmit:this.onSubmit.bind(this)},r().createElement("input",{id:"save-pipeline-name",type:"text",value:this.props.name,onChange:this.onNameChanged.bind(this),className:"form-control",placeholder:"Untitled"})))}}const At=St;var Dt=n(3777),_t={};_t.styleTagTransform=Ae(),_t.setAttributes=Ee(),_t.insert=xe().bind(null,"head"),_t.domAPI=ve(),_t.insertStyleElement=Ce(),me()(Dt.Z,_t);const kt=Dt.Z&&Dt.Z.locals?Dt.Z.locals:void 0;class Tt extends i.PureComponent{static displayName="ConfirmNewPipelineComponent";static propTypes={isNewPipelineConfirm:o().bool.isRequired,setIsNewPipelineConfirm:o().func.isRequired,newPipeline:o().func.isRequired};onConfirm=()=>{this.props.newPipeline(),this.onClose()};onClose=()=>{this.props.setIsNewPipelineConfirm(!1)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isNewPipelineConfirm,onConfirm:this.onConfirm,onCancel:this.onClose,buttonText:"Confirm",trackingId:"confirm_new_pipeline_modal"},r().createElement("div",{className:kt["confirm-new-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const Ft=Tt;var It=n(4686),Nt={};Nt.styleTagTransform=Ae(),Nt.setAttributes=Ee(),Nt.insert=xe().bind(null,"head"),Nt.domAPI=ve(),Nt.insertStyleElement=Ce(),me()(It.Z,Nt);const Pt=It.Z&&It.Z.locals?It.Z.locals:void 0;n(7526),n(3354),n(5870),n(930),n(574),n(4116),n(3267),n(4614),n(9852),n(4306),n(6077),n(1072),n(183);const Ot=require("mongodb-ace-autocompleter"),Rt=require("mongodb-query-parser");var Mt=n.n(Rt),Lt=n(7386),Bt=n.n(Lt),jt=n(4935),Vt=n.n(jt);const zt="Stage must be a properly formatted document.";function qt(){const e=Mt()(...arguments);if(""===e)throw new Error(zt);return e}function Ut(e,t){const n=[];if("$project"!==e.stageOperator)return n;if($t(e))return n;if(!t){t={};try{const n=Bt()(e.stage);t[e.stageOperator]=qt(n)}catch(e){return n}}const i=t[e.stageOperator];return Object.keys(i).map((e=>{const t=i[e];t&&n.push({name:e,value:e,score:1,meta:JSON.stringify(t),version:"0.0.0"})})),n}function Wt(e){try{return qt(Bt()(e.stage)),{isValid:!0,syntaxError:null}}catch(e){return{isValid:!1,syntaxError:zt}}}function Kt(e){if($t(e))return{};const t={};try{const n=Bt()(e.stage);t[e.stageOperator]=qt(n)}catch(t){return e.syntaxError=zt,e.isValid=!1,e.previewDocuments=[],{}}return e.projections=Ut(e,t),e.isValid=!0,e.syntaxError=null,t}function $t(e){return!e.isEnabled||!e.stageOperator||""===e.stage}function Gt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{database:n}=Vt()(e),{stage:i,stageOperator:r}=t;let s;try{s=qt(i)}catch{s={}}if("$merge"===r){const e="string"==typeof s?s:s.into;return"object"==typeof e?`${e.db}.${e.coll}`:`${n}.${e}`}if("$out"===r){if(s.s3)return null;const e=s;return"object"==typeof e?`${e.db}.${e.coll}`:`${n}.${e}`}return null}var Ht=n(9752),Jt=n.n(Ht),Xt=n(345),Zt=n(594),Yt=n.n(Zt),Qt=n(6496),en=n.n(Qt),tn=n(6625),nn=n.n(tn);function rn(e){return e?.every((e=>e===Ot.ATLAS))}function sn(e){return!e?.outputStage||"true"!==process?.env?.HADRON_READONLY}const on=e=>e.map(Kt).filter((e=>Object.keys(e).length>0)),an="aggregations/id/CREATE_ID",un=()=>({type:an}),ln="aggregations/projections/PROJECTIONS_CHANGED",cn=[],pn=()=>({type:ln}),hn="aggregations/is-modified/SET_IS_MODIFIED",dn=!1,fn=e=>({type:hn,isModified:e});let mn;!function(e){e.AutoPreviewToggled="compass-aggregations/autoPreviewToggled"}(mn||(mn={}));const gn=!0,vn=e=>t=>{t({type:mn.AutoPreviewToggled,value:e}),e&&t(ti(0,!0))},{track:yn}=We("COMPASS-AGGREGATIONS-UI"),xn="aggregations/pipeline",bn=`${xn}/STAGE_ADDED`,En=`${xn}/STAGE_ADDED_AFTER`,wn=`${xn}/STAGE_CHANGED`,Cn=`${xn}/STAGE_COLLAPSE_TOGGLED`,Sn=`${xn}/STAGE_DELETED`,An=`${xn}/STAGE_MOVED`,Dn=`${xn}/STAGE_OPERATOR_SELECTED`,_n=`${xn}/STAGE_TOGGLED`,kn=`${xn}/STAGE_PREVIEW_UPDATED`,Tn=`${xn}/LOADING_STAGE_RESULTS`,Fn=(Object.freeze({$limit:10}),Object.freeze({$limit:rt}),["$collStats","$currentOp","$indexStats","$listLocalSessions","$listSessions"]),In=["$group","$bucket","$bucketAuto"],Nn="$out",Pn="$merge",On="$search",Rn="$searchMeta",Mn="$documents",Ln=()=>({id:(new Xt.ObjectId).toHexString(),stageOperator:"",stage:"",isValid:!0,isEnabled:!0,isExpanded:!0,isLoading:!1,isComplete:!1,previewDocuments:[],syntaxError:null,error:null,projections:[]}),Bn=[Ln()],jn=e=>e.map((e=>Object.assign({},e))),Vn=(e,t,n)=>{const i=((e,t)=>Ot.STAGE_OPERATORS.find((n=>n.name===e&&n.env.includes(t))))(e,n),r=(i||{}).snippet||"{\n \n}",s=(i||{}).comment||"";return(t?`${s}${r}`:r).replace(/\${[0-9]+:?([a-z0-9.()]+)?}/gi,(function(e,t){return t??""}))},zn={};zn[wn]=(e,t)=>{const n=jn(e);n[t.index].stage=t.stage,n[t.index].isComplete=!1;const{isValid:i,syntaxError:r}=Wt(n[t.index]);return n[t.index].isValid=i,n[t.index].syntaxError=r,n},zn[bn]=e=>{const t=jn(e),n={...Ln()};return t.push(n),t},zn[En]=(e,t)=>{const n=jn(e),i={...Ln()};return n.splice(Number(t.index)+1,0,i),n},zn[Sn]=(e,t)=>{const n=jn(e);return n.splice(t.index,1),n},zn[An]=(e,t)=>{const n=jn(e);return n.splice(t.toIndex,0,n.splice(t.fromIndex,1)[0]),n},zn[Dn]=(e,t)=>{const n=t.stageOperator,i=e[t.index];if(n===i.stageOperator)return e;let r;var s,o;s=i,o=t.env,r=s.stageOperator&&s.stage&&Bt()(s.stage)!==Vn(s.stageOperator,!1,o)?i.stage:Vn(n,t.isCommenting,t.env);const a=jn(e);a[t.index].stageOperator=n,a[t.index].stage=r,a[t.index].isExpanded=!0,a[t.index].isComplete=!1,a[t.index].previewDocuments=[],a[t.index].isMissingAtlasOnlyStageSupport=!(![On,Rn,Mn].includes(n)||t.env===Ot.ADL||t.env===Ot.ATLAS);const{isValid:u,syntaxError:l}=Wt(a[t.index]);return a[t.index].isValid=u,a[t.index].syntaxError=l,a[t.index].error=null,a},zn[_n]=(e,t)=>{const n=jn(e);return n[t.index].isEnabled=!n[t.index].isEnabled,n},zn[Cn]=(e,t)=>{const n=jn(e);return n[t.index].isExpanded=!n[t.index].isExpanded,n},zn[kn]=(e,t)=>{const n=jn(e);return[On,Rn,Mn].includes(n[t.index].stageOperator)&&t.env!==Ot.ADL&&t.env!==Ot.ATLAS&&t.error&&(40324===t.error.code||31082===t.error.code)?(n[t.index].previewDocuments=[],n[t.index].error=null,n[t.index].isMissingAtlasOnlyStageSupport=!0):(n[t.index].previewDocuments=null===t.error||void 0===t.error?t.documents:[],n[t.index].error=t.error?t.error.message:null,n[t.index].isMissingAtlasOnlyStageSupport=!1),n[t.index].isLoading=!1,n[t.index].isComplete=t.isComplete,n},zn[Tn]=(e,t)=>{const n=jn(e);return n[t.index].isLoading=!0,n},zn[mn.AutoPreviewToggled]=(e,t)=>!1===t.value?jn(e).map((e=>(e.error=null,e))):e;const qn=()=>(e,t)=>{const{pipeline:n}=t();yn("Aggregation Edited",{num_stages:n.length,stage_action:"stage_added",stage_name:null}),e({type:bn})},Un=(e,t,n,i,r)=>({type:kn,documents:e,index:t,error:n,isComplete:i,env:r}),Wn=e=>({type:Tn,index:e}),Kn=(e,t)=>{const n=e.inputDocuments.count,i=e.largeLimit||rt;return e.pipeline.reduce(((r,s,o)=>(o<=t&&s.isEnabled&&(("N/A"===n&&e.sample||n>i&&In.includes(s.stageOperator)&&e.sample)&&r.push({$limit:i}),r.push(s.executor||Kt(s))),r)),[])},$n=(e,t)=>{let n=!1;return Gn.get(e)?.(),Gn.set(e,(()=>{n=!0})),e=>{n||t(e)}},Gn=new Map,Hn=new Map,Jn=(e,t,n,i,r)=>{const s=i().pipeline[r];s.executor=Kt(s),s.isValid&&s.isEnabled&&s.stageOperator&&s.stageOperator!==Nn&&s.stageOperator!==Pn?ei(e,t,n,i,r):n(Un([],r,null,!1,i().env))},Xn=e=>{if(Hn.has(e))return Hn.get(e);{const t=Yt()(Jn,750,{leading:!1,trailing:!0});return Hn.set(e,t),t}},Zn=function(e,t,n,i,r){let s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const o=`${i().aggregationWorkspaceId}::${r}`,a=$n(o,n),u=Xn(o);if(s)return u.cancel(),void Jn(e,t,a,i,r);u(e,t,a,i,r)},Yn=e=>(t,n)=>{const{aggregationWorkspaceId:i}=n(),r="number"==typeof e?t=>t===`${i}::${String(e)}`:e=>e.startsWith(`${i}::`);for(const[e,t]of Hn.entries())r(e)&&(t.cancel(),Hn.delete(e));for(const[e,t]of Gn.entries())r(e)&&(t(),Gn.delete(e))},Qn=(e,t,n,i,r,s)=>{const o={maxTimeMS:r().maxTimeMS??it,allowDiskUse:!0,collation:r().collationString.value??void 0};t.aggregate(n,e,o,((e,t)=>{if(e)return i(Un([],s,e,!1,r().env));t.toArray(((e,n)=>{i(Un(n||[],s,e,!0,r().env)),t.close(),i((0,Ht.globalAppRegistryEmit)("agg-pipeline-executed",{id:r().id,numStages:r().pipeline.length,stageOperators:r().pipeline.map((e=>e.stageOperator))}))}))}))},ei=(e,t,n,i,r)=>{n(Wn(r));const s=((e,t)=>{const n=Kn(e,t),i=e.pipeline[e.pipeline.length-1];return n.length>0&&!Fn.includes(i.stageOperator)&&n.push({$limit:e.limit||10}),n})(i(),r);Qn(s,e,t,n,i,r)},ti=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(n,i)=>{const r=i();if(!r.autoPreview)return;if(e>=r.pipeline.length)return void n(Yn(e));""===r.id&&n(un());const{dataService:s}=r.dataService;if(s){const o=r.namespace;for(let a=e;a<r.pipeline.length;a++)Zn(s,o,n,i,a,t)}}},ni="PromiseCancelledError";class ii extends Error{name=ni}const ri=()=>new ii("The operation was cancelled.");const{log:si,mongoLogId:oi}=Ke("compass-aggregations"),ai={promoteValues:!1,allowDiskUse:!0,bsonRegExp:!0};async function ui(e){let{dataService:t,signal:n,namespace:i,pipeline:r,options:s,skip:o,limit:a}=e;if(n.aborted)return Promise.reject(ri());const u=t.startSession("CRUD"),l=t.aggregate(i,r.concat(o?[{$skip:o}]:[]).concat(a?[{$limit:a}]:[]),{...ai,...s,session:u}),c=()=>{Promise.all([l.close(),t.killSessions(u)]).catch((e=>{si.warn(oi(1001000105),"Aggregations","Attempting to kill the session failed",{error:e.message})}))};let p;n.addEventListener("abort",c,{once:!0});try{p=await async function(e,t){if(t.aborted)return Promise.reject(ri());const n=new AbortController,i=function(e,t){if(e.aborted)return Promise.reject(ri());let n;const i=new Promise((function(e,t){n=t})),r=()=>{t.removeEventListener("abort",s),n(ri())},s=()=>{e.removeEventListener("abort",r)};return e.addEventListener("abort",r,{once:!0}),t.addEventListener("abort",s,{once:!0}),i}(t,n.signal);try{return await Promise.race([i,e])}finally{t.aborted||n.abort()}}(l.toArray(),n)}finally{n.removeEventListener("abort",c),p=p||[]}return p}const{log:li,mongoLogId:ci,track:pi}=We("COMPASS-AGGREGATIONS-UI");let hi;!function(e){e.AggregationStarted="compass-aggregations/aggregationStarted",e.AggregationFinished="compass-aggregations/aggregationFinished",e.AggregationFailed="compass-aggregations/aggregationFailed",e.AggregationCancelledByUser="compass-aggregations/aggregationCancelledByUser",e.LastPageReached="compass-aggregations/lastPageReached"}(hi||(hi={}));const di={documents:[],page:1,limit:20,isLast:!1,loading:!1},fi=()=>(e,t)=>{pi("Aggregation Canceled");const{aggregation:{abortController:n}}=t();mi(n),e({type:hi.AggregationCancelledByUser})},mi=e=>{e?.abort()},gi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return async(t,n)=>{const{id:i,pipeline:r,namespace:s,maxTimeMS:o,dataService:{dataService:a},aggregation:{limit:u,abortController:l},collationString:{value:c}}=n();if(a){mi(l);try{const n=new AbortController,l=n.signal;t({type:hi.AggregationStarted,abortController:n});const p=on(r),h={maxTimeMS:o??it,collation:c??void 0},d=p[p.length-1]??{},f=["$merge","$out"].includes(Object.keys(d)[0]),m=await ui({dataService:a,signal:l,namespace:s,pipeline:p,options:h,...!f&&{skip:(e-1)*u,limit:u}});f&&t((0,Ht.globalAppRegistryEmit)("agg-pipeline-out-executed",{id:i})),0===m.length?t({type:hi.LastPageReached,page:e}):t({type:hi.AggregationFinished,documents:m,page:e,isLast:m.length<u})}catch(n){if(n.name===ni)return;if(n.code)return t({type:hi.AggregationFailed,error:n.message,page:e}),"MaxTimeMSExpired"===n.codeName&&pi("Aggregation Timed Out",{max_time_ms:o??null}),void li.warn(ci(1001000106),"Aggregations","Failed to run aggregation",{message:n.message});throw n}}}};let vi;!function(e){e.CountStarted="compass-aggregations/countStarted",e.CountFinished="compass-aggregations/countFinished",e.CountFailed="compass-aggregations/countFailed"}(vi||(vi={}));const yi={loading:!1};let xi;!function(e){e.WorkspaceChanged="compass-aggregations/workspaceChanged"}(xi||(xi={}));const bi="builder",Ei=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),wi=(0,he.css)({padding:0}),Ci=(0,he.css)({border:"none",padding:0,backgroundColor:"transparent",span:{backgroundImage:"none !important"}}),Si=Y((e=>{let{pipeline:t,workspace:n}=e;return{stages:t.filter((e=>e.isEnabled)).map((e=>{let{stageOperator:t}=e;return t})).filter(Boolean),showAddNewStage:0===t.length,isResultsMode:"results"===n}}),{onStageAdded:qn,onChangeWorkspace:e=>t=>{"builder"===e&&(t(fi()),t(((e,t)=>{const{countDocuments:{abortController:n}}=t();n?.abort()}))),t({type:xi.WorkspaceChanged,view:e})}})((e=>{let{isResultsMode:t,stages:n,showAddNewStage:i,onStageAdded:s,onChangeWorkspace:o}=e;return r().createElement("div",{className:Ei,"data-testid":"toolbar-pipeline-stages"},0===n.length?r().createElement(he.Description,{className:(0,he.cx)(wi)},"Your pipeline is currently empty.",i&&r().createElement(r().Fragment,null," ","To get started select the ",r().createElement(he.Link,{className:Ci,as:"button",onClick:()=>s(),hideExternalIcon:!0,"data-testid":"pipeline-toolbar-add-stage-button"},"first stage."))):r().createElement(he.Pipeline,{size:"small"},n.map(((e,t)=>r().createElement(he.Stage,{key:`${t}-${e}`},e)))),t&&r().createElement(he.Button,{"data-testid":"pipeline-toolbar-edit-button",variant:"primaryOutline",size:"small",onClick:()=>o("builder"),leftGlyph:r().createElement(he.Icon,{glyph:"Edit"})},"Edit"))})),{track:Ai,debug:Di}=We("COMPASS-AGGREGATIONS-UI"),_i=null,ki="aggregations/update-view/ERROR_UPDATING_VIEW",Ti="aggregations/update-view/DISMISS_VIEW_UPDATE_ERROR",Fi=e=>({type:ki,error:`${e}`}),Ii=()=>({type:Ti}),Ni=()=>(e,t)=>{e(Ii());const n=t(),i=n.dataService.dataService,r=n.editViewName,s=n.pipeline.map((e=>e.executor||Kt(e))),o={viewOn:Vt()(n.namespace).collection,pipeline:s};try{Di("calling data-service.updateCollection",r),i.updateCollection(r,o,(t=>{if(t)return Di("error updating view",t),void e(Fi(t));e((0,Ht.globalAppRegistryEmit)("refresh-data")),Ai("View Updated",{num_stages:s.length}),e((0,Ht.globalAppRegistryEmit)("compass:aggregations:update-view",{numStages:s.length}));const i={namespace:r,isReadonly:!0,sourceName:n.namespace,editViewName:null,sourceReadonly:n.isReadonly,sourceViewOn:n.sourceName,sourcePipeline:s};Di("selecting namespace",i),e((0,Ht.globalAppRegistryEmit)("select-namespace",i))}))}catch(t){Di("Unexpected error updating view",t),e(Fi(t))}};var Pi=n(4208),Oi=n.n(Pi);const Ri=e=>{const t=e.stages[0],n=(0,Pi.getStageCursorKey)(t);if(!n)throw new Error("Can not find a cursor stage.");return Li(t[n])},Mi=e=>{const t=Object.keys(e.shards)[0],n=e.shards[t];return n.stages?Ri(n):Li(n)},Li=e=>e.queryPlanner,Bi=e=>e.queryPlanner.winningPlan.shards[0],ji=e=>{const t=e.stages[0],n=(0,Pi.getStageCursorKey)(t);if(!n)throw new Error("Can not find a cursor stage.");const i=e.stages[e.stages.length-1],r=zi(t[n]);return r.nReturned=i.nReturned,r.stageIndexes=Ui(e.stages),r.executionTimeMillis=function(e,t){const[,...n]=t;return e.executionTimeMillis+qi(n,"executionTimeMillisEstimate")}(r,e.stages),r},Vi=e=>{const t=[];let n=[];for(const i in e.shards){const r=e.shards[i].stages?ji(e.shards[i]):zi(e.shards[i]);t.push({shardName:i,...r}),n=n.concat(Ui(e.shards[i].stages??[],i))}const i=qi(t,"nReturned"),r=qi(t,"executionTimeMillis"),s=qi(t,"totalKeysExamined"),o=qi(t,"totalDocsExamined");return{nReturned:i,executionTimeMillis:r,totalKeysExamined:s,totalDocsExamined:o,allPlansExecution:[],executionSuccess:!0,stageIndexes:n,executionStages:{stage:1===t.length?"SINGLE_SHARD":"SHARD_MERGE",nReturned:i,executionTimeMillis:r,totalKeysExamined:s,totalDocsExamined:o,shards:t}}},zi=e=>e.executionStats;function qi(e,t){return e.reduce(((e,n)=>e+Number(n[t]??0)),0)}function Ui(e,t){return e.reduce(((e,t)=>e.concat(t?.indexesUsed??[])),[]).map((e=>({index:e,shard:t??null})))}const Wi=Symbol("ExplainPlan.kParent");class Ki{constructor(e){const t=Oi()(e),n=(e=>(0,Pi.isAggregationExplain)(e)?(e=>(0,Pi.isShardedAggregationExplain)(e)?Vi(e):ji(e))(e):zi(e))(t);Ki.addParentStages(n.executionStages);const i=(e=>{const t=(0,Pi.isAggregationExplain)(e)?(e=>(0,Pi.isShardedAggregationExplain)(e)?Mi(e):Ri(e))(e):(e=>(0,Pi.isShardedFindExplain)(e)?Bi(e):Li(e))(e);return{namespace:t.namespace,parsedQuery:t.parsedQuery}})(t),r=n?.executionStages?.shards?.[0]??n;this.executionStats=n,this.namespace=i.namespace,this.parsedQuery=i.parsedQuery,this.executionSuccess=r.executionSuccess,this.nReturned=n.nReturned,this.executionTimeMillis=n.executionTimeMillis,this.totalKeysExamined=n.totalKeysExamined,this.totalDocsExamined=n.totalDocsExamined,this.originalExplainData=e}get usedIndexes(){const e=this.findAllStagesByName("IXSCAN"),t=this.findStageByName("IDHACK"),n=this.executionStats.stageIndexes??[];for(const i of[...e,t]){if(!i)continue;let e=null;if(this.isSharded)for(const t of Ki.getParentStages(i))if("string"==typeof t.shardName){e=t.shardName;break}const r=i===t?"_id_":i.indexName;n.push({index:r,shard:e})}if(this.isSharded)for(const e of this.executionStats.executionStages.shards)n.some((t=>t.shard===e.shardName))||n.push({index:null,shard:e.shardName});return n.filter(((e,t,n)=>n.findIndex((t=>t.index===e.index&&t.shard===e.shard))===t))}get isCovered(){return!(this.totalDocsExamined>0)&&"FETCH"!==this.findStageByName("IXSCAN")?.parentName}get isMultiKey(){return this.findAllStagesByName("IXSCAN").some((e=>e.isMultiKey))}get inMemorySort(){return 0!==this.findAllStagesByName("SORT").length}get isCollectionScan(){return null!==this.findStageByName("COLLSCAN")}get isSharded(){return!!this.executionStats.executionStages.shards}get numShards(){return this.isSharded?this.executionStats.executionStages.shards.length:0}findStageByName(e,t){for(const n of this._getStageIterator(t))if(n.stage===e)return n;return null}findAllStagesByName(e,t){return[...this._getStageIterator(t)].filter((t=>t.stage===e))}*_getStageIterator(e){const t=e??this.executionStats.executionStages;yield t;for(const e of Ki.getChildStages(t))yield*this._getStageIterator(e)}static*getChildStages(e){e.inputStage&&(yield e.inputStage),e.executionStages&&(yield e.executionStages),e.innerStage&&(yield e.innerStage),e.outerStage&&(yield e.outerStage),e.thenStage&&(yield e.thenStage),e.elseStage&&(yield e.elseStage),e.shards&&(yield*e.shards),e.inputStages&&(yield*e.inputStages)}static addParentStages(e){e[Wi]=null;for(const t of Ki.getChildStages(e))Ki.addParentStages(t),t[Wi]=e}static*getParentStages(e){let t=e;for(;t=t?.[Wi];)yield t}}const{log:$i,mongoLogId:Gi,track:Hi}=We("COMPASS-AGGREGATIONS-UI");let Ji;!function(e){e.ExplainStarted="compass-aggregations/explainStarted",e.ExplainFinished="compass-aggregations/explainFinished",e.ExplainFailed="compass-aggregations/explainFailed",e.ExplainCancelled="compass-aggregations/explainCancelled"}(Ji||(Ji={}));const Xi={isLoading:!1,isModalOpen:!1},Zi=()=>(e,t)=>{const{explain:{abortController:n}}=t();n?.abort(),e({type:Ji.ExplainCancelled})},Yi=function(e,t){return t.filter((e=>e.index)).map((t=>{const n=e.find((e=>e.name===t.index));return{name:t.index,shard:t.shard,key:n?.key??{}}})).filter(Boolean)},Qi=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),er={onUpdateView:Ni,onRunAggregation:()=>(e,t)=>{const{pipeline:n}=t();return pi("Aggregation Executed",(()=>({num_stages:on(n).length}))),e(gi())},onExportAggregationResults:()=>(e,t)=>{const{pipeline:n,namespace:i,maxTimeMS:r,countDocuments:{count:s},collationString:{value:o}}=t(),a=on(n),u={maxTimeMS:r??it,allowDiskUse:!0,collation:o??void 0};e((0,Ht.globalAppRegistryEmit)("open-export",{namespace:i,aggregation:{stages:a,options:u},count:s}))},onExplainAggregation:()=>async(e,t)=>{const{isDataLake:n,pipeline:i,namespace:r,maxTimeMS:s,dataService:{dataService:o},indexes:a,collationString:{value:u}}=t();if(o)try{const t=new AbortController,l=t.signal;e({type:Ji.ExplainStarted,abortController:t});const c={maxTimeMS:s??it,allowDiskUse:!0,collation:u??void 0},p=on(i),h=((e,t)=>{if(t)return"queryPlannerExtended";const n=e[e.length-1]??{};return Object.prototype.hasOwnProperty.call(n,"$out")||Object.prototype.hasOwnProperty.call(n,"$merge")?"queryPlanner":"allPlansExecution"})(p,n),d=await o.explainAggregate(r,p,c,{abortSignal:l,explainVerbosity:h}),f={plan:d};try{const{nReturned:t,executionTimeMillis:n,usedIndexes:i}=new Ki(d),r={executionTimeMillis:n,nReturned:t,indexes:Yi(a,i)};f.stats=r}catch(e){$i.warn(Gi(1001000137),"Explain","Failed to parse aggregation explain",{message:e.message})}finally{Hi("Aggregation Explained",{num_stages:p.length,index_used:f.stats?.indexes?.length??0}),e({type:Ji.ExplainFinished,explain:f})}}catch(t){o.isOperationCancelledError(t)||(e({type:Ji.ExplainFailed,error:t.message}),$i.error(Gi(1001000138),"Explain","Failed to run aggregation explain",{message:t.message}))}}},tr=Y((e=>{let{pipeline:t,editViewName:n,isModified:i}=e;const r=t.filter((e=>!$t(e))),s=r[r.length-1],o=["$merge","$out"].includes(s?.stageOperator),a=r.some((e=>!e.isValid||Boolean(e.error))),u=0===t.length;return{isRunButtonDisabled:a||u,isExplainButtonDisabled:a,isExportButtonDisabled:o||a||u,showUpdateViewButton:Boolean(n),isUpdateViewButtonDisabled:!i||a||u}}),er)((e=>{let{isOptionsVisible:t,showRunButton:n,isRunButtonDisabled:i,showExportButton:s,isExportButtonDisabled:o,showUpdateViewButton:a,isUpdateViewButtonDisabled:u,isExplainButtonDisabled:l,showExplainButton:c,onUpdateView:p,onRunAggregation:h,onToggleOptions:d,onExportAggregationResults:f,onExplainAggregation:m}=e;return r().createElement("div",{className:Qi},a&&r().createElement(he.Button,{"aria-label":"Update view","data-testid":"pipeline-toolbar-update-view-aggregation-button",variant:"primary",size:"small",onClick:p,disabled:u},"Update view"),c&&r().createElement(he.Button,{"aria-label":"Explain aggregation","data-testid":"pipeline-toolbar-explain-aggregation-button",variant:"default",size:"small",onClick:m,disabled:l},"Explain"),!a&&s&&r().createElement(he.Button,{"aria-label":"Export aggregation","data-testid":"pipeline-toolbar-export-aggregation-button",variant:"default",size:"small",onClick:f,disabled:o},"Export"),!a&&n&&r().createElement(he.Button,{"aria-label":"Run aggregation","data-testid":"pipeline-toolbar-run-button",variant:"primary",size:"small",onClick:h,disabled:i},"Run"),r().createElement(he.MoreOptionsToggle,{isExpanded:!!t,"aria-controls":"pipeline-options",id:"pipeline-toolbar-options","data-testid":"pipeline-toolbar-options-button",onToggleOptions:d}))})),nr=()=>{const{remote:e}=n(5840),t=n(5315),i=process.env.MONGODB_COMPASS_AGGREGATIONS_TEST_BASE_PATH||e.app.getPath("userData");return t.join(i,"SavedPipelines")};var ir=n(2048),rr=n.n(ir),sr=n(5315),or=n.n(sr);const{debug:ar}=We("COMPASS-AGGREGATIONS-UI"),ur="utf8";class lr{async loadAll(){const e=nr(),t=(await ir.promises.readdir(e)).filter((e=>e.endsWith(".json"))).map((t=>or().join(e,t)));return(await Promise.all(t.map((e=>this._loadOne(e))))).filter(Boolean)}async _loadOne(e){try{const[t,n]=await Promise.all([this._getFileData(e),ir.promises.stat(e)]);return{...t,lastModified:n.mtimeMs}}catch(t){return ar(`Failed to load pipeline ${or().basename(e)}`,t),null}}async _getFileData(e){const t=await ir.promises.readFile(e,ur);return JSON.parse(t)}async updateAttributes(e,t){if(!e)throw new Error("pipelineId is required");const n=or().join(nr(),`${e}.json`),i=await this._getFileData(n);return await ir.promises.writeFile(n,JSON.stringify({...i,...t}),ur),this._loadOne(n)}async delete(e){const t=or().join(nr(),`${e}.json`);return ir.promises.unlink(t)}}const{track:cr,debug:pr}=We("COMPASS-AGGREGATIONS-UI"),hr="aggregations/saved-pipeline",dr=`${hr}/LIST_TOGGLED`,fr=`${hr}/ADD`,mr={pipelines:[],isLoaded:!1,isListVisible:!1},gr={};gr[dr]=(e,t)=>{const n=(e=>Object.assign({},e))(e);return n.isListVisible=!!t.index,n},gr[fr]=(e,t)=>({...e,pipelines:t.pipelines,isLoaded:!0});const vr=e=>({type:dr,index:e}),yr=e=>({type:fr,pipelines:e}),xr=()=>(e,t)=>{t().savedPipeline.isLoaded||e(br())},br=()=>(e,t)=>{const n=new lr,i=t();n.loadAll().then((t=>{const n=t.filter((e=>{let{namespace:t}=e;return t===i.namespace}));e(fn(!1)),e(yr(n)),e((0,Ht.globalAppRegistryEmit)("agg-pipeline-saved",{name:i.name}))})).catch((e=>{pr("Failed to load pipelines",e)}))},Er=()=>async(e,t)=>{const{promises:i}=n(2048),r=n(5315),s=t();""===t().id&&e(un());const o=s.pipeline.map((e=>({...e,previewDocuments:[]}))),{id:a,name:u,namespace:l,comments:c,sample:p,autoPreview:h,collationString:{text:d},dataService:f}=t(),m={id:a,name:u,namespace:l,comments:c,sample:p,autoPreview:h,collationString:d,pipeline:o,host:f?.dataService?.getConnectionString?.().hosts.join(",")??null};cr("Aggregation Saved",{id:m.id,num_stages:o.length});const g=nr();await i.mkdir(g,{recursive:!0});const v=r.join(g,`${m.id}.json`);await i.writeFile(v,JSON.stringify(m),{encoding:"utf8",flag:"w"}),e(br())},wr=(0,he.css)({display:"flex",gap:he.spacing[4],alignItems:"center"}),Cr=(0,he.css)({display:"flex",gap:he.spacing[2]}),Sr=(0,he.css)({border:"none",backgroundColor:"transparent",lineHeight:1,display:"flex",alignItems:"center","&:hover":{cursor:"pointer"}}),Ar=(0,he.css)({display:"flex",flex:1}),Dr=(0,he.css)({display:"flex",flex:"none",marginLeft:"auto"}),_r=Y((e=>({isOpenPipelineVisible:!e.editViewName&&!e.isAtlasDeployed})),{onShowSavedPipelines:()=>e=>{e(xr()),e(vr(1))}})((e=>{let{onShowSavedPipelines:t,showRunButton:n,showExportButton:i,showExplainButton:s,onToggleOptions:o,isOptionsVisible:a,isOpenPipelineVisible:u}=e;return r().createElement("div",{className:wr,"data-testid":"pipeline-header"},u&&r().createElement("div",{className:Cr},r().createElement(he.Body,{weight:"medium"},"Pipeline"),r().createElement("button",{"data-testid":"pipeline-toolbar-open-pipelines-button",onClick:t,className:Sr,"aria-label":"Open saved pipelines"},r().createElement(he.Icon,{glyph:"Folder"}),r().createElement(he.Icon,{glyph:"CaretDown"}))),r().createElement("div",{className:Ar},r().createElement(Si,null)),r().createElement("div",{className:Dr},r().createElement(tr,{onToggleOptions:o,isOptionsVisible:a,showRunButton:n,showExportButton:i,showExplainButton:s})))})),kr="aggregations/collation/COLLATION_STRING_CHANGED",Tr={text:"",value:null,isValid:!0};function Fr(e){const t=Mt().isCollationValid(e);return{text:e,value:!1===t?null:t,isValid:!1!==t}}const Ir=e=>({type:kr,value:e}),Nr=n(4283),Pr=e=>()=>{Nr?n(5840).shell.openExternal(e):window.open(e,"_new")},Or="aggregations/max-time-ms/MAX_TIME_MS_CHANGED",Rr=null,Mr=e=>({type:Or,maxTimeMS:isNaN(e)?null:e}),Lr=require("hadron-react-components");var Br=n(9430),jr={};jr.styleTagTransform=Ae(),jr.setAttributes=Ee(),jr.insert=xe().bind(null,"head"),jr.domAPI=ve(),jr.insertStyleElement=Ce(),me()(Br.Z,jr);const Vr=Br.Z&&Br.Z.locals?Br.Z.locals:void 0;class zr extends i.PureComponent{static displayName="CollationToolbarComponent";static propTypes={collationString:o().object,collationStringChanged:o().func.isRequired,maxTimeMS:o().number,maxTimeMSChanged:o().func,openLink:o().func.isRequired};state={hasFocus:!1};onCollationChange=e=>{this.props.collationStringChanged(e.target.value)};onMaxTimeMsChanged=e=>{this.props.maxTimeMSChanged&&this.props.maxTimeMSChanged(parseInt(e.currentTarget.value,10))};_onFocus=()=>{this.setState({hasFocus:!0})};_onBlur=()=>{this.setState({hasFocus:!1})};render(){return r().createElement("div",{"data-testid":"legacy-collation-toolbar",className:Vr["collation-toolbar"]},r().createElement("div",{onBlur:this._onBlur,onFocus:this._onFocus,className:pe()(Vr["toolbar-input-wrapper"],{[Vr["has-focus"]]:this.state.hasFocus})},r().createElement("div",{className:pe()(Vr["toolbar-input-label"],{[Vr["has-error"]]:!this.props.collationString.isValid}),"data-testid":"collation-toolbar-input-label"},r().createElement(Lr.InfoSprinkle,{helpLink:"https://docs.mongodb.com/master/reference/collation/",onClickHandler:this.props.openLink}),"Collation"),r().createElement("input",{"data-testid":"collation-string",placeholder:"{ locale: 'simple' }",type:"text",onChange:this.onCollationChange,value:this.props.collationString.text}),r().createElement("div",{className:pe()(Vr["max-time-ms"])},r().createElement("div",{className:pe()(Vr["toolbar-input-label"]),"data-testid":"maxtimems-toolbar-input-label"},r().createElement(Lr.InfoSprinkle,{helpLink:"https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS/",onClickHandler:this.props.openLink}),"Max Time MS"),r().createElement("input",{"data-testid":"max-time-ms",id:"max-time-limit","aria-describedby":"max-time-limit",type:"number",min:"0",placeholder:it,value:this.props.maxTimeMS??"",onChange:this.onMaxTimeMsChanged}))))}}const qr=zr,Ur=Y((e=>{let{collationString:t,settings:{maxTimeMS:n,isDirty:i},maxTimeMS:r}=e;return{collationString:t,maxTimeMS:i?n:r}}),{collationStringChanged:Ir,maxTimeMSChanged:Mr,openLink:Pr})((e=>{let{collationString:t,collationStringChanged:n,maxTimeMS:i,maxTimeMSChanged:s,openLink:o}=e;const a={collationString:t,collationStringChanged:n,maxTimeMS:i,maxTimeMSChanged:s,openLink:o};return r().createElement(qr,a)})),Wr=()=>r().createElement("div",{"data-testid":"pipeline-options",role:"region",id:"pipeline-options","aria-labelledby":"pipeline-toolbar-options"},r().createElement(Ur,null)),Kr=()=>(e,t)=>{const n=t();e((0,Ht.localAppRegistryEmit)("open-aggregation-export-to-language",((e,t)=>`[${e.pipeline.filter(((e,n)=>e.isEnabled&&n<=t)).map((e=>function(e){const t=Kt(e);return Mt().toJSString(t)}(e))).join(", ")}]`)(n,n.pipeline.length))),e((0,Ht.globalAppRegistryEmit)("compass:export-to-language:opened",{source:"Aggregations"}))};var $r={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Gr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Hr={5:Gr,"5module":Gr+" export import",6:Gr+" const class extends export import super"},Jr=/^in(stanceof)?$/,Xr="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Zr="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Yr=new RegExp("["+Xr+"]"),Qr=new RegExp("["+Xr+Zr+"]");Xr=Zr=null;var es=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],ts=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function ns(e,t){for(var n=65536,i=0;i<t.length;i+=2){if((n+=t[i])>e)return!1;if((n+=t[i+1])>=e)return!0}}function is(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Yr.test(String.fromCharCode(e)):!1!==t&&ns(e,es)))}function rs(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Qr.test(String.fromCharCode(e)):!1!==t&&(ns(e,es)||ns(e,ts)))))}var ss=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function os(e,t){return new ss(e,{beforeExpr:!0,binop:t})}var as={beforeExpr:!0},us={startsExpr:!0},ls={};function cs(e,t){return void 0===t&&(t={}),t.keyword=e,ls[e]=new ss(e,t)}var ps={num:new ss("num",us),regexp:new ss("regexp",us),string:new ss("string",us),name:new ss("name",us),privateId:new ss("privateId",us),eof:new ss("eof"),bracketL:new ss("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new ss("]"),braceL:new ss("{",{beforeExpr:!0,startsExpr:!0}),braceR:new ss("}"),parenL:new ss("(",{beforeExpr:!0,startsExpr:!0}),parenR:new ss(")"),comma:new ss(",",as),semi:new ss(";",as),colon:new ss(":",as),dot:new ss("."),question:new ss("?",as),questionDot:new ss("?."),arrow:new ss("=>",as),template:new ss("template"),invalidTemplate:new ss("invalidTemplate"),ellipsis:new ss("...",as),backQuote:new ss("`",us),dollarBraceL:new ss("${",{beforeExpr:!0,startsExpr:!0}),eq:new ss("=",{beforeExpr:!0,isAssign:!0}),assign:new ss("_=",{beforeExpr:!0,isAssign:!0}),incDec:new ss("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ss("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:os("||",1),logicalAND:os("&&",2),bitwiseOR:os("|",3),bitwiseXOR:os("^",4),bitwiseAND:os("&",5),equality:os("==/!=/===/!==",6),relational:os("</>/<=/>=",7),bitShift:os("<</>>/>>>",8),plusMin:new ss("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:os("%",10),star:os("*",10),slash:os("/",10),starstar:new ss("**",{beforeExpr:!0}),coalesce:os("??",1),_break:cs("break"),_case:cs("case",as),_catch:cs("catch"),_continue:cs("continue"),_debugger:cs("debugger"),_default:cs("default",as),_do:cs("do",{isLoop:!0,beforeExpr:!0}),_else:cs("else",as),_finally:cs("finally"),_for:cs("for",{isLoop:!0}),_function:cs("function",us),_if:cs("if"),_return:cs("return",as),_switch:cs("switch"),_throw:cs("throw",as),_try:cs("try"),_var:cs("var"),_const:cs("const"),_while:cs("while",{isLoop:!0}),_with:cs("with"),_new:cs("new",{beforeExpr:!0,startsExpr:!0}),_this:cs("this",us),_super:cs("super",us),_class:cs("class",us),_extends:cs("extends",as),_export:cs("export"),_import:cs("import",us),_null:cs("null",us),_true:cs("true",us),_false:cs("false",us),_in:cs("in",{beforeExpr:!0,binop:7}),_instanceof:cs("instanceof",{beforeExpr:!0,binop:7}),_typeof:cs("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:cs("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:cs("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},hs=/\r\n?|\n|\u2028|\u2029/,ds=new RegExp(hs.source,"g");function fs(e){return 10===e||13===e||8232===e||8233===e}var ms=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,vs=Object.prototype,ys=vs.hasOwnProperty,xs=vs.toString;function bs(e,t){return ys.call(e,t)}var Es=Array.isArray||function(e){return"[object Array]"===xs.call(e)};function ws(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Cs=function(e,t){this.line=e,this.column=t};Cs.prototype.offset=function(e){return new Cs(this.line,this.column+e)};var Ss=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function As(e,t){for(var n=1,i=0;;){ds.lastIndex=i;var r=ds.exec(e);if(!(r&&r.index<t))return new Cs(n,t-i);++n,i=r.index+r[0].length}}var Ds={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},_s=!1;function ks(e,t){return 2|(e?4:0)|(t?8:0)}var Ts=function(e,t,n){this.options=e=function(e){var t={};for(var n in Ds)t[n]=e&&bs(e,n)?e[n]:Ds[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!_s&&"object"==typeof console&&console.warn&&(_s=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Es(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return Es(t.onComment)&&(t.onComment=function(e,t){return function(n,i,r,s,o,a){var u={type:n?"Block":"Line",value:i,start:r,end:s};e.locations&&(u.loc=new Ss(this,o,a)),e.ranges&&(u.range=[r,s]),t.push(u)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=ws(Hr[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=$r[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=ws(i);var r=(i?i+" ":"")+$r.strict;this.reservedWordsStrict=ws(r),this.reservedWordsStrictBind=ws(r+" "+$r.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(hs).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=ps.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Fs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ts.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Fs.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Fs.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Fs.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Fs.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Fs.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(64&t)>0||n||this.options.allowSuperOutsideMethod},Fs.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Fs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Fs.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(258&t)>0||n},Fs.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},Ts.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},Ts.parse=function(e,t){return new this(t,e).parse()},Ts.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()},Ts.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Ts.prototype,Fs);var Is=Ts.prototype,Ns=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function Ps(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Is.strictDirective=function(e){for(;;){gs.lastIndex=e,e+=gs.exec(this.input)[0].length;var t=Ns.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){gs.lastIndex=e+t[0].length;var n=gs.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return";"===r||"}"===r||hs.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(i+1))}e+=t[0].length,gs.lastIndex=e,e+=gs.exec(this.input)[0].length,";"===this.input[e]&&e++}},Is.eat=function(e){return this.type===e&&(this.next(),!0)},Is.isContextual=function(e){return this.type===ps.name&&this.value===e&&!this.containsEsc},Is.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Is.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Is.canInsertSemicolon=function(){return this.type===ps.eof||this.type===ps.braceR||hs.test(this.input.slice(this.lastTokEnd,this.start))},Is.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Is.semicolon=function(){this.eat(ps.semi)||this.insertSemicolon()||this.unexpected()},Is.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Is.expect=function(e){this.eat(e)||this.unexpected()},Is.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Is.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},Is.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,i=e.doubleProto;if(!t)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Is.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Is.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Os=Ts.prototype;Os.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==ps.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Rs={kind:"loop"},Ms={kind:"switch"};Os.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;gs.lastIndex=this.pos;var t=gs.exec(this.input),n=this.pos+t[0].length,i=this.input.charCodeAt(n);if(91===i||92===i||i>55295&&i<56320)return!0;if(e)return!1;if(123===i)return!0;if(is(i,!0)){for(var r=n+1;rs(i=this.input.charCodeAt(r),!0);)++r;if(92===i||i>55295&&i<56320)return!0;var s=this.input.slice(n,r);if(!Jr.test(s))return!0}return!1},Os.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;gs.lastIndex=this.pos;var e,t=gs.exec(this.input),n=this.pos+t[0].length;return!(hs.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(rs(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},Os.parseStatement=function(e,t,n){var i,r=this.type,s=this.startNode();switch(this.isLet(e)&&(r=ps._var,i="let"),r){case ps._break:case ps._continue:return this.parseBreakContinueStatement(s,r.keyword);case ps._debugger:return this.parseDebuggerStatement(s);case ps._do:return this.parseDoStatement(s);case ps._for:return this.parseForStatement(s);case ps._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case ps._class:return e&&this.unexpected(),this.parseClass(s,!0);case ps._if:return this.parseIfStatement(s);case ps._return:return this.parseReturnStatement(s);case ps._switch:return this.parseSwitchStatement(s);case ps._throw:return this.parseThrowStatement(s);case ps._try:return this.parseTryStatement(s);case ps._const:case ps._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(s,i);case ps._while:return this.parseWhileStatement(s);case ps._with:return this.parseWithStatement(s);case ps.braceL:return this.parseBlock(!0,s);case ps.semi:return this.parseEmptyStatement(s);case ps._export:case ps._import:if(this.options.ecmaVersion>10&&r===ps._import){gs.lastIndex=this.pos;var o=gs.exec(this.input),a=this.pos+o[0].length,u=this.input.charCodeAt(a);if(40===u||46===u)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===ps._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.value,c=this.parseExpression();return r===ps.name&&"Identifier"===c.type&&this.eat(ps.colon)?this.parseLabeledStatement(s,l,c,e):this.parseExpressionStatement(s,c)}},Os.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(ps.semi)||this.insertSemicolon()?e.label=null:this.type!==ps.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(n||"loop"===r.kind))break;if(e.label&&n)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},Os.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Os.parseDoStatement=function(e){return this.next(),this.labels.push(Rs),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(ps._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(ps.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Os.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Rs),this.enterScope(0),this.expect(ps.parenL),this.type===ps.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===ps._var||this.type===ps._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),(this.type===ps._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===ps._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var s=this.isContextual("let"),o=!1,a=new Ps,u=this.parseExpression(!(t>-1)||"await",a);return this.type===ps._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===ps._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,a),this.checkLValPattern(u),this.parseForIn(e,u)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,u))},Os.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Bs|(n?0:js),!1,t)},Os.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(ps._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Os.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(ps.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Os.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(ps.braceL),this.labels.push(Ms),this.enterScope(0);for(var n=!1;this.type!==ps.braceR;)if(this.type===ps._case||this.type===ps._default){var i=this.type===ps._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(ps.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},Os.parseThrowStatement=function(e){return this.next(),hs.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ls=[];Os.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===ps._catch){var t=this.startNode();if(this.next(),this.eat(ps.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLValPattern(t.param,n?4:2),this.expect(ps.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(ps._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Os.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Os.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Rs),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Os.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},Os.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Os.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1)s[r].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===ps._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==e.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},Os.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Os.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(ps.braceL),e&&this.enterScope(0);this.type!==ps.braceR;){var i=this.parseStatement(null);t.body.push(i)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Os.parseFor=function(e,t){return e.init=t,this.expect(ps.semi),e.test=this.type===ps.semi?null:this.parseExpression(),this.expect(ps.semi),e.update=this.type===ps.parenR?null:this.parseExpression(),this.expect(ps.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Os.parseForIn=function(e,t){var n=this.type===ps._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(ps.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},Os.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(ps.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===ps._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===i.id.type||t&&(this.type===ps._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(ps.comma))break}return e},Os.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Bs=1,js=2;function Vs(e,t){var n=t.key.name,i=e[n],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===r||"iset"===i&&"iget"===r||"sget"===i&&"sset"===r||"sset"===i&&"sget"===r?(e[n]="true",!1):!!i||(e[n]=r,!1)}function zs(e,t){var n=e.computed,i=e.key;return!n&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Os.parseFunction=function(e,t,n,i,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===ps.star&&t&js&&this.unexpected(),e.generator=this.eat(ps.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&Bs&&(e.id=4&t&&this.type!==ps.name?null:this.parseIdent(),!e.id||t&js||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ks(e.async,e.generator)),t&Bs||(e.id=this.type===ps.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Bs?"FunctionDeclaration":"FunctionExpression")},Os.parseFunctionParams=function(e){this.expect(ps.parenL),e.params=this.parseBindingList(ps.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Os.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(ps.braceL);this.type!==ps.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(r.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&Vs(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Os.parseClassElement=function(e){if(this.eat(ps.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(ps.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===ps.star?a=!0:i="static"}if(n.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==ps.star||this.canInsertSemicolon()?i="async":s=!0),!i&&(t>=9||!s)&&this.eat(ps.star)&&(r=!0),!i&&!s&&!r){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:i=u)}if(i?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===ps.parenL||"method"!==o||r||s){var l=!n.static&&zs(n,"constructor"),c=l&&e;l&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=l?"constructor":o,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n},Os.isClassElementNameStart=function(){return this.type===ps.name||this.type===ps.privateId||this.type===ps.num||this.type===ps.string||this.type===ps.bracketL||this.type.keyword},Os.parseClassElementName=function(e){this.type===ps.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Os.parseClassMethod=function(e,t,n,i){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):e.static&&zs(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Os.parseClassField=function(e){if(zs(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&zs(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(ps.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Os.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==ps.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Os.parseClassId=function(e,t){this.type===ps.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Os.parseClassSuper=function(e){e.superClass=this.eat(ps._extends)?this.parseExprSubscripts(!1):null},Os.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Os.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,i=this.privateNameStack.length,r=0===i?null:this.privateNameStack[i-1],s=0;s<n.length;++s){var o=n[s];bs(t,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Os.parseExport=function(e,t){if(this.next(),this.eat(ps.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==ps.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(ps._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===ps._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,4|Bs,!1,n)}else if(this.type===ps._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==ps.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},Os.checkExport=function(e,t,n){e&&(bs(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},Os.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(e,u)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},Os.checkVariableExport=function(e,t){if(e)for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}},Os.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Os.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(ps.braceL);!this.eat(ps.braceR);){if(n)n=!1;else if(this.expect(ps.comma),this.afterTrailingComma(ps.braceR))break;var i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"ExportSpecifier"))}return t},Os.parseImport=function(e){return this.next(),this.type===ps.string?(e.specifiers=Ls,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===ps.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Os.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===ps.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLValSimple(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(ps.comma))return e}if(this.type===ps.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(ps.braceL);!this.eat(ps.braceR);){if(t)t=!1;else if(this.expect(ps.comma),this.afterTrailingComma(ps.braceR))break;var r=this.startNode();r.imported=this.parseIdent(!0),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportSpecifier"))}return e},Os.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Os.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var qs=Ts.prototype;qs.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},qs.toAssignableList=function(e,t){for(var n=e.length,i=0;i<n;i++){var r=e[i];r&&this.toAssignable(r,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},qs.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},qs.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==ps.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},qs.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case ps.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(ps.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case ps.braceL:return this.parseObj(!0)}return this.parseIdent()},qs.parseBindingList=function(e,t,n){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(ps.comma),t&&this.type===ps.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===ps.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),i.push(o)}return i},qs.parseBindingListItem=function(e){return e},qs.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(ps.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},qs.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var i=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(bs(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}},qs.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var u=a[o];u&&this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}},qs.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Us=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},Ws={b_stat:new Us("{",!1),b_expr:new Us("{",!0),b_tmpl:new Us("${",!1),p_stat:new Us("(",!1),p_expr:new Us("(",!0),q_tmpl:new Us("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new Us("function",!1),f_expr:new Us("function",!0),f_expr_gen:new Us("function",!0,!1,null,!0),f_gen:new Us("function",!1,!1,null,!0)},Ks=Ts.prototype;Ks.initialContext=function(){return[Ws.b_stat]},Ks.curContext=function(){return this.context[this.context.length-1]},Ks.braceIsBlock=function(e){var t=this.curContext();return t===Ws.f_expr||t===Ws.f_stat||(e!==ps.colon||t!==Ws.b_stat&&t!==Ws.b_expr?e===ps._return||e===ps.name&&this.exprAllowed?hs.test(this.input.slice(this.lastTokEnd,this.start)):e===ps._else||e===ps.semi||e===ps.eof||e===ps.parenR||e===ps.arrow||(e===ps.braceL?t===Ws.b_stat:e!==ps._var&&e!==ps._const&&e!==ps.name&&!this.exprAllowed):!t.isExpr)},Ks.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},Ks.updateContext=function(e){var t,n=this.type;n.keyword&&e===ps.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Ks.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},ps.parenR.updateContext=ps.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Ws.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},ps.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Ws.b_stat:Ws.b_expr),this.exprAllowed=!0},ps.dollarBraceL.updateContext=function(){this.context.push(Ws.b_tmpl),this.exprAllowed=!0},ps.parenL.updateContext=function(e){var t=e===ps._if||e===ps._for||e===ps._with||e===ps._while;this.context.push(t?Ws.p_stat:Ws.p_expr),this.exprAllowed=!0},ps.incDec.updateContext=function(){},ps._function.updateContext=ps._class.updateContext=function(e){!e.beforeExpr||e===ps._else||e===ps.semi&&this.curContext()!==Ws.p_stat||e===ps._return&&hs.test(this.input.slice(this.lastTokEnd,this.start))||(e===ps.colon||e===ps.braceL)&&this.curContext()===Ws.b_stat?this.context.push(Ws.f_stat):this.context.push(Ws.f_expr),this.exprAllowed=!1},ps.backQuote.updateContext=function(){this.curContext()===Ws.q_tmpl?this.context.pop():this.context.push(Ws.q_tmpl),this.exprAllowed=!1},ps.star.updateContext=function(e){if(e===ps._function){var t=this.context.length-1;this.context[t]===Ws.f_expr?this.context[t]=Ws.f_expr_gen:this.context[t]=Ws.f_gen}this.exprAllowed=!0},ps.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==ps.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var $s=Ts.prototype;function Gs(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Gs(e.expression)}$s.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i,r=e.key;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===i&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[i="$"+i];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(r.start,"Redefinition of property"):o=t[i]={init:!1,get:!1,set:!1},o[s]=!0}}},$s.parseExpression=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===ps.comma){var s=this.startNodeAt(n,i);for(s.expressions=[r];this.eat(ps.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return r},$s.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,r=-1,s=-1;t?(r=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ps,i=!0);var o=this.start,a=this.startLoc;this.type!==ps.parenL&&this.type!==ps.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){var l=this.startNodeAt(o,a);return l.operator=this.value,this.type===ps.eq&&(u=this.toAssignable(u,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===ps.eq?this.checkLValPattern(u):this.checkLValSimple(u),l.left=u,this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),s>-1&&(t.trailingComma=s),u},$s.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(ps.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(ps.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r},$s.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===n&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,n,i,-1,e)},$s.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==ps._in)&&s>i){var o=this.type===ps.logicalOR||this.type===ps.logicalAND,a=this.type===ps.coalesce;a&&(s=ps.logicalAND.binop);var u=this.value;this.next();var l=this.start,c=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),l,c,s,r),h=this.buildBinary(t,n,e,p,u,o||a);return(o&&this.type===ps.coalesce||a&&(this.type===ps.logicalOR||this.type===ps.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,i,r)}return e},$s.buildBinary=function(e,t,n,i,r,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=r,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},$s.parseMaybeUnary=function(e,t,n,i){var r,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(i),t=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===ps.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,i),this.checkExpressionErrors(e,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&Gs(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,r=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else{if(r=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,o);l.operator=this.value,l.prefix=!1,l.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(l,"UpdateExpression")}}return n||!this.eat(ps.starstar)?r:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,r,this.parseMaybeUnary(null,!1,!1,i),"**",!1)},$s.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var s=this.parseSubscripts(r,n,i,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},$s.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,o=!1;;){var a=this.parseSubscript(e,t,n,i,s,o,r);if(a.optional&&(o=!0),a===e||"ArrowFunctionExpression"===a.type){if(o){var u=this.startNodeAt(t,n);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}e=a}},$s.parseSubscript=function(e,t,n,i,r,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(ps.questionDot);i&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(ps.bracketL);if(l||u&&this.type!==ps.parenL&&this.type!==ps.backQuote||this.eat(ps.dot)){var c=this.startNodeAt(t,n);c.object=e,l?(c.property=this.parseExpression(),this.expect(ps.bracketR)):this.type===ps.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!l,a&&(c.optional=u),e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(ps.parenL)){var p=new Ps,h=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(ps.parenR,this.options.ecmaVersion>=8,!1,p);if(r&&!u&&!this.canInsertSemicolon()&&this.eat(ps.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=d,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(t,n),m,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=m,a&&(g.optional=u),e=this.finishNode(g,"CallExpression")}else if(this.type===ps.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(t,n);v.tag=e,v.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(v,"TaggedTemplateExpression")}return e},$s.parseExprAtom=function(e,t){this.type===ps.slash&&this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case ps._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type!==ps.parenL||this.allowDirectSuper||this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==ps.dot&&this.type!==ps.bracketL&&this.type!==ps.parenL&&this.unexpected(),this.finishNode(n,"Super");case ps._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case ps.name:var r=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(ps._function))return this.overrideContext(Ws.f_expr),this.parseFunction(this.startNodeAt(r,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(ps.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[a],!1,t);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===ps.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(ps.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[a],!0,t)}return a;case ps.regexp:var u=this.value;return(n=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},n;case ps.num:case ps.string:return this.parseLiteral(this.value);case ps._null:case ps._true:case ps._false:return(n=this.startNode()).value=this.type===ps._null?null:this.type===ps._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case ps.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case ps.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(ps.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case ps.braceL:return this.overrideContext(Ws.b_expr),this.parseObj(!1,e);case ps._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case ps._class:return this.parseClass(this.startNode(),!1);case ps._new:return this.parseNew();case ps.backQuote:return this.parseTemplate();case ps._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},$s.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case ps.parenL:return this.parseDynamicImport(e);case ps.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},$s.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(ps.parenR)){var t=this.start;this.eat(ps.comma)&&this.eat(ps.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},$s.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},$s.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},$s.parseParenExpression=function(){this.expect(ps.parenL);var e=this.parseExpression();return this.expect(ps.parenR),e},$s.parseParenAndDistinguishExpression=function(e,t){var n,i=this.start,r=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,u=this.startLoc,l=[],c=!0,p=!1,h=new Ps,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==ps.parenR;){if(c?c=!1:this.expect(ps.comma),s&&this.afterTrailingComma(ps.parenR,!0)){p=!0;break}if(this.type===ps.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(ps.parenR),e&&!this.canInsertSemicolon()&&this.eat(ps.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(i,r,l,t);l.length&&!p||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,l.length>1?((n=this.startNodeAt(a,u)).expressions=l,this.finishNodeAt(n,"SequenceExpression",m,g)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(i,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},$s.parseParenItem=function(e){return e},$s.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,i)};var Hs=[];$s.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ps.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc,s=this.type===ps._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,!0,!1),s&&"ImportExpression"===e.callee.type&&this.raise(i,"Cannot use new with import()"),this.eat(ps.parenL)?e.arguments=this.parseExprList(ps.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Hs,this.finishNode(e,"NewExpression")},$s.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===ps.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===ps.backQuote,this.finishNode(n,"TemplateElement")},$s.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(n.quasis=[i];!i.tail;)this.type===ps.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(ps.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(ps.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},$s.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===ps.name||this.type===ps.num||this.type===ps.string||this.type===ps.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===ps.star)&&!hs.test(this.input.slice(this.lastTokEnd,this.start))},$s.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(ps.braceR);){if(i)i=!1;else if(this.expect(ps.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(ps.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,r,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},$s.parseProperty=function(e,t){var n,i,r,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(ps.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===ps.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===ps.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(r=this.start,s=this.startLoc),e||(n=this.eat(ps.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(ps.star),this.parsePropertyName(o,t)):i=!1,this.parsePropertyValue(o,e,n,i,r,s,t,a),this.finishNode(o,"Property")},$s.parsePropertyValue=function(e,t,n,i,r,s,o,a){if((n||i)&&this.type===ps.colon&&this.unexpected(),this.eat(ps.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===ps.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,i);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===ps.comma||this.type===ps.braceR||this.type===ps.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key)):this.type===ps.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(n||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var u="get"===e.kind?0:1;if(e.value.params.length!==u){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},$s.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ps.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(ps.bracketR),e.key;e.computed=!1}return e.key=this.type===ps.num||this.type===ps.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},$s.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},$s.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|ks(t,i.generator)|(n?128:0)),this.expect(ps.parenL),i.params=this.parseBindingList(ps.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},$s.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|ks(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},$s.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==ps.braceL,s=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()},$s.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},$s.checkParams=function(e,t){for(var n=Object.create(null),i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,1,t?null:n)}},$s.parseExprList=function(e,t,n,i){for(var r=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(ps.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===ps.comma?o=null:this.type===ps.ellipsis?(o=this.parseSpread(i),i&&this.type===ps.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),r.push(o)}return r},$s.checkUnreserved=function(e){var t=e.start,n=e.end,i=e.name;this.inGenerator&&"yield"===i&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===i&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==i&&"await"!==i||this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||"await"!==i||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))},$s.parseIdent=function(e,t){var n=this.startNode();return this.type===ps.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},$s.parsePrivateIdent=function(){var e=this.startNode();return this.type===ps.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},$s.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===ps.semi||this.canInsertSemicolon()||this.type!==ps.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(ps.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},$s.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Js=Ts.prototype;Js.raise=function(e,t){var n=As(this.input,e);t+=" ("+n.line+":"+n.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},Js.raiseRecoverable=Js.raise,Js.curPosition=function(){if(this.options.locations)return new Cs(this.curLine,this.pos-this.lineStart)};var Xs=Ts.prototype,Zs=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Xs.enterScope=function(e){this.scopeStack.push(new Zs(e))},Xs.exitScope=function(){this.scopeStack.pop()},Xs.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Xs.declareName=function(e,t,n){var i=!1;if(2===t){var r=this.currentScope();i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();i=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Xs.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Xs.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Xs.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Xs.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var Ys=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ss(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Qs=Ts.prototype;function eo(e,t,n,i){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=n),e}Qs.startNode=function(){return new Ys(this,this.start,this.startLoc)},Qs.startNodeAt=function(e,t){return new Ys(this,e,t)},Qs.finishNode=function(e,t){return eo.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Qs.finishNodeAt=function(e,t,n,i){return eo.call(this,e,t,n,i)},Qs.copyNode=function(e){var t=new Ys(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var to="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",no=to+" Extended_Pictographic",io={9:to,10:no,11:no,12:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict"},ro="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",so="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",oo=so+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ao={9:so,10:oo,11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",12:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"},uo={};function lo(e){var t=uo[e]={binary:ws(io[e]+" "+ro),nonBinary:{General_Category:ws(ro),Script:ws(ao[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}lo(9),lo(10),lo(11),lo(12);var co=Ts.prototype,po=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=uo[e.options.ecmaVersion>=12?12:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function ho(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function fo(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function mo(e){return e>=65&&e<=90||e>=97&&e<=122}function go(e){return mo(e)||95===e}function vo(e){return go(e)||yo(e)}function yo(e){return e>=48&&e<=57}function xo(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function bo(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Eo(e){return e>=48&&e<=55}po.prototype.reset=function(e,t,n){var i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchN=i&&this.parser.options.ecmaVersion>=9},po.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},po.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return-1;var r=n.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=i)return r;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(r<<10)+s-56613888:r},po.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return i;var r,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=i||(r=n.charCodeAt(e+1))<56320||r>57343?e+1:e+2},po.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},po.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},po.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},po.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},co.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,i=0;i<n.length;i++){var r=n.charAt(i);-1===t.indexOf(r)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(r,i+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},co.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},co.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var i=n[t];-1===e.groupNames.indexOf(i)&&e.raise("Invalid named capture referenced")}},co.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},co.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},co.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},co.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},co.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},co.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},co.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},co.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},co.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},co.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},co.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},co.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},co.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},co.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!fo(t)&&(e.lastIntValue=t,e.advance(),!0)},co.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!fo(n);)e.advance();return e.pos!==t},co.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},co.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},co.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},co.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ho(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ho(e.lastIntValue);return!0}return!1},co.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return is(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},co.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return rs(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},co.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},co.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},co.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},co.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},co.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},co.regexp_eatZero=function(e){return 48===e.current()&&!yo(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},co.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},co.regexp_eatControlLetter=function(e){var t=e.current();return!!mo(t)&&(e.lastIntValue=t%32,e.advance(),!0)},co.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1},co.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},co.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},co.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},co.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,i),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r),!0}return!1},co.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){bs(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},co.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},co.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";go(t=e.current());)e.lastStringValue+=ho(t),e.advance();return""!==e.lastStringValue},co.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";vo(t=e.current());)e.lastStringValue+=ho(t),e.advance();return""!==e.lastStringValue},co.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},co.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},co.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},co.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Eo(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},co.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},co.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!yo(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},co.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},co.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;yo(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},co.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;xo(n=e.current());)e.lastIntValue=16*e.lastIntValue+bo(n),e.advance();return e.pos!==t},co.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},co.regexp_eatOctalDigit=function(e){var t=e.current();return Eo(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},co.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var r=e.current();if(!xo(r))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+bo(r),e.advance()}return!0};var wo=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ss(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Co=Ts.prototype;function So(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Ao(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Co.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new wo(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Co.getToken=function(){return this.next(),new wo(this)},"undefined"!=typeof Symbol&&(Co[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===ps.eof,value:t}}}}),Co.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(ps.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Co.readToken=function(e){return is(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Co.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Co.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(ds.lastIndex=n;(e=ds.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,i),n,this.pos,t,this.curPosition())},Co.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!fs(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Co.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&ms.test(String.fromCharCode(e))))break e;++this.pos}}},Co.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Co.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(ps.ellipsis)):(++this.pos,this.finishToken(ps.dot))},Co.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(ps.assign,2):this.finishOp(ps.slash,1)},Co.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?ps.star:ps.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,i=ps.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(ps.assign,n+1):this.finishOp(i,n)},Co.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(ps.assign,3):this.finishOp(124===e?ps.logicalOR:ps.logicalAND,2):61===t?this.finishOp(ps.assign,2):this.finishOp(124===e?ps.bitwiseOR:ps.bitwiseAND,1)},Co.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(ps.assign,2):this.finishOp(ps.bitwiseXOR,1)},Co.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!hs.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(ps.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(ps.assign,2):this.finishOp(ps.plusMin,1)},Co.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(ps.assign,n+1):this.finishOp(ps.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(ps.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Co.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(ps.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(ps.arrow)):this.finishOp(61===e?ps.eq:ps.prefix,1)},Co.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(ps.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(ps.assign,3):this.finishOp(ps.coalesce,2)}return this.finishOp(ps.question,1)},Co.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,is(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(ps.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ao(e)+"'")},Co.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(ps.parenL);case 41:return++this.pos,this.finishToken(ps.parenR);case 59:return++this.pos,this.finishToken(ps.semi);case 44:return++this.pos,this.finishToken(ps.comma);case 91:return++this.pos,this.finishToken(ps.bracketL);case 93:return++this.pos,this.finishToken(ps.bracketR);case 123:return++this.pos,this.finishToken(ps.braceL);case 125:return++this.pos,this.finishToken(ps.braceR);case 58:return++this.pos,this.finishToken(ps.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(ps.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(ps.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ao(e)+"'")},Co.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Co.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(hs.test(i)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new po(this));a.reset(n,r,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(ps.regexp,{pattern:r,flags:o,value:u})},Co.readInt=function(e,t,n){for(var i=this.options.ecmaVersion>=12&&void 0===t,r=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,u=0,l=null==t?1/0:t;u<l;++u,++this.pos){var c=this.input.charCodeAt(this.pos),p=void 0;if(i&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===u&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((p=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;a=c,o=o*e+p}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},Co.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=So(this.input.slice(t,this.pos)),++this.pos):is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ps.num,n)},Co.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===i){var r=So(this.input.slice(t,this.pos));return++this.pos,is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ps.num,r)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==i||n||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||n||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(t,this.pos),n?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(ps.num,o)},Co.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Co.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(fs(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(ps.string,t)};var Do={};Co.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Do)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Co.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Do;this.raise(e,t)},Co.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==ps.template&&this.type!==ps.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(ps.template,e)):36===n?(this.pos+=2,this.finishToken(ps.dollarBraceL)):(++this.pos,this.finishToken(ps.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(fs(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Co.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(ps.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Co.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ao(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;return this.invalidStringToken(n,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return fs(t)?"":String.fromCharCode(t)}},Co.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Co.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(rs(r,i))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?is:rs)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Ao(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Co.readWord=function(){var e=this.readWord1(),t=ps.name;return this.keywords.test(e)&&(t=ls[e]),this.finishToken(t,e)},Ts.acorn={Parser:Ts,version:"8.5.0",defaultOptions:Ds,Position:Cs,SourceLocation:Ss,getLineInfo:As,Node:Ys,TokenType:ss,tokTypes:ps,keywordTypes:ls,TokContext:Us,tokContexts:Ws,isIdentifierChar:rs,isIdentifierStart:is,Token:wo,isNewLine:fs,lineBreak:hs,lineBreakG:ds,nonASCIIwhitespace:ms};var _o="✖";function ko(e){return e.name===_o}function To(){}var Fo=function(e,t){if(void 0===t&&(t={}),this.toks=this.constructor.BaseParser.tokenizer(e,t),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:ps.eof,start:0,end:0},this.tok.validateRegExpFlags=To,this.tok.validateRegExpPattern=To,this.options.locations){var n=this.toks.curPosition();this.tok.loc=new Ss(this.toks,n,n)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};Fo.prototype.startNode=function(){return new Ys(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)},Fo.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start},Fo.prototype.startNodeAt=function(e){return this.options.locations?new Ys(this.toks,e[0],e[1]):new Ys(this.toks,e)},Fo.prototype.finishNode=function(e,t){return e.type=t,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e},Fo.prototype.dummyNode=function(e){var t=this.startNode();return t.type=e,t.end=t.start,this.options.locations&&(t.loc.end=t.loc.start),this.options.ranges&&(t.range[1]=t.start),this.last={type:ps.name,start:t.start,end:t.start,loc:t.loc},t},Fo.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=_o,e},Fo.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=_o,e},Fo.prototype.eat=function(e){return this.tok.type===e&&(this.next(),!0)},Fo.prototype.isContextual=function(e){return this.tok.type===ps.name&&this.tok.value===e},Fo.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(ps.name)},Fo.prototype.canInsertSemicolon=function(){return this.tok.type===ps.eof||this.tok.type===ps.braceR||hs.test(this.input.slice(this.last.end,this.tok.start))},Fo.prototype.semicolon=function(){return this.eat(ps.semi)},Fo.prototype.expect=function(e){if(this.eat(e))return!0;for(var t=1;t<=2;t++)if(this.lookAhead(t).type===e){for(var n=0;n<t;n++)this.next();return!0}},Fo.prototype.pushCx=function(){this.context.push(this.curIndent)},Fo.prototype.popCx=function(){this.curIndent=this.context.pop()},Fo.prototype.lineEnd=function(e){for(;e<this.input.length&&!fs(this.input.charCodeAt(e));)++e;return e},Fo.prototype.indentationAfter=function(e){for(var t=0;;++e){var n=this.input.charCodeAt(e);if(32===n)++t;else{if(9!==n)return t;t+=this.options.tabSize}}},Fo.prototype.closes=function(e,t,n,i){return this.tok.type===e||this.tok.type===ps.eof||n!==this.curLineStart&&this.curIndent<t&&this.tokenStartsLine()&&(!i||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<t)},Fo.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var t=this.input.charCodeAt(e);if(9!==t&&32!==t)return!1}return!0},Fo.prototype.extend=function(e,t){this[e]=t(this[e])},Fo.prototype.parse=function(){return this.next(),this.parseTopLevel()},Fo.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},Fo.parse=function(e,t){return new this(e,t).parse()},Fo.BaseParser=Ts;var Io=Fo.prototype;function No(e){return e<14&&e>8||32===e||160===e||fs(e)}Io.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}},Io.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===ps.dot&&"."===this.input.substr(this.toks.end,1)&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=ps.ellipsis),new wo(this.toks)}catch(s){if(!(s instanceof SyntaxError))throw s;var e=s.message,t=s.raisedAt,n=!0;if(/unterminated/i.test(e))if(t=this.lineEnd(s.pos+1),/string/.test(e))n={start:s.pos,end:t,type:ps.string,value:this.input.slice(s.pos+1,t)};else if(/regular expr/i.test(e)){var i=this.input.slice(s.pos,t);try{i=new RegExp(i)}catch(e){}n={start:s.pos,end:t,type:ps.regexp,value:i}}else n=!!/template/.test(e)&&{start:s.pos,end:t,type:ps.template,value:this.input.slice(s.pos,t)};else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(e))for(;t<this.input.length&&!No(this.input.charCodeAt(t));)++t;else if(/character escape|expected hexadecimal/i.test(e))for(;t<this.input.length;){var r=this.input.charCodeAt(t++);if(34===r||39===r||fs(r))break}else if(/unexpected character/i.test(e))t++,n=!1;else{if(!/regular expression/i.test(e))throw s;n=!0}if(this.resetTo(t),!0===n&&(n={start:t,end:t,type:ps.name,value:_o}),n)return this.options.locations&&(n.loc=new Ss(this.toks,As(this.input,n.start),As(this.input,n.end))),n}},Io.resetTo=function(e){this.toks.pos=e;var t,n=this.input.charAt(e-1);if(this.toks.exprAllowed=!n||/[[{(,;:?/*=+\-~!|&%^<>]/.test(n)||/[enwfd]/.test(n)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(e-10,e)),this.options.locations)for(this.toks.curLine=1,this.toks.lineStart=ds.lastIndex=0;(t=ds.exec(this.input))&&t.index<e;)++this.toks.curLine,this.toks.lineStart=t.index+t[0].length},Io.lookAhead=function(e){for(;e>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[e-1]};var Po=Fo.prototype;Po.parseTopLevel=function(){var e=this.startNodeAt(this.options.locations?[0,As(this.input,0)]:0);for(e.body=[];this.tok.type!==ps.eof;)e.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(e.body),this.last=this.tok,e.sourceType=this.options.sourceType,this.finishNode(e,"Program")},Po.parseStatement=function(){var e,t=this.tok.type,n=this.startNode();switch(this.toks.isLet()&&(t=ps._var,e="let"),t){case ps._break:case ps._continue:this.next();var i=t===ps._break;return this.semicolon()||this.canInsertSemicolon()?n.label=null:(n.label=this.tok.type===ps.name?this.parseIdent():null,this.semicolon()),this.finishNode(n,i?"BreakStatement":"ContinueStatement");case ps._debugger:return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement");case ps._do:return this.next(),n.body=this.parseStatement(),n.test=this.eat(ps._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(n,"DoWhileStatement");case ps._for:this.next();var r=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(ps.parenL),this.tok.type===ps.semi)return this.parseFor(n,null);var s=this.toks.isLet();if(s||this.tok.type===ps._var||this.tok.type===ps._const){var o=this.parseVar(this.startNode(),!0,s?"let":this.tok.value);return 1!==o.declarations.length||this.tok.type!==ps._in&&!this.isContextual("of")?this.parseFor(n,o):(this.options.ecmaVersion>=9&&this.tok.type!==ps._in&&(n.await=r),this.parseForIn(n,o))}var a=this.parseExpression(!0);return this.tok.type===ps._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==ps._in&&(n.await=r),this.parseForIn(n,this.toAssignable(a))):this.parseFor(n,a);case ps._function:return this.next(),this.parseFunction(n,!0);case ps._if:return this.next(),n.test=this.parseParenExpression(),n.consequent=this.parseStatement(),n.alternate=this.eat(ps._else)?this.parseStatement():null,this.finishNode(n,"IfStatement");case ps._return:return this.next(),this.eat(ps.semi)||this.canInsertSemicolon()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement");case ps._switch:var u,l=this.curIndent,c=this.curLineStart;for(this.next(),n.discriminant=this.parseParenExpression(),n.cases=[],this.pushCx(),this.expect(ps.braceL);!this.closes(ps.braceR,l,c,!0);)if(this.tok.type===ps._case||this.tok.type===ps._default){var p=this.tok.type===ps._case;u&&this.finishNode(u,"SwitchCase"),n.cases.push(u=this.startNode()),u.consequent=[],this.next(),u.test=p?this.parseExpression():null,this.expect(ps.colon)}else u||(n.cases.push(u=this.startNode()),u.consequent=[],u.test=null),u.consequent.push(this.parseStatement());return u&&this.finishNode(u,"SwitchCase"),this.popCx(),this.eat(ps.braceR),this.finishNode(n,"SwitchStatement");case ps._throw:return this.next(),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement");case ps._try:if(this.next(),n.block=this.parseBlock(),n.handler=null,this.tok.type===ps._catch){var h=this.startNode();this.next(),this.eat(ps.parenL)?(h.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(ps.parenR)):h.param=null,h.body=this.parseBlock(),n.handler=this.finishNode(h,"CatchClause")}return n.finalizer=this.eat(ps._finally)?this.parseBlock():null,n.handler||n.finalizer?this.finishNode(n,"TryStatement"):n.block;case ps._var:case ps._const:return this.parseVar(n,!1,e||this.tok.value);case ps._while:return this.next(),n.test=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WhileStatement");case ps._with:return this.next(),n.object=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WithStatement");case ps.braceL:return this.parseBlock();case ps.semi:return this.next(),this.finishNode(n,"EmptyStatement");case ps._class:return this.parseClass(!0);case ps._import:if(this.options.ecmaVersion>10){var d=this.lookAhead(1).type;if(d===ps.parenL||d===ps.dot)return n.expression=this.parseExpression(),this.semicolon(),this.finishNode(n,"ExpressionStatement")}return this.parseImport();case ps._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,!0,!0);var f=this.parseExpression();return ko(f)?(this.next(),this.tok.type===ps.eof?this.finishNode(n,"EmptyStatement"):this.parseStatement()):t===ps.name&&"Identifier"===f.type&&this.eat(ps.colon)?(n.body=this.parseStatement(),n.label=f,this.finishNode(n,"LabeledStatement")):(n.expression=f,this.semicolon(),this.finishNode(n,"ExpressionStatement"))}},Po.parseBlock=function(){var e=this.startNode();this.pushCx(),this.expect(ps.braceL);var t=this.curIndent,n=this.curLineStart;for(e.body=[];!this.closes(ps.braceR,t,n,!0);)e.body.push(this.parseStatement());return this.popCx(),this.eat(ps.braceR),this.finishNode(e,"BlockStatement")},Po.parseFor=function(e,t){return e.init=t,e.test=e.update=null,this.eat(ps.semi)&&this.tok.type!==ps.semi&&(e.test=this.parseExpression()),this.eat(ps.semi)&&this.tok.type!==ps.parenR&&(e.update=this.parseExpression()),this.popCx(),this.expect(ps.parenR),e.body=this.parseStatement(),this.finishNode(e,"ForStatement")},Po.parseForIn=function(e,t){var n=this.tok.type===ps._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.popCx(),this.expect(ps.parenR),e.body=this.parseStatement(),this.finishNode(e,n)},Po.parseVar=function(e,t,n){e.kind=n,this.next(),e.declarations=[];do{var i=this.startNode();i.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),i.init=this.eat(ps.eq)?this.parseMaybeAssign(t):null,e.declarations.push(this.finishNode(i,"VariableDeclarator"))}while(this.eat(ps.comma));if(!e.declarations.length){var r=this.startNode();r.id=this.dummyIdent(),e.declarations.push(this.finishNode(r,"VariableDeclarator"))}return t||this.semicolon(),this.finishNode(e,"VariableDeclaration")},Po.parseClass=function(e){var t=this.startNode();this.next(),this.tok.type===ps.name?t.id=this.parseIdent():t.id=!0===e?this.dummyIdent():null,t.superClass=this.eat(ps._extends)?this.parseExpression():null,t.body=this.startNode(),t.body.body=[],this.pushCx();var n=this.curIndent+1,i=this.curLineStart;for(this.eat(ps.braceL),this.curIndent+1<n&&(n=this.curIndent,i=this.curLineStart);!this.closes(ps.braceR,n,i);){var r=this.parseClassElement();r&&t.body.body.push(r)}return this.popCx(),this.eat(ps.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(t.body,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Po.parseClassElement=function(){if(this.eat(ps.semi))return null;var e=this.options,t=e.ecmaVersion,n=e.locations,i=this.curIndent,r=this.curLineStart,s=this.startNode(),o="",a=!1,u=!1,l="method";if(s.static=!1,this.eatContextual("static")&&(this.isClassElementNameStart()||this.toks.type===ps.star?s.static=!0:o="static"),!o&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.toks.type!==ps.star||this.canInsertSemicolon()?o="async":u=!0),!o){a=this.eat(ps.star);var c=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?l=c:o=c)}if(o)s.computed=!1,s.key=this.startNodeAt(n?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),s.key.name=o,this.finishNode(s.key,"Identifier");else if(this.parseClassElementName(s),ko(s.key))return ko(this.parseMaybeAssign())&&this.next(),this.eat(ps.comma),null;if(t<13||this.toks.type===ps.parenL||"method"!==l||a||u){var p=!s.computed&&!s.static&&!a&&!u&&"method"===l&&("Identifier"===s.key.type&&"constructor"===s.key.name||"Literal"===s.key.type&&"constructor"===s.key.value);s.kind=p?"constructor":l,s.value=this.parseMethod(a,u),this.finishNode(s,"MethodDefinition")}else{if(this.eat(ps.eq))if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine())s.value=null;else{var h=this.inAsync,d=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=h,this.inGenerator=d}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s},Po.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()},Po.parseClassElementName=function(e){this.toks.type===ps.privateId?(e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Po.parseFunction=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=6&&(e.generator=this.eat(ps.star)),this.options.ecmaVersion>=8&&(e.async=!!n),this.tok.type===ps.name?e.id=this.parseIdent():!0===t&&(e.id=this.dummyIdent()),this.inAsync=e.async,this.inGenerator=e.generator,this.inFunction=!0,e.params=this.parseFunctionParams(),e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},Po.parseExport=function(){var e=this.startNode();if(this.next(),this.eat(ps.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?e.exported=this.parseExprAtom():e.exported=null),e.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(ps._default)){var t;if(this.tok.type===ps._function||(t=this.toks.isAsyncFunction())){var n=this.startNode();this.next(),t&&this.next(),e.declaration=this.parseFunction(n,"nullableID",t)}else this.tok.type===ps._class?e.declaration=this.parseClass("nullableID"):(e.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(e,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(e.declaration=this.parseStatement(),e.specifiers=[],e.source=null):(e.declaration=null,e.specifiers=this.parseExportSpecifierList(),e.source=this.eatContextual("from")?this.parseExprAtom():null,this.semicolon()),this.finishNode(e,"ExportNamedDeclaration")},Po.parseImport=function(){var e,t=this.startNode();return this.next(),this.tok.type===ps.string?(t.specifiers=[],t.source=this.parseExprAtom()):(this.tok.type===ps.name&&"from"!==this.tok.value&&((e=this.startNode()).local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(ps.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===ps.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Po.parseImportSpecifiers=function(){var e=[];if(this.tok.type===ps.star){var t=this.startNode();this.next(),t.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),e.push(this.finishNode(t,"ImportNamespaceSpecifier"))}else{var n=this.curIndent,i=this.curLineStart,r=this.nextLineStart;for(this.pushCx(),this.eat(ps.braceL),this.curLineStart>r&&(r=this.curLineStart);!this.closes(ps.braceR,n+(this.curLineStart<=r?1:0),i);){var s=this.startNode();if(this.eat(ps.star))s.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),this.finishNode(s,"ImportNamespaceSpecifier");else{if(this.isContextual("from"))break;if(s.imported=this.parseIdent(),ko(s.imported))break;s.local=this.eatContextual("as")?this.parseIdent():s.imported,this.finishNode(s,"ImportSpecifier")}e.push(s),this.eat(ps.comma)}this.eat(ps.braceR),this.popCx()}return e},Po.parseExportSpecifierList=function(){var e=[],t=this.curIndent,n=this.curLineStart,i=this.nextLineStart;for(this.pushCx(),this.eat(ps.braceL),this.curLineStart>i&&(i=this.curLineStart);!this.closes(ps.braceR,t+(this.curLineStart<=i?1:0),n)&&!this.isContextual("from");){var r=this.startNode();if(r.local=this.parseIdent(),ko(r.local))break;r.exported=this.eatContextual("as")?this.parseIdent():r.local,this.finishNode(r,"ExportSpecifier"),e.push(r),this.eat(ps.comma)}return this.eat(ps.braceR),this.popCx(),e};var Oo=Fo.prototype;Oo.checkLVal=function(e){if(!e)return e;switch(e.type){case"Identifier":case"MemberExpression":return e;case"ParenthesizedExpression":return e.expression=this.checkLVal(e.expression),e;default:return this.dummyIdent()}},Oo.parseExpression=function(e){var t=this.storeCurrentPos(),n=this.parseMaybeAssign(e);if(this.tok.type===ps.comma){var i=this.startNodeAt(t);for(i.expressions=[n];this.eat(ps.comma);)i.expressions.push(this.parseMaybeAssign(e));return this.finishNode(i,"SequenceExpression")}return n},Oo.parseParenExpression=function(){this.pushCx(),this.expect(ps.parenL);var e=this.parseExpression();return this.popCx(),this.expect(ps.parenR),e},Oo.parseMaybeAssign=function(e){if(this.inGenerator&&this.toks.isContextual("yield")){var t=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==ps.star&&!this.tok.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(ps.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")}var n=this.storeCurrentPos(),i=this.parseMaybeConditional(e);if(this.tok.type.isAssign){var r=this.startNodeAt(n);return r.operator=this.tok.value,r.left=this.tok.type===ps.eq?this.toAssignable(i):this.checkLVal(i),this.next(),r.right=this.parseMaybeAssign(e),this.finishNode(r,"AssignmentExpression")}return i},Oo.parseMaybeConditional=function(e){var t=this.storeCurrentPos(),n=this.parseExprOps(e);if(this.eat(ps.question)){var i=this.startNodeAt(t);return i.test=n,i.consequent=this.parseMaybeAssign(),i.alternate=this.expect(ps.colon)?this.parseMaybeAssign(e):this.dummyIdent(),this.finishNode(i,"ConditionalExpression")}return n},Oo.parseExprOps=function(e){var t=this.storeCurrentPos(),n=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),t,-1,e,n,i)},Oo.parseExprOp=function(e,t,n,i,r,s){if(this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())return e;var o=this.tok.type.binop;if(null!=o&&(!i||this.tok.type!==ps._in)&&o>n){var a=this.startNodeAt(t);if(a.left=e,a.operator=this.tok.value,this.next(),this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())a.right=this.dummyIdent();else{var u=this.storeCurrentPos();a.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,i,r,s)}return this.finishNode(a,/&&|\|\||\?\?/.test(a.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,n,i,r,s)}return e},Oo.parseMaybeUnary=function(e){var t,n=this.storeCurrentPos();if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))t=this.parseAwait(),e=!0;else if(this.tok.type.prefix){var i=this.startNode(),r=this.tok.type===ps.incDec;r||(e=!0),i.operator=this.tok.value,i.prefix=!0,this.next(),i.argument=this.parseMaybeUnary(!0),r&&(i.argument=this.checkLVal(i.argument)),t=this.finishNode(i,r?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===ps.ellipsis){var s=this.startNode();this.next(),s.argument=this.parseMaybeUnary(e),t=this.finishNode(s,"SpreadElement")}else for(t=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(n);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(t),this.next(),t=this.finishNode(o,"UpdateExpression")}if(!e&&this.eat(ps.starstar)){var a=this.startNodeAt(n);return a.operator="**",a.left=t,a.right=this.parseMaybeUnary(!1),this.finishNode(a,"BinaryExpression")}return t},Oo.parseExprSubscripts=function(){var e=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),e,!1,this.curIndent,this.curLineStart)},Oo.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()){if(this.tok.type!==ps.dot||this.curIndent!==i)break;--i}var a="Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon(),u=s&&this.eat(ps.questionDot);if(u&&(o=!0),u&&this.tok.type!==ps.parenL&&this.tok.type!==ps.bracketL&&this.tok.type!==ps.backQuote||this.eat(ps.dot)){var l=this.startNodeAt(t);l.object=e,this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()?l.property=this.dummyIdent():l.property=this.parsePropertyAccessor()||this.dummyIdent(),l.computed=!1,s&&(l.optional=u),e=this.finishNode(l,"MemberExpression")}else if(this.tok.type===ps.bracketL){this.pushCx(),this.next();var c=this.startNodeAt(t);c.object=e,c.property=this.parseExpression(),c.computed=!0,s&&(c.optional=u),this.popCx(),this.expect(ps.bracketR),e=this.finishNode(c,"MemberExpression")}else if(n||this.tok.type!==ps.parenL){if(this.tok.type!==ps.backQuote)break;var p=this.startNodeAt(t);p.tag=e,p.quasi=this.parseTemplate(),e=this.finishNode(p,"TaggedTemplateExpression")}else{var h=this.parseExprList(ps.parenR);if(a&&this.eat(ps.arrow))return this.parseArrowExpression(this.startNodeAt(t),h,!0);var d=this.startNodeAt(t);d.callee=e,d.arguments=h,s&&(d.optional=u),e=this.finishNode(d,"CallExpression")}}if(o){var f=this.startNodeAt(t);f.expression=e,e=this.finishNode(f,"ChainExpression")}return e},Oo.parseExprAtom=function(){var e;switch(this.tok.type){case ps._this:case ps._super:var t=this.tok.type===ps._this?"ThisExpression":"Super";return e=this.startNode(),this.next(),this.finishNode(e,t);case ps.name:var n=this.storeCurrentPos(),i=this.parseIdent(),r=!1;if("async"===i.name&&!this.canInsertSemicolon()){if(this.eat(ps._function))return this.parseFunction(this.startNodeAt(n),!1,!0);this.tok.type===ps.name&&(i=this.parseIdent(),r=!0)}return this.eat(ps.arrow)?this.parseArrowExpression(this.startNodeAt(n),[i],r):i;case ps.regexp:e=this.startNode();var s=this.tok.value;return e.regex={pattern:s.pattern,flags:s.flags},e.value=s.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(e,"Literal");case ps.num:case ps.string:return(e=this.startNode()).value=this.tok.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===ps.num&&110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal");case ps._null:case ps._true:case ps._false:return(e=this.startNode()).value=this.tok.type===ps._null?null:this.tok.type===ps._true,e.raw=this.tok.type.keyword,this.next(),this.finishNode(e,"Literal");case ps.parenL:var o=this.storeCurrentPos();this.next();var a=this.parseExpression();if(this.expect(ps.parenR),this.eat(ps.arrow)){var u=a.expressions||[a];return u.length&&ko(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var l=this.startNodeAt(o);l.expression=a,a=this.finishNode(l,"ParenthesizedExpression")}return a;case ps.bracketL:return(e=this.startNode()).elements=this.parseExprList(ps.bracketR,!0),this.finishNode(e,"ArrayExpression");case ps.braceL:return this.parseObj();case ps._class:return this.parseClass(!1);case ps._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case ps._new:return this.parseNew();case ps.backQuote:return this.parseTemplate();case ps._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}},Oo.parseExprImport=function(){var e=this.startNode(),t=this.parseIdent(!0);switch(this.tok.type){case ps.parenL:return this.parseDynamicImport(e);case ps.dot:return e.meta=t,this.parseImportMeta(e);default:return e.name="import",this.finishNode(e,"Identifier")}},Oo.parseDynamicImport=function(e){return e.source=this.parseExprList(ps.parenR)[0]||this.dummyString(),this.finishNode(e,"ImportExpression")},Oo.parseImportMeta=function(e){return this.next(),e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty")},Oo.parseNew=function(){var e=this.startNode(),t=this.curIndent,n=this.curLineStart,i=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ps.dot))return e.meta=i,e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty");var r=this.storeCurrentPos();return e.callee=this.parseSubscripts(this.parseExprAtom(),r,!0,t,n),this.tok.type===ps.parenL?e.arguments=this.parseExprList(ps.parenR):e.arguments=[],this.finishNode(e,"NewExpression")},Oo.parseTemplateElement=function(){var e=this.startNode();return this.tok.type===ps.invalidTemplate?e.value={raw:this.tok.value,cooked:null}:e.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,"\n"),cooked:this.tok.value},this.next(),e.tail=this.tok.type===ps.backQuote,this.finishNode(e,"TemplateElement")},Oo.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.next(),e.expressions.push(this.parseExpression()),this.expect(ps.braceR)?t=this.parseTemplateElement():((t=this.startNode()).value={cooked:"",raw:""},t.tail=!0,this.finishNode(t,"TemplateElement")),e.quasis.push(t);return this.expect(ps.backQuote),this.finishNode(e,"TemplateLiteral")},Oo.parseObj=function(){var e=this.startNode();e.properties=[],this.pushCx();var t=this.curIndent+1,n=this.curLineStart;for(this.eat(ps.braceL),this.curIndent+1<t&&(t=this.curIndent,n=this.curLineStart);!this.closes(ps.braceR,t,n);){var i=this.startNode(),r=void 0,s=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(ps.ellipsis))i.argument=this.parseMaybeAssign(),e.properties.push(this.finishNode(i,"SpreadElement")),this.eat(ps.comma);else if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),i.method=!1,i.shorthand=!1,r=this.eat(ps.star)),this.parsePropertyName(i),this.toks.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(ps.star),this.parsePropertyName(i)):s=!1,ko(i.key))ko(this.parseMaybeAssign())&&this.next(),this.eat(ps.comma);else{if(this.eat(ps.colon))i.kind="init",i.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===ps.parenL||this.tok.type===ps.braceL))i.kind="init",i.method=!0,i.value=this.parseMethod(r,s);else if(this.options.ecmaVersion>=5&&"Identifier"===i.key.type&&!i.computed&&("get"===i.key.name||"set"===i.key.name)&&this.tok.type!==ps.comma&&this.tok.type!==ps.braceR&&this.tok.type!==ps.eq)i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);else{if(i.kind="init",this.options.ecmaVersion>=6)if(this.eat(ps.eq)){var a=this.startNodeAt(o);a.operator="=",a.left=i.key,a.right=this.parseMaybeAssign(),i.value=this.finishNode(a,"AssignmentExpression")}else i.value=i.key;else i.value=this.dummyIdent();i.shorthand=!0}e.properties.push(this.finishNode(i,"Property")),this.eat(ps.comma)}}return this.popCx(),this.eat(ps.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(e,"ObjectExpression")},Oo.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ps.bracketL))return e.computed=!0,e.key=this.parseExpression(),void this.expect(ps.bracketR);e.computed=!1}var t=this.tok.type===ps.num||this.tok.type===ps.string?this.parseExprAtom():this.parseIdent();e.key=t||this.dummyIdent()},Oo.parsePropertyAccessor=function(){return this.tok.type===ps.name||this.tok.type.keyword?this.parseIdent():this.tok.type===ps.privateId?this.parsePrivateIdent():void 0},Oo.parseIdent=function(){var e=this.tok.type===ps.name?this.tok.value:this.tok.type.keyword;if(!e)return this.dummyIdent();var t=this.startNode();return this.next(),t.name=e,this.finishNode(t,"Identifier")},Oo.parsePrivateIdent=function(){var e=this.startNode();return e.name=this.tok.value,this.next(),this.finishNode(e,"PrivateIdentifier")},Oo.initFunction=function(e){e.id=null,e.params=[],this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Oo.toAssignable=function(e,t){if(!e||"Identifier"===e.type||"MemberExpression"===e.type&&!t);else if("ParenthesizedExpression"===e.type)this.toAssignable(e.expression,t);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if("ObjectExpression"===e.type){e.type="ObjectPattern";for(var n=0,i=e.properties;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}}else if("ArrayExpression"===e.type)e.type="ArrayPattern",this.toAssignableList(e.elements,t);else if("Property"===e.type)this.toAssignable(e.value,t);else if("SpreadElement"===e.type)e.type="RestElement",this.toAssignable(e.argument,t);else{if("AssignmentExpression"!==e.type)return this.dummyIdent();e.type="AssignmentPattern",delete e.operator}}return e},Oo.toAssignableList=function(e,t){for(var n=0,i=e;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}return e},Oo.parseFunctionParams=function(e){return e=this.parseExprList(ps.parenR),this.toAssignableList(e,!0)},Oo.parseMethod=function(e,t){var n=this.startNode(),i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=!!e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inAsync=n.async,this.inGenerator=n.generator,this.inFunction=!0,n.params=this.parseFunctionParams(),n.body=this.parseBlock(),this.toks.adaptDirectivePrologue(n.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(n,"FunctionExpression")},Oo.parseArrowExpression=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inAsync=e.async,this.inGenerator=!1,this.inFunction=!0,e.params=this.toAssignableList(t,!0),e.expression=this.tok.type!==ps.braceL,e.expression?e.body=this.parseMaybeAssign():(e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body)),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},Oo.parseExprList=function(e,t){this.pushCx();var n=this.curIndent,i=this.curLineStart,r=[];for(this.next();!this.closes(e,n+1,i);)if(this.eat(ps.comma))r.push(t?null:this.dummyIdent());else{var s=this.parseMaybeAssign();if(ko(s)){if(this.closes(e,n,i))break;this.next()}else r.push(s);this.eat(ps.comma)}return this.popCx(),this.eat(e)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),r},Oo.parseAwait=function(){var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Ds.tabSize=4;const{stringify:Ro}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const Mo={"||":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Lo=17,Bo={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Lo,ClassExpression:Lo,FunctionExpression:Lo,ObjectExpression:Lo,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function jo(e,t){const{generator:n}=e;if(e.write("("),null!=t&&t.length>0){n[t[0].type](t[0],e);const{length:i}=t;for(let r=1;r<i;r++){const i=t[r];e.write(", "),n[i.type](i,e)}}e.write(")")}function Vo(e,t,n,i){const r=e.expressionsPrecedence[t.type];if(r===Lo)return!0;const s=e.expressionsPrecedence[n.type];return r!==s?!i&&15===r&&14===s&&"**"===n.operator||r<s:(13===r||14===r)&&("**"===t.operator&&"**"===n.operator?!i:i?Mo[t.operator]<=Mo[n.operator]:Mo[t.operator]<Mo[n.operator])}function zo(e,t,n,i){const{generator:r}=e;Vo(e,t,n,i)?(e.write("("),r[t.type](t,e),e.write(")")):r[t.type](t,e)}function qo(e,t,n,i){const r=t.split("\n"),s=r.length-1;if(e.write(r[0].trim()),s>0){e.write(i);for(let t=1;t<s;t++)e.write(n+r[t].trim()+i);e.write(n+r[s].trim())}}function Uo(e,t,n,i){const{length:r}=t;for(let s=0;s<r;s++){const r=t[s];e.write(n),"L"===r.type[0]?e.write("// "+r.value.trim()+"\n",r):(e.write("/*"),qo(e,r.value,n,i),e.write("*/"+i))}}function Wo(e,t){const{generator:n}=e,{declarations:i}=t;e.write(t.kind+" ");const{length:r}=i;if(r>0){n.VariableDeclarator(i[0],e);for(let t=1;t<r;t++)e.write(", "),n.VariableDeclarator(i[t],e)}}let Ko,$o,Go,Ho,Jo,Xo;const Zo={Program(e,t){const n=t.indent.repeat(t.indentLevel),{lineEnd:i,writeComments:r}=t;r&&null!=e.comments&&Uo(t,e.comments,n,i);const s=e.body,{length:o}=s;for(let e=0;e<o;e++){const o=s[e];r&&null!=o.comments&&Uo(t,o.comments,n,i),t.write(n),this[o.type](o,t),t.write(i)}r&&null!=e.trailingComments&&Uo(t,e.trailingComments,n,i)},BlockStatement:Xo=function(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;t.write("{");const o=e.body;if(null!=o&&o.length>0){t.write(i),r&&null!=e.comments&&Uo(t,e.comments,s,i);const{length:a}=o;for(let e=0;e<a;e++){const n=o[e];r&&null!=n.comments&&Uo(t,n.comments,s,i),t.write(s),this[n.type](n,t),t.write(i)}t.write(n)}else r&&null!=e.comments&&(t.write(i),Uo(t,e.comments,s,i),t.write(n));r&&null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write("}"),t.indentLevel--},ClassBody:Xo,EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const n=t.expressionsPrecedence[e.expression.type];n===Lo||3===n&&"O"===e.expression.left.type[0]?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),null!=e.alternate&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t;t.indentLevel++;const s=n+t.indent,o=s+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+i);const{cases:a}=e,{length:u}=a;for(let e=0;e<u;e++){const n=a[e];r&&null!=n.comments&&Uo(t,n.comments,s,i),n.test?(t.write(s+"case "),this[n.test.type](n.test,t),t.write(":"+i)):t.write(s+"default:"+i);const{consequent:u}=n,{length:l}=u;for(let e=0;e<l;e++){const n=u[e];r&&null!=n.comments&&Uo(t,n.comments,o,i),t.write(o),this[n.type](n,t),t.write(i)}}t.indentLevel-=2,t.write(n+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:n}=e;null==n.param?t.write(" catch "):(t.write(" catch ("),this[n.param.type](n.param,t),t.write(") ")),this[n.body.type](n.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),null!=e.init){const{init:n}=e;"V"===n.type[0]?Wo(t,n):this[n.type](n,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:Ko=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:n}=e;"V"===n.type[0]?Wo(t,n):this[n.type](n,t),t.write("I"===e.type[3]?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:Ko,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:$o=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),jo(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:$o,VariableDeclaration(e,t){Wo(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),null!=e.init&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:n}=e,{type:i}=n,r=t.expressionsPrecedence[i];"C"===i[0]&&"l"===i[1]&&"E"===i[5]||!(r===Lo||r<t.expressionsPrecedence.ClassExpression)?this[n.type](n,t):(t.write("("),this[e.superClass.type](n,t),t.write(")")),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:n}=e,{length:i}=n;let r=0;if(i>0){for(;r<i;){r>0&&t.write(", ");const e=n[r],i=e.type[6];if("D"===i)t.write(e.local.name,e),r++;else{if("N"!==i)break;t.write("* as "+e.local.name,e),r++}}if(r<i){for(t.write("{");;){const e=n[r],{name:s}=e.imported;if(t.write(s,e),s!==e.local.name&&t.write(" as "+e.local.name),!(++r<i))break;t.write(", ")}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),null!=t.expressionsPrecedence[e.declaration.type]&&"F"!==e.declaration.type[0]&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:n}=e,{length:i}=n;if(i>0)for(let e=0;;){const r=n[e],{name:s}=r.local;if(t.write(s,r),s!==r.exported.name&&t.write(" as "+r.exported.name),!(++e<i))break;t.write(", ")}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration(e,t){null!=e.exported?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const n=e.kind[0];"g"!==n&&"s"!==n||t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),jo(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:n}=e;null!=n&&(1===n.length&&"I"===n[0].type[0]?t.write(n[0].name,n[0]):jo(t,e.params)),t.write(" => "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:Go=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:Go,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),zo(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:n,expressions:i}=e;t.write("`");const{length:r}=i;for(let e=0;e<r;e++){const r=i[e],s=n[e];t.write(s.value.raw,s),t.write("${"),this[r.type](r,t),t.write("}")}const s=n[n.length-1];t.write(s.value.raw,s),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){this[e.tag.type](e.tag,t),this[e.quasi.type](e.quasi,t)},ArrayExpression:Jo=function(e,t){if(t.write("["),e.elements.length>0){const{elements:n}=e,{length:i}=n;for(let e=0;;){const r=n[e];if(null!=r&&this[r.type](r,t),!(++e<i)){null==r&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:Jo,ObjectExpression(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;if(t.write("{"),e.properties.length>0){t.write(i),r&&null!=e.comments&&Uo(t,e.comments,s,i);const o=","+i,{properties:a}=e,{length:u}=a;for(let e=0;;){const n=a[e];if(r&&null!=n.comments&&Uo(t,n.comments,s,i),t.write(s),this[n.type](n,t),!(++e<u))break;t.write(o)}t.write(i),r&&null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write(n+"}")}else r?null!=e.comments?(t.write(i),Uo(t,e.comments,s,i),null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write(n+"}")):null!=e.trailingComments?(t.write(i),Uo(t,e.trailingComments,s,i),t.write(n+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||"i"!==e.kind[0]?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:n}=e,{length:i}=n;for(let e=0;this[n[e].type](n[e],t),++e<i;)t.write(", ")}t.write("}")},SequenceExpression(e,t){jo(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:n,argument:i,argument:{type:r}}=e;t.write(n);const s=Vo(t,i,e);s||!(n.length>1)&&("U"!==r[0]||"n"!==r[1]&&"p"!==r[1]||!i.prefix||i.operator[0]!==n||"+"!==n&&"-"!==n)||t.write(" "),s?(t.write(n.length>1?" (":"("),this[r](i,t),t.write(")")):this[r](i,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:Ho=function(e,t){const n="in"===e.operator;n&&t.write("("),zo(t,e.left,e,!1),t.write(" "+e.operator+" "),zo(t,e.right,e,!0),n&&t.write(")")},LogicalExpression:Ho,ConditionalExpression(e,t){const{test:n}=e,i=t.expressionsPrecedence[n.type];i===Lo||i<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[n.type](n,t),t.write(")")):this[n.type](n,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const n=t.expressionsPrecedence[e.callee.type];n===Lo||n<t.expressionsPrecedence.CallExpression||function(e){let t=e;for(;null!=t;){const{type:e}=t;if("C"===e[0]&&"a"===e[1])return!0;if("M"!==e[0]||"e"!==e[1]||"m"!==e[2])return!1;t=t.object}}(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),jo(t,e.arguments)},CallExpression(e,t){const n=t.expressionsPrecedence[e.callee.type];n===Lo||n<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),jo(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const n=t.expressionsPrecedence[e.object.type];n===Lo||n<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},Literal(e,t){null!=e.raw?t.write(e.raw,e):null!=e.regex?this.RegExpLiteral(e,t):null!=e.bigint?t.write(e.bigint+"n",e):t.write(Ro(e.value),e)},RegExpLiteral(e,t){const{regex:n}=e;t.write(`/${n.pattern}/${n.flags}`,e)}},Yo={};class Qo{constructor(e){const t=null==e?Yo:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:Zo,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:Bo,this.indent=null!=t.indent?t.indent:" ",this.lineEnd=null!=t.lineEnd?t.lineEnd:"\n",this.indentLevel=null!=t.startingIndentLevel?t.startingIndentLevel:0,this.writeComments=!!t.comments&&t.comments,null!=t.sourceMap&&(this.write=null==t.output?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=t.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split("\n").length-1,this.mapping={original:null,generated:this,name:void 0,source:t.sourceMap.file||t.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,t){this.output+=e,this.map(e,t)}writeToStreamAndMap(e,t){this.output.write(e),this.map(e,t)}map(e,t){if(null!=t){const{type:n}=t;if("L"===n[0]&&"n"===n[2])return this.column=0,void this.line++;if(null!=t.loc){const{mapping:e}=this;e.original=t.loc.start,e.name=t.name,this.sourceMap.addMapping(e)}if("T"===n[0]&&"E"===n[8]||"L"===n[0]&&"i"===n[1]&&"string"==typeof t.value){const{length:t}=e;let{column:n,line:i}=this;for(let r=0;r<t;r++)"\n"===e[r]?(n=0,i++):n++;return this.column=n,void(this.line=i)}}const{length:n}=e,{lineEnd:i}=this;n>0&&(this.lineEndSize>0&&(1===i.length?e[n-1]===i:e.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}}function ea(e,t){const n=new Qo(t);return n.generator[e.type](e,n),n.output}const ta=n(1227)("mongodb-aggregations:modules:import-pipeline"),na="aggregations/import-pipeline",ia=`${na}/NEW_PIPELINE_FROM_TEXT`,ra=`${na}/CLOSE_IMPORT`,sa=`${na}/CHANGE_TEXT`,oa=`${na}/CREATE_NEW`,aa=`${na}/CONFIRM_NEW`,ua={isOpen:!1,text:"",isConfirmationNeeded:!1,syntaxError:null},la={[ia]:e=>({...e,isOpen:!0,text:""}),[ra]:e=>({...e,isOpen:!1,isConfirmationNeeded:!1,syntaxError:null}),[sa]:(e,t)=>({...e,text:t.text}),[oa]:e=>({...e,isOpen:!1,isConfirmationNeeded:!0})},ca=()=>({type:ia}),pa=e=>{try{return function(e){const t=function(e){if(!e.body||1!==e.body.length)return;const t=e.body[0];if("ExpressionStatement"!==t.type)return;const{type:n,elements:i}=t.expression||{};return"ArrayExpression"!==n||i.find((e=>!function(e){return"ObjectExpression"===e.type&&e.properties&&1===e.properties.length}(e)))?void 0:i.map((e=>function(e){const{key:t,value:n}=e.properties[0];return{operator:t.name||t.value,source:ea(n,{comments:!0,indent:" "})}}(e)))}(function(e){try{const t=function(e,t){return Fo.parse(e,{ecmaVersion:6})}(e);return t}catch(e){const t=new Error(`Unable to parse the pipeline source: ${e.message}`);throw t.stack=e.stack,t}}(e));if(!t)throw new Error("Unable to extract pipeline stages: the provided input is not an array of objects.");return t}(e).map((e=>ha(e.operator,e.source,null)))}catch(e){return ta(e),[ha(null,"",e.message)]}},ha=(e,t,n)=>({...Ln(),stageOperator:e,stage:t,isValid:!n,syntaxError:n});var da=n(6160),fa=n.n(da);const ma="aggregations/data-service/DATA_SERVICE_CONNECTED",ga={error:null,dataService:null};function va(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga,t=arguments.length>1?arguments[1]:void 0;return t.type===ma?{error:t.error,dataService:t.dataService}:e}const ya=(e,t)=>({type:ma,error:e,dataService:t}),xa="aggregations/fields/FIELDS_CHANGED",ba=[],Ea=null,wa="aggregations/source-name/SOURCE_NAME_CHANGED",Ca=null,Sa=n(1227)("mongodb-aggregations:modules:input-document"),Aa="aggregations/input-documents",Da=`${Aa}/TOGGLE_INPUT_COLLAPSED`,_a=`${Aa}/UPDATE_INPUT_DOCUMENTS`,ka=`${Aa}/LOADING_INPUT_DOCUMENTS`,Ta={count:0,documents:[],error:null,isExpanded:!0,isLoading:!1},Fa=(e,t,n)=>({type:_a,count:e,documents:t,error:n}),Ia=()=>(e,t)=>{const n=t(),i=n.dataService.dataService,r=n.namespace,s={maxTimeMS:n.settings.maxTimeMS},o=[{$limit:n.settings.sampleSize}];i&&i.isConnected()?(e({type:ka}),i.estimatedCount(r,s,((t,n)=>{i.aggregate(r,o,s,((i,r)=>{if(i)return e(Fa(t?"N/A":n,[],i));r.toArray(((i,s)=>{e(Fa(t?"N/A":n,s,i)),r.close()}))}))}))):i&&!i.isConnected()&&Sa("warning: trying to refresh aggregation but dataService is disconnected",i)},Na="aggregations/namespace/NAMESPACE_CHANGED",Pa=e=>({type:Na,namespace:e}),Oa="aggregations/env/ENV_CHANGED",Ra=Ot.ON_PREM,Ma="aggregations/env/IS_TIME_SERIES_CHANGED",La=!1,Ba="aggregations/server-version/SERVER_VERSION_CHANGED",ja="4.0.0",Va="aggregations/name/NAME_CHANGED",za="aggregations/limit/LIMIT_CHANGED",qa="aggregations/large-limit/LARGE_LIMIT_CHANGED",Ua=rt,Wa="aggregations/is-atlas-deployed/SET_IS_ATLAS_DEPLOYED",Ka=!1,$a="aggregations/is-readonly/IS_READONLY_CHANGED",Ga=!1,Ha="aggregations/comments/TOGGLE_COMMENTS",Ja=!0,Xa="aggregations/sample/TOGGLE_SAMPLE",Za=!0,Ya="agreggations/restore-pipeline",Qa=`${Ya}/MODAL_TOGGLE`,eu=`${Ya}/OBJECT_ID`,tu={isModalVisible:!1,pipelineObjectID:""},nu="aggregations/is-overview-on/TOGGLE_OVERVIEW",iu=!1,ru="aggregations/settings",su=`${ru}/TOGGLE_IS_EXPANDED`,ou=`${ru}/TOGGLE_COMMENT_MODE`,au=`${ru}/SET_SAMPLE_SIZE`,uu=`${ru}/SET_MAX_TIME_MS`,lu=`${ru}/SET_LIMIT`,cu=`${ru}/APPLY_SETTINGS`,pu={isExpanded:!1,isCommentMode:!0,isDirty:!1,sampleSize:10,maxTimeMS:it,limit:rt},hu=()=>({type:su}),du="aggregations/is-fullscreen-on/TOGGLE_FULLSCREEN",fu=!1,mu="aggregations/saving-pipeline/NAME_CHANGED",gu="aggregations/saving-pipeline/APPLY",vu="aggregations/saving-pipeline/CANCEL",yu="aggregations/saving-pipeline/OPEN",xu={isOpen:!1,name:"",isSaveAs:!1},bu=function(){let{name:e="",isSaveAs:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:yu,isSaveAs:t,name:e}},Eu="aggregations/out-results-fn/OUT_RESULTS_FN_CHANGED",wu=null,Cu="aggregations/is-new-pipeline-confirm/SET_IS_NEW_PIPELINE_CONFIRM",Su=!1,Au=e=>({type:Cu,isNewPipelineConfirm:e});var Du;!function(e){e.SetDataLake="compass-aggregations/setDataLake"}(Du||(Du={}));const _u=!1,ku=e=>({type:Du.SetDataLake,dataLake:e});let Tu;!function(e){e.IndexesFetched="compass-aggregations/indexesFetched"}(Tu||(Tu={}));const Fu=[],{track:Iu,debug:Nu}=We("COMPASS-AGGREGATIONS-UI"),Pu={appRegistry:Ht.INITIAL_STATE,dataService:ga,fields:ba,inputDocuments:Ta,namespace:"",env:Ra,isTimeSeries:La,serverVersion:ja,pipeline:Bn,savedPipeline:mr,restorePipeline:tu,name:"",collationString:Tr,isAtlasDeployed:Ka,isReadonly:Ga,isOverviewOn:iu,comments:Ja,sample:Za,autoPreview:gn,id:"",isModified:dn,importPipeline:ua,settings:pu,limit:10,largeLimit:Ua,maxTimeMS:Rr,isFullscreenOn:fu,savingPipeline:xu,projections:cn,outResultsFn:wu,editViewName:Ea,sourceName:Ca,isNewPipelineConfirm:Su,updateViewError:_i,aggregation:di,workspace:bi,countDocuments:yi,explain:Xi,isDataLake:_u,indexes:Fu},Ou="aggregations/CLEAR_PIPELINE",Ru="aggregations/RESTORE_PIPELINE",Mu="aggregations/NEW_PIPELINE",Lu="aggregations/CLONE_PIPELINE",Bu="aggregations/NEW_FROM_PASTE",ju="aggregations/MODIFY_VIEW",Vu=j({appRegistry:Jt(),comments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ja,t=arguments.length>1?arguments[1]:void 0;return t.type===Ha?!e:e},sample:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Za,t=arguments.length>1?arguments[1]:void 0;return t.type===Xa?!e:e},autoPreview:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gn,t=arguments.length>1?arguments[1]:void 0;return t.type===mn.AutoPreviewToggled?t.value:e},dataService:va,fields:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ba,t=arguments.length>1?arguments[1]:void 0;return t.type===xa?t.fields:e},inputDocuments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ta,t=arguments.length>1?arguments[1]:void 0;return t.type===Da?{...e,isExpanded:!e.isExpanded}:t.type===ka?{...e,isLoading:!0}:t.type===_a?{...e,count:t.count,documents:t.documents,error:t.error,isLoading:!1}:e},namespace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Na?t.namespace:e},env:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ra,t=arguments.length>1?arguments[1]:void 0;return t.type===Oa?t.env:e},isTimeSeries:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La,t=arguments.length>1?arguments[1]:void 0;return t.type===Ma?t.isTimeSeries:e},serverVersion:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ja,t=arguments.length>1?arguments[1]:void 0;return t.type===Ba&&t.version||e},savedPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mr,t=arguments.length>1?arguments[1]:void 0;const n=gr[t.type];return n?n(e,t):e},restorePipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tu,t=arguments.length>1?arguments[1]:void 0;return t.type===Qa?{...e,isModalVisible:!!t.index}:t.type===eu?{...e,pipelineObjectID:t.objectID}:e},pipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[Ln()],t=arguments.length>1?arguments[1]:void 0;const n=zn[t.type];return n?n(e,t):e},name:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Va?t.name:e},collationString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tr,t=arguments.length>1?arguments[1]:void 0;return t.type===kr?Fr(t.value):e},id:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===an?(new Xt.ObjectId).toHexString():e},isModified:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dn,t=arguments.length>1?arguments[1]:void 0;return t.type===hn?t.isModified:e},isAtlasDeployed:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ka,t=arguments.length>1?arguments[1]:void 0;return t.type===Wa?t.isAtlasDeployed:e},isReadonly:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ga,t=arguments.length>1?arguments[1]:void 0;return t.type===$a?t.isReadonly:e},importPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ua,t=arguments.length>1?arguments[1]:void 0;const n=la[t.type];return n?n(e,t):e},isOverviewOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iu;return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pu,t=arguments.length>1?arguments[1]:void 0;return t.type===su?0==!e.isExpanded&&!0===e.isDirty?{...e,...pu}:{...e,isExpanded:!e.isExpanded}:t.type===ou?{...e,isCommentMode:!e.isCommentMode,isDirty:!0}:t.type===au?{...e,sampleSize:t.value,isDirty:!0}:t.type===uu?{...e,maxTimeMS:t.value,isDirty:!0}:t.type===lu?{...e,limit:t.value,isDirty:!0}:(t.type,e)},limit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1?arguments[1]:void 0;return t.type===za?t.limit:e},largeLimit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ua,t=arguments.length>1?arguments[1]:void 0;return t.type===qa?t.largeLimit:e},maxTimeMS:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rr,t=arguments.length>1?arguments[1]:void 0;return t.type===Or?t.maxTimeMS:e},isFullscreenOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fu,t=arguments.length>1?arguments[1]:void 0;return t.type===du?!e:e},savingPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xu,t=arguments.length>1?arguments[1]:void 0;return t.type===mu?{...e,name:t.name}:t.type===yu?{...e,isOpen:!0,isSaveAs:t.isSaveAs,name:t.name}:t.type===vu?{...e,name:"",isOpen:!1}:e},projections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cn;return e},editViewName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ea;return e},sourceName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ca,t=arguments.length>1?arguments[1]:void 0;return t.type===wa?t.sourceName:e},outResultsFn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wu,t=arguments.length>1?arguments[1]:void 0;return t.type===Eu?t.outResultsFn:e},isNewPipelineConfirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Su,t=arguments.length>1?arguments[1]:void 0;return t.type===Cu?t.isNewPipelineConfirm:e},updateViewError:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_i,t=arguments.length>1?arguments[1]:void 0;return t.type===ki?t.error:t.type===Ti?null:e},aggregation:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return di;case hi.AggregationStarted:return{...e,loading:!0,error:void 0,documents:[],abortController:t.abortController,previousPageData:{page:e.page,documents:e.documents,isLast:e.isLast}};case hi.AggregationFinished:return{...e,isLast:t.isLast,page:t.page,documents:t.documents,loading:!1,abortController:void 0,error:void 0,previousPageData:void 0};case hi.AggregationFailed:return{...e,documents:[],loading:!1,abortController:void 0,error:t.error,page:t.page,previousPageData:void 0};case hi.AggregationCancelledByUser:return{...e,loading:!1,abortController:void 0,documents:e.previousPageData?.documents||[],page:e.previousPageData?.page||1,isLast:e.previousPageData?.isLast||!1,previousPageData:void 0};case hi.LastPageReached:return{...e,isLast:!0,loading:!1,page:t.page};default:return e}},workspace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return t.view;case hi.AggregationStarted:return"results";default:return e}},countDocuments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return yi;case vi.CountStarted:return{loading:!0,abortController:t.abortController};case vi.CountFinished:return{loading:!1,abortController:void 0,count:t.count};case vi.CountFailed:return{...e,loading:!1,abortController:void 0};default:return e}},aggregationWorkspaceId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Xt.UUID).toHexString();return e},explain:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ji.ExplainStarted:return{isModalOpen:!0,isLoading:!0,explain:void 0,error:void 0,abortController:t.abortController};case Ji.ExplainFinished:return{isModalOpen:!0,isLoading:!1,explain:t.explain,error:void 0,abortController:void 0};case Ji.ExplainFailed:return{isModalOpen:!0,isLoading:!1,explain:void 0,error:t.error,abortController:void 0};case Ji.ExplainCancelled:return Xi;default:return e}},isDataLake:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_u,t=arguments.length>1?arguments[1]:void 0;return t.type===Du.SetDataLake?t.dataLake:e},indexes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fu,t=arguments.length>1?arguments[1]:void 0;return t.type===Tu.IndexesFetched?t.indexes:e}}),zu={[Na]:(e,t)=>{const n={...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,serverVersion:e.serverVersion,dataService:e.dataService,appRegistry:e.appRegistry};return Vu(n,t)},"aggregations/reset":e=>({...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId}),[Ru]:(e,t)=>{const{id:n,name:i,comments:r,sample:s,autoPreview:o,collationString:a,pipeline:u}=t.restoreState;return{...e,id:n,name:i,comments:r,sample:s,autoPreview:o,collationString:Fr(a),pipeline:u,savedPipeline:{...e.savedPipeline,isListVisible:!1},restorePipeline:{isModalVisible:!1,pipelineObjectID:""}}},[Ou]:e=>({...e,pipeline:[],limit:10,largeLimit:Ua,maxTimeMS:Rr,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,savedPipeline:{...e.savedPipeline,isListVisible:!0}}),[Mu]:e=>({...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId,appRegistry:e.appRegistry,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,fields:e.fields,serverVersion:e.serverVersion,dataService:e.dataService,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,inputDocuments:e.inputDocuments}),[Lu]:e=>({...e,id:(new Xt.ObjectId).toHexString(),name:`${e.name} (copy)`,isModified:!0}),[aa]:e=>{const t=pa(e.importPipeline.text),n=t.length>0?t[0].syntaxError:null;return n||Iu("Aggregation Imported From Text",{num_stages:t.length}),{...e,name:"",collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n?[]:t,importPipeline:{isOpen:!!n,isConfirmationNeeded:!1,text:n?e.importPipeline.text:"",syntaxError:n}}},[nu]:e=>{const t={...e,isOverviewOn:!e.isOverviewOn};return t.pipeline&&t.pipeline.forEach((e=>{e.isExpanded=!t.isOverviewOn})),t.inputDocuments&&(t.inputDocuments.isExpanded=!t.isOverviewOn),t},[cu]:e=>{const t={...e,limit:e.settings.sampleSize,largeLimit:e.settings.limit,comments:e.settings.isCommentMode,maxTimeMS:e.settings.maxTimeMS};return t.settings.isDirty=!1,t},[gu]:e=>{const t={...e,name:e.savingPipeline.name};return t.savingPipeline.isOpen=!1,t},[ln]:e=>{const t={...e,projections:[]};return t.pipeline.map(((e,n)=>{e.projections=Ut(e,null),e.projections.map((e=>{e.index=n,t.projections.push(e)}))})),t},[Bu]:(e,t)=>{const n=pa(t.text),i=n.length>0?n[0].syntaxError:null;return i||e.pipeline.length>1?e:{...e,name:"",collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:t.text,syntaxError:i}}},[ju]:(e,t)=>{const n=t.pipeline.map((e=>ha(Object.keys(e)[0],(0,Rt.toJSString)(Object.values(e)[0]," "),null)));return{...e,editViewName:t.name,isReadonly:t.isReadonly,sourceName:t.sourceName,collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:"",syntaxError:null}}}},qu=(e,t)=>{const n=zu[t.type];return n?n(e,t):Vu(e,t)},Uu=()=>({type:Ou}),Wu=e=>({type:Ru,restoreState:e}),Ku=e=>t=>{t(Uu()),t(Wu(e)),t((0,Ht.globalAppRegistryEmit)("compass:aggregations:pipeline-opened")),t(ti(0,!0))},$u=()=>(e,t)=>{const n=t(),i={source:n.namespace,pipeline:n.pipeline.map((e=>e.executor||Kt(e))).filter((e=>!fa()(e)))};Nu("emitting","open-create-view",i),e((0,Ht.localAppRegistryEmit)("open-create-view",i))};function Gu(e){let{onAction:t,title:n,glyph:s,menuItems:o,"data-testid":a}=e;const[u,l]=(0,i.useState)(!1),c=(0,i.useCallback)((e=>{e.stopPropagation(),l(!1),t(e.currentTarget.dataset.action)}),[t]);return r().createElement(he.Menu,{"data-testid":`${a}-content`,open:u,setOpen:l,justify:"start",trigger:e=>{let{onClick:t,children:i}=e;return r().createElement(he.Button,{"data-testid":a,title:n,"aria-label":n,variant:"primary",size:"xsmall",leftGlyph:r().createElement(he.Icon,{glyph:s}),onClick:e=>{e.stopPropagation(),t()}},n,i)}},o.map((e=>r().createElement(he.MenuItem,{key:e.title,"data-action":e.action,"data-testid":`${a}-${e.action}`,onClick:c,"aria-label":e.title},e.title))))}const Hu=Y((e=>{let{name:t,serverVersion:n}=e;return{pipelineName:t,isCreateViewAvailable:nn().gte(n,"3.4.0")}}),{onSave:e=>""===e?bu():Er(),onSaveAs:e=>""===e?bu():bu({name:e,isSaveAs:!0}),onCreateView:()=>$u()})((e=>{let{pipelineName:t,isCreateViewAvailable:n,onSave:i,onSaveAs:s,onCreateView:o}=e;return r().createElement(Gu,{"data-testid":"save-menu",title:"Save",glyph:"Save",onAction:e=>{switch(e){case"save":return i(t);case"saveAs":return s(t);case"createView":return o()}},menuItems:[{action:"save",title:"Save"},{action:"saveAs",title:"Save as"},n&&{action:"createView",title:"Create view"}].filter(Boolean)})})),Ju=Y(null,(e=>({onCreatePipeline:()=>e(Au(!0)),onCreatePipelineFromText:()=>e(ca())})))((e=>{let{onCreatePipeline:t,onCreatePipelineFromText:n}=e;return r().createElement(Gu,{"data-testid":"create-new-menu",title:"Create new",glyph:"Plus",onAction:e=>{switch(e){case"createPipleine":return t();case"createPipleineFromText":return n()}},menuItems:[{action:"createPipleine",title:"Pipeline"},{action:"createPipleineFromText",title:"Pipeline from text"}]})})),Xu=(0,he.css)({display:"flex",alignItems:"center"}),Zu=(0,he.css)({maxWidth:"100px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),Yu=(0,he.css)({fontStyle:"italic",whiteSpace:"nowrap"}),Qu=Y((e=>{let{name:t,isModified:n}=e;return{name:t,isModified:n}}))((e=>{let{name:t,isModified:n}=e;return r().createElement(he.Body,{className:Xu,"data-testid":"pipeline-name"},""===t?"Untitled":r().createElement(he.Tooltip,{trigger:e=>{let{children:n,...i}=e;return r().createElement("span",d({},i,{className:Zu}),n,t)}},r().createElement(he.Body,null,t)),n&&r().createElement("span",{className:Yu}," – modified"))})),el=(0,he.css)({display:"flex",gap:he.spacing[2],justifyItems:"center"}),tl=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[1]}),nl=(0,he.css)({marginBottom:0,padding:0,textTransform:"uppercase"}),il=Y((e=>{let{autoPreview:t}=e;return{isAutoPreview:t}}),{onToggleAutoPreview:vn,onToggleSettings:hu})((e=>{let{isAutoPreview:t,onToggleAutoPreview:n,onToggleSettings:i}=e;return r().createElement("div",{className:el,"data-testid":"pipeline-toolbar-extra-settings"},r().createElement("div",{className:tl},r().createElement(he.Toggle,{id:"auto-preview",size:"xsmall","aria-label":"Toggle Auto Preview",onChange:e=>{n(e)},"data-testid":"pipeline-toolbar-preview-toggle",checked:t}),r().createElement(he.Label,{className:nl,htmlFor:"auto-preview"},"Auto Preview")),r().createElement(he.IconButton,{"aria-label":"More Settings",onClick:()=>i(),"data-testid":"pipeline-toolbar-settings-button"},r().createElement(he.Icon,{glyph:"Settings"})))})),rl=(0,he.css)({display:"grid",gap:he.spacing[2],gridTemplateAreas:'"settings extraSettings"',gridTemplateColumns:"1fr min-content",alignItems:"center",whiteSpace:"nowrap"}),sl=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),ol=(0,he.css)({gridArea:"extraSettings",display:"flex"}),al=Y((e=>({isSavePipelineEnabled:!e.editViewName&&!e.isAtlasDeployed,isCreatePipelineEnabled:!e.editViewName})),{onExportToLanguage:Kr})((e=>{let{isSavePipelineEnabled:t,isCreatePipelineEnabled:n,onExportToLanguage:i}=e;return r().createElement("div",{className:rl,"data-testid":"pipeline-settings"},r().createElement("div",{className:sl},t&&r().createElement(r().Fragment,null,r().createElement(Qu,null),r().createElement(Hu,null)),n&&r().createElement(Ju,null),r().createElement(he.Button,{variant:"primaryOutline",size:"xsmall",leftGlyph:r().createElement(he.Icon,{glyph:"Export"}),onClick:i,"data-testid":"pipeline-toolbar-export-button"},"Export to language")),r().createElement("div",{className:ol},r().createElement(il,null)))})),ul=(0,he.css)({paddingTop:he.spacing[3],paddingRight:he.spacing[5],paddingBottom:he.spacing[3],paddingLeft:he.spacing[3]}),ll=(0,he.css)({display:"grid",gap:he.spacing[3],gridTemplateAreas:'\n "headerAndOptionsRow"\n ',marginLeft:he.spacing[1],marginRight:he.spacing[1]}),cl=(0,he.css)({gridTemplateAreas:'\n "headerAndOptionsRow"\n "settingsRow"\n '}),pl=(0,he.css)({gridArea:"headerAndOptionsRow",border:"1px solid",borderRadius:"6px",borderColor:he.uiColors.gray.light2,padding:he.spacing[2]}),hl=(0,he.css)({gridArea:"settingsRow"}),dl=(0,he.css)({marginTop:he.spacing[2]}),fl=Y((e=>{let{workspace:t}=e;return{isSettingsVisible:"builder"===t}}))((e=>{let{isSettingsVisible:t,showRunButton:n,showExportButton:s,showExplainButton:o}=e;const[a,u]=(0,i.useState)(!1);return r().createElement(he.Toolbar,{className:(0,he.cx)(ul,ll,t&&cl),"data-testid":"pipeline-toolbar"},r().createElement(r().Fragment,null,r().createElement("div",{className:pl},r().createElement(_r,{isOptionsVisible:a,onToggleOptions:()=>u(!a),showRunButton:n,showExportButton:s,showExplainButton:o}),a&&r().createElement("div",{className:dl},r().createElement(Wr,null))),t&&r().createElement("div",{className:hl},r().createElement(al,null))))})),ml=require("@mongodb-js/compass-crud");n(8423);var gl=n(161),vl=n.n(gl),yl=n(4622),xl=n.n(yl),bl=n(4772),El=n.n(bl),wl=n(4537),Cl=n.n(wl),Sl=n(3958),Al=n.n(Sl);const Dl=Symbol.for("@@mdb.decryptedKeys");function _l(e,t){t.isValueDecrypted()&&(e[Dl]||Object.defineProperty(e,Dl,{value:[],writable:!0,configurable:!0,enumerable:!1}),e[Dl].push(String(t.currentKey)))}const kl=class{static generate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n={};for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isRemoved()||""===i.currentKey||(n[i.currentKey]=i.generateObject(t),_l(n,i));return n}return e}static generateOriginal(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n={};for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isAdded()||(n[i.key]=i.generateOriginalObject(t),_l(n,i));return n}return e}static generateArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n=[];for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isRemoved()||(i.elements?n.push(i.generateObject(t)):n.push(i.currentValue),_l(n,i));return n}return e}static generateOriginalArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n=[];for(const i of e)t.excludeInternalFields&&i.isInternalField()||(i.originalExpandableValue?n.push(i.generateOriginalObject(t)):i.isAdded()||n.push(i.value),_l(n,i));return n}return e}};var Tl=n(8875),Fl=n.n(Tl);const Il={Added:"Element::Added",Edited:"Element::Edited",Removed:"Element::Removed",Reverted:"Element::Reverted",Converted:"Element::Converted",Invalid:"Element::Invalid",Valid:"Element::Valid"};function Nl(e){const t=String(e).length;return 0===t?1:t}function Pl(e){if(e&&"object"==typeof e)for(const t of Object.keys(e)){const n=e[t];"object"==typeof n&&null!==n&&(n.$numberInt?e[t]=+n.$numberInt:n.$numberDouble?e[t]=+n.$numberDouble:Pl(n))}}const Ol=/^(\[|\{)(.+)(\]|\})$/;class Rl{constructor(e){this.element=e,this.type=e.currentType,this.editing=!1}edit(e){const t=this.element.currentType;try{const n=Fl().cast(e,t);this.element.edit(n)}catch(n){this.element.setInvalid(e,t,n.message)}}paste(e){Ol.exec(e)?(this.edit(JSON.parse(e)),this.element._bubbleUp(Il.Converted,this.element)):this.edit(e)}size(){return Nl(this.element.currentValue)}value(){return String(this.element.currentValue)}start(){this.editing=!0}complete(){this.editing=!1}}class Ml extends Rl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(Fl().cast(this._formattedValue(),"Date"))}edit(e){try{"Invalid Date"===Fl().cast(e,"Date").toString()?this.element.setInvalid(e,"Date",`${String(e)} is not in a valid date format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Il.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(e){const t=this.element.currentValue;return e?Nl(t):this.element.isCurrentTypeValid()?Nl(this._formattedValue()):Nl(t)}start(){super.start(),this.element.isCurrentTypeValid()&&this.edit(this._formattedValue())}value(){const e=this.element.currentValue;return!this.editing&&this.element.isCurrentTypeValid()?this._formattedValue():String(e)}_formattedValue(){return new Date(this.element.currentValue).toISOString().replace("Z","+00:00")}}const Ll=["Binary","Code","MinKey","MaxKey","Timestamp","BSONRegExp","Undefined","Null","DBRef"];class Bl extends(vl()){cancel(){if(this.elements)for(const e of Array.from(this.elements))e.cancel();this.isModified()&&this.revert()}constructor(e,t){let n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;super(),this.uuid=(new Xt.UUID).toHexString(),this.key=e,this.currentKey=e,this.parent=r,this.previousElement=s,this.nextElement=o,this.added=i,this.removed=!1,this.type=Fl().type(t),this.currentType=this.type,this.level=this._getLevel(),this.setValid(),this._isExpandable(t)?(this.elements=this._generateElements(t),this.originalExpandableValue=t):(this.value=t,this.currentValue=t),this.parent&&(n=this.parent.isRoot()?this.parent.doc:this.parent.originalExpandableValue);const a=n&&n[Symbol.for("@@mdb.decryptedKeys")];this.decrypted=(a||[]).map(String).includes(String(e))}_getLevel(){let e=-1,t=this.parent;for(;t;)e++,t=t.parent;return e}edit(e){this.currentType=Fl().type(e),this._isExpandable(e)&&!this._isExpandable(this.currentValue)?(this.currentValue=null,this.elements=this._generateElements(e)):!this._isExpandable(e)&&this.elements?(this.currentValue=e,this.elements=void 0):this.currentValue=e,this.setValid(),this._bubbleUp(Il.Edited,this)}changeType(e){if("Object"===e)this.edit("{"),this.next();else if("Array"===e)this.edit("["),this.next();else try{if("Date"===e){const e=new Ml(this);e.edit(this.generateObject()),e.complete()}else this.edit(Fl().cast(this.generateObject(),e))}catch(t){this.setInvalid(this.currentValue,e,t.message)}}getRoot(){let e=this.parent;for(;e?.parent;)e=e.parent;return e}get(e){return this.elements?.get(e)}at(e){return this.elements?.at(e)}next(){return"{"===this.currentValue?this._convertToEmptyObject():"["===this.currentValue?this._convertToEmptyArray():this._next()}rename(e){if(this.parent){const t=this.parent.elements._map[this.currentKey];delete this.parent.elements._map[this.currentKey],this.parent.elements._map[e]=t}this.currentKey=e,this._bubbleUp(Il.Edited,this)}generateObject(e){return"Array"===this.currentType?kl.generateArray(this.elements,e):"Object"===this.currentType?kl.generate(this.elements,e):this.currentValue}generateOriginalObject(e){if("Array"===this.type){const t=this._generateElements(this.originalExpandableValue);return kl.generateOriginalArray(t,e)}if("Object"===this.type){const t=this._generateElements(this.originalExpandableValue);return kl.generateOriginal(t,e)}return this.value}insertAfter(e,t,n){if(!this.elements)throw new Error("Cannot insert values on non-array/non-object elements");"Array"===this.currentType&&(""===e.currentKey&&this.elements.handleEmptyKeys(e),t=e.currentKey+1);const i=this.elements.insertAfter(e,t,n,!0,this);return"Array"===this.currentType&&this.elements.updateKeys(i,1),i._bubbleUp(Il.Added,i,this),i}insertEnd(e,t){if(!this.elements)throw new Error("Cannot insert values on non-array/non-object elements");"Array"===this.currentType&&(this.elements.flush(),e=0,this.elements.lastElement&&(""===this.elements.lastElement.currentKey&&this.elements.handleEmptyKeys(this.elements.lastElement),e=this.elements.lastElement.currentKey+1));const n=this.elements.insertEnd(e,t,!0,this);return this._bubbleUp(Il.Added,n),n}insertPlaceholder(){return this.insertEnd("","")}insertSiblingPlaceholder(){return this.parent.insertAfter(this,"","")}isAdded(){return this.added||!!this.parent?.isAdded()}isBlank(){return""===this.currentKey&&""===this.currentValue}isCurrentTypeValid(){return!!this.currentTypeValid}setValid(){this.currentTypeValid=!0,this.invalidTypeMessage=void 0,this._bubbleUp(Il.Valid,this)}setInvalid(e,t,n){this.currentValue=e,this.currentType=t,this.currentTypeValid=!1,this.invalidTypeMessage=n,this._bubbleUp(Il.Invalid,this)}isDuplicateKey(e){if(""===e)return!1;for(const t of this.parent?.elements??[])if(t.uuid!==this.uuid&&t.currentKey===e)return!0;return!1}isEdited(){return(this.isRenamed()||!this._valuesEqual()||this.type!==this.currentType)&&!this.isAdded()}_valuesEqual(){return"Date"===this.currentType&&en()(this.currentValue)?Al()(this.value,new Date(this.currentValue)):"ObjectId"===this.currentType&&en()(this.currentValue)?this._isObjectIdEqual():Al()(this.value,this.currentValue)}_isObjectIdEqual(){try{return this.value.toHexString()===this.currentValue}catch(e){return!1}}isLast(){return this.parent?.elements?.lastElement===this}isRenamed(){return!(this.parent&&!this.parent.isRoot()&&"Object"!==this.parent.currentType)&&this.key!==this.currentKey}isRevertable(){return this.isEdited()||this.isRemoved()}isRemovable(){return!this.parent.isRemoved()}isNotActionable(){return("_id"===this.key||this.isInternalField())&&!this.isAdded()||!this.isRemovable()}isValueDecrypted(){return this.decrypted}containsDecryptedChildren(){if(this.isValueDecrypted())return!0;for(const e of this.elements||[])if(e.containsDecryptedChildren())return!0;return!1}isValueEditable(){return this._isKeyLegallyEditable()&&!Ll.includes(this.currentType)}isParentEditable(){return!(this.parent&&!this.parent.isRoot())||this.parent._isKeyLegallyEditable()}_isKeyLegallyEditable(){return this.isParentEditable()&&(this.isAdded()||"_id"!==this.currentKey&&!this.isInternalField())}isKeyEditable(){return this._isKeyLegallyEditable()&&!this.containsDecryptedChildren()}isInternalField(){return!(!this.parent||(this.parent.isRoot()||!this.parent.isInternalField())&&(!this.parent.isRoot()||(e=this.currentKey,"string"!=typeof e||!/^__safeContent__($|\.)/.test(e))));var e}isModified(){if(this.elements)for(const e of this.elements)if(e.isModified())return!0;return this.isAdded()||this.isEdited()||this.isRemoved()}isRemoved(){return this.removed}isRoot(){return!1}remove(){this.revert(),this.removed=!0,this.parent&&this._bubbleUp(Il.Removed,this,this.parent)}revert(){this.isAdded()?("Array"===this.parent?.currentType&&this.parent.elements.updateKeys(this,-1),this.parent.elements.remove(this),this._bubbleUp(Il.Removed,this,this.parent),this.parent=null):(this.originalExpandableValue?(this.elements=this._generateElements(this.originalExpandableValue),this.currentValue=void 0):(null===this.currentValue&&null!==this.value?this.elements=null:this._removeAddedElements(),this.currentValue=this.value),this.currentKey=this.key,this.currentType=this.type,this.removed=!1),this.setValid(),this._bubbleUp(Il.Reverted,this)}_bubbleUp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emit(e,...n);const r=this.parent;r&&(r.isRoot()?r.emit(e,...n):r._bubbleUp(e,...n))}_convertToEmptyObject(){this.edit({}),this.insertPlaceholder()}_convertToEmptyArray(){this.edit([]),this.insertPlaceholder()}_isElementEmpty(e){return!!e&&e.isAdded()&&e.isBlank()}_isExpandable(e){return El()(e)||Cl()(e)}_generateElements(e){return new jl(this,e)}_key(e,t){return"Array"===this.currentType?t:e}_next(){this._isElementEmpty(this.nextElement)||this._isElementEmpty(this)||this.parent.insertAfter(this,"","")}_removeAddedElements(){if(this.elements)for(const e of this.elements)e.isAdded()&&this.elements.remove(e)}static get Events(){return Il}}class jl{at(e){if(this.flush(),!Number.isInteger(e))return;let t=this.firstElement;for(let n=0;n<e;n++){if(!t)return;t=t.nextElement}return null===t?void 0:t}get(e){return this.flush(),this._map[e]}constructor(e,t){this.firstElement=null,this.lastElement=null,this.doc=e,this.originalDoc=t,this.keys=xl()(this.originalDoc),"Array"===this.doc.currentType&&(this.keys=this.keys.map((e=>parseInt(e,10)))),this.size=this.keys.length,this.loaded=0,this._map={}}insertAfter(e,t,n,i,r){return this.flush(),this._insertAfter(e,t,n,i,r)}updateKeys(e,t){for(this.flush();e.nextElement;)e.nextElement.currentKey+=t,e=e.nextElement}handleEmptyKeys(e){if(""===e.currentKey){let t=e;for(;""===t.currentKey;){if(!t.previousElement){t.currentKey=0;break}t=t.previousElement}for(;t.nextElement;)t.nextElement.currentKey=t.currentKey+1,t=t.nextElement}}insertBefore(e,t,n,i,r){return this.flush(),this._insertBefore(e,t,n,i,r)}insertBeginning(e,t,n,i){return this.flush(),this._insertBeginning(e,t,n,i)}insertEnd(e,t,n,i){return this.flush(),this.lastElement?this.insertAfter(this.lastElement,e,t,n,i):this.insertBeginning(e,t,n,i)}flush(){if(this.loaded<this.size)for(const e of this)e?.elements?.flush()}*[Symbol.iterator](){let e,t=0;for(;;)if(this._needsLazyLoad(t)){const n=this.keys[t];t+=1,e=this._lazyInsertEnd(n),yield e}else{if(!this._needsStandardIteration(t))break;if(e=e?e.nextElement:this.firstElement,!e)break;t+=1,yield e}}_needsLazyLoad(e){return 0===e&&0===this.loaded&&this.size>0||this.loaded<=e&&e<this.size}_needsStandardIteration(e){return this.loaded>0&&e<this.loaded&&e<this.size}_lazyInsertEnd(e){return this.size-=1,this._insertEnd(e,this.originalDoc[e],this.doc.cloned,this.doc)}_insertEnd(e,t,n,i){return this.lastElement?this._insertAfter(this.lastElement,e,t,n,i):this._insertBeginning(e,t,n,i)}_insertBefore(e,t,n,i,r){const s=new Bl(t,n,i,r,e.previousElement,e);return e.previousElement?e.previousElement.nextElement=s:this.firstElement=s,e.previousElement=s,this._map[s.key]=s,this.size+=1,this.loaded+=1,s}_insertBeginning(e,t,n,i){if(!this.firstElement){const r=new Bl(e,t,n,i,null,null);return this.firstElement=this.lastElement=r,this.size+=1,this.loaded+=1,this._map[r.key]=r,r}const r=this.insertBefore(this.firstElement,e,t,n,i);return this._map[r.key]=r,r}_insertAfter(e,t,n,i,r){const s=new Bl(t,n,i,r,e,e.nextElement);return e.nextElement?e.nextElement.previousElement=s:this.lastElement=s,e.nextElement=s,this._map[s.key]=s,this.size+=1,this.loaded+=1,s}remove(e){return this.flush(),e.previousElement?e.previousElement.nextElement=e.nextElement:this.firstElement=e.nextElement,e.nextElement?e.nextElement.previousElement=e.previousElement:this.lastElement=e.previousElement,e.nextElement=e.previousElement=null,delete this._map[e.currentKey],this.size-=1,this.loaded-=1,this}findIndex(e){let t=0;for(const n of this){if(n===e)return t;t++}return-1}}const Vl={Cancel:"Document::Cancel"};class zl extends(vl()){cancel(){for(const e of Array.from(this.elements))e.cancel();this.emit(Vl.Cancel)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(),this.uuid=(new Xt.UUID).toHexString(),this.doc=e,this.cloned=t||!1,this.isUpdatable=!0,this.elements=this._generateElements(),this.type="Document",this.currentType="Document"}apply(e){"function"==typeof e?.generateObject&&(e=e.generateObject());const t=[];let n=null;for(const[i,r]of Object.entries(e))this.get(i)?this.get(i).edit(r):n?this.insertAfter(this.get(n),i,r):this.insertBeginning(i,r),n=i,t.push(i);for(const e of[...this.elements])t.includes(e.currentKey)||e.remove()}generateObject(e){return kl.generate(this.elements,e)}generateOriginalObject(e){return kl.generateOriginal(this.elements,e)}generateUpdateUnlessChangedInBackgroundQuery(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.getOriginalKeysAndValuesForFieldsThatWereUpdated(e),n={_id:this.getId(),...t},i=this.getSetUpdateForDocumentChanges(),r=this.getUnsetUpdateForDocumentChanges(),s={};return i&&Object.keys(i).length>0&&(s.$set=i),r&&Object.keys(r).length>0&&(s.$unset=r),{query:n,updateDoc:s}}get(e){return this.elements.get(e)}getChild(e){if(!e)return;let t=this.elements.get(e[0]),n=1;for(;n<e.length;){if(void 0===t)return;t="Array"===t.currentType?t.at(e[n]):t.get(e[n]),n++}return t}getId(){const e=this.get("_id");return e?e.generateObject():null}getOriginalKeysAndValuesForFieldsThatWereUpdated(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t={};if(this.elements)for(const n of this.elements)(n.isModified()&&!n.isAdded()||e&&n.key in e)&&(t[n.key]=n.generateOriginalObject()),n.isAdded()&&""!==n.currentKey&&(t[n.currentKey]={$exists:!1});return t}getOriginalKeysAndValuesForSpecifiedKeys(e){const t={};if(this.elements)for(const n of this.elements)n.key in e&&(t[n.key]=n.generateOriginalObject());return t}getSetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isRemoved()&&""!==t.currentKey&&t.isModified()&&(e[t.currentKey]=t.generateObject());return e}getStringId(){const e=this.get("_id");return e?"Array"===e.currentType||"Object"===e.currentType?JSON.stringify(e.generateObject()):String(e.value):null}getUnsetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isAdded()&&t.isRemoved()&&""!==t.key&&(e[t.key]=!0),!t.isAdded()&&t.isRenamed()&&""!==t.key&&(e[t.key]=!0);return e}insertPlaceholder(){return this.insertEnd("","")}insertBeginning(e,t){const n=this.elements.insertBeginning(e,t,!0,this);return n._bubbleUp(Il.Added,n,this),n}insertEnd(e,t){const n=this.elements.insertEnd(e,t,!0,this);return n._bubbleUp(Il.Added,n,this),n}insertAfter(e,t,n){const i=this.elements.insertAfter(e,t,n,!0,this);return i._bubbleUp(Il.Added,i,this),i}isAdded(){return!1}isModified(){for(const e of this.elements)if(e.isModified())return!0;return!1}isRemoved(){return!1}isRoot(){return!0}next(){this.elements.flush();const e=this.elements.lastElement;e&&e.isAdded()&&e.isBlank()?e.remove():this.insertPlaceholder()}_generateElements(){return new jl(this,this.doc)}static get Events(){return Vl}static FromEJSON(e){const t=Xt.EJSON.parse(e,{relaxed:!1});return new zl(t)}static FromEJSONArray(e){const t=Xt.EJSON.parse(e,{relaxed:!1});return Array.isArray(t)?t.map((e=>new zl(e))):[new zl(t)]}toEJSON(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Xt.EJSON.serialize(e,{relaxed:!1});return Pl(n),JSON.stringify(n,null,"indent"in t?t.indent:2)}("original"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"current")?this.generateOriginalObject():this.generateObject(),e)}}const ql=zl;class Ul extends Rl{constructor(e){super(e)}}class Wl extends Rl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(Fl().cast(this.element.currentValue,"Decimal128"))}edit(e){try{Fl().cast(e,"Decimal128"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Il.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}class Kl extends Rl{constructor(e){super(e)}size(){return Nl(this.element.currentValue.valueOf())}}class $l extends Rl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(Fl().cast(this.element.currentValue,"Int64"))}edit(e){try{Fl().cast(e,"Int64"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Il.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}class Gl extends Rl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(Fl().cast(this.element.currentValue,"Double"))}edit(e){try{const t=Fl().cast(e,"Double");isNaN(t.value)?this.element.setInvalid(e,"Double",`${String(e)} is not a valid double format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Il.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(){const e=this.element.currentValue;return Nl("function"==typeof e.valueOf?e.valueOf():e)}}class Hl extends Rl{constructor(e){super(e)}size(){return 4}value(){return"null"}}const Jl="undefined";class Xl extends Rl{constructor(e){super(e)}size(){return Jl.length}value(){return Jl}}class Zl extends Rl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(Fl().cast(this.element.currentValue,"ObjectId"))}edit(e){try{Fl().cast(e,"ObjectId"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Il.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}start(){super.start(),this.element.isCurrentTypeValid()&&this.edit(String(this.element.currentValue))}}Object.assign((e=>({Standard:new Rl(e),String:new Ul(e),Decimal128:new Wl(e),Date:new Ml(e),Double:new Gl(e),Int32:new Kl(e),Int64:new $l(e),Null:new Hl(e),Undefined:new Xl(e),ObjectId:new Zl(e)})),{DateEditor:Ml,StandardEditor:Rl,StringEditor:Ul,Decimal128Editor:Wl,DoubleEditor:Gl,Int32Editor:Kl,Int64Editor:$l,NullEditor:Hl,UndefinedEditor:Xl,ObjectIdEditor:Zl});const Yl=ql,Ql=e=>{let{direction:t}=e;return 1===t?r().createElement(he.Icon,{glyph:"ArrowUp"}):-1===t?r().createElement(he.Icon,{glyph:"ArrowDown"}):r().createElement(r().Fragment,null,"(",String(t),")")},ec=(0,he.css)({display:"flex",flexDirection:"column",gap:he.spacing[1]}),tc=(0,he.css)({marginTop:he.spacing[1],marginBottom:he.spacing[1]}),nc=(0,he.css)({marginTop:he.spacing[1],"*:not(:last-child)":{marginRight:he.spacing[1]}}),ic=(0,he.css)({color:he.uiColors.gray.dark1}),rc=e=>{let{indexes:t}=e;return 0===t.length?null:r().createElement("div",{className:ec},t.map(((e,t)=>{let{name:n,shard:i,key:s}=e;const o=i?r().createElement(r().Fragment,null,n," ",r().createElement("span",{className:ic},"(",i,")")):n;return r().createElement("div",{className:tc,key:t},r().createElement(he.Accordion,{text:o,"data-testid":`explain-index-button-${n}-${i??""}`},r().createElement("div",{className:nc,"data-testid":`explain-index-content-${n}-${i??""}`},Object.entries(s).map(((e,t)=>{let[n,i]=e;return r().createElement(he.Badge,{variant:he.BadgeVariant.LightGray,key:t},n," ",r().createElement(Ql,{direction:i}))})))))})))},sc=(0,he.css)({display:"flex",gap:he.spacing[3],flexDirection:"column"}),oc=(0,he.css)({gap:he.spacing[1],display:"flex",flexDirection:"column"}),ac=(0,he.css)({display:"flex",gap:he.spacing[1],alignItems:"baseline"}),uc=(0,he.css)({whiteSpace:"nowrap"}),lc=e=>{let{nReturned:t,executionTimeMillis:n,indexes:i}=e;return r().createElement("div",{className:sc,"data-testid":"pipeline-explain-results-summary"},r().createElement(he.Subtitle,null,"Query Performance Summary"),r().createElement("div",{className:oc},"number"==typeof t&&r().createElement("div",{className:ac},r().createElement(he.Body,null,"Documents returned:"),r().createElement(he.Body,{weight:"medium"},t)),n>0&&r().createElement("div",{className:ac},r().createElement(he.Body,null,"Actual query execution time (ms):"),r().createElement(he.Body,{weight:"medium"},n)),i.length>0&&r().createElement("div",{className:ac},r().createElement(he.Body,{className:uc},"Query used the following indexes:"),r().createElement(he.Body,{weight:"medium"},i.length)),r().createElement(rc,{indexes:i})))},cc=(0,he.css)({gap:he.spacing[4],display:"grid",gridTemplateRows:"auto 1fr",height:"100%"}),pc=(0,he.css)({gridTemplateAreas:"\n 'stats'\n 'card'\n "}),hc=(0,he.css)({gridTemplateAreas:"\n 'card'\n "}),dc=(0,he.css)({gridArea:"stats"}),fc=(0,he.css)({gridArea:"card",maxHeight:"50vh",overflowY:"scroll"}),mc=e=>{let{plan:t,stats:n}=e;return r().createElement("div",{className:(0,he.cx)(n?pc:hc,cc),"data-testid":"pipeline-explain-results"},n&&r().createElement("div",{className:dc},r().createElement(lc,{nReturned:n.nReturned,executionTimeMillis:n.executionTimeMillis,indexes:n.indexes})),r().createElement(he.Card,{className:fc,"data-testid":"pipeline-explain-results-json"},r().createElement(ml.Document,{doc:t,editable:!1,copyToClipboard:()=>{navigator.clipboard.writeText(new Yl(t).toEJSON())}})))},gc=(0,he.css)({display:"grid",gap:he.spacing[3],gridTemplateRows:"auto 1fr auto"}),vc=(0,he.css)({gridTemplateAreas:"\n 'header'\n 'content'\n 'footer'\n "}),yc=(0,he.css)({gridTemplateAreas:"\n 'header'\n 'content'\n "}),xc=(0,he.css)({gridArea:"header"}),bc=(0,he.css)({gridArea:"content"}),Ec=(0,he.css)({gridArea:"footer",paddingRight:0,paddingBottom:0}),wc=(0,he.css)({display:"flex",justifyContent:"center",height:"100%"}),Cc=()=>window.innerWidth<=he.breakpoints.XLDesktop?"default":"large",Sc=Y((e=>{let{explain:{isModalOpen:t,isLoading:n,error:i,explain:r}}=e;return{isModalOpen:t,isLoading:n,error:i,explain:r}}),{onCloseModal:()=>e=>{e(Zi())},onCancelExplain:Zi})((e=>{let{isModalOpen:t,isLoading:n,error:s,explain:o,onCloseModal:a,onCancelExplain:u}=e;const[l,c]=(0,i.useState)(Cc());(0,i.useEffect)((()=>{if(!t)return;const e=()=>{c(Cc())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),(0,i.useEffect)((()=>{c(Cc())}),[t]);let p=null;return n?p=r().createElement("div",{className:wc},r().createElement(he.CancelLoader,{"data-testid":"pipeline-explain-cancel",cancelText:"Cancel",onCancel:()=>u(),progressText:"Running explain"})):s?p=r().createElement(he.ErrorSummary,{"data-testid":"pipeline-explain-error",errors:s}):o&&(p=r().createElement(mc,{plan:o.plan,stats:o.stats})),p?r().createElement(he.Modal,{size:l,setOpen:a,open:t,"data-testid":"pipeline-explain-modal",contentClassName:(0,he.cx)(n?yc:vc,gc)},r().createElement(he.H3,{className:xc},"Explain Plan"),r().createElement("div",{className:bc},p),!n&&r().createElement(he.ModalFooter,{className:Ec},r().createElement(he.Button,{onClick:a,"data-testid":"pipeline-explain-footer-close-button"},"Close"))):null}));var Ac,Dc=(Ac=function(e,t){return Ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ac(e,t)},function(e,t){function n(){this.constructor=e}Ac(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_c=function(){return _c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},_c.apply(this,arguments)},kc={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return Dc(t,e),t.prototype.render=function(){return i.createElement("div",{className:this.props.className||"",style:_c(_c({position:"absolute",userSelect:"none"},kc[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(i.PureComponent),Fc=n(6238),Ic=n.n(Fc),Nc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pc=function(){return Pc=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Pc.apply(this,arguments)},Oc={width:"auto",height:"auto"},Rc=Ic()((function(e,t,n){return Math.max(Math.min(e,n),t)})),Mc=Ic()((function(e,t){return Math.round(e/t)*t})),Lc=Ic()((function(e,t){return new RegExp(e,"i").test(t)})),Bc=function(e){return Boolean(e.touches&&e.touches.length)},jc=Ic()((function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,r){return Math.abs(i-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[i]-e);return 0===n||r<n?t[i]:e})),Vc=Ic()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),zc=Ic()((function(e){return"auto"===(e=e.toString())||Vc(e,"px")||Vc(e,"%")||Vc(e,"vh")||Vc(e,"vw")||Vc(e,"vmax")||Vc(e,"vmin")?e:e+"px"})),qc=function(e,t,n,i){if(e&&"string"==typeof e){if(Vc(e,"px"))return Number(e.replace("px",""));if(Vc(e,"%"))return t*(Number(e.replace("%",""))/100);if(Vc(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(Vc(e,"vh"))return i*(Number(e.replace("vh",""))/100)}return e},Uc=Ic()((function(e,t,n,i,r,s,o){return i=qc(i,e.width,t,n),r=qc(r,e.height,t,n),s=qc(s,e.width,t,n),o=qc(o,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===s?void 0:Number(s),minHeight:void 0===o?void 0:Number(o)}})),Wc=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Kc="__resizable_base__",$c=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(Kc):t.className+=Kc,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Nc(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Oc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=r}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&Vc(e.propsSize[t].toString(),"%")){if(Vc(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return zc(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?zc(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?zc(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,r=this.props.boundsByDirection,s=this.state.direction,o=r&&Lc("left",s),a=r&&Lc("top",s);if("parent"===this.props.bounds){var u=this.parentNode;u&&(n=o?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,r=this.state,s=r.direction,o=r.original,a=this.props,u=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,p=o.width,h=o.height,d=l||0,f=c||0;return Lc("right",s)&&(p=o.width+(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Lc("left",s)&&(p=o.width-(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Lc("bottom",s)&&(h=o.height+(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),Lc("top",s)&&(h=o.height-(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var r=this.props,s=r.lockAspectRatio,o=r.lockAspectRatioExtraHeight,a=r.lockAspectRatioExtraWidth,u=void 0===i.width?10:i.width,l=void 0===n.width||n.width<0?e:n.width,c=void 0===i.height?10:i.height,p=void 0===n.height||n.height<0?t:n.height,h=o||0,d=a||0;if(s){var f=(c-h)*this.ratio+d,m=(p-h)*this.ratio+d,g=(u-d)/this.ratio+h,v=(l-d)/this.ratio+h,y=Math.max(u,f),x=Math.min(l,m),b=Math.max(c,g),E=Math.min(p,v);e=Rc(e,y,x),t=Rc(t,b,E)}else e=Rc(e,u,l),t=Rc(t,c,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),r=i.left,s=i.top,o=i.right,a=i.bottom;this.resizableLeft=r,this.resizableRight=o,this.resizableTop=s,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(i=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&Bc(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var o=this.parentNode;if(o){var a=this.window.getComputedStyle(o).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:i,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Pc(Pc({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(u)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Bc(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,i=t.maxHeight,r=t.minWidth,s=t.minHeight,o=Bc(e)?e.touches[0].clientX:e.clientX,a=Bc(e)?e.touches[0].clientY:e.clientY,u=this.state,l=u.direction,c=u.original,p=u.width,h=u.height,d=this.getParentSize(),f=Uc(d,this.window.innerWidth,this.window.innerHeight,n,i,r,s);n=f.maxWidth,i=f.maxHeight,r=f.minWidth,s=f.minHeight;var m=this.calculateNewSizeFromDirection(o,a),g=m.newHeight,v=m.newWidth,y=this.calculateNewMaxFromBoundary(n,i),x=this.calculateNewSizeFromAspectRatio(v,g,{width:y.maxWidth,height:y.maxHeight},{width:r,height:s});if(v=x.newWidth,g=x.newHeight,this.props.grid){var b=Mc(v,this.props.grid[0]),E=Mc(g,this.props.grid[1]),w=this.props.snapGap||0;v=0===w||Math.abs(b-v)<=w?b:v,g=0===w||Math.abs(E-g)<=w?E:g}this.props.snap&&this.props.snap.x&&(v=jc(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=jc(g,this.props.snap.y,this.props.snapGap));var C={width:v-c.width,height:g-c.height};p&&"string"==typeof p&&(Vc(p,"%")?v=v/d.width*100+"%":Vc(p,"vw")?v=v/this.window.innerWidth*100+"vw":Vc(p,"vh")&&(v=v/this.window.innerHeight*100+"vh")),h&&"string"==typeof h&&(Vc(h,"%")?g=g/d.height*100+"%":Vc(h,"vw")?g=g/this.window.innerWidth*100+"vw":Vc(h,"vh")&&(g=g/this.window.innerHeight*100+"vh"));var S={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?S.flexBasis=S.width:"column"===this.flexDir&&(S.flexBasis=S.height),this.setState(S),this.props.onResize&&this.props.onResize(e,l,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,r=t.original;if(n&&this.resizable){var s={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Pc(Pc({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,s=t.handleClasses,o=t.handleWrapperStyle,a=t.handleWrapperClass,u=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?i.createElement(Tc,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:s&&s[t]},u&&u[t]?u[t]:null):null}));return i.createElement("div",{className:a,style:o},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==Wc.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=Pc(Pc(Pc({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return i.createElement(r,Pc({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&i.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(i.PureComponent);function Gc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Hc(e,t){if(e){if("string"==typeof e)return Gc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gc(e,t):void 0}}function Jc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(a)throw r}}return s}}(e,t)||Hc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){F(e,t,n[t])}))}return e}function Zc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Qc(e,t,n){return t&&Yc(e.prototype,t),n&&Yc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ep(e){return ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ep(e)}function tp(e,t){if(t&&("object"===ep(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function np(e){return np=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},np(e)}function ip(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}const rp=require("react-dom");var sp=function(){function e(){Zc(this,e),F(this,"refs",{})}return Qc(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(op)}}]),e}();function op(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function ap(e,t){return Object.keys(e).reduce((function(n,i){return-1===t.indexOf(i)&&(n[i]=e[i]),n}),{})}var up={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},lp=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function cp(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function pp(e,t){e.style["".concat(lp,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function hp(e,t){e.style["".concat(lp,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function dp(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function fp(e,t,n){return Math.max(e,Math.min(n,t))}function mp(e){return"px"===e.substr(-2)?parseFloat(e):0}function gp(e){var t=window.getComputedStyle(e);return{bottom:mp(t.marginBottom),left:mp(t.marginLeft),right:mp(t.marginRight),top:mp(t.marginTop)}}function vp(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function yp(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function xp(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function bp(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function Ep(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var i={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?i:Ep(e.parentNode,t,i)}}function wp(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function Cp(e){var t=e.lockOffset,n=e.width,i=e.height,r=t,s=t,o="px";if("string"==typeof t){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);y()(null!==a,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),r=parseFloat(t),s=parseFloat(t),o=a[1]}return y()(isFinite(r)&&isFinite(s),"lockOffset value should be a finite. Given %s",t),"%"===o&&(r=r*n/100,s=s*i/100),{x:r,y:s}}function Sp(e){var t=e.height,n=e.width,i=e.lockOffset,r=Array.isArray(i)?i:[i,i];y()(2===r.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",i);var s=Jc(r,2),o=s[0],a=s[1];return[Cp({height:t,lockOffset:o,width:n}),Cp({height:t,lockOffset:a,width:n})]}function Ap(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:Ap(e.parentNode):null}function Dp(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:mp(t.gridColumnGap),y:mp(t.gridRowGap)}:{x:0,y:0}}var _p="BUTTON",kp="INPUT",Tp="OPTION",Fp="TEXTAREA",Ip="SELECT";function Np(e){var t,n="input, textarea, select, canvas, [contenteditable]",i=e.querySelectorAll(n),r=e.cloneNode(!0);return(t=r.querySelectorAll(n),function(e){if(Array.isArray(e))return Gc(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Hc(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.")}()).forEach((function(e,t){"file"!==e.type&&(e.value=i[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),"CANVAS"===e.tagName&&i[t].width>0&&i[t].height>0&&e.getContext("2d").drawImage(i[t],0,0)})),r}function Pp(e){return null!=e.sortableHandle}var Op=function(){function e(t,n){Zc(this,e),this.container=t,this.onScrollCallback=n}return Qc(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,i=e.minTranslate,r=e.maxTranslate,s=e.width,o=e.height,a={x:0,y:0},u={x:1,y:1},l=this.container,c=l.scrollTop,p=l.scrollLeft,h=l.scrollHeight,d=l.scrollWidth,f=0===c,m=h-c-l.clientHeight==0,g=0===p,v=d-p-l.clientWidth==0;n.y>=r.y-o/2&&!m?(a.y=1,u.y=10*Math.abs((r.y-o/2-n.y)/o)):n.x>=r.x-s/2&&!v?(a.x=1,u.x=10*Math.abs((r.x-s/2-n.x)/s)):n.y<=i.y+o/2&&!f?(a.y=-1,u.y=10*Math.abs((n.y-o/2-i.y)/o)):n.x<=i.x+s/2&&!g&&(a.x=-1,u.x=10*Math.abs((n.x-s/2-i.x)/s)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===a.x&&0===a.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:u.x*a.x,top:u.y*a.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),Rp={axis:o().oneOf(["x","y","xy"]),contentWindow:o().any,disableAutoscroll:o().bool,distance:o().number,getContainer:o().func,getHelperDimensions:o().func,helperClass:o().string,helperContainer:o().oneOfType([o().func,"undefined"==typeof HTMLElement?o().any:o().instanceOf(HTMLElement)]),hideSortableGhost:o().bool,keyboardSortingTransitionDuration:o().number,lockAxis:o().string,lockOffset:o().oneOfType([o().number,o().string,o().arrayOf(o().oneOfType([o().number,o().string]))]),lockToContainerEdges:o().bool,onSortEnd:o().func,onSortMove:o().func,onSortOver:o().func,onSortStart:o().func,pressDelay:o().number,pressThreshold:o().number,keyCodes:o().shape({lift:o().arrayOf(o().number),drop:o().arrayOf(o().number),cancel:o().arrayOf(o().number),up:o().arrayOf(o().number),down:o().arrayOf(o().number)}),shouldCancelStart:o().func,transitionDuration:o().number,updateBeforeSortStart:o().func,useDragHandle:o().bool,useWindowAsScrollContainer:o().bool},Mp={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},Lp={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:Mp,shouldCancelStart:function(e){return-1!==[kp,Fp,Ip,Tp,_p].indexOf(e.target.tagName)||!!dp(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},Bp=Object.keys(Rp);function jp(e){y()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function Vp(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var zp=(0,i.createContext)({manager:{}}),qp={index:o().number.isRequired,collection:o().oneOfType([o().number,o().string]),disabled:o().bool},Up=Object.keys(qp),Wp=n(6667),Kp={};Kp.styleTagTransform=Ae(),Kp.setAttributes=Ee(),Kp.insert=xe().bind(null,"head"),Kp.domAPI=ve(),Kp.insertStyleElement=Ce(),me()(Wp.Z,Kp);const $p=Wp.Z&&Wp.Z.locals?Wp.Z.locals:void 0;class Gp extends i.PureComponent{render(){return r().createElement("div",{className:$p["resize-handle"]})}}var Hp=n(9262),Jp={};Jp.styleTagTransform=Ae(),Jp.setAttributes=Ee(),Jp.insert=xe().bind(null,"head"),Jp.domAPI=ve(),Jp.insertStyleElement=Ce(),me()(Hp.Z,Jp);const Xp=Hp.Z&&Hp.Z.locals?Hp.Z.locals:void 0;class Zp extends i.PureComponent{static displayName="DeleteStageComponent";static propTypes={index:o().number.isRequired,runStage:o().func.isRequired,stageDeleted:o().func.isRequired,setIsModified:o().func.isRequired};onStageDeleted=()=>{this.props.stageDeleted(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index,!0)};render(){return r().createElement("div",{className:pe()(Xp["delete-stage"])},r().createElement("button",{"data-test-id":"delete-stage",type:"button",title:"Delete Stage",className:"btn btn-default btn-xs",onClick:this.onStageDeleted},r().createElement("i",{className:"fa fa-trash-o","aria-hidden":!0})))}}const Yp=Zp;var Qp=n(2884),eh={};eh.styleTagTransform=Ae(),eh.setAttributes=Ee(),eh.insert=xe().bind(null,"head"),eh.domAPI=ve(),eh.insertStyleElement=Ce(),me()(Qp.Z,eh);const th=Qp.Z&&Qp.Z.locals?Qp.Z.locals:void 0;class nh extends i.PureComponent{static displayName="AddAfterStageComponent";static propTypes={index:o().number.isRequired,stageAddedAfter:o().func.isRequired};onStageAddedAfter=()=>{this.props.stageAddedAfter(this.props.index)};render(){return r().createElement("div",{className:pe()(th["add-after-stage"]),"data-tip":"Add stage below","data-place":"top","data-for":"add-after-stage"},r().createElement("button",{"data-test-id":"add-after-stage",type:"button",title:"Add After Stage",className:"btn btn-default btn-xs",onClick:this.onStageAddedAfter},"+"),r().createElement(Lr.Tooltip,{id:"add-after-stage"}))}}const ih=nh;var rh=n(2347),sh={};sh.styleTagTransform=Ae(),sh.setAttributes=Ee(),sh.insert=xe().bind(null,"head"),sh.domAPI=ve(),sh.insertStyleElement=Ce(),me()(rh.Z,sh);const oh=rh.Z&&rh.Z.locals?rh.Z.locals:void 0;class ah extends i.PureComponent{static displayName="ToggleStageComponent";static propTypes={isEnabled:o().bool.isRequired,index:o().number.isRequired,runStage:o().func.isRequired,stageToggled:o().func.isRequired,setIsModified:o().func.isRequired};onStageToggled=()=>{this.props.stageToggled(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index,!0)};render(){const e=this.props.isEnabled?"Exclude stage from pipeline":"Include stage in pipeline";return r().createElement("div",{className:oh["toggle-stage"],"data-for":"toggle-stage","data-tip":e,"data-place":"top"},r().createElement(he.Toggle,{id:"toggle-stage-button",checked:this.props.isEnabled,onChange:this.onStageToggled,className:oh["toggle-stage-button"],"aria-label":e,size:"small"}),r().createElement(Lr.Tooltip,{id:"toggle-stage"}))}}const uh=ah;var lh=n(5884),ch={};ch.styleTagTransform=Ae(),ch.setAttributes=Ee(),ch.insert=xe().bind(null,"head"),ch.domAPI=ve(),ch.insertStyleElement=Ce(),me()(lh.Z,ch);const ph=lh.Z&&lh.Z.locals?lh.Z.locals:void 0;class hh extends i.PureComponent{static displayName="StageGrabberComponent";render(){return r().createElement("div",{className:ph["stage-grabber"]},r().createElement("i",{className:"fa fa-bars fa-rotate-90","aria-hidden":!0}))}}const dh=hh;var fh=n(1103),mh={};mh.styleTagTransform=Ae(),mh.setAttributes=Ee(),mh.insert=xe().bind(null,"head"),mh.domAPI=ve(),mh.insertStyleElement=Ce(),me()(fh.Z,mh);const gh=fh.Z&&fh.Z.locals?fh.Z.locals:void 0;class vh extends i.PureComponent{static displayName="StageCollapserComponent";static propTypes={isExpanded:o().bool.isRequired,index:o().number.isRequired,stageCollapseToggled:o().func.isRequired,setIsModified:o().func.isRequired};onStageCollapseToggled=()=>{this.props.stageCollapseToggled(this.props.index),this.props.setIsModified(!0)};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return r().createElement("div",{className:pe()(gh["stage-collapser"])},r().createElement("button",{type:"button",title:t,onClick:this.onStageCollapseToggled,className:"btn btn-default btn-xs"},r().createElement("i",{className:e,"aria-hidden":!0})))}}const yh=vh;var xh=n(8726),bh=function(e){var t=e.onMouseDown;return r().createElement("span",{className:"Select-arrow",onMouseDown:t})};bh.propTypes={onMouseDown:o().func};var Eh=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],wh=function(e){for(var t=0;t<Eh.length;t++)e=e.replace(Eh[t].letters,Eh[t].base);return e},Ch=function(e){return null!=e&&""!==e},Sh=function(e,t,n,i){return i.ignoreAccents&&(t=wh(t)),i.ignoreCase&&(t=t.toLowerCase()),i.trimFilter&&(t=t.replace(/^\s+|\s+$/g,"")),n&&(n=n.map((function(e){return e[i.valueKey]}))),e.filter((function(e){if(n&&n.indexOf(e[i.valueKey])>-1)return!1;if(i.filterOption)return i.filterOption.call(void 0,e,t);if(!t)return!0;var r=e[i.valueKey],s=e[i.labelKey],o=Ch(r),a=Ch(s);if(!o&&!a)return!1;var u=o?String(r):null,l=a?String(s):null;return i.ignoreAccents&&(u&&"label"!==i.matchProp&&(u=wh(u)),l&&"value"!==i.matchProp&&(l=wh(l))),i.ignoreCase&&(u&&"label"!==i.matchProp&&(u=u.toLowerCase()),l&&"value"!==i.matchProp&&(l=l.toLowerCase())),"start"===i.matchPos?u&&"label"!==i.matchProp&&u.substr(0,t.length)===t||l&&"value"!==i.matchProp&&l.substr(0,t.length)===t:u&&"label"!==i.matchProp&&u.indexOf(t)>=0||l&&"value"!==i.matchProp&&l.indexOf(t)>=0}))},Ah=function(e){var t=e.focusedOption,n=e.focusOption,i=e.inputValue,s=e.instancePrefix,o=e.onFocus,a=e.onOptionRef,u=e.onSelect,l=e.optionClassName,c=e.optionComponent,p=e.optionGroupComponent,h=e.optionRenderer,d=e.options,f=e.removeValue,m=e.selectValue,g=e.valueArray,v=e.valueKey,y=p,x=c,b=h;return function e(c){return c.map((function(c,p){if(function(e){return e&&Array.isArray(e.options)}(c)){var h=pe()({"Select-option-group":!0});return r().createElement(y,{className:h,key:"option-group-"+p,label:b(c),option:c,optionIndex:p},e(c.options))}var d=g&&g.indexOf(c)>-1,E=c===t,w=pe()(l,{"Select-option":!0,"is-selected":d,"is-focused":E,"is-disabled":c.disabled});return r().createElement(x,{className:w,focusOption:n,inputValue:i,instancePrefix:s,isDisabled:c.disabled,isFocused:E,isSelected:d,key:"option-"+p+"-"+c[v],onFocus:o,onSelect:u,option:c,optionIndex:p,ref:function(e){a(e,E)},removeValue:f,selectValue:m},b(c,p))}))}(d)};Ah.propTypes={focusOption:o().func,focusedOption:o().object,inputValue:o().string,instancePrefix:o().string,onFocus:o().func,onOptionRef:o().func,onSelect:o().func,optionClassName:o().string,optionComponent:o().func,optionRenderer:o().func,options:o().array,removeValue:o().func,selectValue:o().func,valueArray:o().array,valueKey:o().string};var Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_h=(function(){function e(e){this.value=e}function t(t){var n,i;function r(n,i){try{var o=t[n](i),a=o.value;a instanceof e?Promise.resolve(a.value).then((function(e){r("next",e)}),(function(e){r("throw",e)})):s(o.done?"return":"normal",o.value)}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?r(n.key,n.arg):i=null}this._invoke=function(e,t){return new Promise((function(s,o){var a={key:e,arg:t,resolve:s,reject:o,next:null};i?i=i.next=a:(n=i=a,r(e,t))}))},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),kh=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Th=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Fh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ih=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Nh=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},Ph=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Oh=function(e){function t(){return _h(this,t),Ph(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ih(t,e),kh(t,[{key:"render",value:function(){return this.props.children}}]),t}(r().Component);Oh.propTypes={children:o().node};var Rh=function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},Mh=function(e){function t(e){_h(this,t);var n=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return Ih(t,e),kh(t,[{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,i=e.optionIndex,s=pe()(this.props.className,t.className);return t.disabled?r().createElement("div",{className:s,onMouseDown:Rh,onClick:Rh},this.props.children):r().createElement("div",{className:s,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+i,title:t.title},this.props.children)}}]),t}(r().Component);Mh.propTypes={children:o().node,className:o().string,instancePrefix:o().string.isRequired,isDisabled:o().bool,isFocused:o().bool,isSelected:o().bool,onFocus:o().func,onSelect:o().func,onUnfocus:o().func,option:o().object.isRequired,optionIndex:o().number};var Lh=function(e){function t(e){_h(this,t);var n=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Ih(t,e),kh(t,[{key:"blockEvent",value:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"render",value:function(){var e=this.props.option,t=pe()(this.props.className,e.className);return e.disabled?r().createElement("div",{className:t,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):r().createElement("div",{className:t,style:e.style,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,title:e.title},r().createElement("div",{className:"Select-option-group-label"},this.props.label),this.props.children)}}]),t}(r().Component);Lh.propTypes={children:o().any,className:o().string,label:o().node,option:o().object.isRequired};var Bh=function(e){function t(e){_h(this,t);var n=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Ih(t,e),kh(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return r().createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){var e="Select-value-label";return this.props.onClick||this.props.value.href?r().createElement("a",{className:e,href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):r().createElement("span",{className:e,role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return r().createElement("div",{className:pe()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(r().Component);function jh(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}Bh.propTypes={children:o().node,disabled:o().bool,id:o().string,onClick:o().func,onRemove:o().func,value:o().object.isRequired};var Vh=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},zh=o().oneOfType([o().string,o().node]),qh=(o().oneOfType([o().string,o().number]),1),Uh=function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},Wh=function(e){function t(e){_h(this,t);var n=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","getOptionLabel","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleTouchEnd","handleTouchEndClearValue","handleTouchMove","handleTouchOutside","handleTouchStart","handleValueClick","onOptionRef","removeValue","selectValue"].forEach((function(e){return n[e]=n[e].bind(n)})),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return Ih(t,e),kh(t,[{key:"componentWillMount",value:function(){this._flatOptions=this.flattenOptions(this.props.options),this._instancePrefix="react-select-"+(this.props.instanceId||++qh)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:Uh(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&(this._flatOptions=this.flattenOptions(e.options));var t=this.getValueArray(e.value,e);!e.isOpen&&this.props.isOpen?this.closeMenu():e.isOpen&&!this.props.isOpen&&this.setState({isOpen:!0}),e.required?this.setState({required:Uh(t[0],e.multi)}):this.props.required&&this.setState({required:!1}),this.state.inputValue&&this.props.value!==e.value&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=(0,rp.findDOMNode)(this.focused),i=(0,rp.findDOMNode)(this.menu),r=i.scrollTop,s=r+i.offsetHeight,o=n.offsetTop,a=o+n.offsetHeight;(r>o||s<a)&&(i.scrollTop=n.offsetTop),this.hasScrolledToOption=!0}else this.state.isOpen||(this.hasScrolledToOption=!1);if(this._scrollToFocusedOptionOnUpdate&&this.focused&&this.menu){this._scrollToFocusedOptionOnUpdate=!1;var u=(0,rp.findDOMNode)(this.focused),l=(0,rp.findDOMNode)(this.menu),c=u.getBoundingClientRect(),p=l.getBoundingClientRect();c.bottom>p.bottom?l.scrollTop=u.offsetTop+u.clientHeight-l.offsetHeight:c.top<p.top&&(l.scrollTop=u.offsetTop)}if(this.props.scrollMenuIntoView&&this.menuContainer){var h=this.menuContainer.getBoundingClientRect();window.innerHeight<h.bottom+this.props.menuBuffer&&window.scrollBy(0,h.bottom+this.props.menuBuffer-window.innerHeight)}if(e.disabled!==this.props.disabled&&(this.setState({isFocused:!1}),this.closeMenu()),t.isOpen!==this.state.isOpen){this.toggleTouchOutsideEvent(this.state.isOpen);var d=this.state.isOpen?this.props.onOpen:this.props.onClose;d&&d()}}},{key:"componentWillUnmount",value:function(){this.toggleTouchOutsideEvent(!1)}},{key:"toggleTouchOutsideEvent",value:function(e){e?!document.addEventListener&&document.attachEvent?document.attachEvent("ontouchstart",this.handleTouchOutside):document.addEventListener("touchstart",this.handleTouchOutside):!document.removeEventListener&&document.detachEvent?document.detachEvent("ontouchstart",this.handleTouchOutside):document.removeEventListener("touchstart",this.handleTouchOutside)}},{key:"handleTouchOutside",value:function(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.closeMenu()}},{key:"focus",value:function(){this.input&&this.input.focus()}},{key:"blurInput",value:function(){this.input&&this.input.blur()}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchEndClearValue",value:function(e){this.dragging||this.clearValue(e)}},{key:"handleMouseDown",value:function(e){if(!(this.props.disabled||"mousedown"===e.type&&0!==e.button))if("INPUT"!==e.target.tagName){if(e.preventDefault(),!this.props.searchable)return this.focus(),this.setState({isOpen:!this.state.isOpen});if(this.state.isFocused){this.focus();var t=this.input,n=!0;"function"==typeof t.getInput&&(t=t.getInput()),t.value="",this._focusAfterClear&&(n=!1,this._focusAfterClear=!1),this.setState({isOpen:n,isPseudoFocused:!1,focusedOption:null})}else this._openAfterFocus=this.props.openOnClick,this.focus(),this.setState({focusedOption:null})}else this.state.isFocused?this.state.isOpen||this.setState({isOpen:!0,isPseudoFocused:!1}):(this._openAfterFocus=this.props.openOnClick,this.focus())}},{key:"handleMouseDownOnArrow",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(this.state.isOpen?(e.stopPropagation(),e.preventDefault(),this.closeMenu()):this.setState({isOpen:!0}))}},{key:"handleMouseDownOnMenu",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this._openAfterFocus=!0,this.focus())}},{key:"closeMenu",value:function(){this.props.onCloseResetsInput?this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}),this.hasScrolledToOption=!1}},{key:"handleInputFocus",value:function(e){if(!this.props.disabled){var t=this.state.isOpen||this._openAfterFocus||this.props.openOnFocus;t=!this._focusAfterClear&&t,this.props.onFocus&&this.props.onFocus(e),this.setState({isFocused:!0,isOpen:!!t}),this._focusAfterClear=!1,this._openAfterFocus=!1}}},{key:"handleInputBlur",value:function(e){if(!this.menu||this.menu!==document.activeElement&&!this.menu.contains(document.activeElement)){this.props.onBlur&&this.props.onBlur(e);var t={isFocused:!1,isOpen:!1,isPseudoFocused:!1};this.props.onBlurResetsInput&&(t.inputValue=this.handleInputValueChange("")),this.setState(t)}else this.focus()}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.state.inputValue!==e.target.value&&(t=this.handleInputValueChange(t)),this.setState({inputValue:t,isOpen:!0,isPseudoFocused:!1})}},{key:"setInputValue",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":Dh(t))&&(e=""+t)}this.setState({inputValue:e})}},{key:"handleInputValueChange",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":Dh(t))&&(e=""+t)}return e}},{key:"handleKeyDown",value:function(e){if(!(this.props.disabled||"function"==typeof this.props.onInputKeyDown&&(this.props.onInputKeyDown(e),e.defaultPrevented)))switch(e.keyCode){case 8:!this.state.inputValue&&this.props.backspaceRemoves&&(e.preventDefault(),this.popValue());break;case 9:if(e.shiftKey||!this.state.isOpen||!this.props.tabSelectsValue)break;e.preventDefault(),this.selectFocusedOption();break;case 13:e.preventDefault(),e.stopPropagation(),this.state.isOpen?this.selectFocusedOption():this.focusNextOption();break;case 27:e.preventDefault(),this.state.isOpen?(this.closeMenu(),e.stopPropagation()):this.props.clearable&&this.props.escapeClearsValue&&(this.clearValue(e),e.stopPropagation());break;case 32:if(this.props.searchable)break;if(e.preventDefault(),!this.state.isOpen){this.focusNextOption();break}e.stopPropagation(),this.selectFocusedOption();break;case 38:e.preventDefault(),this.focusPreviousOption();break;case 40:e.preventDefault(),this.focusNextOption();break;case 33:e.preventDefault(),this.focusPageUpOption();break;case 34:e.preventDefault(),this.focusPageDownOption();break;case 35:if(e.shiftKey)break;e.preventDefault(),this.focusEndOption();break;case 36:if(e.shiftKey)break;e.preventDefault(),this.focusStartOption();break;case 46:e.preventDefault(),!this.state.inputValue&&this.props.deleteRemoves&&this.popValue()}}},{key:"handleValueClick",value:function(e,t){this.props.onValueClick&&this.props.onValueClick(e,t)}},{key:"handleMenuScroll",value:function(e){if(this.props.onMenuScrollToBottom){var t=e.target;t.scrollHeight>t.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i="object"===(void 0===n?"undefined":Dh(n))?n:this.props;if(i.multi){if("string"==typeof e&&(e=e.split(i.delimiter)),!Array.isArray(e)){if(null==e)return[];e=[e]}return e.map((function(e){return t.expandValue(e,i)})).filter((function(e){return e}))}var r=this.expandValue(e,i);return r?[r]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":Dh(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var i=t.labelKey,r=t.renderInvalidValues,s=t.valueKey,o=this._flatOptions;if(o){for(var a=0;a<o.length;a++)if(String(o[a][s])===String(e))return o[a];var u;if(r)return this._invalidOptions=this._invalidOptions||{},this._invalidOptions[e]=this._invalidOptions[e]||(Th(u={invalid:!0},i,e),Th(u,s,e),u),this._invalidOptions[e]}}},{key:"setValue",value:function(e){var t=this;if(this.props.autoBlur&&this.blurInput(),this.props.required){var n=Uh(e,this.props.multi);this.setState({required:n})}this.props.simpleValue&&e&&(e=this.props.multi?e.map((function(e){return e[t.props.valueKey]})).join(this.props.delimiter):e[this.props.valueKey]),this.props.onChange&&this.props.onChange(e)}},{key:"selectValue",value:function(e){var t=this;this.props.closeOnSelect&&(this.hasScrolledToOption=!1);var n=this.props.onSelectResetsInput?"":this.state.inputValue;this.props.multi?this.setState({focusedIndex:null,inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect},(function(){t.getValueArray(t.props.value).some((function(n){return n[t.props.valueKey]===e[t.props.valueKey]}))?t.removeValue(e):t.addValue(e)})):this.setState({inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect,isPseudoFocused:this.state.isFocused},(function(){t.setValue(e)}))}},{key:"addValue",value:function(e){var t=this.getValueArray(this.props.value),n=this._visibleOptions.filter((function(e){return!e.disabled})),i=n.indexOf(e);this.setValue(t.concat(e)),n.length-1===i?this.focusOption(n[i-1]):n.length>i&&this.focusOption(n[i+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter((function(n){return n[t.props.valueKey]!==e[t.props.valueKey]}))),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1},this.focus),this._focusAfterClear=!0)}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map((function(e,t){return{option:e,index:t}})).filter((function(e){return!e.option.disabled}));if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen){var n={focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null),isOpen:!0};return this.props.onSelectResetsInput&&(n.inputValue=""),void this.setState(n)}if(t.length){for(var i=-1,r=0;r<t.length;r++)if(this._focusedOption===t[r].option){i=r;break}if("next"===e&&-1!==i)i=(i+1)%t.length;else if("previous"===e)i>0?i-=1:i=t.length-1;else if("start"===e)i=0;else if("end"===e)i=t.length-1;else if("page_up"===e){var s=i-this.props.pageSize;i=s<0?0:s}else if("page_down"===e){var o=i+this.props.pageSize;i=o>t.length-1?t.length-1:o}-1===i&&(i=0),this.setState({focusedIndex:t[i].index,focusedOption:t[i].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return r().createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},r().createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,i=this.props.valueRenderer||this.getOptionLabel,s=this.props.valueComponent;if(!e.length){var o=function(e,t,n){var i=e.inputValue,r=e.isPseudoFocused,s=e.isFocused,o=t.onSelectResetsInput;return!i||!o&&!n&&!r&&!s}(this.state,this.props,t);return o?r().createElement("div",{className:"Select-placeholder"},this.props.placeholder):null}var a,u,l,c,p,h,d=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map((function(e,t){return r().createElement(s,{disabled:n.props.disabled||!1===e.clearableValue,id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,key:"value-"+t+"-"+e[n.props.valueKey],onClick:d,onRemove:n.removeValue,placeholder:n.props.placeholder,value:e},i(e,t),r().createElement("span",{className:"Select-aria-only"}," "))})):(a=this.state,u=this.props,l=a.inputValue,c=a.isPseudoFocused,p=a.isFocused,h=u.onSelectResetsInput,l&&(h||!p&&c||p&&!c)?void 0:(t&&(d=null),r().createElement(s,{disabled:this.props.disabled,id:this._instancePrefix+"-value-item",instancePrefix:this._instancePrefix,onClick:d,placeholder:this.props.placeholder,value:e[0]},i(e[0]))))}},{key:"renderInput",value:function(e,t){var n,i=this,s=pe()("Select-input",this.props.inputProps.className),o=this.state.isOpen,a=pe()((Th(n={},this._instancePrefix+"-list",o),Th(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),u=this.state.inputValue;!u||this.props.onSelectResetsInput||this.state.isFocused||(u="");var l=Fh({},this.props.inputProps,{"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-expanded":""+o,"aria-haspopup":""+o,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-owns":a,className:s,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",required:this.state.required,tabIndex:this.props.tabIndex,value:u});if(this.props.inputRenderer)return this.props.inputRenderer(l);if(this.props.disabled||!this.props.searchable){var c=Nh(this.props.inputProps,[]),p=pe()(Th({},this._instancePrefix+"-list",o));return r().createElement("div",Fh({},c,{"aria-expanded":o,"aria-owns":p,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-disabled":""+this.props.disabled,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],className:s,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",style:{border:0,width:1,display:"inline-block"},tabIndex:this.props.tabIndex||0}))}return this.props.autosize?r().createElement(xh.Z,Fh({id:this.props.id},l,{minWidth:"5"})):r().createElement("div",{className:s,key:"input-wrap"},r().createElement("input",Fh({id:this.props.id},l)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.multi?this.props.clearAllText:this.props.clearValueText,n=this.props.clearRenderer();return r().createElement("span",{"aria-label":t,className:"Select-clear-zone",onMouseDown:this.clearValue,onTouchEnd:this.handleTouchEndClearValue,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,title:t},n)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?r().createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterFlatOptions",value:function(e){var t=this.state.inputValue,n=this._flatOptions;return this.props.filterOptions?("function"==typeof this.props.filterOptions?this.props.filterOptions:Sh)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,trimFilter:this.props.trimFilter,valueKey:this.props.valueKey}):n}},{key:"flattenOptions",value:function(e,t){if(!e)return[];for(var n,i=[],r=0;r<e.length;r++){var s=jh(e[r]);t&&(s.group=t),(n=s)&&Array.isArray(n.options)?(i=i.concat(this.flattenOptions(s.options,s)),s.options=[]):i.push(s)}return i}},{key:"unflattenOptions",value:function(e){var t=[],n=void 0,i=void 0;return e.forEach((function(e){for(e.isInTree=!1,n=e.group;n;)n.isInTree&&(n.options=[],n.isInTree=!1),n=n.group})),e.forEach((function(e){for(n=(i=e).group;n;)i.isInTree||(n.options.push(i),i.isInTree=!0),n=(i=n).group;i.isInTree||(t.push(i),i.isInTree=!0)})),e.forEach((function(e){delete e.isInTree})),t}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onOptionRef:this.onOptionRef,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionGroupComponent:this.props.optionGroupComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,removeValue:this.removeValue,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?r().createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map((function(e){return Vh(e[t.props.valueKey])})).join(this.props.delimiter);return r().createElement("input",{disabled:this.props.disabled,name:this.props.name,ref:function(e){return t.value=e},type:"hidden",value:n})}return e.map((function(e,n){return r().createElement("input",{disabled:t.props.disabled,key:"hidden."+n,name:t.props.name,ref:"value"+n,type:"hidden",value:Vh(e[t.props.valueKey])})}))}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,i=this.state.focusedOption||e;if(i&&!i.disabled){var r=-1;if(t.some((function(e,t){var s=e[n]===i[n];return s&&(r=t),s})),-1!==r)return r}for(var s=0;s<t.length;s++)if(!t[s].disabled)return s;return null}},{key:"renderOuter",value:function(e,t,n){var i=this,s=this.props.dropdownComponent,o=this.renderMenu(e,t,n);return o?r().createElement(s,null,r().createElement("div",{ref:function(e){return i.menuContainer=e},className:"Select-menu-outer",style:this.props.menuContainerStyle},r().createElement("div",{className:"Select-menu",id:this._instancePrefix+"-list",onMouseDown:this.handleMouseDownOnMenu,onScroll:this.handleMenuScroll,ref:function(e){return i.menu=e},role:"listbox",style:this.props.menuStyle,tabIndex:-1},o))):null}},{key:"render",value:function(){var e=this,t=this.getValueArray(this.props.value);this._visibleOptions=this.filterFlatOptions(this.props.multi&&this.props.removeSelected?t:null);var n=this.unflattenOptions(this._visibleOptions),i="boolean"==typeof this.props.isOpen?this.props.isOpen:this.state.isOpen;this.props.multi&&!n.length&&t.length&&!this.state.inputValue&&(i=!1);var s,o=this.getFocusableOptionIndex(t[0]);s=this._focusedOption=null!==o?this._visibleOptions[o]:null;var a=pe()("Select",this.props.className,{"has-value":t.length,"is-clearable":this.props.clearable,"is-disabled":this.props.disabled,"is-focused":this.state.isFocused,"is-loading":this.props.isLoading,"is-open":i,"is-pseudo-focused":this.state.isPseudoFocused,"is-searchable":this.props.searchable,"Select--multi":this.props.multi,"Select--rtl":this.props.rtl,"Select--single":!this.props.multi}),u=null;return this.props.multi&&!this.props.disabled&&t.length&&!this.state.inputValue&&this.state.isFocused&&this.props.backspaceRemoves&&(u=r().createElement("span",{id:this._instancePrefix+"-backspace-remove-message",className:"Select-aria-only","aria-live":"assertive"},this.props.backspaceToRemoveMessage.replace("{label}",t[t.length-1][this.props.labelKey]))),r().createElement("div",{ref:function(t){return e.wrapper=t},className:a,style:this.props.wrapperStyle},this.renderHiddenField(t),r().createElement("div",{ref:function(t){return e.control=t},className:"Select-control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleTouchEnd,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,style:this.props.style},r().createElement("span",{className:"Select-multi-value-wrapper",id:this._instancePrefix+"-value"},this.renderValue(t,i),this.renderInput(t,o)),u,this.renderLoading(),this.renderClear(),this.renderArrow()),i?this.renderOuter(n,t,s):null)}}]),t}(r().Component);Wh.propTypes={"aria-describedby":o().string,"aria-label":o().string,"aria-labelledby":o().string,arrowRenderer:o().func,autoBlur:o().bool,autoFocus:o().bool,autofocus:o().bool,autosize:o().bool,backspaceRemoves:o().bool,backspaceToRemoveMessage:o().string,className:o().string,clearAllText:zh,clearRenderer:o().func,clearValueText:zh,clearable:o().bool,closeOnSelect:o().bool,deleteRemoves:o().bool,delimiter:o().string,disabled:o().bool,dropdownComponent:o().func,escapeClearsValue:o().bool,filterOption:o().func,filterOptions:o().any,id:o().string,ignoreAccents:o().bool,ignoreCase:o().bool,inputProps:o().object,inputRenderer:o().func,instanceId:o().string,isLoading:o().bool,isOpen:o().bool,joinValues:o().bool,labelKey:o().string,matchPos:o().string,matchProp:o().string,menuBuffer:o().number,menuContainerStyle:o().object,menuRenderer:o().func,menuStyle:o().object,multi:o().bool,name:o().string,noResultsText:zh,onBlur:o().func,onBlurResetsInput:o().bool,onChange:o().func,onClose:o().func,onCloseResetsInput:o().bool,onFocus:o().func,onInputChange:o().func,onInputKeyDown:o().func,onMenuScrollToBottom:o().func,onOpen:o().func,onSelectResetsInput:o().bool,onValueClick:o().func,openOnClick:o().bool,openOnFocus:o().bool,optionClassName:o().string,optionComponent:o().func,optionGroupComponent:o().func,optionRenderer:o().func,options:o().array,pageSize:o().number,placeholder:zh,removeSelected:o().bool,renderInvalidValues:o().bool,required:o().bool,resetValue:o().any,rtl:o().bool,scrollMenuIntoView:o().bool,searchable:o().bool,simpleValue:o().bool,style:o().object,tabIndex:o().string,tabSelectsValue:o().bool,trimFilter:o().bool,value:o().any,valueComponent:o().func,valueKey:o().string,valueRenderer:o().func,wrapperStyle:o().object},Wh.defaultProps={arrowRenderer:bh,autosize:!0,backspaceRemoves:!0,backspaceToRemoveMessage:"Press backspace to remove {label}",clearable:!0,clearAllText:"Clear all",clearRenderer:function(){return r().createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},clearValueText:"Clear value",closeOnSelect:!0,deleteRemoves:!0,delimiter:",",disabled:!1,dropdownComponent:Oh,escapeClearsValue:!0,filterOptions:Sh,ignoreAccents:!0,ignoreCase:!0,inputProps:{},isLoading:!1,joinValues:!1,labelKey:"label",matchPos:"any",matchProp:"any",menuBuffer:0,menuRenderer:Ah,multi:!1,noResultsText:"No results found",onBlurResetsInput:!0,onCloseResetsInput:!0,onSelectResetsInput:!0,openOnClick:!0,optionComponent:Mh,optionGroupComponent:Lh,pageSize:5,placeholder:"Select...",removeSelected:!0,required:!1,rtl:!1,scrollMenuIntoView:!0,searchable:!0,simpleValue:!1,tabSelectsValue:!0,trimFilter:!0,valueComponent:Bh,valueKey:"value"};var Kh={autoload:o().bool.isRequired,cache:o().any,children:o().func.isRequired,ignoreAccents:o().bool,ignoreCase:o().bool,loadOptions:o().func.isRequired,loadingPlaceholder:o().oneOfType([o().string,o().node]),multi:o().bool,noResultsText:o().oneOfType([o().string,o().node]),onChange:o().func,onInputChange:o().func,options:o().array.isRequired,placeholder:o().oneOfType([o().string,o().node]),searchPromptText:o().oneOfType([o().string,o().node]),value:o().any},$h={},Gh={autoload:!0,cache:$h,children:function(e){return r().createElement(Wh,e)},ignoreAccents:!0,ignoreCase:!0,loadingPlaceholder:"Loading...",options:[],searchPromptText:"Type to search"},Hh=function(e){function t(e,n){_h(this,t);var i=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i._cache=e.cache===$h?{}:e.cache,i.state={inputValue:"",isLoading:!1,options:e.options},i.onInputChange=i.onInputChange.bind(i),i}return Ih(t,e),kh(t,[{key:"componentDidMount",value:function(){this.props.autoload&&this.loadOptions("")}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&this.setState({options:e.options})}},{key:"componentWillUnmount",value:function(){this._callback=null}},{key:"loadOptions",value:function(e){var t=this,n=this.props.loadOptions,i=this._cache;if(i&&Object.prototype.hasOwnProperty.call(i,e))return this._callback=null,void this.setState({isLoading:!1,options:i[e]});var r=function n(r,s){var o=s&&s.options||[];i&&(i[e]=o),n===t._callback&&(t._callback=null,t.setState({isLoading:!1,options:o}))};this._callback=r;var s=n(e,r);s&&s.then((function(e){return r(0,e)}),(function(e){return r()})),this._callback&&!this.state.isLoading&&this.setState({isLoading:!0})}},{key:"onInputChange",value:function(e){var t=this.props,n=t.ignoreAccents,i=t.ignoreCase,r=t.onInputChange,s=e;if(r){var o=r(s);null!=o&&"object"!==(void 0===o?"undefined":Dh(o))&&(s=""+o)}var a=s;return n&&(a=wh(a)),i&&(a=a.toLowerCase()),this.setState({inputValue:s}),this.loadOptions(a),s}},{key:"noResultsText",value:function(){var e=this.props,t=e.loadingPlaceholder,n=e.noResultsText,i=e.searchPromptText,r=this.state,s=r.inputValue;return r.isLoading?t:s&&n?n:i}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,i=t.loadingPlaceholder,r=t.placeholder,s=this.state,o=s.isLoading,a=s.options,u={noResultsText:this.noResultsText(),placeholder:o?i:r,options:o&&i?[]:a,ref:function(t){return e.select=t}};return n(Fh({},this.props,u,{isLoading:o,onInputChange:this.onInputChange}))}}]),t}(i.Component);Hh.propTypes=Kh,Hh.defaultProps=Gh;var Jh=function(e){function t(e,n){_h(this,t);var i=Ph(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.filterOptions=i.filterOptions.bind(i),i.menuRenderer=i.menuRenderer.bind(i),i.onInputKeyDown=i.onInputKeyDown.bind(i),i.onInputChange=i.onInputChange.bind(i),i.onOptionSelect=i.onOptionSelect.bind(i),i}return Ih(t,e),kh(t,[{key:"createNewOption",value:function(){var e=this.props,t=e.isValidNewOption,n=e.newOptionCreator,i=e.onNewOptionClick,r=e.options,s=void 0===r?[]:r;if(t({label:this.inputValue})){var o=n({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey});this.isOptionUnique({option:o,options:s})&&(i?i(o):(s.unshift(o),this.select.selectValue(o)))}}},{key:"filterOptions",value:function(){var e=this.props,t=e.filterOptions,n=e.isValidNewOption,i=e.promptTextCreator,r=(arguments.length<=2?void 0:arguments[2])||[],s=t.apply(void 0,arguments)||[];if(n({label:this.inputValue})){var o=this.props.newOptionCreator,a=o({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey}),u=this.isOptionUnique({option:a,options:r.concat(s)});if(u){var l=i(this.inputValue);this._createPlaceholderOption=o({label:l,labelKey:this.labelKey,valueKey:this.valueKey}),s.unshift(this._createPlaceholderOption)}}return s}},{key:"isOptionUnique",value:function(e){var t=e.option,n=e.options,i=this.props.isOptionUnique;return n=n||this.select.filterFlatOptions(),i({labelKey:this.labelKey,option:t,options:n,valueKey:this.valueKey})}},{key:"menuRenderer",value:function(e){return(0,this.props.menuRenderer)(Fh({},e,{onSelect:this.onOptionSelect,selectValue:this.onOptionSelect}))}},{key:"onInputChange",value:function(e){var t=this.props.onInputChange;return this.inputValue=e,t&&(this.inputValue=t(e)),this.inputValue}},{key:"onInputKeyDown",value:function(e){var t=this.props,n=t.shouldKeyDownEventCreateNewOption,i=t.onInputKeyDown,r=this.select.getFocusedOption();r&&r===this._createPlaceholderOption&&n({keyCode:e.keyCode})?(this.createNewOption(),e.preventDefault()):i&&i(e)}},{key:"onOptionSelect",value:function(e){e===this._createPlaceholderOption?this.createNewOption():this.select.selectValue(e)}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.ref,i=Nh(t,["ref"]),r=this.props.children;return r||(r=Xh),r(Fh({},i,{allowCreate:!0,filterOptions:this.filterOptions,menuRenderer:this.menuRenderer,onInputChange:this.onInputChange,onInputKeyDown:this.onInputKeyDown,ref:function(t){e.select=t,t&&(e.labelKey=t.props.labelKey,e.valueKey=t.props.valueKey),n&&n(t)}}))}}]),t}(r().Component),Xh=function(e){return r().createElement(Wh,e)},Zh=function(e){var t=e.option,n=e.options,i=e.labelKey,r=e.valueKey;return!n||!n.length||0===n.filter((function(e){return e[i]===t[i]||e[r]===t[r]})).length},Yh=function(e){return!!e.label},Qh=function(e){var t=e.label,n=e.labelKey,i={};return i[e.valueKey]=t,i[n]=t,i.className="Select-create-option-placeholder",i},ed=function(e){return'Create option "'+e+'"'},td=function(e){switch(e.keyCode){case 9:case 13:case 188:return!0;default:return!1}};Jh.isOptionUnique=Zh,Jh.isValidNewOption=Yh,Jh.newOptionCreator=Qh,Jh.promptTextCreator=ed,Jh.shouldKeyDownEventCreateNewOption=td,Jh.defaultProps={filterOptions:Sh,isOptionUnique:Zh,isValidNewOption:Yh,menuRenderer:Ah,newOptionCreator:Qh,promptTextCreator:ed,shouldKeyDownEventCreateNewOption:td},Jh.propTypes={children:o().func,filterOptions:o().any,isOptionUnique:o().func,isValidNewOption:o().func,menuRenderer:o().any,newOptionCreator:o().func,onInputChange:o().func,onInputKeyDown:o().func,onNewOptionClick:o().func,options:o().array,promptTextCreator:o().func,ref:o().func,shouldKeyDownEventCreateNewOption:o().func};var nd=function(e){function t(){return _h(this,t),Ph(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ih(t,e),kh(t,[{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this;return r().createElement(Hh,this.props,(function(t){var n=t.ref,i=Nh(t,["ref"]),s=n;return r().createElement(Jh,i,(function(t){var n=t.ref,i=Nh(t,["ref"]),r=n;return e.props.children(Fh({},i,{ref:function(t){r(t),s(t),e.select=t}}))}))}))}}]),t}(r().Component);nd.propTypes={children:o().func.isRequired},nd.defaultProps={children:function(e){return r().createElement(Wh,e)}},Wh.Async=Hh,Wh.AsyncCreatable=nd,Wh.Creatable=Jh,Wh.Value=Bh,Wh.Option=Mh;const id=Wh;var rd=n(173),sd={};sd.styleTagTransform=Ae(),sd.setAttributes=Ee(),sd.insert=xe().bind(null,"head"),sd.domAPI=ve(),sd.insertStyleElement=Ce(),me()(rd.Z,sd);const od=rd.Z&&rd.Z.locals?rd.Z.locals:void 0;class ad extends i.Component{static propTypes={option:o().object.isRequired,className:o().string,children:o().node};render(){const{option:e}=this.props;return r().createElement("div",{"data-tip":e.description,"data-place":"right","data-for":`select-option-${e.name}`},r().createElement(Mh,d({},this.props,{className:od.option+" "+this.props.className}),this.props.children,rn(e.env)&&r().createElement(he.AtlasLogoMark,{size:12,className:od.optionIcon})),r().createElement(Lr.Tooltip,{className:od.tooltip,id:`select-option-${e.name}`}))}}const ud=ad;var ld=n(6125),cd={};cd.styleTagTransform=Ae(),cd.setAttributes=Ee(),cd.insert=xe().bind(null,"head"),cd.domAPI=ve(),cd.insertStyleElement=Ce(),me()(ld.Z,cd);const pd=ld.Z&&ld.Z.locals?ld.Z.locals:void 0;class hd extends i.PureComponent{static displayName="StageOperatorSelectComponent";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,stageOperator:o().string,index:o().number.isRequired,isEnabled:o().bool.isRequired,isCommenting:o().bool.isRequired,stageOperatorSelected:o().func.isRequired,serverVersion:o().string.isRequired,setIsModified:o().func.isRequired};onStageOperatorSelected=e=>{this.props.stageOperatorSelected(this.props.index,e,this.props.isCommenting,this.props.env),this.props.setIsModified(!0)};render(){const e=(e=>{let{serverVersion:t,env:n,isTimeSeries:i,sourceName:r}=e;const s=i?Ot.TIME_SERIES:r?Ot.VIEW:Ot.COLLECTION;return Ot.STAGE_OPERATORS.filter(sn).filter((e=>function(e,t){const n=nn().coerce(t);return nn().gte(n,e?.version)}(e,t))).filter((e=>function(e,t){return e?.namespaces?.includes(t)}(e,s))).filter((e=>rn(e.env)||function(e,t){return e?.env?.includes(t)}(e,n))).map((e=>({...e})))})({serverVersion:this.props.serverVersion,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName});return r().createElement("div",{className:pd["stage-operator-select"]},r().createElement(id,{optionComponent:ud,simpleValue:!0,searchable:!0,openOnClick:!0,openOnFocus:!0,clearable:!1,disabled:!this.props.isEnabled,className:pd["stage-operator-select-control"],options:e,value:this.props.stageOperator,onChange:this.onStageOperatorSelected}))}}const dd=hd;var fd=n(2891),md={};md.styleTagTransform=Ae(),md.setAttributes=Ee(),md.insert=xe().bind(null,"head"),md.domAPI=ve(),md.insertStyleElement=Ce(),me()(fd.Z,md);const gd=fd.Z&&fd.Z.locals?fd.Z.locals:void 0,vd={$out:"The $out operator will cause the pipeline to persist the results to the specified location (collection, S3, or Atlas). If the collection exists it will be replaced.",$merge:"The $merge operator will cause the pipeline to persist the results to the specified location."},yd=Object.keys(vd);function xd(e){let{stageOperator:t}=e;return yd.includes(t)?r().createElement(he.Tooltip,{trigger:e=>{let{children:t,...n}=e;return r().createElement("span",d({},n,{className:gd["tooltip-icon"]}),t,r().createElement(he.Icon,{glyph:"InfoWithCircle"}))}},r().createElement(he.Body,null,vd[t])):null}xd.propTypes={stageOperator:o().string.isRequired};class bd extends i.PureComponent{static displayName="StageEditorToolbar";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,error:o().string,isExpanded:o().bool.isRequired,isEnabled:o().bool.isRequired,stageOperator:o().string,index:o().number.isRequired,serverVersion:o().string.isRequired,stageOperatorSelected:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,setIsModified:o().func.isRequired,isCommenting:o().bool.isRequired,runStage:o().func.isRequired,isAutoPreviewing:o().bool};render(){return r().createElement("div",{className:pe()(gd["stage-editor-toolbar"],{[gd["stage-editor-toolbar-errored"]]:this.props.error})},r().createElement(dh,null),r().createElement(yh,{isExpanded:this.props.isExpanded,index:this.props.index,setIsModified:this.props.setIsModified,stageCollapseToggled:this.props.stageCollapseToggled}),r().createElement(dd,{env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stageOperator:this.props.stageOperator,index:this.props.index,isEnabled:this.props.isEnabled,isCommenting:this.props.isCommenting,stageOperatorSelected:this.props.stageOperatorSelected,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion}),r().createElement(uh,{index:this.props.index,isEnabled:this.props.isEnabled,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageToggled:this.props.stageToggled}),r().createElement("div",{className:gd["stage-editor-toolbar-right"]},!this.props.isAutoPreviewing&&r().createElement(xd,{stageOperator:this.props.stageOperator}),r().createElement(Yp,{index:this.props.index,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageDeleted:this.props.stageDeleted}),r().createElement(ih,{index:this.props.index,stageAddedAfter:this.props.stageAddedAfter})))}}const Ed=bd;var wd=n(8915),Cd={};Cd.styleTagTransform=Ae(),Cd.setAttributes=Ee(),Cd.insert=xe().bind(null,"head"),Cd.domAPI=ve(),Cd.insertStyleElement=Ce(),me()(wd.Z,Cd);const Sd=wd.Z&&wd.Z.locals?wd.Z.locals:void 0;class Ad extends i.Component{static displayName="StageEditorComponent";static propTypes={stage:o().string,stageOperator:o().string,error:o().string,syntaxError:o().string,runStage:o().func.isRequired,index:o().number.isRequired,serverVersion:o().string.isRequired,fields:o().array.isRequired,stageChanged:o().func.isRequired,isValid:o().bool.isRequired,setIsModified:o().func.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};static defaultProps={fields:[],projections:[]};constructor(e){super(e),this.completer=new Ot.StageAutoCompleter(this.props.serverVersion,he.EditorTextCompleter,this.getFieldsAndProjections(),this.props.stageOperator)}shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.index!==this.props.index||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||e.isValid!==this.props.isValid}componentDidUpdate(e){this.completer.update(this.getFieldsAndProjections(),this.props.stageOperator),this.completer.version=this.props.serverVersion,this.props.stageOperator!==e.stageOperator&&this.editor&&this.editor.focus()}onStageChange=e=>{if(null===this.props.stageOperator&&e&&"["===e.charAt(0))return this.props.newPipelineFromPaste(e),void this.props.runStage(0);this.props.stageChanged(e,this.props.index)};getFieldsAndProjections(){const{fields:e,projections:t,index:n}=this.props,i=t.filter((e=>e.index<n));return[].concat.call([],e,i)}renderError(){if(this.props.error)return r().createElement("div",{"data-test-id":"stage-editor-error-message",className:Sd["stage-editor-errormsg"],title:this.props.error},this.props.error)}renderSyntaxError(){if(!this.props.isValid&&this.props.syntaxError)return r().createElement("div",{className:Sd["stage-editor-syntax-error"],title:this.props.syntaxError},this.props.syntaxError)}render(){return r().createElement("div",{className:Sd["stage-editor-container"]},r().createElement("div",{className:Sd["stage-editor"]},r().createElement(he.Editor,{text:this.props.stage,onChangeText:this.onStageChange,variant:he.EditorVariant.Shell,className:Sd["stage-editor-ace-editor"],name:`aggregations-stage-editor-${this.props.index}`,options:{minLines:5},completer:this.completer,showPrintMargin:!1,onLoad:e=>{this.editor=e}})),this.renderSyntaxError(),this.renderError())}}const Dd=Ad;var _d=n(7130),kd={};kd.styleTagTransform=Ae(),kd.setAttributes=Ee(),kd.insert=xe().bind(null,"head"),kd.domAPI=ve(),kd.insertStyleElement=Ce(),me()(_d.Z,kd);const Td=_d.Z&&_d.Z.locals?_d.Z.locals:void 0;class Fd extends i.PureComponent{static displayName="LoadingOverlay";static propTypes={text:o().string.isRequired};render(){return r().createElement("div",{className:Td["loading-overlay"]},r().createElement("div",{className:Td["loading-overlay-box"]},r().createElement("i",{className:"fa fa-circle-o-notch fa-spin","aria-hidden":!0}),r().createElement("div",{className:Td["loading-overlay-box-text"]},this.props.text)))}}const Id=Fd;var Nd=n(9877),Pd={};Pd.styleTagTransform=Ae(),Pd.setAttributes=Ee(),Pd.insert=xe().bind(null,"head"),Pd.domAPI=ve(),Pd.insertStyleElement=Ce(),me()(Nd.Z,Pd);const Od=Nd.Z&&Nd.Z.locals?Nd.Z.locals:void 0,{track:Rd}=Ke("COMPASS-AGGREGATIONS-UI");class Md extends i.Component{static displayName="StagePreview";static propTypes={runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,documents:o().array.isRequired,error:o().string,isValid:o().bool.isRequired,isEnabled:o().bool.isRequired,isLoading:o().bool.isRequired,isComplete:o().bool.isRequired,isMissingAtlasOnlyStageSupport:o().bool,openLink:o().func.isRequired,index:o().number.isRequired,stageOperator:o().string,stage:o().string};onGotoMergeResults=()=>{this.props.gotoMergeResults(this.props.index)};onGotoOutResults=()=>{const e=Bt()(this.props.stage).replace(/['"]+/g,"");this.props.gotoOutResults(e)};onSaveDocuments=()=>{this.props.runOutStage(this.props.index)};onAtlasSignupCtaClicked=()=>{Rd("Atlas Link Clicked",{screen:"agg_builder"}),this.props.openLink("https://www.mongodb.com/cloud/atlas/lp/search-1?utm_campaign=atlas_search&utm_source=compass&utm_medium=product&utm_content=v1")};renderMergeSection(){return this.props.isComplete?this.props.error?r().createElement("div",{className:Od["stage-preview-out"]}):r().createElement("div",{className:Od["stage-preview-out"]},r().createElement("div",{className:Od["stage-preview-out-text"]},"Documents persisted to collection specified by $merge."),r().createElement(he.Link,{"data-test-id":"go-to-merge-collection",as:"button",className:Od["stage-preview-out-link"],onClick:this.onGotoMergeResults},"Go to collection.")):r().createElement("div",{className:Od["stage-preview-out"]},r().createElement("div",{className:Od["stage-preview-out-text"]},"The $merge operator will cause the pipeline to persist the results to the specified location."))}renderOutSection(){return this.props.isComplete?this.props.error?r().createElement("div",{className:Od["stage-preview-out"]}):r().createElement(he.Body,{className:Od["stage-preview-out"]},r().createElement("div",{className:Od["stage-preview-out-text"]},"Documents persisted to collection: ",Bt()(this.props.stage),"."),r().createElement(he.Link,{"data-test-id":"go-to-out-collection",as:"button",className:Od["stage-preview-out-link"],onClick:this.onGotoOutResults},"Go to collection.")):r().createElement(he.Body,{className:Od["stage-preview-out"]},r().createElement("div",{className:Od["stage-preview-out-text"]},"The $out operator will cause the pipeline to persist the results to the specified location (collection, S3, or Atlas). If the collection exists it will be replaced."))}renderAtlasOnlyStagePreviewSection(){return r().createElement("div",{className:Od["stage-preview-missing-search-support"]},r().createElement(he.AtlasLogoMark,{size:30,className:Od["stage-preview-missing-search-support-icon"]}),r().createElement("div",{"data-test-id":"stage-preview-missing-search-support",className:Od["stage-preview-missing-search-support-text"]},"This stage is only available with MongoDB Atlas. Create a free cluster or connect to an Atlas cluster to build search indexes and use ",this.props.stageOperator," aggregation stage to run fast, relevant search queries."),r().createElement(de.TextButton,{text:"Create Free Cluster",className:"btn btn-xs btn-primary",clickHandler:this.onAtlasSignupCtaClicked}))}renderPreview(){if(this.props.isMissingAtlasOnlyStageSupport)return this.renderAtlasOnlyStagePreviewSection();if(this.props.isValid&&this.props.isEnabled){if(this.props.stageOperator===Nn)return this.renderOutSection();if(this.props.stageOperator===Pn)return this.renderMergeSection();if(this.props.documents.length>0){const e=this.props.documents.map(((e,t)=>r().createElement("div",{key:t,className:Od["stage-preview-document-card-container"]},r().createElement("div",{className:Od["stage-preview-document-card"]},r().createElement(ml.Document,{doc:e,editable:!1})))));return r().createElement("div",{className:Od["stage-preview-documents"]},e)}}return this.props.isLoading?void 0:r().createElement("div",{className:Od["stage-preview-empty"]},r().createElement("div",null,r().createElement("svg",{width:"44",height:"60",viewBox:"0 0 44 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r().createElement("path",{d:"M21.9297 38.2988C23.4783 35.1247 27.7679 30.0989 32.5375 35.3879"}),r().createElement("path",{d:"M1 10.7831V51.3133L9.61538 59M1 10.7831L35.4615 1L43 5.19277M1 10.7831L10.1538 15.6747M9.61538 59L43 45.7229C39.9487 34.0763 38 22.5957 43 5.19277M9.61538 59C5.5 34.9362 7.46154 20.3333 10.1538 15.6747M43 5.19277L10.1538 15.6747"}),r().createElement("path",{d:"M19.7174 26.7113C19.7734 27.324 19.6719 27.8684 19.4884 28.2491C19.2999 28.6402 19.0726 28.7786 18.9038 28.7941C18.7349 28.8095 18.4862 28.7146 18.2299 28.3642C17.9804 28.0232 17.7818 27.5063 17.7257 26.8935C17.6696 26.2808 17.7711 25.7364 17.9546 25.3557C18.1432 24.9646 18.3704 24.8262 18.5393 24.8107C18.7082 24.7953 18.9568 24.8902 19.2132 25.2406C19.4627 25.5816 19.6613 26.0985 19.7174 26.7113Z",fill:"#89979B"}),r().createElement("path",{d:"M32.481 23.5351C32.5371 24.1479 32.4356 24.6923 32.2521 25.0729C32.0636 25.464 31.8363 25.6025 31.6674 25.6179C31.4985 25.6334 31.2499 25.5385 30.9935 25.1881C30.744 24.847 30.5454 24.3301 30.4894 23.7174C30.4333 23.1046 30.5348 22.5602 30.7183 22.1796C30.9068 21.7885 31.1341 21.65 31.303 21.6346C31.4719 21.6191 31.7205 21.714 31.9769 22.0644C32.2264 22.4055 32.425 22.9224 32.481 23.5351Z",fill:"#89979B"}))),r().createElement("div",null,r().createElement("i",{"data-test-id":"stage-preview-empty"},"No Preview Documents")))}renderLoading(){if(this.props.isLoading)return this.props.stageOperator===Nn?r().createElement(Id,{text:"Persisting Documents..."}):r().createElement(Id,{text:"Loading Preview Documents..."})}render(){return r().createElement("div",{className:Od["stage-preview"]},this.renderLoading(),this.renderPreview())}}const Ld=Md;var Bd=n(462),jd={};jd.styleTagTransform=Ae(),jd.setAttributes=Ee(),jd.insert=xe().bind(null,"head"),jd.domAPI=ve(),jd.insertStyleElement=Ce(),me()(Bd.Z,jd);const Vd=Bd.Z&&Bd.Z.locals?Bd.Z.locals:void 0,zd=/s3:/,qd=/atlas:/;class Ud extends i.PureComponent{static displayName="StagePreviewToolbar";static propTypes={error:o().string,isEnabled:o().bool.isRequired,isValid:o().bool.isRequired,stageOperator:o().string,stageValue:o().any,count:o().number.isRequired,openLink:o().func.isRequired};getWord(){return 1===this.props.count?"document":"documents"}getOutText(){try{const e=Bt()(this.props.stageValue);return e.match(zd)?"Documents will be saved to S3.":e.match(qd)?"Documents will be saved to Atlas cluster.":`Documents will be saved to the collection: ${e}`}catch(e){return"Unable to parse the destination for the out stage."}}getText(){if(this.props.isEnabled){if(this.props.stageOperator){if(this.props.stageOperator===Nn&&this.props.isValid)return this.getOutText();const e=st[this.props.stageOperator];let t=null;return t=e?r().createElement(he.Link,{as:"button",className:Vd["stage-preview-toolbar-link"],onClick:this.props.openLink.bind(this,e.link)},this.props.stageOperator):r().createElement("span",{className:Vd["stage-preview-toolbar-link-invalid"]},this.props.stageOperator),r().createElement("div",null,r().createElement("span",null,"Output after ",t," stage"),this.renderInfoSprinkle(e),r().createElement("span",{"data-test-id":"stage-preview-toolbar-tooltip"},"(Sample of ",this.props.count," ",this.getWord(),")"))}return"A sample of the aggregated results from this stage will be shown below"}return"Stage is disabled. Results not passed in the pipeline."}renderInfoSprinkle(e){if(this.props.stageOperator)return e?r().createElement("span",{"data-tip":e.tooltip,"data-for":"stage-tooltip","data-place":"top","data-html":"true"},r().createElement(Lr.InfoSprinkle,{onClickHandler:this.props.openLink,helpLink:e.link}),r().createElement(Lr.Tooltip,{id:"stage-tooltip"})):r().createElement("span",null," ")}render(){return r().createElement("div",{className:pe()(Vd["stage-preview-toolbar"],{[Vd["stage-preview-toolbar-errored"]]:this.props.error})},this.getText())}}const Wd=Ud;var Kd=n(7295),$d={};$d.styleTagTransform=Ae(),$d.setAttributes=Ee(),$d.insert=xe().bind(null,"head"),$d.domAPI=ve(),$d.insertStyleElement=Ce(),me()(Kd.Z,$d);const Gd=Kd.Z&&Kd.Z.locals?Kd.Z.locals:void 0,Hd=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Zc(this,n);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return F(h(h(t=tp(this,(e=np(n)).call.apply(e,[this].concat(s))))),"wrappedInstance",(0,i.createRef)()),t}return ip(n,t),Qc(n,[{key:"componentDidMount",value:function(){(0,rp.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(e,d({ref:t},this.props))}}]),n}(i.Component),F(t,"displayName",vp("sortableHandle",e)),n}((e=>r().createElement(Ed,e))),Jd={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class Xd extends i.Component{static displayName="StageComponent";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,stage:o().string.isRequired,stageOperator:o().string,error:o().string,syntaxError:o().string,isValid:o().bool.isRequired,isEnabled:o().bool.isRequired,isExpanded:o().bool.isRequired,isLoading:o().bool.isRequired,isComplete:o().bool.isRequired,isMissingAtlasOnlyStageSupport:o().bool,previewDocuments:o().array.isRequired,index:o().number.isRequired,isCommenting:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,runStage:o().func.isRequired,runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,serverVersion:o().string.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,openLink:o().func.isRequired,fields:o().array.isRequired,setIsModified:o().func.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.isValid!==this.props.isValid||e.isEnabled!==this.props.isEnabled||e.isExpanded!==this.props.isExpanded||e.isLoading!==this.props.isLoading||e.isComplete!==this.props.isComplete||e.isMissingAtlasOnlyStageSupport!==this.props.isMissingAtlasOnlyStageSupport||e.index!==this.props.index||e.isCommenting!==this.props.isCommenting||e.isAutoPreviewing!==this.props.isAutoPreviewing||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||"$out"===this.props.stageOperator&&e.stage!==this.props.stage}getOpacity(){return this.props.isEnabled?1:.6}renderEditor(){return r().createElement(r().Fragment,null,r().createElement(Hd,{env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,isExpanded:this.props.isExpanded,isEnabled:this.props.isEnabled,stageOperator:this.props.stageOperator,index:this.props.index,stageOperatorSelected:this.props.stageOperatorSelected,stageCollapseToggled:this.props.stageCollapseToggled,stageToggled:this.props.stageToggled,runStage:this.props.runStage,isCommenting:this.props.isCommenting,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion,isAutoPreviewing:this.props.isAutoPreviewing}),this.props.isExpanded&&r().createElement(Dd,{stage:this.props.stage,stageOperator:this.props.stageOperator,error:this.props.error,syntaxError:this.props.syntaxError,isValid:this.props.isValid,runStage:this.props.runStage,index:this.props.index,serverVersion:this.props.serverVersion,setIsModified:this.props.setIsModified,isAutoPreviewing:this.props.isAutoPreviewing,fields:this.props.fields,stageChanged:this.props.stageChanged,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste}))}renderResizableEditor(){const{isAutoPreviewing:e}=this.props,t=this.renderEditor();return e?r().createElement($c,{className:Gd["stage-editor"],defaultSize:{width:"388px",height:"auto"},minWidth:"260px",maxWidth:"92%",enable:Jd,ref:e=>{this.resizableRef=e},handleWrapperClass:Gd["stage-resize-handle-wrapper"],handleComponent:{right:r().createElement(Gp,null)}},t):r().createElement("div",{className:Gd["stage-editor-no-preview"]},t)}renderPreview(){return r().createElement("div",{className:Gd["stage-preview-container"]},r().createElement(Wd,{isEnabled:this.props.isEnabled,isValid:this.props.isValid,stageOperator:this.props.stageOperator,stageValue:this.props.stage,count:this.props.previewDocuments.length,openLink:this.props.openLink}),this.props.isExpanded&&r().createElement(Ld,{documents:this.props.previewDocuments,isValid:this.props.isValid,isEnabled:this.props.isEnabled,isLoading:this.props.isLoading,isComplete:this.props.isComplete,isMissingAtlasOnlyStageSupport:this.props.isMissingAtlasOnlyStageSupport,error:this.props.error,stageOperator:this.props.stageOperator,stage:this.props.stage,index:this.props.index,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,openLink:this.props.openLink}))}render(){const e=this.getOpacity();return r().createElement("div",{"data-test-id":"stage-container","data-stage-index":this.props.index,className:pe()(Gd["stage-container"],{[Gd["stage-container-is-first"]]:0===this.props.index})},r().createElement("div",{className:pe()(Gd.stage,{[Gd["stage-errored"]]:this.props.error}),style:{opacity:e}},this.renderResizableEditor(),this.props.isAutoPreviewing&&this.renderPreview()))}}const Zd=Xd;var Yd=n(1849),Qd={};Qd.styleTagTransform=Ae(),Qd.setAttributes=Ee(),Qd.insert=xe().bind(null,"head"),Qd.domAPI=ve(),Qd.insertStyleElement=Ce(),me()(Yd.Z,Qd);const ef=Yd.Z&&Yd.Z.locals?Yd.Z.locals:void 0;class tf extends i.PureComponent{static displayName="InputCollapserComponent";static propTypes={isExpanded:o().bool.isRequired,toggleInputDocumentsCollapsed:o().func.isRequired};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return r().createElement("div",{className:pe()(ef["input-collapser"])},r().createElement("button",{type:"button",title:t,onClick:this.props.toggleInputDocumentsCollapsed,className:"btn btn-default btn-xs"},r().createElement("i",{className:e,"aria-hidden":!0})))}}const nf=tf;var rf=n(9865),sf={};sf.styleTagTransform=Ae(),sf.setAttributes=Ee(),sf.insert=xe().bind(null,"head"),sf.domAPI=ve(),sf.insertStyleElement=Ce(),me()(rf.Z,sf);const of=rf.Z&&rf.Z.locals?rf.Z.locals:void 0;class af extends i.PureComponent{static displayName="InputDocumentsCountComponent";static propTypes={count:o().oneOfType([o().number,o().string]).isRequired};render(){const e=pe()({fa:!0,"fa-database":!0,[of["input-documents-count-db"]]:!0});return r().createElement("div",{className:pe()(of["input-documents-count"])},r().createElement("i",{className:e,"aria-hidden":!0}),r().createElement("div",{className:pe()(of["input-documents-count-label"])},this.props.count," Documents in the Collection"))}}const uf=af;var lf=n(8910),cf={};cf.styleTagTransform=Ae(),cf.setAttributes=Ee(),cf.insert=xe().bind(null,"head"),cf.domAPI=ve(),cf.insertStyleElement=Ce(),me()(lf.Z,cf);const pf=lf.Z&&lf.Z.locals?lf.Z.locals:void 0;class hf extends i.PureComponent{static displayName="InputRefreshComponent";static propTypes={refreshInputDocuments:o().func.isRequired};render(){return r().createElement("div",{className:pf["input-refresh"]},r().createElement("button",{type:"button",title:"Refresh Documents",onClick:this.props.refreshInputDocuments,className:"btn btn-default btn-xs"},r().createElement("i",{className:"fa fa-repeat","aria-hidden":!0})))}}const df=hf;var ff=n(8608),mf={};mf.styleTagTransform=Ae(),mf.setAttributes=Ee(),mf.insert=xe().bind(null,"head"),mf.domAPI=ve(),mf.insertStyleElement=Ce(),me()(ff.Z,mf);const gf=ff.Z&&ff.Z.locals?ff.Z.locals:void 0;class vf extends i.PureComponent{static displayName="InputBuilderToolbar";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){return r().createElement("div",{className:pe()(gf["input-builder-toolbar"])},r().createElement(nf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,isExpanded:this.props.isExpanded}),r().createElement(uf,{count:this.props.count}),r().createElement(df,{refreshInputDocuments:this.props.refreshInputDocuments}))}}const yf=vf;var xf=n(4145),bf={};bf.styleTagTransform=Ae(),bf.setAttributes=Ee(),bf.insert=xe().bind(null,"head"),bf.domAPI=ve(),bf.insertStyleElement=Ce(),me()(xf.Z,bf);const Ef=xf.Z&&xf.Z.locals?xf.Z.locals:void 0,wf=()=>r().createElement("div",{className:pe()(Ef["input-preview-toolbar"])},r().createElement("div",{className:pe()(Ef["input-preview-toolbar-text"])},"Preview of Documents in the Collection"));wf.displayName="InputPreviewToolbar";const Cf=wf;var Sf=n(6102),Af={};Af.styleTagTransform=Ae(),Af.setAttributes=Ee(),Af.insert=xe().bind(null,"head"),Af.domAPI=ve(),Af.insertStyleElement=Ce(),me()(Sf.Z,Af);const Df=Sf.Z&&Sf.Z.locals?Sf.Z.locals:void 0;class _f extends i.PureComponent{static displayName="InputToolbarComponent";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){return r().createElement("div",{className:Df["input-toolbar"]},r().createElement(yf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),r().createElement(Cf,null))}}const kf=_f;var Tf=n(8056),Ff={};Ff.styleTagTransform=Ae(),Ff.setAttributes=Ee(),Ff.insert=xe().bind(null,"head"),Ff.domAPI=ve(),Ff.insertStyleElement=Ce(),me()(Tf.Z,Ff);const If=Tf.Z&&Tf.Z.locals?Tf.Z.locals:void 0;class Nf extends i.PureComponent{static displayName="InputBuilderComponent";render(){return r().createElement("div",{className:If["input-builder"]},"Select an operator to construct expressions used in the aggregation pipeline stages. ",r().createElement(he.Link,{href:"https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/"},"Learn more"))}}const Pf=Nf;var Of=n(969),Rf={};Rf.styleTagTransform=Ae(),Rf.setAttributes=Ee(),Rf.insert=xe().bind(null,"head"),Rf.domAPI=ve(),Rf.insertStyleElement=Ce(),me()(Of.Z,Rf);const Mf=Of.Z&&Of.Z.locals?Of.Z.locals:void 0;class Lf extends i.Component{static displayName="InputPreview";static propTypes={documents:o().array.isRequired,isLoading:o().bool.isRequired};render(){const e=(this.props.documents||[]).map(((e,t)=>r().createElement("div",{key:t,className:Mf["input-preview-document-card-container"]},r().createElement("div",{className:Mf["input-preview-document-card"]},r().createElement(ml.Document,{doc:e,editable:!1})))));return r().createElement("div",{className:Mf["input-preview"]},this.props.isLoading?r().createElement(Id,{text:"Sampling Documents..."}):null,r().createElement("div",{className:Mf["input-preview-documents"]},e))}}const Bf=Lf;var jf=n(3279),Vf={};Vf.styleTagTransform=Ae(),Vf.setAttributes=Ee(),Vf.insert=xe().bind(null,"head"),Vf.domAPI=ve(),Vf.insertStyleElement=Ce(),me()(jf.Z,Vf);const zf=jf.Z&&jf.Z.locals?jf.Z.locals:void 0,qf={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class Uf extends i.PureComponent{static displayName="InputWorkspace";static propTypes={documents:o().array.isRequired,isLoading:o().bool.isRequired};render(){return r().createElement("div",{className:zf["input-workspace"]},r().createElement($c,{defaultSize:{width:"388px",height:"auto"},minWidth:"220px",maxWidth:"92%",enable:qf,ref:e=>{this.resizableRef=e},handleWrapperClass:zf["stage-resize-handle-wrapper"],handleComponent:{right:r().createElement(Gp,null)}},r().createElement(Pf,null)),r().createElement(Bf,{documents:this.props.documents,isLoading:this.props.isLoading}))}}const Wf=Uf;var Kf=n(6546),$f={};$f.styleTagTransform=Ae(),$f.setAttributes=Ee(),$f.insert=xe().bind(null,"head"),$f.domAPI=ve(),$f.insertStyleElement=Ce(),me()(Kf.Z,$f);const Gf=Kf.Z&&Kf.Z.locals?Kf.Z.locals:void 0;class Hf extends i.PureComponent{static displayName="InputComponent";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,documents:o().array.isRequired,isLoading:o().bool.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){const e=this.props.isExpanded?r().createElement(Wf,{documents:this.props.documents,isLoading:this.props.isLoading}):null;return r().createElement("div",{className:Gf.input},r().createElement(kf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),e)}}const Jf=Hf;var Xf=n(9867),Zf={};Zf.styleTagTransform=Ae(),Zf.setAttributes=Ee(),Zf.insert=xe().bind(null,"head"),Zf.domAPI=ve(),Zf.insertStyleElement=Ce(),me()(Xf.Z,Zf);const Yf=Xf.Z&&Xf.Z.locals?Xf.Z.locals:void 0;class Qf extends i.PureComponent{static displayName="AddStageComponent";static propTypes={stageAdded:o().func.isRequired};render(){return r().createElement("div",{className:Yf["add-stage-container"]},r().createElement("div",{className:Yf["add-stage"]},r().createElement(de.TextButton,{dataTestId:"add-stage",text:"Add Stage",className:"btn btn-xs btn-default",clickHandler:this.props.stageAdded})))}}const em=Qf;var tm=n(1266),nm={};nm.styleTagTransform=Ae(),nm.setAttributes=Ee(),nm.insert=xe().bind(null,"head"),nm.domAPI=ve(),nm.insertStyleElement=Ce(),me()(tm.Z,nm);const im=tm.Z&&tm.Z.locals?tm.Z.locals:void 0,rm=e=>r().createElement(he.Badge,{className:im["modify-source-banner"],variant:he.BadgeVariant.Blue},'Modifying pipeline backing "',e.editViewName,'"');rm.propTypes={editViewName:o().string.isRequired};const sm=rm;var om=n(310),am={};am.styleTagTransform=Ae(),am.setAttributes=Ee(),am.insert=xe().bind(null,"head"),am.domAPI=ve(),am.insertStyleElement=Ce(),me()(om.Z,am);const um=om.Z&&om.Z.locals?om.Z.locals:void 0,lm=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Zc(this,n);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return F(h(h(t=tp(this,(e=np(n)).call.apply(e,[this].concat(s))))),"wrappedInstance",(0,i.createRef)()),t}return ip(n,t),Qc(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,i=e.index,r=(0,rp.findDOMNode)(this);r.sortableInfo={collection:t,disabled:n,index:i,manager:this.context.manager},this.node=r,this.ref={node:r},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(e,d({ref:t},ap(this.props,Up)))}}]),n}(i.Component),F(t,"displayName",vp("sortableElement",e)),F(t,"contextType",zp),F(t,"propTypes",qp),F(t,"defaultProps",{collection:0}),n}((e=>{let{idx:t,...n}=e;return r().createElement(Zd,d({index:t},n))})),cm=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;Zc(this,n),F(h(h(t=tp(this,np(n).call(this,e)))),"state",{}),F(h(h(t)),"handleStart",(function(e){var n=t.props,i=n.distance,r=n.shouldCancelStart;if(2!==e.button&&!r(e)){t.touched=!0,t.position=xp(e);var s=dp(e.target,(function(e){return null!=e.sortableInfo}));if(s&&s.sortableInfo&&t.nodeIsChild(s)&&!t.state.sorting){var o=t.props.useDragHandle,a=s.sortableInfo,u=a.index,l=a.collection;if(a.disabled)return;if(o&&!dp(e.target,Pp))return;t.manager.active={collection:l,index:u},bp(e)||"A"!==e.target.tagName||e.preventDefault(),i||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),F(h(h(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),F(h(h(t)),"handleMove",(function(e){var n=t.props,i=n.distance,r=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var s=xp(e),o={x:t.position.x-s.x,y:t.position.y-s.y},a=Math.abs(o.x)+Math.abs(o.y);t.delta=o,i||r&&!(a>=r)?i&&a>=i&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),F(h(h(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),F(h(h(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),F(h(h(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),i=function(){if(n){var i=function(){var n=h.sortableInfo.index,i=gp(h),r=Dp(t.container),l=t.scrollContainer.getBoundingClientRect(),m=o({index:n,node:h,collection:d});if(t.node=h,t.margin=i,t.gridGap=r,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=l,t.index=n,t.newIndex=n,t.axis={x:s.indexOf("x")>=0,y:s.indexOf("y")>=0},t.offsetEdge=Ep(h,t.container),t.initialOffset=xp(f?Xc({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(Np(h)),cp(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-i.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-i.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),u&&(t.sortableGhost=h,cp(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var g=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,v=g.top,y=g.left,x=g.width,b=v+g.height,E=y+x;t.axis.x&&(t.minTranslate.x=y-t.boundingClientRect.left,t.maxTranslate.x=E-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=v-t.boundingClientRect.top,t.maxTranslate.y=b-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:l.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:l.left+l.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:l.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:l.top+l.height)-t.boundingClientRect.top-t.height/2);a&&a.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(up.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),up.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),c&&c({node:h,index:n,collection:d,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},r=t.props,s=r.axis,o=r.getHelperDimensions,a=r.helperClass,u=r.hideSortableGhost,l=r.updateBeforeSortStart,c=r.onSortStart,p=r.useWindowAsScrollContainer,h=n.node,d=n.collection,f=t.manager.isKeySorting,m=function(){if("function"==typeof l){t._awaitingUpdateBeforeSortStart=!0;var n=Vp((function(){var t=h.sortableInfo.index;return Promise.resolve(l({collection:d,index:t,node:h,isKeySorting:f},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return m&&m.then?m.then(i):i()}}();return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),F(h(h(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),F(h(h(t)),"handleSortEnd",(function(e){var n=t.props,i=n.hideSortableGhost,r=n.onSortEnd,s=t.manager,o=s.active.collection,a=s.isKeySorting,u=t.manager.getOrderedRefs();t.listenerNode&&(a?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(up.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),up.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),i&&t.sortableGhost&&cp(t.sortableGhost,{opacity:"",visibility:""});for(var l=0,c=u.length;l<c;l++){var p=u[l],h=p.node;p.edgeOffset=null,p.boundingClientRect=null,pp(h,null),hp(h,null),p.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof r&&r({collection:o,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:a,nodes:u},e),t.touched=!1})),F(h(h(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var i=Xc({},t.translate),r=0,s=0;return t.axis.x&&(i.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),r=t.translate.x-i.x),t.axis.y&&(i.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),s=t.translate.y-i.y),t.translate=i,pp(t.helper,t.translate),t.scrollContainer.scrollLeft+=r,void(t.scrollContainer.scrollTop+=s)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),F(h(h(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),F(h(h(t)),"handleKeyDown",(function(e){var n=e.keyCode,i=t.props,r=i.shouldCancelStart,s=i.keyCodes,o=Xc({},Mp,void 0===s?{}:s);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||o.lift.includes(n)&&!r(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),o.lift.includes(n)&&!t.manager.active?t.keyLift(e):o.drop.includes(n)&&t.manager.active?t.keyDrop(e):o.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):o.up.includes(n)?t.keyMove(-1):o.down.includes(n)&&t.keyMove(1))})),F(h(h(t)),"keyLift",(function(e){var n=e.target,i=dp(n,(function(e){return null!=e.sortableInfo})).sortableInfo,r=i.index,s=i.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:r,collection:s},t.handlePress(e)})),F(h(h(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),i=n[n.length-1].node.sortableInfo.index,r=t.newIndex+e,s=t.newIndex;if(!(r<0||r>i)){t.prevIndex=s,t.newIndex=r;var o=wp(t.newIndex,t.prevIndex,t.index),a=n.find((function(e){return e.node.sortableInfo.index===o})),u=a.node,l=t.containerScrollDelta,c=a.boundingClientRect||yp(u,l),p=a.translate||{x:0,y:0},h=c.top+p.y-l.top,d=c.left+p.x-l.left,f=s<r,m=f&&t.axis.x?u.offsetWidth-t.width:0,g=f&&t.axis.y?u.offsetHeight-t.height:0;t.handleSortMove({pageX:d+m,pageY:h+g,ignoreTransition:0===e})}})),F(h(h(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),F(h(h(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),F(h(h(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,i=e.target,r=dp(i,(function(e){return null!=e.sortableInfo}));return r&&r.sortableInfo&&!r.sortableInfo.disabled&&(n?Pp(i):i.sortableInfo)}));var r=new sp;return jp(e),t.manager=r,t.wrappedInstance=(0,i.createRef)(),t.sortableContextValue={manager:r},t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return ip(n,t),Qc(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var i=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof i?i():i,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:Ap(e.container)||e.container,e.autoScroller=new Op(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return up[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return up[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,i=t.lockOffset,r=t.lockToContainerEdges,s=t.transitionDuration,o=t.keyboardSortingTransitionDuration,a=void 0===o?s:o,u=this.manager.isKeySorting,l=e.ignoreTransition,c=xp(e),p={x:c.x-this.initialOffset.x,y:c.y-this.initialOffset.y};if(p.y-=window.pageYOffset-this.initialWindowScroll.top,p.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=p,r){var h=Jc(Sp({height:this.height,lockOffset:i,width:this.width}),2),d=h[0],f=h[1],m={x:this.width/2-d.x,y:this.height/2-d.y},g={x:this.width/2-f.x,y:this.height/2-f.y};p.x=fp(this.minTranslate.x+m.x,this.maxTranslate.x-g.x,p.x),p.y=fp(this.minTranslate.y+m.y,this.maxTranslate.y-g.y,p.y)}"x"===n?p.y=0:"y"===n&&(p.x=0),u&&a&&!l&&hp(this.helper,a),pp(this.helper,p)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,i=e.onSortOver,r=this.containerScrollDelta,s=this.windowScrollDelta,o=this.manager.getOrderedRefs(),a=this.offsetEdge.left+this.translate.x+r.left,u=this.offsetEdge.top+this.translate.y+r.top,l=this.manager.isKeySorting,c=this.newIndex;this.newIndex=null;for(var p=0,h=o.length;p<h;p++){var d=o[p].node,f=d.sortableInfo.index,m=d.offsetWidth,g=d.offsetHeight,v={height:this.height>g?g/2:this.height/2,width:this.width>m?m/2:this.width/2},y=l&&f>this.index&&f<=c,x=l&&f<this.index&&f>=c,b={x:0,y:0},E=o[p].edgeOffset;E||(E=Ep(d,this.container),o[p].edgeOffset=E,l&&(o[p].boundingClientRect=yp(d,r)));var w=p<o.length-1&&o[p+1],C=p>0&&o[p-1];w&&!w.edgeOffset&&(w.edgeOffset=Ep(w.node,this.container),l&&(w.boundingClientRect=yp(w.node,r))),f!==this.index?(t&&hp(d,t),this.axis.x?this.axis.y?x||f<this.index&&(a+s.left-v.width<=E.left&&u+s.top<=E.top+v.height||u+s.top+v.height<=E.top)?(b.x=this.width+this.marginOffset.x,E.left+b.x>this.containerBoundingRect.width-v.width&&w&&(b.x=w.edgeOffset.left-E.left,b.y=w.edgeOffset.top-E.top),null===this.newIndex&&(this.newIndex=f)):(y||f>this.index&&(a+s.left+v.width>=E.left&&u+s.top+v.height>=E.top||u+s.top+v.height>=E.top+g))&&(b.x=-(this.width+this.marginOffset.x),E.left+b.x<this.containerBoundingRect.left+v.width&&C&&(b.x=C.edgeOffset.left-E.left,b.y=C.edgeOffset.top-E.top),this.newIndex=f):y||f>this.index&&a+s.left+v.width>=E.left?(b.x=-(this.width+this.marginOffset.x),this.newIndex=f):(x||f<this.index&&a+s.left<=E.left+v.width)&&(b.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(y||f>this.index&&u+s.top+v.height>=E.top?(b.y=-(this.height+this.marginOffset.y),this.newIndex=f):(x||f<this.index&&u+s.top<=E.top+v.height)&&(b.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),pp(d,b),o[p].translate=b):n&&(this.sortableGhost=d,cp(d,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),l&&(this.newIndex=c);var S=l?this.prevIndex:c;i&&this.newIndex!==S&&i({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:S,isKeySorting:l,nodes:o,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?(0,rp.findDOMNode)(this):e(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(zp.Provider,{value:this.sortableContextValue},(0,i.createElement)(e,d({ref:t},ap(this.props,Bp))))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(i.Component),F(t,"displayName",vp("sortableList",e)),F(t,"defaultProps",Lp),F(t,"propTypes",Rp),n}((e=>{let{children:t}=e;return r().createElement("div",null,t)}));class pm extends i.PureComponent{static displayName="PipelineWorkspace";static propTypes={editViewName:o().string,env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,pipeline:o().array.isRequired,toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,stageAdded:o().func.isRequired,setIsModified:o().func.isRequired,openLink:o().func.isRequired,isCommenting:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,inputDocuments:o().object.isRequired,runStage:o().func.isRequired,runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,serverVersion:o().string.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,fields:o().array.isRequired,isOverviewOn:o().bool.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};onStageMoved=e=>{let{oldIndex:t,newIndex:n}=e;t!==n&&(this.props.stageMoved(t,n),this.props.runStage(0,!0))};renderModifyingViewSourceBanner(){if(this.props.editViewName)return r().createElement(sm,{editViewName:this.props.editViewName})}renderStage=(e,t)=>r().createElement(lm,{key:e.id,idx:t,index:t,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stage:e.stage,stageOperator:e.stageOperator,error:e.error,syntaxError:e.syntaxError,isValid:e.isValid,isEnabled:e.isEnabled,isLoading:e.isLoading,isComplete:e.isComplete,isMissingAtlasOnlyStageSupport:e.isMissingAtlasOnlyStageSupport,isExpanded:e.isExpanded,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,previewDocuments:e.previewDocuments,runStage:this.props.runStage,openLink:this.props.openLink,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,setIsModified:this.props.setIsModified,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste});renderStageList=()=>r().createElement(cm,{axis:"y",lockAxis:"y",onSortEnd:this.onStageMoved,useDragHandle:!0,transitionDuration:0,helperContainer:()=>this.stageListContainerRef??document.body,helperClass:"dragging",distance:10},this.props.pipeline.map(((e,t)=>this.renderStage(e,t))));render(){const e=this.props.inputDocuments;return r().createElement("div",{"data-testid":"pipeline-builder-workspace",className:um["pipeline-workspace-container-container"],ref:e=>{this.stageListContainerRef=e}},r().createElement("div",{className:um["pipeline-workspace-container"]},r().createElement("div",{className:um["pipeline-workspace"]},this.renderModifyingViewSourceBanner(),r().createElement(Jf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,documents:e.documents,isLoading:e.isLoading,isExpanded:e.isExpanded,openLink:this.props.openLink,count:e.count,isOverviewOn:this.props.isOverviewOn}),this.renderStageList(),r().createElement(em,{stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified}))))}}const hm=pm,dm=(0,he.css)({ol:{padding:0},marginLeft:he.spacing[3]+he.spacing[1],marginRight:he.spacing[4]+he.spacing[1]}),fm=e=>{let{documents:t,view:n}=e;const s=(0,i.useMemo)((()=>({docs:t.map((e=>new Yl(e))),isEditable:!1,copyToClipboard(e){const t=e.toEJSON();navigator.clipboard.writeText(t)}})),[t]);if(0===t.length)return null;const o="document"===n?ml.DocumentListView:ml.DocumentJsonView;return r().createElement("div",{className:dm},r().createElement(o,s))},mm=(0,he.css)({display:"flex",gap:he.spacing[3],justifyContent:"center",alignItems:"center",flexDirection:"column"}),gm=(0,he.css)({color:he.uiColors.green.dark2,fontWeight:"normal"}),vm=(0,he.css)({fontWeight:"normal"}),ym=()=>r().createElement("div",{className:mm,"data-testid":"pipeline-empty-results"},r().createElement("svg",{className:"document-list-zero-state-graphic",xmlns:"http://www.w3.org/2000/svg",width:"38",height:"48",viewBox:"0 0 38 48"},r().createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",transform:"translate(1 1)"},r().createElement("polyline",{stroke:"#116149",points:"30 .002 30 6.002 36 6.002"}),r().createElement("polyline",{stroke:"#116149",points:"30 26.002 30 32.002 36 32.002"}),r().createElement("line",{y1:".002",y2:"2.002",stroke:"#116149"}),r().createElement("line",{y1:"12.002",y2:"14.002",stroke:"#116149"}),r().createElement("polyline",{stroke:"#116149",points:"0 6.002 0 8.002 2 8.002"}),r().createElement("line",{y1:"18.002",y2:"20.002",stroke:"#116149"}),r().createElement("line",{y1:"24.002",y2:"26.002",stroke:"#116149"}),r().createElement("line",{y1:"30.002",y2:"32.002",stroke:"#116149"}),r().createElement("polyline",{stroke:"#116149",points:"0 36.002 0 38.002 2 38.002"}),r().createElement("line",{x1:"6",x2:"8",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"12",x2:"14",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"18",x2:"20",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"6",x2:"8",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("line",{x1:"12",x2:"14",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("line",{x1:"18",x2:"20",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("polygon",{stroke:"#16CC62",points:"36 20.002 20 20.002 20 .002 30 .002 36 6.002"}),r().createElement("polygon",{stroke:"#16CC62",points:"36 46.002 20 46.002 20 26.002 30 26.002 36 32.002"}))),r().createElement(he.H2,{className:gm},"No results"),r().createElement(he.Subtitle,{className:vm},"Try to modify your pipeline to get results")),xm=(0,he.css)({backgroundColor:"transparent",border:"none",display:"inline",height:he.spacing[4]+he.spacing[1],":focus":{outline:`${he.spacing[1]}px auto ${he.uiColors.focus}`}}),bm={onCount:()=>async(e,t)=>{const{pipeline:n,namespace:i,maxTimeMS:r,dataService:{dataService:s},collationString:{value:o}}=t();if(s)try{const t=new AbortController,a=t.signal;e({type:vi.CountStarted,abortController:t});const u=on(n),l={maxTimeMS:r??it,collation:o??void 0},[{count:c}]=await ui({dataService:s,signal:a,namespace:i,pipeline:[...u,{$count:"count"}],options:l});e({type:vi.CountFinished,count:Number(c)})}catch(t){e({type:vi.CountFailed})}}},Em=Y((e=>{let{countDocuments:{loading:t,count:n}}=e;return{loading:t,count:n}}),bm)((e=>{let{loading:t,count:n,onCount:i}=e;const s="pipeline-pagination-count";return t?r().createElement("div",{"data-testid":s},r().createElement(he.SpinLoader,null)):void 0!==n?r().createElement("div",{"data-testid":s},r().createElement(he.Body,null,"of ",n)):r().createElement("div",{"data-testid":s},r().createElement(he.Tooltip,{trigger:e=>{let{children:t,...n}=e;return r().createElement(he.Link,d({},n,{"aria-label":"count results",as:"button","data-testid":"pipeline-pagination-count-action",hideExternalIcon:!0,className:xm,onClick:()=>i()}),t,"count results")}},r().createElement(he.Body,null,"\n In order to have the final count of documents we need to run the\n aggregation again. This will be the equivalent of adding a\n $count as the last stage of the pipeline.\n ")))})),wm=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[2]}),Cm=(0,he.css)({display:"flex",gap:he.spacing[1],alignItems:"center"}),Sm=Y((e=>{let{aggregation:{documents:t,isLast:n,page:i,limit:r,loading:s,error:o},countDocuments:{count:a}}=e;const u=(e=>{let{limit:t,page:n}=e;return(n-1)*t+1})({limit:r,page:i}),l=(e=>{let{limit:t,page:n,documentCount:i}=e;return(n-1)*t+(i||t)})({limit:r,page:i,documentCount:t.length});return{showingFrom:u,showingTo:l,isCountDisabled:Boolean(o),isPrevDisabled:i<=1||s||Boolean(o),isNextDisabled:n||s||Boolean(o)||a===l}}),{onPrev:()=>async(e,t)=>{const{aggregation:{page:n}}=t();if(!(n<=1))return e(gi(n-1))},onNext:()=>async(e,t)=>{const{aggregation:{isLast:n,page:i}}=t();if(!n)return e(gi(i+1))}})((e=>{let{showingFrom:t,showingTo:n,isCountDisabled:i,isPrevDisabled:s,isNextDisabled:o,onPrev:a,onNext:u}=e;return r().createElement("div",{className:wm,"data-testid":"pipeline-pagination"},!i&&r().createElement("div",{className:Cm},r().createElement(he.Body,{"data-testid":"pipeline-pagination-desc"},"Showing ",t," – ",n),r().createElement(Em,null)),r().createElement("div",null,r().createElement(he.IconButton,{"data-testid":"pipeline-pagination-prev-action","aria-label":"Previous page",disabled:s,onClick:()=>a()},r().createElement(he.Icon,{glyph:"ChevronLeft"})),r().createElement(he.IconButton,{"data-testid":"pipeline-pagination-next-action","aria-label":"Next page",disabled:o,onClick:()=>u()},r().createElement(he.Icon,{glyph:"ChevronRight"}))))}));function Am(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}var Dm={};Am(Dm,"SSRProvider",(()=>Tm)),Am(Dm,"useSSRSafeId",(()=>Im)),Am(Dm,"useIsSSR",(()=>Nm));const _m={prefix:String(Math.round(1e10*Math.random())),current:0},km=r().createContext(_m);function Tm(e){let t=(0,i.useContext)(km),n=(0,i.useMemo)((()=>({prefix:t===_m?"":`${t.prefix}-${++t.current}`,current:0})),[t]);return r().createElement(km.Provider,{value:n},e.children)}let Fm=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Im(e){let t=(0,i.useContext)(km);return t!==_m||Fm||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),(0,i.useMemo)((()=>e||`react-aria${t.prefix}-${++t.current}`),[e])}function Nm(){let e=(0,i.useContext)(km)!==_m,[t,n]=(0,i.useState)(e);return"undefined"!=typeof window&&e&&(0,i.useLayoutEffect)((()=>{n(!1)}),[]),t}function Pm(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Pm(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Om(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Pm(e))&&(i&&(i+=" "),i+=t);return i}function Rm(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}function Mm(e,t,n){let[r,s]=(0,i.useState)(e||t),o=(0,i.useRef)(void 0!==e),a=o.current,u=void 0!==e,l=(0,i.useRef)(r);a!==u&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}.`),o.current=u;let c=(0,i.useCallback)(((e,...t)=>{let i=(e,...t)=>{n&&(Object.is(l.current,e)||n(e,...t)),u||(l.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s(((n,...r)=>{let s=e(u?l.current:n,...r);return i(s,...t),u?n:s}))):(u||s(e),i(e,...t))}),[u,n]);return u?l.current=e:e=r,[e,c]}Rm({},"useControlledState",(()=>Mm));var Lm={};function Bm(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function jm(e,t,n,i){let r=(e-(isNaN(t)?0:t))%i,s=2*Math.abs(r)>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r;isNaN(t)?!isNaN(n)&&s>n&&(s=Math.floor(n/i)*i):s<t?s=t:!isNaN(n)&&s>n&&(s=t+Math.floor((n-t)/i)*i);let o=i.toString(),a=o.indexOf("."),u=a>=0?o.length-a:0;if(u>0){let e=Math.pow(10,u);s=Math.round(s*e)/e}return s}function Vm(e,t,n=10){const i=Math.pow(n,t);return Math.round(e*i)/i}function zm(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}Rm(Lm,"clamp",(()=>Bm)),Rm(Lm,"snapValueToStep",(()=>jm)),Rm(Lm,"toFixedNumber",(()=>Vm));var qm={};zm(qm,"useId",(()=>Km)),zm(qm,"mergeIds",(()=>$m)),zm(qm,"useSlotId",(()=>Gm)),zm({},"useLayoutEffect",(()=>Um));const Um="undefined"!=typeof window?r().useLayoutEffect:()=>{};let Wm=new Map;function Km(e){let[t,n]=(0,i.useState)(e),r=(0,i.useRef)(null),s=Im(t),o=(0,i.useCallback)((e=>{r.current=e}),[]);return Wm.set(s,o),Um((()=>{let e=s;return()=>{Wm.delete(e)}}),[s]),(0,i.useEffect)((()=>{let e=r.current;e&&(r.current=null,n(e))})),s}function $m(e,t){if(e===t)return e;let n=Wm.get(e);if(n)return n(t),t;let i=Wm.get(t);return i?(i(e),e):t}function Gm(e=[]){let t=Km(),[n,r]=Lg(t),s=(0,i.useCallback)((()=>{r((function*(){yield t,yield document.getElementById(t)?t:null}))}),[t,r]);return Um(s,[t,s,...e]),n}function Hm(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Jm(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let i=e[n];for(let e in i){let n=t[e],r=i[e];"function"==typeof n&&"function"==typeof r&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=Hm(n,r):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof n||"string"!=typeof r?"id"===e&&n&&r?t.id=$m(n,r):t[e]=void 0!==r?r:n:t[e]=Om(n,r)}}return t}function Xm(...e){return t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}zm({},"chain",(()=>Hm)),zm({},"mergeProps",(()=>Jm)),zm({},"mergeRefs",(()=>Xm)),zm({},"filterDOMProps",(()=>eg));const Zm=new Set(["id"]),Ym=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Qm=/^(data-.*)$/;function eg(e,t={}){let{labelable:n,propNames:i}=t,r={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Zm.has(t)||n&&Ym.has(t)||(null==i?void 0:i.has(t))||Qm.test(t))&&(r[t]=e[t]);return r}function tg(e){if(function(){if(null==ng){ng=!1;try{document.createElement("div").focus({get preventScroll(){return ng=!0,!0}})}catch(e){}}return ng}())e.focus({preventScroll:!0});else{let t=function(e){for(var t=e.parentNode,n=[],i=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==i;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return i instanceof HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:i}of e)t.scrollTop=n,t.scrollLeft=i}(t)}}zm({},"focusWithoutScrolling",(()=>tg));let ng=null;function ig(e,t,n="horizontal"){let i=e.getBoundingClientRect();return t?"horizontal"===n?i.right:i.bottom:"horizontal"===n?i.left:i.top}zm({},"getOffset",(()=>ig));var rg={};zm(rg,"clamp",(()=>Bm)),zm(rg,"snapValueToStep",(()=>jm)),zm({},"runAfterTransition",(()=>ug));let sg=new Map,og=new Set;function ag(){if("undefined"==typeof window)return;let e=t=>{let n=sg.get(t.target);if(n&&(n.delete(t.propertyName),0===n.size&&(t.target.removeEventListener("transitioncancel",e),sg.delete(t.target)),0===sg.size)){for(let e of og)e();og.clear()}};document.body.addEventListener("transitionrun",(t=>{let n=sg.get(t.target);n||(n=new Set,sg.set(t.target,n),t.target.addEventListener("transitioncancel",e)),n.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function ug(e){requestAnimationFrame((()=>{0===sg.size?e():og.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?ag():document.addEventListener("DOMContentLoaded",ag)),zm({},"useDrag1D",(()=>cg));const lg=[];function cg(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:n,orientation:r,onHover:s,onDrag:o,onPositionChange:a,onIncrement:u,onDecrement:l,onIncrementToMax:c,onDecrementToMin:p,onCollapseToggle:h}=e,d=e=>{let i=ig(t.current,n,r),s=(e=>"horizontal"===r?e.clientX:e.clientY)(e);return n?i-s:s-i},f=(0,i.useRef)(!1),m=(0,i.useRef)(0),g=(0,i.useRef)({onPositionChange:a,onDrag:o});g.current.onDrag=o,g.current.onPositionChange=a;let v=e=>{e.preventDefault();let t=d(e);f.current||(f.current=!0,g.current.onDrag&&g.current.onDrag(!0),g.current.onPositionChange&&g.current.onPositionChange(t)),m.current!==t&&(m.current=t,a&&a(t))},y=e=>{const t=e.target;f.current=!1;let n=d(e);g.current.onDrag&&g.current.onDrag(!1),g.current.onPositionChange&&g.current.onPositionChange(n),lg.splice(lg.indexOf(t),1),window.removeEventListener("mouseup",y,!1),window.removeEventListener("mousemove",v,!1)};return{onMouseDown:e=>{const t=e.currentTarget;lg.some((e=>t.contains(e)))||(lg.push(t),window.addEventListener("mousemove",v,!1),window.addEventListener("mouseup",y,!1))},onMouseEnter:()=>{s&&s(!0)},onMouseOut:()=>{s&&s(!1)},onKeyDown:e=>{switch(e.key){case"Left":case"ArrowLeft":"horizontal"===r&&(e.preventDefault(),l&&!n?l():u&&n&&u());break;case"Up":case"ArrowUp":"vertical"===r&&(e.preventDefault(),l&&!n?l():u&&n&&u());break;case"Right":case"ArrowRight":"horizontal"===r&&(e.preventDefault(),u&&!n?u():l&&n&&l());break;case"Down":case"ArrowDown":"vertical"===r&&(e.preventDefault(),u&&!n?u():l&&n&&l());break;case"Home":e.preventDefault(),p&&p();break;case"End":e.preventDefault(),c&&c();break;case"Enter":e.preventDefault(),h&&h()}}}}function pg(){let e=(0,i.useRef)(new Map),t=(0,i.useCallback)(((t,n,i,r)=>{let s=(null==r?void 0:r.once)?(...t)=>{e.current.delete(i),i(...t)}:i;e.current.set(i,{type:n,eventTarget:t,fn:s,options:r}),t.addEventListener(n,i,r)}),[]),n=(0,i.useCallback)(((t,n,i,r)=>{var s;let o=(null===(s=e.current.get(i))||void 0===s?void 0:s.fn)||i;t.removeEventListener(n,o,r),e.current.delete(i)}),[]),r=(0,i.useCallback)((()=>{e.current.forEach(((e,t)=>{n(e.eventTarget,e.type,t,e.options)}))}),[n]);return(0,i.useEffect)((()=>r),[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function hg(e,t){let{id:n,"aria-label":i,"aria-labelledby":r}=e;if(n=Km(n),r&&i){let e=new Set([...r.trim().split(/\s+/),n]);r=[...e].join(" ")}else r&&(r=r.trim().split(/\s+/).join(" "));return i||r||!t||(i=t),{id:n,"aria-label":i,"aria-labelledby":r}}function dg(e){const t=(0,i.useRef)();return Um((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)}),[e]),t}function fg(e,t){const n=(0,i.useRef)(!0);(0,i.useEffect)((()=>{n.current?n.current=!1:e()}),t)}function mg(e){const{ref:t,onResize:n}=e;(0,i.useEffect)((()=>{let e=null==t?void 0:t.current;if(e){if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};{const t=new window.ResizeObserver((e=>{e.length&&n()}));return t.observe(e),()=>{e&&t.unobserve(e)}}}}),[n,t])}function gg(e,t){Um((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}}),[e,t])}function vg(e){for(;e&&!yg(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function yg(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}zm({},"useGlobalListeners",(()=>pg)),zm({},"useLabels",(()=>hg)),zm({},"useObjectRef",(()=>dg)),zm({},"useUpdateEffect",(()=>fg)),zm({},"useResizeObserver",(()=>mg)),zm({},"useSyncRef",(()=>gg)),zm({},"getScrollParent",(()=>vg)),zm({},"useViewportSize",(()=>bg));let xg="undefined"!=typeof window&&window.visualViewport;function bg(){let[e,t]=(0,i.useState)((()=>Eg()));return(0,i.useEffect)((()=>{let e=()=>{t((e=>{let t=Eg();return t.width===e.width&&t.height===e.height?e:t}))};return xg?xg.addEventListener("resize",e):window.addEventListener("resize",e),()=>{xg?xg.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),e}function Eg(){return{width:(null==xg?void 0:xg.width)||window.innerWidth,height:(null==xg?void 0:xg.height)||window.innerHeight}}zm({},"useDescription",(()=>Sg));let wg=0;const Cg=new Map;function Sg(e){let[t,n]=(0,i.useState)(null);return Um((()=>{if(!e)return;let t=Cg.get(e);if(t)n(t.element.id);else{let i="react-aria-description-"+wg++;n(i);let r=document.createElement("div");r.id=i,r.style.display="none",r.textContent=e,document.body.appendChild(r),t={refCount:0,element:r},Cg.set(e,t)}return t.refCount++,()=>{0==--t.refCount&&(t.element.remove(),Cg.delete(e))}}),[e]),{"aria-describedby":e?t:void 0}}var Ag={};function Dg(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function _g(e){return"undefined"!=typeof window&&null!=window.navigator&&e.test((window.navigator.userAgentData||window.navigator).platform)}function kg(){return _g(/^Mac/i)}function Tg(){return _g(/^iPhone/i)}function Fg(){return _g(/^iPad/i)||kg()&&navigator.maxTouchPoints>1}function Ig(){return Tg()||Fg()}function Ng(){return kg()||Ig()}function Pg(){return Dg(/AppleWebKit/i)&&!Og()}function Og(){return Dg(/Chrome/i)}function Rg(){return Dg(/Android/i)}function Mg(e,t,n,r){let s=(0,i.useRef)(n);s.current=n;let o=null==n;(0,i.useEffect)((()=>{if(o)return;let n=e.current,i=e=>s.current.call(this,e);return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}}),[e,t,r,o])}function Lg(e){let[t,n]=(0,i.useState)(e),r=(0,i.useRef)(t),s=(0,i.useRef)(null);r.current=t;let o=(0,i.useRef)(null);o.current=()=>{let e=s.current.next();e.done?s.current=null:t===e.value?o.current():n(e.value)},Um((()=>{s.current&&o.current()}));let a=(0,i.useCallback)((e=>{s.current=e(r.current),o.current()}),[s,o]);return[t,a]}function Bg(e,t){let n=jg(e,t,"left"),i=jg(e,t,"top"),r=t.offsetWidth,s=t.offsetHeight,o=e.scrollLeft,a=e.scrollTop,u=o+e.offsetWidth,l=a+e.offsetHeight;n<=o?o=n:n+r>u&&(o+=n+r-u),i<=a?a=i:i+s>l&&(a+=i+s-l),e.scrollLeft=o,e.scrollTop=a}function jg(e,t,n){const i="left"===n?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);){if(t.offsetParent.contains(e)){r-=e[i];break}t=t.offsetParent}return r}zm(Ag,"isMac",(()=>kg)),zm(Ag,"isIPhone",(()=>Tg)),zm(Ag,"isIPad",(()=>Fg)),zm(Ag,"isIOS",(()=>Ig)),zm(Ag,"isAppleDevice",(()=>Ng)),zm(Ag,"isWebKit",(()=>Pg)),zm(Ag,"isChrome",(()=>Og)),zm(Ag,"isAndroid",(()=>Rg)),zm({},"useEvent",(()=>Mg)),zm({},"useValueEffect",(()=>Lg)),zm({},"scrollIntoView",(()=>Bg));const Vg=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[2],flex:"none"}),zg=e=>{let{value:t,onChange:n}=e;const i=Km(),s=Km();return r().createElement("div",{className:Vg,"data-testid":"pipeline-results-view-controls"},r().createElement(he.Overline,{as:"label",id:i,htmlFor:s,"aria-label":"Show documents as"},"View"),r().createElement(he.SegmentedControl,{id:s,"aria-labelledby":i,size:"small",value:t,onChange:n},r().createElement(he.SegmentedControlOption,{"aria-label":"Document list",value:"document"},r().createElement(he.Icon,{size:"small",glyph:"Menu"})),r().createElement(he.SegmentedControlOption,{"aria-label":"JSON list",value:"json"},r().createElement(he.Icon,{size:"small",glyph:"CurlyBraces"}))))},qg=(0,he.css)({display:"flex",gap:he.spacing[2],justifyContent:"flex-end",alignItems:"center"}),Ug=e=>{let{onChangeResultsView:t,resultsView:n}=e;return r().createElement("div",{"data-testid":"pipeline-results-header"},r().createElement("div",{className:qg},r().createElement(Sm,null),r().createElement(zg,{value:n,onChange:t})))},Wg=(0,he.css)({overflow:"hidden",display:"grid",gridTemplateRows:"min-content 1fr",gridTemplateColumns:"1fr",marginBottom:he.spacing[3]}),Kg=(0,he.css)({paddingLeft:he.spacing[3]+he.spacing[1],paddingRight:he.spacing[5]+he.spacing[1]}),$g=(0,he.css)({height:"100%",overflowY:"auto","&:not(:first-child)":{height:`calc(100% - ${he.spacing[3]}px)`,marginTop:he.spacing[3]}}),Gg=(0,he.css)({display:"flex",alignItems:"flex-start",paddingLeft:he.spacing[3]+he.spacing[1],paddingRight:he.spacing[5]+he.spacing[1]}),Hg=(0,he.css)({width:"100%",height:"100%",paddingTop:2*he.spacing[6],justifyContent:"center"}),Jg=e=>{let{children:t,center:n}=e;return r().createElement("div",{className:(0,he.cx)(Gg,n&&Hg)},t)},Xg=(0,he.css)({display:"flex",flexDirection:"column",alignItems:"center",gap:he.spacing[2],maxWidth:8*he.spacing[6],marginTop:he.spacing[2],marginBottom:he.spacing[2]}),Zg=(0,he.css)({color:he.uiColors.green.dark2,textAlign:"center"}),Yg=e=>{let{namespace:t,onClick:n}=e;return r().createElement("div",{className:Xg},r().createElement(he.Subtitle,{className:Zg},"Results persisted",t?` in ${t} namespace`:""),t&&r().createElement(he.Button,{"data-testid":"pipeline-results-go-to-collection",variant:"primaryOutline",onClick:n},"Go to collection"))},Qg=Y((e=>{let{pipeline:t,namespace:n,aggregation:{documents:i,loading:r,error:s}}=e;const o=t.filter((e=>!$t(e))),a=o[o.length-1];return{documents:i,isLoading:r,error:s,isError:Boolean(s),isEmpty:0===i.length,isMergeOrOutPipeline:["$merge","$out"].includes(a?.stageOperator),mergeOrOutDestination:Gt(n,a)}}),{onCancel:fi,onRetry:()=>(e,t)=>{const{aggregation:{page:n}}=t();return e(gi(n))},onOutClick:e=>(0,Ht.globalAppRegistryEmit)("aggregations-open-result-namespace",e)})((e=>{let{documents:t,isLoading:n,error:s,isError:o,isEmpty:a,isMergeOrOutPipeline:u,mergeOrOutDestination:l,onOutClick:c,onRetry:p,onCancel:h}=e;const[d,f]=(0,i.useState)("document");let m=null;return m=o&&s?r().createElement(Jg,null,r().createElement(he.ErrorSummary,{"data-testid":"pipeline-results-error",errors:s,onAction:p,actionText:"Retry"})):n?r().createElement(Jg,{center:!0},r().createElement(he.CancelLoader,{"data-testid":"pipeline-results-loader",progressText:u?"Persisting documents"+(l?` to ${l} namespace`:""):"Running aggregation",cancelText:"Stop",onCancel:h})):u?r().createElement(Jg,{center:!0},r().createElement(Yg,{namespace:l,onClick:()=>{l&&c?.(l)}})):a?r().createElement(Jg,{center:!0},r().createElement(ym,null)):r().createElement(fm,{documents:t,view:d}),r().createElement("div",{"data-testid":"pipeline-results-workspace",className:Wg},!u&&r().createElement("div",{className:Kg},r().createElement(Ug,{resultsView:d,onChangeResultsView:f})),r().createElement("div",{className:$g},m))}));class ev extends i.PureComponent{static displayName="PipelineComponent";static propTypes={env:o().string.isRequired,isAtlasDeployed:o().bool.isRequired,openPipelineById:o().func.isRequired,savedPipelinesListToggle:o().func.isRequired,getSavedPipelines:o().func.isRequired,toggleComments:o().func.isRequired,toggleSample:o().func.isRequired,toggleAutoPreview:o().func.isRequired,restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,restorePipeline:o().object.isRequired,deletePipeline:o().func.isRequired,pipeline:o().array.isRequired,serverVersion:o().string.isRequired,stageAdded:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,savedPipeline:o().object.isRequired,saveCurrentPipeline:o().func.isRequired,newPipeline:o().func.isRequired,newPipelineFromText:o().func.isRequired,closeImport:o().func.isRequired,clonePipeline:o().func.isRequired,changeText:o().func.isRequired,createNew:o().func.isRequired,confirmNew:o().func.isRequired,runStage:o().func.isRequired,importPipelineText:o().string.isRequired,exportToLanguage:o().func.isRequired,fields:o().array.isRequired,nameChanged:o().func.isRequired,isModified:o().bool.isRequired,isCommenting:o().bool.isRequired,isSampling:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,isImportPipelineOpen:o().bool.isRequired,isImportConfirmationNeeded:o().bool.isRequired,setIsModified:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,name:o().string,dismissViewError:o().func.isRequired,editViewName:o().string,updateView:o().func.isRequired,updateViewError:o().string,importPipelineError:o().string,collationString:o().object,collationStringChanged:o().func.isRequired,openLink:o().func.isRequired,isOverviewOn:o().bool.isRequired,toggleOverview:o().func.isRequired,settings:o().object.isRequired,toggleSettingsIsExpanded:o().func.isRequired,toggleSettingsIsCommentMode:o().func.isRequired,setSettingsSampleSize:o().func.isRequired,setSettingsMaxTimeMS:o().func.isRequired,setSettingsLimit:o().func.isRequired,limit:o().number.isRequired,largeLimit:o().number.isRequired,maxTimeMS:o().number,applySettings:o().func.isRequired,isFullscreenOn:o().bool.isRequired,toggleFullscreen:o().func.isRequired,savingPipelineNameChanged:o().func.isRequired,savingPipelineApply:o().func.isRequired,savingPipelineCancel:o().func.isRequired,savingPipelineOpen:o().func.isRequired,savingPipeline:o().object.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired,openCreateView:o().func.isRequired,isNewPipelineConfirm:o().bool.isRequired,setIsNewPipelineConfirm:o().func.isRequired,inputDocuments:o().object.isRequired,workspace:o().string.isRequired,runOutStage:o().func.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,showExportButton:o().bool.isRequired,showRunButton:o().bool.isRequired,showExplainButton:o().bool.isRequired};static defaultProps={projections:[],maxTimeMS:it,limit:10,largeLimit:rt};renderModifyingViewSourceError(){if(this.props.updateViewError)return r().createElement("div",{className:Pt["pipeline-error-banner-container"]},r().createElement(he.Banner,{variant:"danger",dismissible:!0,onClose:this.props.dismissViewError},this.props.updateViewError))}renderRestoreModal(){return this.props.restorePipeline.isModalVisible?r().createElement(dt,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,openPipelineById:this.props.openPipelineById,restorePipeline:this.props.restorePipeline}):null}renderSavePipeline(){if(!this.props.isAtlasDeployed)return r().createElement(nt,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,savedPipelinesListToggle:this.props.savedPipelinesListToggle,savedPipeline:this.props.savedPipeline})}renderPipelineToolbar(){return r().createElement(fl,{showRunButton:this.props.showRunButton,showExportButton:this.props.showExportButton,showExplainButton:this.props.showExplainButton})}renderPipelineWorkspace(){return"results"===this.props.workspace?r().createElement(Qg,null):r().createElement(hm,{editViewName:this.props.editViewName,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,pipeline:this.props.pipeline,toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified,openLink:this.props.openLink,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,inputDocuments:this.props.inputDocuments,runStage:this.props.runStage,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste})}render(){const e=r().createElement(yt,{isOpen:this.props.isImportPipelineOpen,closeImport:this.props.closeImport,changeText:this.props.changeText,createNew:this.props.createNew,error:this.props.importPipelineError,text:this.props.importPipelineText}),t=r().createElement(Ct,{isConfirmationNeeded:this.props.isImportConfirmationNeeded,closeImport:this.props.closeImport,isAutoPreviewing:this.props.isAutoPreviewing,runStage:this.props.runStage,confirmNew:this.props.confirmNew}),n=r().createElement(Ft,{isNewPipelineConfirm:this.props.isNewPipelineConfirm,setIsNewPipelineConfirm:this.props.setIsNewPipelineConfirm,newPipeline:this.props.newPipeline}),i=r().createElement(At,{name:this.props.savingPipeline.name,isOpen:this.props.savingPipeline.isOpen,isSaveAs:this.props.savingPipeline.isSaveAs,saveCurrentPipeline:this.props.saveCurrentPipeline,savingPipelineNameChanged:this.props.savingPipelineNameChanged,savingPipelineApply:this.props.savingPipelineApply,savingPipelineCancel:this.props.savingPipelineCancel,savingPipelineOpen:this.props.savingPipelineOpen,clonePipeline:this.props.clonePipeline});return r().createElement("div",{className:pe()(Pt.pipeline,!!this.props.isFullscreenOn&&Pt["pipeline-fullscreen"])},this.renderPipelineToolbar(),this.renderModifyingViewSourceError(),this.renderPipelineWorkspace(),this.renderSavePipeline(),r().createElement(Sc,null),r().createElement(ct,{isAtlasDeployed:this.props.isAtlasDeployed,isExpanded:this.props.settings.isExpanded,toggleSettingsIsExpanded:this.props.toggleSettingsIsExpanded,toggleSettingsIsCommentMode:this.props.toggleSettingsIsCommentMode,setSettingsSampleSize:this.props.setSettingsSampleSize,setSettingsMaxTimeMS:this.props.setSettingsMaxTimeMS,setSettingsLimit:this.props.setSettingsLimit,isCommenting:this.props.isCommenting,toggleComments:this.props.toggleComments,limit:this.props.limit,largeLimit:this.props.largeLimit,maxTimeMS:this.props.maxTimeMS,applySettings:this.props.applySettings,runStage:this.props.runStage,settings:this.props.settings}),this.renderRestoreModal(),e,t,i,n)}}const tv=ev;var nv=n(8817),iv={};iv.styleTagTransform=Ae(),iv.setAttributes=Ee(),iv.insert=xe().bind(null,"head"),iv.domAPI=ve(),iv.insertStyleElement=Ce(),me()(nv.Z,iv);const rv=nv.Z&&nv.Z.locals?nv.Z.locals:void 0;class sv extends i.Component{static displayName="AggregationsComponent";render(){return r().createElement("div",{className:rv.aggregations},r().createElement(tv,this.props))}}const ov=Y((e=>({fields:e.fields,inputDocuments:e.inputDocuments,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,serverVersion:e.serverVersion,pipeline:e.pipeline,savedPipeline:e.savedPipeline,restorePipeline:e.restorePipeline,name:e.name,collationString:e.collationString,isModified:e.isModified,isCommenting:e.comments,isSampling:e.sample,isAtlasDeployed:e.isAtlasDeployed,isAutoPreviewing:e.autoPreview,isImportPipelineOpen:e.importPipeline.isOpen,isImportConfirmationNeeded:e.importPipeline.isConfirmationNeeded,importPipelineText:e.importPipeline.text,importPipelineError:e.importPipeline.syntaxError,settings:e.settings,isOverviewOn:e.isOverviewOn,limit:e.limit,largeLimit:e.largeLimit,maxTimeMS:e.maxTimeMS,isFullscreenOn:e.isFullscreenOn,savingPipeline:e.savingPipeline,projections:e.projections,editViewName:e.editViewName,isNewPipelineConfirm:e.isNewPipelineConfirm,setIsNewPipelineConfirm:e.setIsNewPipelineConfirm,updateViewError:e.updateViewError,workspace:e.workspace})),{namespaceChanged:Pa,nameChanged:e=>({type:Va,name:e}),collationStringChanged:Ir,toggleInputDocumentsCollapsed:()=>({type:Da}),refreshInputDocuments:Ia,toggleOverview:()=>({type:nu}),toggleComments:()=>({type:Ha}),toggleSample:()=>({type:Xa}),toggleAutoPreview:vn,deletePipeline:e=>async(t,n)=>{const i=new lr;await i.delete(e),t(br()),t(Uu()),t((0,Ht.globalAppRegistryEmit)("agg-pipeline-deleted",{name:n().name}))},runStage:ti,runOutStage:e=>(t,n)=>{const i=n(),{dataService:r}=i.dataService;r&&(((e,t,n,i,r)=>{n(Wn(r));const s=Kn(i(),r);Qn(s,e,t,n,i,r)})(r,i.namespace,t,n,e),t((0,Ht.globalAppRegistryEmit)("agg-pipeline-out-executed",{id:i.id})))},gotoOutResults:e=>(t,n)=>{const i=n(),r=`${Vt()(i.namespace).database}.${e.replace(/"/g,"")}`;i.outResultsFn?i.outResultsFn(r):t((0,Ht.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},gotoMergeResults:e=>(t,n)=>{const i=n(),r=((e,t)=>{const n=Kt(t).$merge;if(en()(n))return`${e}.${n}`;const i=n.into;return en()(i)?`${e}.${i}`:`${i.db||e}.${i.coll}`})(Vt()(i.namespace).database,i.pipeline[e]);i.outResultsFn?i.outResultsFn(r):t((0,Ht.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},stageAdded:qn,stageAddedAfter:e=>(t,n)=>{const{pipeline:i}=n();yn("Aggregation Edited",{num_stages:i.length,stage_action:"stage_added",stage_name:null}),t({type:En,index:e})},stageChanged:(e,t)=>n=>{n({type:wn,index:t,stage:e}),n(pn()),n(fn(!0)),n(ti(t))},stageCollapseToggled:e=>({type:Cn,index:e}),stageDeleted:e=>(t,n)=>{const{pipeline:i}=n();yn("Aggregation Edited",{num_stages:i.length,stage_action:"stage_removed",stage_name:i[e].stageOperator}),t({type:Sn,index:e})},stageMoved:(e,t)=>(n,i)=>{if(e===t)return;const{pipeline:r}=i();yn("Aggregation Edited",{num_stages:r.length,stage_action:"stage_reordered",stage_name:r[e].stageOperator}),n({type:An,fromIndex:e,toIndex:t})},stageOperatorSelected:(e,t,n,i)=>(r,s)=>{const{pipeline:o}=s();o[e].stageOperator!==t&&(yn("Aggregation Edited",{num_stages:o.length,stage_action:"stage_renamed",stage_name:t}),r({type:Dn,index:e,stageOperator:t,isCommenting:n,env:i}))},stageToggled:e=>({type:_n,index:e}),toggleSettingsIsExpanded:hu,toggleSettingsIsCommentMode:()=>({type:ou}),setSettingsSampleSize:e=>({type:au,value:e}),setSettingsMaxTimeMS:e=>({type:uu,value:e}),setSettingsLimit:e=>({type:lu,value:e}),exportToLanguage:Kr,savedPipelinesListToggle:vr,saveCurrentPipeline:Er,savedPipelineAdd:yr,getSavedPipelines:xr,restorePipelineModalToggle:e=>({type:Qa,index:e}),restorePipelineFrom:e=>({type:eu,objectID:e}),restoreSavedPipeline:Wu,newPipeline:()=>({type:Mu}),newPipelineFromText:ca,closeImport:()=>({type:ra}),clonePipeline:()=>({type:Lu}),changeText:e=>({type:sa,text:e}),createNew:()=>({type:oa}),confirmNew:()=>({type:aa}),openLink:Pr,openPipelineById:e=>async t=>{const n=or().join(nr(),`${e}.json`);try{const e=await rr().promises.readFile(n,"utf8");t(Ku(JSON.parse(e)))}catch(e){Nu(e)}},applySettings:e=>(t,n)=>{t((e=>({type:cu,settings:e}))(e)),t((0,Ht.globalAppRegistryEmit)("compass:aggregations:settings-applied",{settings:n().settings}))},setIsModified:fn,limitChanged:e=>({type:za,limit:e}),largeLimitChanged:e=>({type:qa,largeLimit:e}),maxTimeMSChanged:Mr,toggleFullscreen:()=>({type:du}),savingPipelineNameChanged:e=>({type:mu,name:e}),savingPipelineApply:()=>({type:gu}),savingPipelineCancel:()=>({type:vu}),savingPipelineOpen:bu,projectionsChanged:pn,newPipelineFromPaste:e=>t=>{t((e=>({type:Bu,text:e}))(e)),t((0,Ht.globalAppRegistryEmit)("compass:aggregations:pipeline-imported"))},updateView:Ni,openCreateView:$u,setIsNewPipelineConfirm:Au,dismissViewError:Ii})(sv),av=ov;function uv(e){return function(t){var n=t.dispatch,i=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,i,e):t(r)}}}}var lv=uv();lv.withExtraArgument=uv;const cv=lv,pv=e=>{e.dispatch(Ia())},hv=(e,t)=>{e.dispatch({type:Wa,isAtlasDeployed:t})},dv=(e,t,n)=>{e.dispatch(ya(t,n))},fv=(e,t)=>{Vt()(t).collection&&(e.dispatch(Pa(t)),pv(e))},mv=(e,t)=>{e.dispatch((e=>({type:Eu,outResultsFn:e}))(t))},gv=(e,t)=>{e.dispatch((e=>({type:Ba,version:e}))(t))},vv=(e,t)=>{e.dispatch((e=>({type:xa,fields:e}))(t))},yv=(e,t)=>{e.dispatch((e=>({type:Tu.IndexesFetched,indexes:e}))(t.map((e=>e.getAttributes({props:!0},!0)))))},xv=(e,t)=>{e.dispatch((0,Ht.localAppRegistryActivated)(t))},bv=(e,t)=>{e.dispatch((0,Ht.globalAppRegistryActivated)(t))},Ev=(e,t,n,i,r)=>{var s,o,a,u;e.dispatch((s=t,o=n,a=i,u=r,e=>{e(((e,t,n,i)=>({type:ju,name:e,pipeline:t,isReadonly:n,sourceName:i}))(s,o,a,u)),e(ti(0,!0))}))},wv=(e,t)=>{e.dispatch((e=>({type:Oa,env:e}))(t))},Cv=(e,t)=>{e.dispatch((e=>({type:Ma,isTimeSeries:e}))(t))},Sv=(e,t)=>{e.dispatch((e=>({type:$a,isReadonly:e}))(t))},Av=(e,t)=>{e.dispatch((e=>({type:wa,sourceName:e}))(t))},Dv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=B(qu,q(cv));if(e.localAppRegistry){const n=e.localAppRegistry;xv(t,n),n.on("refresh-data",(()=>{pv(t)})),n.on("fields-changed",(e=>{vv(t,e.aceFields)})),n.on("indexes-changed",(e=>{yv(t,e)}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;bv(t,n),n.on("refresh-data",(()=>{pv(t)})),n.on("import-finished",(e=>{let{ns:n}=e;const{namespace:i}=t.getState();n===i&&pv(t)})),n.on("compass:deployment-awareness:topology-changed",(e=>{wv(t,e.env)}))}if(e.dataProvider&&dv(t,e.dataProvider.error,e.dataProvider.dataProvider),null!==e.isAtlasDeployed&&void 0!==e.isAtlasDeployed&&hv(t,e.isAtlasDeployed),e.namespace&&fv(t,e.namespace),e.serverVersion&&gv(t,e.serverVersion),e.fields&&vv(t,e.fields),e.outResultsFn&&mv(t,e.outResultsFn),e.editViewName&&Ev(t,e.editViewName,e.sourcePipeline,e.isReadonly,e.sourceName),e.env)wv(t,e.env);else if(n.g&&n.g.hadronApp&&n.g.hadronApp.appRegistry){const e=n.g.hadronApp.appRegistry.getStore("DeploymentAwareness.Store");e&&wv(t,e.state.env)}return e.isTimeSeries&&Cv(t,e.isTimeSeries),e.isReadonly&&Sv(t,e.isReadonly),e.sourceName&&Av(t,e.sourceName),e.aggregation&&Ku(e.aggregation)(t.dispatch),e.isDataLake&&t.dispatch(ku(e.isDataLake)),t};class _v extends i.Component{static displayName="AggregationsPlugin";static propTypes={store:o().object.isRequired,showExportButton:o().bool,showRunButton:o().bool,showExplainButton:o().bool};static defaultProps={showExportButton:!1,showRunButton:!1,showExplainButton:!1};render(){return r().createElement(p,{store:this.props.store},r().createElement(av,{showExportButton:this.props.showExportButton,showRunButton:this.props.showRunButton,showExplainButton:this.props.showExplainButton}))}}const kv=_v,Tv="aggregations/create-view/source/SET",Fv="aggregations/create-view/pipeline/SET",Iv=[],Nv="aggregations/create-view/is-running/TOGGLE_IS_RUNNING",Pv=!1,Ov=e=>({type:Nv,isRunning:e}),Rv="aggregations/create-view/is-visible/TOGGLE_IS_VISIBLE",Mv=!1,Lv=e=>({type:Rv,isVisible:e}),Bv="aggregations/create-view/is-duplicating/TOGGLE_IS_DUPLICATING",jv=!1,Vv="aggregations/create-view/name/CHANGE_NAME",zv=e=>({type:Vv,name:e}),qv="aggregations/create-view/error",Uv=`${qv}/HANDLE_ERROR`,Wv=`${qv}/CLEAR_ERROR`,Kv=null,$v="aggregations/create-view/reset",{track:Gv,debug:Hv}=We("COMPASS-AGGREGATIONS-UI"),Jv=n(4935),Xv="aggregations/create-view/OPEN",Zv={isRunning:Pv,isVisible:Mv,isDuplicating:jv,name:"",error:Kv,source:"",pipeline:Iv},Yv=j({appRegistry:Jt(),isRunning:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pv,t=arguments.length>1?arguments[1]:void 0;return t.type===Nv?t.isRunning:e},isDuplicating:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jv,t=arguments.length>1?arguments[1]:void 0;return t.type===Bv?t.isDuplicating:e},isVisible:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mv,t=arguments.length>1?arguments[1]:void 0;return t.type===Rv?t.isVisible:e},name:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Vv?t.name:e},error:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kv,t=arguments.length>1?arguments[1]:void 0;return t.type===Uv?t.error:t.type===Wv?null:e},source:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Tv?t.source:e},pipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Iv,t=arguments.length>1?arguments[1]:void 0;return t.type===Fv?t.pipeline:e},dataService:va}),Qv=(e,t)=>{if(t.type===$v)return{...e,...Zv};if(t.type===Xv){const n={...e,...Zv,isVisible:!0,isDuplicating:t.duplicate,source:t.source,pipeline:t.pipeline};return Hv("handling open",{newState:n}),n}return Yv(e,t)},ey=(e,t)=>(e(Ov(!1)),e({type:Uv,error:t})),ty=(e,t,n)=>({type:Xv,source:e,pipeline:t,duplicate:n}),ny=()=>(e,t)=>{Hv("creating view!");const n=t(),i=n.dataService.dataService,r=n.name,s=n.source,{database:o}=Jv(n.source),a=n.pipeline,u={};e({type:Wv});try{e(Ov(!0)),Hv("calling data-service.createView",r,s,a,u),i.createView(r,s,a,u,(t=>{if(t)return Hv("error creating view",t),ey(e,t);Hv("View created!"),Gv("Aggregation Saved As View",{num_stages:a.length}),e((0,Ht.globalAppRegistryEmit)("compass:aggregations:create-view",{numStages:a.length})),e((0,Ht.globalAppRegistryEmit)("aggregations-open-result-namespace",`${o}.${r}`)),e({type:$v})}))}catch(t){return Hv("Unexpected error creating view",t),ey(e,t)}};class iy extends i.PureComponent{static displayName="CreateViewModalComponent";static propTypes={createView:o().func.isRequired,isVisible:o().bool.isRequired,toggleIsVisible:o().func.isRequired,name:o().string,changeViewName:o().func.isRequired,isDuplicating:o().bool.isRequired,source:o().string.isRequired,pipeline:o().array.isRequired,isRunning:o().bool.isRequired,error:o().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1,isDuplicating:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return r().createElement(he.ConfirmationModal,{title:this.props.isDuplicating?"Duplicate View":"Create a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Create",trackingId:"create_view_modal"},r().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},r().createElement(Lr.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?r().createElement(Lr.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?r().createElement(Lr.ModalStatusMessage,{icon:"spinner",message:"Create in Progress",type:"in-progress"}):null))}}const ry=Y((e=>({isRunning:e.isRunning,isVisible:e.isVisible,isDuplicating:e.isDuplicating,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:ny,changeViewName:zv,toggleIsVisible:Lv})(iy);class sy extends i.Component{static displayName="CreateViewPlugin";static propTypes={store:o().object.isRequired};render(){return r().createElement(p,{store:this.props.store},r().createElement(ry,null))}}const oy=sy;class ay extends i.PureComponent{static displayName="DuplicateViewModalComponent";static propTypes={createView:o().func.isRequired,isVisible:o().bool.isRequired,toggleIsVisible:o().func.isRequired,name:o().string,changeViewName:o().func.isRequired,source:o().string.isRequired,pipeline:o().array.isRequired,isRunning:o().bool.isRequired,error:o().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return r().createElement(he.ConfirmationModal,{title:"Duplicate a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Duplicate",trackingId:"duplicate_view_modal"},r().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},r().createElement(Lr.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?r().createElement(Lr.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?r().createElement(Lr.ModalStatusMessage,{icon:"spinner",message:"Duplicate in Progress",type:"in-progress"}):null))}}const uy=Y((e=>({isRunning:e.isRunning,isVisible:e.isVisible,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:ny,changeViewName:zv,toggleIsVisible:Lv})(ay),ly=B(Qv,q(cv));ly.onActivated=e=>{ly.dispatch((0,Ht.globalAppRegistryActivated)(e)),e.on("data-service-connected",((e,t)=>{ly.dispatch(ya(e,t))})),e.on("open-create-view",(e=>{ly.dispatch(ty(e.source,e.pipeline,e.duplicate))}))};const cy=ly;class py extends i.Component{static displayName="DuplicateViewPlugin";render(){return r().createElement(p,{store:cy},r().createElement(uy,null))}}const hy=py,dy=n(1227)("mongodb-aggregations:stores:create-view"),fy=(e,t,n)=>{e.dispatch(ya(t,n))},my=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=B(Qv,q(cv));if(e.localAppRegistry){const n=e.localAppRegistry;t.dispatch((0,Ht.localAppRegistryActivated)(n)),n.on("open-create-view",(e=>{dy("open-create-view",e.source,e.pipeline),t.dispatch(ty(e.source,e.pipeline,!1))}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;t.dispatch((0,Ht.globalAppRegistryActivated)(n))}return e.dataProvider&&fy(t,e.dataProvider.error,e.dataProvider.dataProvider),t},gy=JSON.parse('{"name":"@mongodb-js/compass-aggregations","productName":"Aggregations plugin","version":"8.26.0","apiVersion":"3.0.0","description":"Compass Aggregation Pipeline Builder","main":"dist/index.js","compass:main":"src/index.js","exports":{"browser":"./dist/browser.js","require":"./dist/index.js"},"compass:exports":{".":"./src/index.js"},"scripts":{"prepublishOnly":"npm run compile && compass-scripts check-exports-exist","compile":"npm run webpack -- --mode production","prewebpack":"rimraf ./dist","webpack":"webpack-compass","start":"npm run webpack serve -- --mode development","analyze":"npm run webpack -- --mode production --analyze","typecheck":"tsc --noEmit","depcheck":"depcheck","eslint":"eslint","lint":"npm run eslint .","check":"npm run typecheck && npm run lint && npm run depcheck","check-ci":"npm run check","test":"mocha","test-electron":"xvfb-maybe electron-mocha --no-sandbox","test-cov":"nyc -x \\"**/*.spec.*\\" --reporter=lcov --reporter=text --reporter=html npm run test","test-watch":"npm run test -- --watch","test-ci":"npm run test-cov","test-ci-electron":"npm run test-electron"},"license":"SSPL","peerDependencies":{"@mongodb-js/compass-components":"^0.16.0","@mongodb-js/compass-crud":"^12.26.0","@mongodb-js/compass-export-to-language":"^7.25.0","@mongodb-js/compass-field-store":"^7.25.0","async":"^3.2.0","bson":"*","electron":"^13.5.1","hadron-react-buttons":"^5.9.0","hadron-react-components":"^5.16.0","mongodb-ace-autocompleter":"*","mongodb-data-service":"^21.23.0","mongodb-query-parser":"^2.4.6","prop-types":"^15.7.2","react":"^16.14.0","react-bootstrap":"^0.32.4","react-dom":"^16.14.0"},"devDependencies":{"@mongodb-js/compass-components":"^0.16.0","@mongodb-js/compass-crud":"^12.26.0","@mongodb-js/compass-export-to-language":"^7.25.0","@mongodb-js/compass-field-store":"^7.25.0","@mongodb-js/eslint-config-compass":"^0.10.0","@mongodb-js/mocha-config-compass":"^0.11.0","@mongodb-js/prettier-config-compass":"^0.5.0","@mongodb-js/tsconfig-compass":"^0.6.0","@mongodb-js/webpack-config-compass":"^0.10.0","@react-aria/utils":"^3.13.1","@testing-library/react":"^12.1.4","@testing-library/user-event":"^13.5.0","@types/decomment":"^0.9.2","@types/lodash.debounce":"^4.0.7","@types/lodash.isempty":"^4.4.6","@types/semver":"^7.3.9","async":"^3.2.0","chai":"^4.3.6","classnames":"^2.2.6","debug":"4.3.0","depcheck":"^1.4.1","electron":"^13.5.1","enzyme":"^3.11.0","eslint":"^7.25.0","hadron-app":"^4.25.0","hadron-app-registry":"^8.13.0","hadron-document":"^7.12.0","hadron-react-buttons":"^5.9.0","hadron-react-components":"^5.16.0","mocha":"^8.4.0","mongodb-ace-autocompleter":"^1.1.1","mongodb-connection-model":"^21.18.0","mongodb-data-service":"^21.23.0","mongodb-query-parser":"^2.4.6","mongodb-reflux-store":"^0.0.1","nyc":"^15.1.0","prop-types":"^15.7.2","react":"^16.14.0","react-dom":"^16.14.0","react-sortable-hoc":"^2.0.0","reflux":"^0.4.1","reflux-state-mixin":"github:mongodb-js/reflux-state-mixin","rimraf":"^3.0.0","sinon":"^9.2.3","xvfb-maybe":"^0.2.1"},"dependencies":{"@mongodb-js/compass-logging":"^0.13.0","@mongodb-js/explain-plan-helper":"^0.10.0","@mongodb-js/mongodb-redux-common":"^1.13.0","acorn-loose":"^8.0.2","astring":"^1.7.0","bson":"*","decomment":"^0.9.2","is-electron-renderer":"^2.0.1","lodash.debounce":"^4.0.8","lodash.isempty":"^4.4.0","lodash.isstring":"^4.0.1","mongodb":"^4.6.0","mongodb-ns":"^2.4.0","re-resizable":"^6.9.0","react-bootstrap":"^0.32.4","react-redux":"^5.0.6","react-select-plus":"^1.2.0","redux":"^4.1.2","redux-thunk":"^2.3.0","semver":"^5.7.1"},"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"repository":{"type":"git","url":"https://github.com/mongodb-js/compass.git"},"gitHead":"757aed43862951a083137bffa1815c621a377440"}'),vy={name:"Aggregations",component:kv,order:2,configureStore:Dv,configureActions:()=>{},storeName:"Aggregations.Store",actionName:"Aggregations.Actions"},yy={name:"Create View",component:oy,configureStore:my,storeName:"Aggregations.CreateViewStore",configureActions:()=>{},actionName:"Aggregations.Actions"},xy={name:"Duplicate View",component:hy},by=e=>{e.registerRole("Collection.Tab",vy),e.registerRole("Collection.ScopedModal",yy),e.registerRole("Global.Modal",xy),e.registerStore("Aggregations.DuplicateViewStore",cy)},Ey=e=>{e.deregisterRole("Collection.Tab",vy),e.deregisterRole("Collection.ScopedModal",yy),e.deregisterRole("Global.Modal",xy),e.deregisterStore("Aggregations.DuplicateViewStore")},wy=kv},5727:(e,t,n)=>{"use strict";const i=n(4283);let r=!1;try{r="string"!=typeof n(5840)}catch(e){}!function(){if(!r)return console.warn("Unsupported environment for hadron-ipc"),{};const t=n(i?677:5663);e.exports=t,i?e.exports.ipcRenderer=t:e.exports.ipcMain=t}()},1563:(e,t)=>{"use strict";t._=e=>`hadron-ipc-${e}-response`},5663:(e,t,n)=>{"use strict";const i=n(1563)._,r=n(4749),s=n(4772),o=n(9320),a=n(5840),u=a.BrowserWindow,l=a.ipcMain,c=n(2069)("hadron-ipc:main");(t=l).respondTo=(e,n)=>{if(s(e))return r(e,((e,n)=>{t.respondTo(n,e)})),t;const a=i(e),p=`${a}-error`;return l.on(e,(function(t){const i=u.fromWebContents(t.sender);if(!i)return;const r=n=>{if(c(`responding with result for ${e}`,n),i.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(a,n)},s=n=>{if(c(`responding with error for ${e}`,n),i.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(p,n)};for(var l=arguments.length,h=new Array(l>1?l-1:0),d=1;d<l;d++)h[d-1]=arguments[d];c(`calling ${e} handler with args`,h);const f=n(i,...h);o(f)?f.then(r).catch(s):f instanceof Error?s(f):r(f)})),t},t.broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];u.getAllWindows().forEach((t=>{t.webContents&&t.webContents.send(e,...n)}))},t.broadcastFocused=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];u.getAllWindows().forEach((t=>{t.webContents&&t.isFocused()&&t.webContents.send(e,...n)}))},t.remove=(e,t)=>{l.removeListener(e,t)},e.exports=t},677:(e,t,n)=>{"use strict";const i=n(1563)._,r=n(5840).ipcRenderer,s=n(2069)("hadron-ipc:renderer");function o(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];e(`calling ${t} with args`,s);const a=i(t),u=`${a}-error`;return new Promise((function(n,i){r.on(a,(function(i,s){e(`got response for ${t} from main`,s),r.removeAllListeners(a),r.removeAllListeners(u),n(s)})),r.on(u,(function(n,s){e(`error for ${t} from main`,s),r.removeAllListeners(a),r.removeAllListeners(u),i(s)})),r.send(t,...s)}))}(t=r).callQuiet=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o((()=>{}),e,...n)},t.call=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o(s,e,...n)},e.exports=t},8875:(e,t,n)=>{e.exports=n(2473)},2473:(e,t,n)=>{const{isPlainObject:i,isArray:r,isString:s,isNumber:o,hasIn:a,keys:u,without:l,toNumber:c,toString:p}=n(6635),{ObjectId:h,MinKey:d,MaxKey:f,Long:m,Double:g,Int32:v,Decimal128:y,Binary:x,BSONRegExp:b,Code:E,BSONSymbol:w,Timestamp:C,Map:S}=n(345),A="Long",D="Int64",_="_bsontype",k=/\[object (\w+)\]/,T=2147483647,F=-2147483648,I=Math.pow(2,63)-1,N=-I,P=/^-?\d+$/,O=["Long","Int32","Double","Decimal128"],R={Array:e=>r(e)?e:i(e)?[]:[e],Binary:e=>new x(""+e,x.SUBTYPE_DEFAULT),Boolean:e=>{if(s(e)){if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1;throw new Error(`'${e}' is not a valid boolean string`)}return!!e},Code:e=>new E(""+e,{}),Date:e=>new Date(e),Decimal128:e=>(a(e,_)&&O.includes(e._bsontype)&&(e=e._bsontype===A?e.toString():e.valueOf()),y.fromString(""+e)),Double:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Double value`);if(s(e)&&e.endsWith("."))throw new Error("Please enter at least one digit after the decimal");const t=c(e);return new g(t)},Int32:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int32 value`);const t=c(e);if(t>=F&&t<=T)return new v(t);throw new Error(`Value ${t} is outside the valid Int32 range`)},Int64:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int64 value`);const t=c(e);if(t>=N&&t<=I)return e.value||"number"==typeof e?m.fromNumber(t):"object"==typeof e?m.fromString(e.toString()):m.fromString(e);throw new Error(`Value ${e.toString()} is outside the valid Int64 range`)},MaxKey:()=>new f,MinKey:()=>new d,Null:()=>null,Object:e=>i(e)?e:{},ObjectId:e=>s(e)&&""!==e?h.createFromHexString(e):new h,BSONRegExp:e=>new b(""+e),String:p,BSONSymbol:e=>new w(""+e),Timestamp:e=>{const t=c(e);return C.fromNumber(t)},Undefined:()=>{}},M=u(R),L=new class{test(e){if(P.test(e)){var t=c(e);return t>=F&&t<=T}return!1}},B=new class{test(e){return!!P.test(e)&&Number.isSafeInteger(c(e))}};e.exports=new class{cast(e,t){var n=R[t],i=e;return n&&(i=n(e)),"[object Object]"===i?"":i}type(e){return a(e,_)?e._bsontype===A?D:"ObjectID"===e._bsontype?"ObjectId":"Symbol"===e._bsontype?"BSONSymbol":e._bsontype:o(e)?(t=p(e),L.test(t)?"Int32":B.test(t)?D:"Double"):i(e)?"Object":r(e)?"Array":Object.prototype.toString.call(e).replace(k,"$1");var t}castableTypes(){return!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?M:l(M,"Decimal128")}}},4208:(e,t,n)=>{"use strict";n(7526),n(3354),n(5870),n(930),n(574),n(4116),n(3267),n(4614),n(9852),n(4306),n(6077),n(1072),n(183);const i=Symbol("kDepth"),r=Symbol("kSBENodes");function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=t(e,n),r=i||{};return e.inputStage&&(r.inputStage=s(e.inputStage,t,e)),e.innerStage&&(r.innerStage=s(e.innerStage,t,e)),e.outerStage&&(r.outerStage=s(e.outerStage,t,e)),e.thenStage&&(r.thenStage=s(e.thenStage,t,e)),e.elseStage&&(r.elseStage=s(e.elseStage,t,e)),e.inputStages&&(r.inputStages=e.inputStages.map((n=>s(n,t,e)))),e.shards&&(r.shards=e.shards.map((t=>s(t,e)))),e.executionStages&&(r.executionStages=e.executionStages.map((n=>s(n,t,e)))),i}function o(e){return s(e,(t=>e===t?{...e}:void 0))}function a(e,t){const n=new Map;s(e,(e=>{e.planNodeId&&(n.set(e.planNodeId,e),e[r]=[])})),s(t,((e,t)=>{e[i]=t?t[i]+1:0,e.planNodeId&&n.get(e.planNodeId)[r].push(e)}));for(const e of n.values())e[r].sort(((e,t)=>e[i]-t[i]));return s(e,(e=>{const t=e[r],n=t[0]||{};return{...o(n),...o(e),executionTimeMillisEstimate:n.executionTimeMillis||n.executionTimeMillisEstimate,docsExamined:t.filter((e=>"seek"===e.stage||"scan"===e.stage)).map((e=>e.numReads||0)).reduce(((e,t)=>e+t),0),keysExamined:t.filter((e=>"ixseek"===e.stage||"ixscan"===e.stage)).map((e=>e.numReads||0)).reduce(((e,t)=>e+t),0)}}))}function u(e){return function(e){return!!e.stages}(e)||l(e)}function l(e){return!!e.shards}function c(e){const{mongosPlannerVersion:t}=e.queryPlanner??{};return!isNaN(t)}function p(e){return Object.keys(e).find((e=>e.match(/^\$.*cursor/i)))}function h(e){if(!e.stages||0===e.stages.length)return e;const t=e.stages.map((e=>{if(!function(e){return!!p(e)}(e))return e;const t=p(e);return e[t]=f(e[t]),e}));return e.stages=t,e}function d(e){return f(e)}function f(e){if(e.queryPlanner&&e.queryPlanner.winningPlan&&e.queryPlanner.winningPlan.queryPlan){e.queryPlanner.plannerVersion=1;const t=e.queryPlanner.winningPlan.queryPlan;e.queryPlanner.winningPlan=t,e.executionStats.executionStages=a(t,e.executionStats.executionStages)}return e}e.exports=function(e){return(e=JSON.parse(JSON.stringify(e))).explainVersion&&e.explainVersion<2?e:(delete e.explainVersion,e=u(e)?l(e)?function(e){if(!e.shards)return e;const t={};for(const n in e.shards)e.shards[n].stages?t[n]=h(e.shards[n]):t[n]=d(e.shards[n]);return e.shards=t,e}(e):h(e):c(e)?function(e){const t=e.queryPlanner,n=e.executionStats;return t.winningPlan.shards?(t.winningPlan.shards.forEach(((e,i)=>{const r=e.winningPlan.queryPlan;if(r){const e=a(r,n.executionStages.shards[i].executionStages);t.winningPlan.shards[i].winningPlan=r,n.executionStages.shards[i].executionStages=e}})),e.queryPlanner=t,e.executionStats=n,e):e}(e):d(e),JSON.parse(JSON.stringify(e)))},e.exports.getStageCursorKey=p,e.exports.isAggregationExplain=u,e.exports.isShardedAggregationExplain=l,e.exports.isShardedFindExplain=c},9752:e=>{const t="@mongodb-js/mongodb-redux-common/app-registry",n=`${t}/LOCAL_APP_REGISTRY_ACTIVATED`,i=`${t}/GLOBAL_APP_REGISTRY_ACTIVATED`,r={localAppRegistry:null,globalAppRegistry:null},s=function(e,t){if(e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];e.emit(t,...i)}};e.exports=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;return t.type===n?{...e,localAppRegistry:t.appRegistry}:t.type===i?{...e,globalAppRegistry:t.appRegistry}:e},e.exports.LOCAL_APP_REGISTRY_ACTIVATED=n,e.exports.GLOBAL_APP_REGISTRY_ACTIVATED=i,e.exports.INITIAL_STATE=r,e.exports.localAppRegistryActivated=e=>({type:n,appRegistry:e}),e.exports.globalAppRegistryActivated=e=>({type:i,appRegistry:e}),e.exports.localAppRegistryEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return(t,i)=>{s(i().appRegistry.localAppRegistry,e,...n)}},e.exports.globalAppRegistryEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return(t,i)=>{s(i().appRegistry.globalAppRegistry,e,...n)}}},2779:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&e.push(o)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},3819:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},1176:(e,t,n)=>{var i=n(5052);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},9540:(e,t,n)=>{var i=n(905),r=n(4237),s=n(3231),o=function(e){return function(t,n,o){var a,u=i(t),l=r(u.length),c=s(o,l);if(e&&n!=n){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},7079:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},1589:(e,t,n)=>{var i=n(1601),r=n(7079),s=n(95)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),s))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},1250:(e,t,n)=>{"use strict";var i=n(1176),r=n(3819);e.exports=function(){for(var e,t=i(this),n=r(t.delete),s=!0,o=0,a=arguments.length;o<a;o++)e=n.call(t,arguments[o]),s=s&&e;return!!s}},7081:(e,t,n)=>{var i=n(816),r=n(4826),s=n(7933),o=n(1787);e.exports=function(e,t){for(var n=r(t),a=o.f,u=s.f,l=0;l<n.length;l++){var c=n[l];i(e,c)||a(e,c,u(t,c))}}},5762:(e,t,n)=>{var i=n(7400),r=n(1787),s=n(5358);e.exports=i?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},5358:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7400:(e,t,n)=>{var i=n(4229);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:(e,t,n)=>{var i=n(9859),r=n(5052),s=i.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},598:(e,t,n)=>{var i=n(1333);e.exports=i("navigator","userAgent")||""},6358:(e,t,n)=>{var i,r,s=n(9859),o=n(598),a=s.process,u=s.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c?r=(i=c.split("."))[0]<4?1:i[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},3837:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:(e,t,n)=>{var i=n(9859),r=n(7933).f,s=n(5762),o=n(7487),a=n(2079),u=n(7081),l=n(6541);e.exports=function(e,t){var n,c,p,h,d,f=e.target,m=e.global,g=e.stat;if(n=m?i:g?i[f]||a(f,{}):(i[f]||{}).prototype)for(c in t){if(h=t[c],p=e.noTargetGet?(d=r(n,c))&&d.value:n[c],!l(m?c:f+(g?".":"#")+c,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;u(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),o(n,c,h,e)}}},4229:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7636:(e,t,n)=>{var i=n(3819);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},1333:(e,t,n)=>{var i=n(9859),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e]):i[e]&&i[e][t]}},8830:(e,t,n)=>{var i=n(1589),r=n(5495),s=n(95)("iterator");e.exports=function(e){if(null!=e)return e[s]||e["@@iterator"]||r[i(e)]}},8403:(e,t,n)=>{var i=n(1176),r=n(8830);e.exports=function(e,t){var n=arguments.length<2?r(e):t;if("function"!=typeof n)throw TypeError(String(e)+" is not iterable");return i(n.call(e))}},9585:e=>{e.exports=function(e){return Map.prototype.entries.call(e)}},9859:(e,t,n)=>{var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},816:(e,t,n)=>{var i=n(2991),r={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return r.call(i(e),t)}},5977:e=>{e.exports={}},4394:(e,t,n)=>{var i=n(7400),r=n(4229),s=n(2635);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},9337:(e,t,n)=>{var i=n(4229),r=n(7079),s="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?s.call(e,""):Object(e)}:Object},8511:(e,t,n)=>{var i=n(5353),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},6407:(e,t,n)=>{var i,r,s,o=n(8694),a=n(9859),u=n(5052),l=n(5762),c=n(816),p=n(5353),h=n(4399),d=n(5977),f="Object already initialized",m=a.WeakMap;if(o||p.state){var g=p.state||(p.state=new m),v=g.get,y=g.has,x=g.set;i=function(e,t){if(y.call(g,e))throw new TypeError(f);return t.facade=e,x.call(g,e,t),t},r=function(e){return v.call(g,e)||{}},s=function(e){return y.call(g,e)}}else{var b=h("state");d[b]=!0,i=function(e,t){if(c(e,b))throw new TypeError(f);return t.facade=e,l(e,b,t),t},r=function(e){return c(e,b)?e[b]:{}},s=function(e){return c(e,b)}}e.exports={set:i,get:r,has:s,enforce:function(e){return s(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},1943:(e,t,n)=>{var i=n(95),r=n(5495),s=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[s]===e)}},6541:(e,t,n)=>{var i=n(4229),r=/#|\.prototype\./,s=function(e,t){var n=a[o(e)];return n==l||n!=u&&("function"==typeof t?i(t):!!t)},o=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5052:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},4231:e=>{e.exports=!1},9395:(e,t,n)=>{var i=n(1333),r=n(6969);e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return"function"==typeof t&&Object(e)instanceof t}},9003:(e,t,n)=>{var i=n(1176),r=n(1943),s=n(4237),o=n(7636),a=n(8403),u=n(8830),l=n(7281),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var p,h,d,f,m,g,v,y=n&&n.that,x=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),w=o(t,y,1+x+E),C=function(e){return p&&l(p,"normal",e),new c(!0,e)},S=function(e){return x?(i(e),E?w(e[0],e[1],C):w(e[0],e[1])):E?w(e,C):w(e)};if(b)p=e;else{if("function"!=typeof(h=u(e)))throw TypeError("Target is not iterable");if(r(h)){for(d=0,f=s(e.length);f>d;d++)if((m=S(e[d]))&&m instanceof c)return m;return new c(!1)}p=a(e,h)}for(g=p.next;!(v=g.call(p)).done;){try{m=S(v.value)}catch(e){l(p,"throw",e)}if("object"==typeof m&&m&&m instanceof c)return m}return new c(!1)}},7281:(e,t,n)=>{var i=n(1176);e.exports=function(e,t,n){var r,s;i(e);try{if(void 0===(r=e.return)){if("throw"===t)throw n;return n}r=r.call(e)}catch(e){s=!0,r=e}if("throw"===t)throw n;if(s)throw r;return i(r),n}},5495:e=>{e.exports={}},3839:(e,t,n)=>{var i=n(6358),r=n(4229);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8694:(e,t,n)=>{var i=n(9859),r=n(8511),s=i.WeakMap;e.exports="function"==typeof s&&/native code/.test(r(s))},1787:(e,t,n)=>{var i=n(7400),r=n(4394),s=n(1176),o=n(9310),a=Object.defineProperty;t.f=i?a:function(e,t,n){if(s(e),t=o(t),s(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7933:(e,t,n)=>{var i=n(7400),r=n(9195),s=n(5358),o=n(905),a=n(9310),u=n(816),l=n(4394),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=o(e),t=a(t),l)try{return c(e,t)}catch(e){}if(u(e,t))return s(!r.f.call(e,t),e[t])}},8151:(e,t,n)=>{var i=n(140),r=n(3837).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},894:(e,t)=>{t.f=Object.getOwnPropertySymbols},140:(e,t,n)=>{var i=n(816),r=n(905),s=n(9540).indexOf,o=n(5977);e.exports=function(e,t){var n,a=r(e),u=0,l=[];for(n in a)!i(o,n)&&i(a,n)&&l.push(n);for(;t.length>u;)i(a,n=t[u++])&&(~s(l,n)||l.push(n));return l}},9195:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},2914:(e,t,n)=>{var i=n(5052);e.exports=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},4826:(e,t,n)=>{var i=n(1333),r=n(8151),s=n(894),o=n(1176);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=s.f;return n?t.concat(n(e)):t}},7487:(e,t,n)=>{var i=n(9859),r=n(5762),s=n(816),o=n(2079),a=n(8511),u=n(6407),l=u.get,c=u.enforce,p=String(String).split("String");(e.exports=function(e,t,n,a){var u,l=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||r(n,"name",t),(u=c(n)).source||(u.source=p.join("string"==typeof t?t:""))),e!==i?(l?!d&&e[t]&&(h=!0):delete e[t],h?e[t]=n:r(e,t,n)):h?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},8885:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},9989:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2079:(e,t,n)=>{var i=n(9859);e.exports=function(e,t){try{Object.defineProperty(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}},4399:(e,t,n)=>{var i=n(3036),r=n(1441),s=i("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},5353:(e,t,n)=>{var i=n(9859),r=n(2079),s="__core-js_shared__",o=i[s]||r(s,{});e.exports=o},3036:(e,t,n)=>{var i=n(4231),r=n(5353);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},7942:(e,t,n)=>{var i=n(1176),r=n(3819),s=n(95)("species");e.exports=function(e,t){var n,o=i(e).constructor;return void 0===o||null==(n=i(o)[s])?t:r(n)}},966:(e,t,n)=>{var i=n(6051),r=n(3326),s=n(8885),o=function(e){return function(t,n){var o,a,u=r(s(t)),l=i(n),c=u.length;return l<0||l>=c?e?"":void 0:(o=u.charCodeAt(l))<55296||o>56319||l+1===c||(a=u.charCodeAt(l+1))<56320||a>57343?e?u.charAt(l):o:e?u.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3231:(e,t,n)=>{var i=n(6051),r=Math.max,s=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):s(n,t)}},905:(e,t,n)=>{var i=n(9337),r=n(8885);e.exports=function(e){return i(r(e))}},6051:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},4237:(e,t,n)=>{var i=n(6051),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},2991:(e,t,n)=>{var i=n(8885);e.exports=function(e){return Object(i(e))}},2066:(e,t,n)=>{var i=n(5052),r=n(9395),s=n(2914),o=n(95)("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var n,a=e[o];if(void 0!==a){if(void 0===t&&(t="default"),n=a.call(e,t),!i(n)||r(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},9310:(e,t,n)=>{var i=n(2066),r=n(9395);e.exports=function(e){var t=i(e,"string");return r(t)?t:String(t)}},1601:(e,t,n)=>{var i={};i[n(95)("toStringTag")]="z",e.exports="[object z]"===String(i)},3326:(e,t,n)=>{var i=n(9395);e.exports=function(e){if(i(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},1441:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},6969:(e,t,n)=>{var i=n(3839);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},95:(e,t,n)=>{var i=n(9859),r=n(3036),s=n(816),o=n(1441),a=n(3839),u=n(6969),l=r("wks"),c=i.Symbol,p=u?c:c&&c.withoutSetter||o;e.exports=function(e){return s(l,e)&&(a||"string"==typeof l[e])||(a&&s(c,e)?l[e]=c[e]:l[e]=p("Symbol."+e)),l[e]}},7526:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1250);i({target:"Map",proto:!0,real:!0,forced:r},{deleteAll:function(){return s.apply(this,arguments)}})},3354:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{every:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e,n,r){if(!i(n,e,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},5870:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{filter:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){i(n,e,t)&&h.call(r,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},574:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{findKey:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},930:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{find:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4116:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(9585),a=n(9989),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{includes:function(e){return u(o(s(this)),(function(t,n,i){if(a(n,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},3267:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(9585),a=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{keyOf:function(e){return a(o(s(this)),(function(t,n,i){if(n===e)return i(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4614:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{mapKeys:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){h.call(r,i(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},9852:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{mapValues:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){h.call(r,e,i(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},4306:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819),a=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{merge:function(e){for(var t=s(this),n=o(t.set),i=arguments.length,r=0;r<i;)a(arguments[r++],n,{that:t,AS_ENTRIES:!0});return t}})},6077:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{reduce:function(e){var t=s(this),n=a(t),i=arguments.length<2,r=i?void 0:arguments[1];if(o(e),u(n,(function(n,s){i?(i=!1,r=s):r=e(r,s,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i)throw TypeError("Reduce of empty map with no initial value");return r}})},1072:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{some:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},183:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819);i({target:"Map",proto:!0,real:!0,forced:r},{update:function(e,t){var n=s(this),i=arguments.length;o(t);var r=n.has(e);if(!r&&i<3)throw TypeError("Updating absent value");var a=r?n.get(e):o(i>2?arguments[2]:void 0)(e,n);return n.set(e,t(a,e,n)),n}})},8423:(e,t,n)=>{"use strict";var i=n(3103),r=n(966).charAt;i({target:"String",proto:!0,forced:n(4229)((function(){return"𠮷"!=="𠮷".at(0)}))},{at:function(e){return r(this,e)}})},9867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-stage-module-add-stage-container__L3KcT {\n margin: 0px;\n padding-bottom: 15px;\n position: relative;\n}\n.add-stage-module-add-stage-container__L3KcT:after {\n position: absolute;\n left: 6px;\n top: 2px;\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: 5px solid #dee0e3;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 {\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n position: relative;\n margin: 0px 20px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n width: 370px;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 button {\n margin: 10px 0px 10px 0px;\n}\n",""]),r.locals={"add-stage-container":"add-stage-module-add-stage-container__L3KcT","add-stage":"add-stage-module-add-stage__3hDT6"};const s=r},8817:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".aggregations-module-aggregations__12xcN {\n display: flex;\n align-items: flex-start;\n background-color: #f5f6f7;\n position: relative;\n width: 100%;\n z-index: 0;\n height: 100%;\n}\n",""]),r.locals={aggregations:"aggregations-module-aggregations__12xcN"};const s=r},8608:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-toolbar-module-input-builder-toolbar__1H2sc {\n width: 350px;\n margin: 0px 15px 0px 18px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: relative;\n height: 30px;\n align-items: center;\n}\n",""]),r.locals={"input-builder-toolbar":"input-builder-toolbar-module-input-builder-toolbar__1H2sc"};const s=r},8056:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-module-input-builder__KDDTC {\n flex-grow: 1;\n position: relative;\n margin: 15px 18px 15px 18px;\n padding: 10px 0px 10px 0px;\n min-height: 54px;\n text-align: center;\n}\n",""]),r.locals={"input-builder":"input-builder-module-input-builder__KDDTC"};const s=r},1849:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-collapser-module-input-collapser__2CIHy {\n position: relative;\n}\n.input-collapser-module-input-collapser__2CIHy button {\n width: 30px;\n}\n",""]),r.locals={"input-collapser":"input-collapser-module-input-collapser__2CIHy"};const s=r},9865:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-documents-count-module-input-documents-count__2sCxl {\n height: 30px;\n display: flex;\n align-items: center;\n flex-grow: 4;\n}\n.input-documents-count-module-input-documents-count-db__2xqQF {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n}\n.input-documents-count-module-input-documents-count-label__Q3Y3L {\n font-size: 12px;\n padding-left: 5px;\n color: #494747;\n}\n",""]),r.locals={"input-documents-count":"input-documents-count-module-input-documents-count__2sCxl","input-documents-count-db":"input-documents-count-module-input-documents-count-db__2xqQF","input-documents-count-label":"input-documents-count-module-input-documents-count-label__Q3Y3L"};const s=r},4145:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-toolbar-module-input-preview-toolbar__34ttN {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n border-left: 1px solid #dee0e3;\n}\n.input-preview-toolbar-module-input-preview-toolbar-text__3gBhM {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n",""]),r.locals={"input-preview-toolbar":"input-preview-toolbar-module-input-preview-toolbar__34ttN","input-preview-toolbar-text":"input-preview-toolbar-module-input-preview-toolbar-text__3gBhM"};const s=r},969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-module-input-preview__2di5A {\n display: flex;\n align-items: center;\n overflow: auto;\n flex-grow: 1;\n width: 100%;\n position: relative;\n}\n.input-preview-module-input-preview-documents__1878X {\n display: flex;\n align-items: flex-start;\n overflow-x: scroll;\n margin: 8px;\n padding: 8px;\n}\n.input-preview-module-input-preview-document-card-container__3ko-A {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n overflow: scroll;\n min-height: 150px;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n}\n.input-preview-module-input-preview-document-card-container__3ko-A:not(:first-child) {\n margin-left: 16px;\n}\n.input-preview-module-input-preview-document-card__ZvCA5 {\n flex-basis: 150px;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: auto;\n padding: 0;\n}\n.input-preview-module-input-preview-document-card__ZvCA5::-webkit-scrollbar {\n display: none;\n}\n.input-preview-module-input-preview__2di5A::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"input-preview":"input-preview-module-input-preview__2di5A","input-preview-documents":"input-preview-module-input-preview-documents__1878X","input-preview-document-card-container":"input-preview-module-input-preview-document-card-container__3ko-A","input-preview-document-card":"input-preview-module-input-preview-document-card__ZvCA5"};const s=r},8910:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-refresh-module-input-refresh__1jTIT {\n flex-grow: 0;\n}\n",""]),r.locals={"input-refresh":"input-refresh-module-input-refresh__1jTIT"};const s=r},6102:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-toolbar-module-input-toolbar__32jT7 {\n border-bottom: 1px solid #dee0e3;\n display: flex;\n align-items: center;\n position: relative;\n height: 40px;\n width: 100%;\n}\n",""]),r.locals={"input-toolbar":"input-toolbar-module-input-toolbar__32jT7"};const s=r},3279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-workspace-module-input-workspace__1ivct {\n display: flex;\n align-items: center;\n}\n",""]),r.locals={"input-workspace":"input-workspace-module-input-workspace__1ivct"};const s=r},6546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-module-input__2mTmO {\n position: relative;\n margin: 18px;\n margin-left: 20px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n}\n",""]),r.locals={input:"input-module-input__2mTmO"};const s=r},7130:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".loading-overlay-module-loading-overlay__3jA58 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.08);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR {\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 300px;\n height: 50px;\n background-color: #FFFFFF;\n}\n.loading-overlay-module-loading-overlay-box-text__1RHOh {\n font-size: 16px;\n margin-left: 5px;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR i {\n font-size: 20px;\n color: #168B46;\n}\n",""]),r.locals={"loading-overlay":"loading-overlay-module-loading-overlay__3jA58","loading-overlay-box":"loading-overlay-module-loading-overlay-box__1EYpR","loading-overlay-box-text":"loading-overlay-module-loading-overlay-box-text__1RHOh"};const s=r},1266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".modify-source-banner-module-modify-source-banner__zkRAk {\n text-align: center;\n margin: 5px auto;\n margin-top: 20px;\n z-index: 500;\n}\n",""]),r.locals={"modify-source-banner":"modify-source-banner-module-modify-source-banner__zkRAk"};const s=r},310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.pipeline-builder-workspace-module-pipeline-workspace__2aYaj {\n display: flex;\n flex-direction: column;\n overflow-y: scroll;\n width: 100%;\n flex-grow: 1;\n}\n.pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu {\n flex-grow: 1;\n width: 100%;\n position: relative;\n overflow-y: scroll;\n}\n",""]),r.locals={"pipeline-workspace-container":"pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec","pipeline-workspace":"pipeline-builder-workspace-module-pipeline-workspace__2aYaj","pipeline-workspace-container-container":"pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu"};const s=r},9430:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.collation-toolbar-module-collation-toolbar__31baA {\n display: flex;\n width: 100%;\n flex-shrink: 0;\n align-items: center;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU {\n width: 100%;\n height: 30px;\n position: relative;\n display: flex;\n border-radius: 14px;\n border: 1px #bfbfbe solid;\n background: #fff;\n overflow: hidden;\n padding: 4px;\n margin-right: 5px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-toolbar-input-label__2z_dD {\n background: #bfbfbe;\n color: #fff;\n white-space: nowrap;\n border-radius: 14px;\n padding: 2px 8px 2px 4px;\n margin-right: 5px;\n text-transform: uppercase;\n font-weight: bold;\n font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 11px;\n flex-grow: 0;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-toolbar-input-label__2z_dD i {\n margin-right: 3px;\n margin-left: 0px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-has-error__1DJu7 {\n background: #ef4c4c;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU input {\n border: 0;\n width: 100%;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU input:focus {\n outline-width: 0;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs {\n display: flex;\n min-width: 170px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs input[type=number]::-webkit-inner-spin-button,\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs input[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.collation-toolbar-module-has-focus__3yMBL {\n border-color: #43b1e5;\n}\n',""]),r.locals={"collation-toolbar":"collation-toolbar-module-collation-toolbar__31baA","toolbar-input-wrapper":"collation-toolbar-module-toolbar-input-wrapper__nLxwU","toolbar-input-label":"collation-toolbar-module-toolbar-input-label__2z_dD","has-error":"collation-toolbar-module-has-error__1DJu7","max-time-ms":"collation-toolbar-module-max-time-ms__2yHVs","has-focus":"collation-toolbar-module-has-focus__3yMBL"};const s=r},1570:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3 {\n padding: 0px;\n}\n",""]),r.locals={"confirm-import-pipeline-note":"confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3"};const s=r},3777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL {\n padding: 0px;\n}\n",""]),r.locals={"confirm-new-pipeline-note":"confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL"};const s=r},5287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".import-pipeline-module-import-pipeline-note__vDPrD {\n color: steelblue;\n background-color: #B0E0E6;\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 10px;\n}\n.import-pipeline-module-import-pipeline-editor__2L-TC {\n flex-shrink: 0;\n position: relative;\n padding: 10px 0px 10px 0px;\n overflow: scroll;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n min-height: 180px;\n max-height: 300px;\n}\n.import-pipeline-module-import-pipeline-error__92RZw {\n flex-shrink: 0;\n position: relative;\n margin: 10px 0px;\n padding: 10px;\n border-radius: 3px;\n overflow: auto;\n background: #ff473a;\n max-height: 100px;\n color: #f5f6f7;\n font-size: x-small;\n font-weight: bold;\n}\n",""]),r.locals={"import-pipeline-note":"import-pipeline-module-import-pipeline-note__vDPrD","import-pipeline-editor":"import-pipeline-module-import-pipeline-editor__2L-TC","import-pipeline-error":"import-pipeline-module-import-pipeline-error__92RZw"};const s=r},4686:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-module-pipeline__1nWUF {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n position: relative;\n}\n.pipeline-module-pipeline-collation-toolbar-container__2S68M {\n padding: 6px 10px 6px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);\n}\n.pipeline-module-pipeline-error-banner-container__19QTd {\n margin-left: 20px;\n margin-right: 36px;\n}\n.pipeline-module-pipeline-fullscreen__2QlA5 {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n}\n",""]),r.locals={pipeline:"pipeline-module-pipeline__1nWUF","pipeline-collation-toolbar-container":"pipeline-module-pipeline-collation-toolbar-container__2S68M","pipeline-error-banner-container":"pipeline-module-pipeline-error-banner-container__19QTd","pipeline-fullscreen":"pipeline-module-pipeline-fullscreen__2QlA5"};const s=r},6667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".resize-handle-module-resize-handle__1rugm {\n position: absolute;\n background: #dee0e3;\n width: 1.1px;\n height: 100%;\n}\n",""]),r.locals={"resize-handle":"resize-handle-module-resize-handle__1rugm"};const s=r},1101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-pipeline-button-module-delete-pipeline__Ch_2o {\n margin: 0px 10px 0px 0px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"delete-pipeline":"delete-pipeline-button-module-delete-pipeline__Ch_2o"};const s=r},3981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".restore-pipeline-button-module-restore-pipeline__NGnMs {\n margin-right: 2px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"restore-pipeline":"restore-pipeline-button-module-restore-pipeline__NGnMs"};const s=r},2099:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-card-module-save-pipeline-card__2EPNA {\n border: 1px solid #dee0e3;\n box-shadow: 0 0 3px #dee0e3;\n margin: 10px;\n display: flex;\n align-items: center;\n background: #fff;\n}\n.save-pipeline-card-module-save-pipeline-card__2EPNA:hover button {\n visibility: visible;\n}\n.save-pipeline-card-module-save-pipeline-card-title__272aN {\n font-size: 12px;\n padding: 8px;\n line-height: 20px;\n font-weight: bold;\n flex-grow: 5;\n color: #494747;\n overflow-wrap: break-word;\n overflow: auto;\n}\n",""]),r.locals={"save-pipeline-card":"save-pipeline-card-module-save-pipeline-card__2EPNA","save-pipeline-card-title":"save-pipeline-card-module-save-pipeline-card-title__272aN"};const s=r},9593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-module-save-pipeline__1r5sb {\n border-right: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 400px;\n height: 100%;\n top: 0;\n left: -401px;\n transition: left 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.save-pipeline-module-save-pipeline-is-visible__3bNUE {\n left: 0px;\n transition: left 0.2s ease-in-out;\n}\n.save-pipeline-module-save-pipeline-header__1G3Ck {\n height: 34px;\n display: flex;\n padding: 10px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs {\n overflow-y: scroll;\n}\n.save-pipeline-module-save-pipeline-close__2mTMD {\n cursor: pointer;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"save-pipeline":"save-pipeline-module-save-pipeline__1r5sb","save-pipeline-is-visible":"save-pipeline-module-save-pipeline-is-visible__3bNUE","save-pipeline-header":"save-pipeline-module-save-pipeline-header__1G3Ck","save-pipeline-cards":"save-pipeline-module-save-pipeline-cards__2__gs","save-pipeline-close":"save-pipeline-module-save-pipeline-close__2mTMD"};const s=r},6252:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.settings-module-container__3sWua {\n border-left: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 580px;\n height: 100%;\n top: 0;\n right: 0px;\n transition: right 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.settings-module-header__1rot3 {\n height: 32px;\n display: flex;\n padding: 5px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.settings-module-header-title__xCvBM {\n color: #424242;\n font-size: 12px;\n font-weight: bold;\n flex-grow: 2;\n}\n.settings-module-header-btn-group__1NySd {\n display: inline-block;\n}\n.settings-module-header-btn-group__1NySd button {\n margin-right: 5px;\n}\n.settings-module-header-btn-group__1NySd:last-child {\n margin-right: 0px;\n}\n.settings-module-input-group__3OjXF {\n margin: 8px;\n padding: 8px 16px;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n}\n.settings-module-input-control__3kNAF {\n min-width: 90px;\n}\n.settings-module-input-control__3kNAF input {\n border-radius: 3px;\n border-color: #BFBFBE;\n border-style: solid;\n border-width: 1px;\n padding: 1px;\n text-align: right;\n float: right;\n}\n.settings-module-input-control__3kNAF input[type="text"],\n.settings-module-input-control__3kNAF input[type="number"] {\n width: 70px;\n color: #464C4F;\n}\n.settings-module-input-control__3kNAF input[type="text"]::placeholder,\n.settings-module-input-control__3kNAF input[type="number"]::placeholder {\n font-size: 13px;\n color: #AAAAAA;\n}\n.settings-module-input-meta__2H8QK {\n flex-grow: 1;\n}\n.settings-module-input-meta__2H8QK p {\n margin-top: 8px;\n}\n',""]),r.locals={container:"settings-module-container__3sWua",header:"settings-module-header__1rot3","header-title":"settings-module-header-title__xCvBM","header-btn-group":"settings-module-header-btn-group__1NySd","input-group":"settings-module-input-group__3OjXF","input-control":"settings-module-input-control__3kNAF","input-meta":"settings-module-input-meta__2H8QK"};const s=r},2884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-after-stage-module-add-after-stage__1xZf9 {\n display: flex;\n justify-content: flex-end;\n}\n.add-after-stage-module-add-after-stage__1xZf9 button {\n width: 30px;\n margin-right: 6px;\n}\n",""]),r.locals={"add-after-stage":"add-after-stage-module-add-after-stage__1xZf9"};const s=r},9262:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-stage-module-delete-stage__3PyCJ {\n margin-right: 6px;\n}\n.delete-stage-module-delete-stage__3PyCJ button {\n width: 30px;\n}\n",""]),r.locals={"delete-stage":"delete-stage-module-delete-stage__3PyCJ"};const s=r},173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".select-option-with-tooltip-module-tooltip__3SVxp {\n max-width: 340px !important;\n}\n.select-option-with-tooltip-module-option__K2UZL {\n display: flex;\n align-items: center;\n}\n.select-option-with-tooltip-module-optionIcon__os9Dz {\n margin-left: auto;\n}\n",""]),r.locals={tooltip:"select-option-with-tooltip-module-tooltip__3SVxp",option:"select-option-with-tooltip-module-option__K2UZL",optionIcon:"select-option-with-tooltip-module-optionIcon__os9Dz"};const s=r},1103:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-collapser-module-stage-collapser__3xs2F {\n position: relative;\n}\n.stage-collapser-module-stage-collapser__3xs2F button {\n width: 30px;\n}\n",""]),r.locals={"stage-collapser":"stage-collapser-module-stage-collapser__3xs2F"};const s=r},2891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK {\n width: 100%;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n padding: 10px 0;\n padding-right: 10px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: 30px;\n cursor: move;\n cursor: grab;\n}\n.dragging .stage-editor-toolbar-module-stage-editor-toolbar__2cwCK {\n pointer-events: auto;\n cursor: grabbing;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk {\n display: flex;\n justify-content: flex-end;\n flex-grow: 4;\n align-items: center;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE {\n background: #FCEBE2;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle:before {\n content: "\\f05a";\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK .stage-editor-toolbar-module-tooltip-icon__3szXX {\n margin-top: 6px;\n margin-right: 6px;\n}\n',""]),r.locals={"stage-editor-toolbar":"stage-editor-toolbar-module-stage-editor-toolbar__2cwCK","stage-editor-toolbar-right":"stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk","stage-editor-toolbar-errored":"stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE","tooltip-icon":"stage-editor-toolbar-module-tooltip-icon__3szXX"};const s=r},5884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-grabber-module-stage-grabber__1-8cr {\n color: #dee0e3;\n margin: 3px 2px 0px 4px;\n position: relative;\n}\n",""]),r.locals={"stage-grabber":"stage-grabber-module-stage-grabber__1-8cr"};const s=r},6125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-operator-select-module-stage-operator-select__1eiQN {\n position: relative;\n width: 120px;\n height: 22px;\n margin: 0px 0px 0px 5px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK {\n position: relative;\n font-size: 12px !important;\n cursor: pointer;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-control {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-placeholder {\n line-height: 25px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-input {\n height: 18px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow-zone {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow {\n margin-top: 8px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-value {\n line-height: 22px !important;\n font-weight: bold;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu {\n height: 200px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu-outer {\n z-index: 2000 !important;\n}\n",""]),r.locals={"stage-operator-select":"stage-operator-select-module-stage-operator-select__1eiQN","stage-operator-select-control":"stage-operator-select-module-stage-operator-select-control__LjhSK"};const s=r},2347:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".toggle-stage-module-toggle-stage__2JZ-6 {\n margin: 0px 0px 0px 5px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.toggle-stage-module-toggle-stage-button__1ILJ7 {\n height: 22px;\n width: 40px;\n}\n",""]),r.locals={"toggle-stage":"toggle-stage-module-toggle-stage__2JZ-6","toggle-stage-button":"toggle-stage-module-toggle-stage-button__1ILJ7"};const s=r},8915:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-editor-module-stage-editor-container__1XwN_ {\n position: relative;\n padding: 6px 8px;\n text-align: center;\n}\n.stage-editor-module-stage-editor__3F-oQ {\n flex-shrink: 0;\n margin: 0;\n padding: 10px 0px 10px 0px;\n overflow: hidden;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n width: 100%;\n min-height: 180px;\n}\n.stage-editor-module-stage-editor-errormsg__3Le7I {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FCEBE2;\n border: 1px solid #F9D3C5;\n min-height: 20px;\n word-break: break-all;\n color: #8F221B;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-syntax-error__3qEJX {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FEF7E3;\n border: 1px solid #FEF2C8;\n min-height: 20px;\n word-break: break-all;\n color: #86681D;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-ace-editor__eRQyZ {\n min-height: 160px;\n}\n",""]),r.locals={"stage-editor-container":"stage-editor-module-stage-editor-container__1XwN_","stage-editor":"stage-editor-module-stage-editor__3F-oQ","stage-editor-errormsg":"stage-editor-module-stage-editor-errormsg__3Le7I","stage-editor-syntax-error":"stage-editor-module-stage-editor-syntax-error__3qEJX","stage-editor-ace-editor":"stage-editor-module-stage-editor-ace-editor__eRQyZ"};const s=r},462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-preview-toolbar-module-stage-preview-toolbar__2o0am {\n width: 100%;\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 30px;\n padding: 10px 0;\n padding-left: 25px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO {\n background: #FCEBE2;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle:before {\n content: "\\f05a";\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am #stage-tooltip {\n width: 300px;\n white-space: pre-wrap;\n}\n',""]),r.locals={"stage-preview-toolbar":"stage-preview-toolbar-module-stage-preview-toolbar__2o0am","stage-preview-toolbar-link":"stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc","stage-preview-toolbar-errored":"stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO"};const s=r},9877:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-preview-module-stage-preview__37FlK {\n width: 100%;\n display: flex;\n align-items: stretch;\n overflow: auto;\n position: relative;\n flex-grow: 1;\n}\n.stage-preview-module-stage-preview-empty__9L3fd {\n padding-left: 15px;\n margin: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n fill: none;\n stroke: #89979B;\n text-align: center;\n}\n.stage-preview-module-stage-preview-missing-search-support__18Jmm {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 10px;\n margin: auto;\n}\n.stage-preview-module-stage-preview-missing-search-support-text__1XKhH {\n text-align: center;\n margin-top: 10px;\n margin-bottom: 20px;\n max-width: 400px;\n}\n.stage-preview-module-stage-preview-out__2kjVI {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n padding-top: 32px;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 8px;\n}\n.stage-preview-module-stage-preview-out-text__FwDzO {\n padding: 0px 15px 2px 15px;\n text-align: center;\n}\n.stage-preview-module-stage-preview-out-button__bnXRJ {\n margin-top: 3px;\n}\n.stage-preview-module-stage-preview-out-link__1uCqW {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-module-stage-preview-documents__uF1qq {\n display: flex;\n align-items: stretch;\n overflow-x: scroll;\n margin: 8px;\n padding: 8px;\n}\n.stage-preview-module-stage-preview-document-card-container__sxM1s {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n overflow: scroll;\n min-height: 150px;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n}\n.stage-preview-module-stage-preview-document-card-container__sxM1s:not(:first-child) {\n margin-left: 16px;\n}\n.stage-preview-module-stage-preview-document-card__21xbY {\n flex-basis: 150px;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: auto;\n padding: 0;\n}\n.stage-preview-module-stage-preview-document-card__21xbY::-webkit-scrollbar {\n display: none;\n}\n.stage-preview-module-stage-preview__37FlK::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"stage-preview":"stage-preview-module-stage-preview__37FlK","stage-preview-empty":"stage-preview-module-stage-preview-empty__9L3fd","stage-preview-missing-search-support":"stage-preview-module-stage-preview-missing-search-support__18Jmm","stage-preview-missing-search-support-text":"stage-preview-module-stage-preview-missing-search-support-text__1XKhH","stage-preview-out":"stage-preview-module-stage-preview-out__2kjVI","stage-preview-out-text":"stage-preview-module-stage-preview-out-text__FwDzO","stage-preview-out-button":"stage-preview-module-stage-preview-out-button__bnXRJ","stage-preview-out-link":"stage-preview-module-stage-preview-out-link__1uCqW","stage-preview-documents":"stage-preview-module-stage-preview-documents__uF1qq","stage-preview-document-card-container":"stage-preview-module-stage-preview-document-card-container__sxM1s","stage-preview-document-card":"stage-preview-module-stage-preview-document-card__21xbY"};const s=r},7295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-module-stage-container__ZDTxh {\n margin: 0px 10px 0px;\n padding-bottom: 15px;\n border-left: 2px solid #dee0e3;\n position: relative;\n}\n.stage-module-stage-container__ZDTxh:before {\n position: absolute;\n left: -3px;\n top: 10px;\n content: '';\n width: 4px;\n height: 16px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh:after {\n position: absolute;\n left: -7px;\n top: 12px;\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid #dee0e3;\n}\n.stage-module-stage-container-is-first__C7RFF:before {\n position: absolute;\n left: -3px;\n top: 0px;\n content: '';\n width: 4px;\n height: 26px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage__1YPPq {\n position: relative;\n margin: 0px 8px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n display: flex;\n flex-direction: row;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage-errored__mbJmP {\n border-color: #CF4A22;\n}\n.stage-module-stage-editor-container__1LvRF {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: auto;\n}\n.stage-module-stage-preview-container__2xO44 {\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n overflow: auto;\n}\n.stage-module-stage-resize-handle-wrapper__1UhOK:hover div div,\n.stage-module-stage-resize-handle-wrapper__1UhOK:active div div {\n background-color: #bfbfbe;\n}\n.stage-module-stage-workspace__9LrbT {\n display: flex;\n align-items: stretch;\n border-radius: 0 0 4px 4px;\n}\n.stage-module-stage-editor-no-preview__34-OX {\n width: 100%;\n}\n",""]),r.locals={"stage-container":"stage-module-stage-container__ZDTxh","stage-container-is-first":"stage-module-stage-container-is-first__C7RFF",stage:"stage-module-stage__1YPPq","stage-errored":"stage-module-stage-errored__mbJmP","stage-editor-container":"stage-module-stage-editor-container__1LvRF","stage-preview-container":"stage-module-stage-preview-container__2xO44","stage-resize-handle-wrapper":"stage-module-stage-resize-handle-wrapper__1UhOK","stage-workspace":"stage-module-stage-workspace__9LrbT","stage-editor-no-preview":"stage-module-stage-editor-no-preview__34-OX"};const s=r},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,i,r,s=e[1]||"",o=e[3];if(!o)return s;if(t&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),u=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[s].concat(u).concat([a]).join("\n")}return[s].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(i)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(r[o]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);i&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},7386:(e,t,n)=>{"use strict";const i=n(8653),r=n(1515);function s(e,t){return i(e,t,{parse:!0})}s.text=function(e,t){return i(e,t,{parse:!1,html:!1})},s.html=function(e,t){return i(e,t,{parse:!1,html:!0})},s.getEOL=function(e){if("string"!=typeof e)throw new TypeError("Invalid parameter 'text' specified.");return r.getEOL(e)},e.exports=s},8653:(e,t,n)=>{"use strict";const i=n(1515);e.exports=function(e,t,n){if("string"!=typeof e)throw new TypeError("Input code/text/html must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("Parameter 'options' must be an object.");const r=e.length,s=t&&t.safe,o=t&&t.space,a=t&&t.trim,u=t&&t.tolerant,l=i.getEOL(e);let c,p=0,h="",d=!0,f="",m=[];if(!r)return e;if(n.parse?(c=i.isHtml(e),c||(m=i.parseRegEx(e,u))):c=n.html,t&&t.ignore){let n=t.ignore;if(n instanceof RegExp?n=[n]:n instanceof Array?(n=n.filter((e=>e instanceof RegExp)),n.length||(n=null)):n=null,n){for(let t=0;t<n.length;t++){const i=n[t];let r;do{r=i.exec(e),r&&m.push({start:r.index,end:r.index+r[0].length-1})}while(r&&i.global)}m=m.sort(((e,t)=>e.start-t.start))}}do{if(!c&&"/"===e[p]&&p<r-1&&(!p||"\\"!==e[p-1])){if("/"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf(l,p+2);if(t<0)break;d?(f="",o?p=t-1:(p=t+l.length-1,v())):p=t-1;continue}if("*"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf("*/",p+2),n=s&&p<r-2&&"!"===e[p+2];if(n&&(h+=t>=0?e.substr(p,t-p+2):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+2);if(p=t+1,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}}if(c&&"<"===e[p]&&p<r-3&&"!--"===e.substr(p+1,3)){if(g()){f&&(h+=f,f=""),h+="<";continue}const t=e.indexOf("--\x3e",p+4),n=s&&"[if"===e.substr(p+4,3);if(n&&(h+=t>=0?e.substr(p,t-p+3):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+3);if(p=t+2,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}const t=e[p],n=" "===t||"\t"===t;if("\r"===t||"\n"===t?e.indexOf(l,p)===p&&(d=!0):n||(d=!1,h+=f,f=""),d&&n?f+=t:h+=t,!(c||"'"!==t&&'"'!==t&&"`"!==t||p&&"\\"===e[p-1])){if(g())continue;let n=p;do{if(n=e.indexOf(t,n+1),n>0){let t=n;for(;"\\"===e[--t];);if((n-t)%2)break}}while(n>0);if(n<0)break;h+=e.substr(p+1,n-p),p=n}}while(++p<r);function g(){if(m.length)return i.indexInRegEx(p,m)}function v(){if(a){let t,n,i;do{for(t=p+1,n=e.indexOf(l,t),i=t;(" "===e[i]||"\t"===e[i])&&++i<n;);i===n&&(p=n+l.length-1)}while(i===n)}}return h}},1515:(e,t,n)=>{"use strict";const i=n(671),r=n(9801);e.exports={getEOL:function(e){let t=0,n=0,i=0;for(;t<e.length&&(t=e.indexOf("\n",t),-1!=t);)t>0&&"\r"===e[t-1]?i++:n++,t++;return n===i?r.EOL:n>i?"\n":"\r\n"},getSpaces:function(e){return" ".repeat(e)},parseRegEx:function(e,t){const n=[];return i.tokenize(e,{loc:!0,range:!0,tolerant:!!t},(e=>{"RegularExpression"===e.type&&n.push({start:e.range[0]+1,end:e.range[1]-1})})),n},indexInRegEx:function(e,t){let n,i=0,r=t.length-1;for(;i<=r;){n=Math.round((i+r)/2);const s=t[n];if(e>=s.start){if(e<=s.end)return!0;i=n+1}else r=n-1}return!1},isHtml:function(e){let t,n=0;do{if(t=e[n]," "!==t&&"\t"!==t&&"\r"!==t&&"\n"!==t)return"<"===t}while(++n<e.length)}}},671:function(e){var t;t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),s=n(8),o=n(15);function a(e,t,n){var o=null,a=function(e,t){n&&n(e,t),o&&o.visit(e,t)},u="function"==typeof n?a:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((o=new i.CommentHandler).attach=c,t.comment=!0,u=a)}var p,h=!1;t&&"string"==typeof t.sourceType&&(h="module"===t.sourceType),p=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,u):new s.Parser(e,t,u);var d=h?p.parseModule():p.parseScript();return l&&o&&(d.comments=o.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}t.parse=a,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",a(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",a(e,i,n)},t.tokenize=function(e,t,n){var i,r=new o.Tokenizer(e,t);i=[];try{for(;;){var s=r.getNextToken();if(!s)break;n&&(s=n(s)),i.push(s)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var s=this.leading[r];t.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=e.start.offset;)t=s.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=e.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),u=n(7),l=n(8),c=n(13),p=n(14);function h(e){var t;switch(e.type){case a.JSXSyntax.JSXIdentifier:t=e.name;break;case a.JSXSyntax.JSXNamespacedName:var n=e;t=h(n.namespace)+":"+h(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=e;t=h(i.object)+"."+h(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var d=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!p.XHTMLEntities[u]||(t=p.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:a=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),a=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new o.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===a.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var s=this.finalize(n,new o.JSXElement(r,[],null));e.children.push(s)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===a.JSXSyntax.JSXClosingElement){e.closing=i;var u=h(e.opening.name);if(u!==h(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(t.length>0))break;s=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(s),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.JSXClosingElement=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXElement=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXExpressionContainer=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXIdentifier=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXMemberExpression=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXAttribute=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXNamespacedName=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXOpeningElement=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXSpreadAttribute=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXText=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.ArrayExpression=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayPattern=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.AssignmentExpression=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentPattern=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AsyncArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncFunctionDeclaration=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AwaitExpression=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.BinaryExpression=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BlockStatement=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BreakStatement=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.CallExpression=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CatchClause=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.ClassBody=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassDeclaration=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ComputedMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ConditionalExpression=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ContinueStatement=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement};t.Directive=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.DoWhileStatement=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement};t.ExportAllDeclaration=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportDefaultDeclaration=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportNamedDeclaration=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportSpecifier=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExpressionStatement=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ForInStatement=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForOfStatement=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForStatement=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.FunctionDeclaration=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.Identifier=function(e){this.type=i.Syntax.Identifier,this.name=e};t.IfStatement=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.ImportDeclaration=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDefaultSpecifier=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportNamespaceSpecifier=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportSpecifier=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.LabeledStatement=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.Literal=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.MetaProperty=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MethodDefinition=function(e,t,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=s};t.Module=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.NewExpression=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.ObjectExpression=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectPattern=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.Property=function(e,t,n,r,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=s,this.shorthand=o};t.RegexLiteral=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RestElement=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.ReturnStatement=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.Script=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.SequenceExpression=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SpreadElement=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.StaticMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.Super=function(){this.type=i.Syntax.Super};t.SwitchCase=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchStatement=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.TaggedTemplateExpression=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TemplateElement=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateLiteral=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.ThisExpression=function(){this.type=i.Syntax.ThisExpression};t.ThrowStatement=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.TryStatement=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.UnaryExpression=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UpdateExpression=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.VariableDeclaration=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclarator=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.WhileStatement=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WithStatement=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.YieldExpression=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),u=n(2),l=n(13),c="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,u=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,u,s)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,u=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,u,s)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||s.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?s.Messages.UnexpectedEOS:3===e.type?s.Messages.UnexpectedIdentifier:6===e.type?s.Messages.UnexpectedNumber:8===e.type?s.Messages.UnexpectedString:10===e.type?s.Messages.UnexpectedTemplate:s.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=s.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=s.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,u=e.start-a+1;return this.errorHandler.createError(r,o,u,i)}return r=this.lastMarker.index,o=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(r,o,u,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,s.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(3===i.type){var h=i.value;this.nextToken(),u=this.match("["),r=(p=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(h))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var d=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!p&&"get"===i.value&&d)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!p&&"set"===i.value&&d)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&d)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!p)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===i.type)if(h=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(h,f))}else c=!0,a=h;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,a,l,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:for(e.type=u.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new o.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);var a=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new o.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new o.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),a=this.match("(")?this.parseArguments():[];e=new o.NewExpression(s,a),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new o.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new o.StaticMemberExpression(e,r))}else if(this.match("(")){var s=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=s?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new o.CallExpression(e,a)),s&&this.match("=>")){for(var u=0;u<a.length;++u)this.reinterpretExpressionAsPattern(a[u]);e={type:c,params:a,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new o.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(e,l))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new o.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new o.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new o.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new o.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new o.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new o.UpdateExpression(a,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new o.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new o.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(s.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new o.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[s,n.value,a],l=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=l[l.length-1];){a=u.pop();var c=u.pop();l.pop(),s=u.pop(),r.pop();var p=this.startNode(r[r.length-1]);u.push(this.finalize(p,new o.BinaryExpression(c,s,a)))}u.push(this.nextToken().value),l.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=u.length-1;t=u[h];for(var d=r.pop();h>1;){var f=r.pop(),m=d&&d.lineStart;p=this.startNode(f,m),c=u[h-1],t=this.finalize(p,new o.BinaryExpression(c,u[h-2],t)),h-=2,d=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case u.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof o.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case u.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(o=n[r]).type===u.Syntax.AssignmentPattern?o.right.type===u.Syntax.YieldExpression&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=u.Syntax.Identifier,o.right.name="yield",delete o.right.argument,delete o.right.delegate):i&&o.type===u.Syntax.Identifier&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,o),n[r]=o;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var o;(o=n[r]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===s.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,a=this.reinterpretAsCoverFormalsList(e);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var h=this.context.allowYield,d=this.context.await;this.context.allowYield=!0,this.context.await=r;var f=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),e=r?this.finalize(f,new o.AsyncArrowFunctionExpression(a.params,m,v)):this.finalize(f,new o.ArrowFunctionExpression(a.params,m,v)),this.context.strict=l,this.context.allowStrictDirective=p,this.context.allowYield=h,this.context.await=d}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var x=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(x,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var l=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),a=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(l,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),a=!0,i=l)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,a=null,l=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===h.length&&this.matchKeyword("in")){var d=h[0];d.init&&(d.id.type===u.Syntax.ArrayPattern||d.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(p=this.context.allowIn,this.context.allowIn=!1,h=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=p,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(h,f)))):(i=this.finalize(i,new o.Identifier(f)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(p=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,l=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new o.ForStatement(i,r,a,n)):l?this.finalize(c,new o.ForInStatement(e,t,n)):this.finalize(c,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,s.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(l,s.Messages.GeneratorInLegacyContext),a=c}else a=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var a="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,a)&&this.tolerateError(s.Messages.DuplicateBinding,t[r].value),i[a]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new o.CatchClause(n,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(s.Messages.NoCatchOrFinally),this.finalize(e,new o.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new o.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=s,this.finalize(e,new o.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=s.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(s.Messages.DefaultRestParameter),this.match(")")||this.throwError(s.Messages.ParameterAfterRestParameter),this.finalize(t,new o.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof o.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var a=null,u=null;if(!e||!this.match("(")){var l=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,i=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,i=s.Messages.StrictReservedWord)}var c=this.context.await,p=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var h=this.parseFormalParameters(u),d=h.params,f=h.stricted;u=h.firstRestricted,h.message&&(i=h.message);var m=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&f&&this.tolerateUnexpectedToken(f,i),this.context.strict=m,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=p,n?this.finalize(t,new o.AsyncFunctionDeclaration(a,d,v)):this.finalize(t,new o.FunctionDeclaration(a,d,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,a=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;a=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=s.Messages.StrictReservedWord)}var p=this.parseFormalParameters(r),h=p.params,d=p.stricted;r=p.firstRestricted,p.message&&(n=p.message);var f=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&d&&this.tolerateUnexpectedToken(d,n),this.context.strict=f,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,t?this.finalize(e,new o.AsyncFunctionExpression(a,h,g)):this.finalize(e,new o.FunctionExpression(a,h,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===u.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new o.Directive(n,i):new o.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,s.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(p=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,s.Messages.ConstructorIsAsync))}var d=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&d?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&d&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===t.type&&"*"===t.value&&d&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0),!i&&r&&this.match("(")&&(i="init",a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,s.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!l||a&&a.generator)&&this.throwUnexpectedToken(t,s.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,s.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,a,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var a=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,a,u))}return e},e}();t.Parser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,s=this.constructError(r,n);return s.index=e,s.lineNumber=t,s.description=i,s},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function a(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(s)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},s={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(s)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+o(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=a(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,o="";!this.eof();){var a=this.source[this.index++];if(a===t){t="";break}if("\\"===a)if((a=this.source[this.index++])&&r.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(a);null===u&&this.throwUnexpectedToken(),o+=u}break;case"x":var l=this.scanHexEscape(a);null===l&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),o+=l;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"8":case"9":o+=a,this.tolerateUnexpectedToken();break;default:if(a&&r.Character.isOctalDigit(a.charCodeAt(0))){var c=this.octalToDecimal(a);n=c.octal||n,o+=String.fromCharCode(c.code)}else o+=a}else{if(r.Character.isLineTerminator(a.charCodeAt(0)))break;o+=a}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],o=!1,a=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){a=1,o=!0,t=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else if("\\"===u)if(u=this.source[this.index++],r.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,c=this.scanHexEscape(u);null!==c?e+=c:(this.index=l,e+=u)}break;case"x":var p=this.scanHexEscape(u);null===p&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),e+=p;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===u?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral):e+=u}else r.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=u}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:e,head:i,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):""})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(n)}catch(e){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var u={type:s.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var l=a.pattern,c=a.flags;u.regex={pattern:l,flags:c}}this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=a}])},e.exports=t()},161:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,i,s,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,s||e,o),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,o=new Array(s);r<s;r++)o[r]=i[r].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,r,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,s),!0;case 6:return c.fn.call(c.context,t,i,r,s,o),!0}for(l=1,u=new Array(p-1);l<p;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),p){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,i);break;case 4:c[l].fn.call(c[l].context,t,i,r);break;default:if(!u)for(h=1,u=new Array(p-1);h<p;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,i,r){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||r&&!a.once||i&&a.context!==i||o(this,s);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||i&&a[u].context!==i)&&l.push(a[u]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},6238:e=>{function t(e,t,n,i){var r=function(e){return null==e||"number"==typeof e||"boolean"==typeof e}(i)?i:n(i),s=t.get(r);return void 0===s&&(s=e.call(this,i),t.set(r,s)),s}function n(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return void 0===s&&(s=e.apply(this,i),t.set(r,s)),s}function i(e,t,n,i,r){return n.bind(t,e,i,r)}function r(e,r){return i(e,this,1===e.length?t:n,r.cache.create(),r.serializer)}function s(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(e){return e in this.cache},o.prototype.get=function(e){return this.cache[e]},o.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new o}};e.exports=function(e,t){var n=t&&t.cache?t.cache:a,i=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:i})},e.exports.strategies={variadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return i(e,this,t,n.cache.create(),n.serializer)}}},3463:(e,t,n)=>{"use strict";var i=n(3887),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(e){return i.isMemo(e)?o:a[e.$$typeof]||r}a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[i.Memo]=o;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(f){var r=d(n);r&&r!==f&&e(t,r,i)}var o=c(n);p&&(o=o.concat(p(n)));for(var a=u(t),m=u(n),g=0;g<o.length;++g){var v=o[g];if(!(s[v]||i&&i[v]||m&&m[v]||a&&a[v])){var y=h(n,v);try{l(t,v,y)}catch(e){}}}}return t}},3459:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case c:case p:case s:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case u:return e;default:return t}}case r:return t}}}function w(e){return E(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=a,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return w(e)||E(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===s},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===a},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=E},3887:(e,t,n)=>{"use strict";e.exports=n(3459)},7677:e=>{"use strict";e.exports=function(e,t,n,i,r,s,o,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,s,o,a],c=0;(u=new Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},4283:e=>{e.exports="undefined"==typeof process||!process||!!process.type&&"renderer"===process.type},9320:e=>{function t(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=t,e.exports.default=t},594:(e,t,n)=>{var i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),p=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,s,o,a,u,l=0,c=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function x(e){return l=e,a=setTimeout(E,t),c?y(e):o}function b(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=s}function E(){var e=f();if(b(e))return w(e);a=setTimeout(E,function(e){var n=t-(e-u);return p?d(n,s-(e-l)):n}(e))}function w(e){return a=void 0,v&&i?y(e):(i=r=void 0,o)}function C(){var e=f(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===a)return x(u);if(p)return a=setTimeout(E,t),y(u)}return void 0===a&&(a=setTimeout(E,t)),o}return t=g(t)||0,m(n)&&(c=!!n.leading,s=(p="maxWait"in n)?h(g(n.maxWait)||0,t):s,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=u=r=a=void 0},C.flush=function(){return void 0===a?o:w(f())},C}},4749:e=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/,i=Object.prototype,r=i.hasOwnProperty,s=i.toString,o=i.propertyIsEnumerable;function a(e,i){return!!(i=null==i?t:i)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<i}var u=Array.isArray;function l(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}(e.length)&&!function(e){var t=c(e)?s.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){return l(e)?function(e,t){var n=u(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&l(e)}(e)&&r.call(e,"callee")&&(!o.call(e,"callee")||"[object Arguments]"==s.call(e))}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,c=!!i;for(var p in e)!t&&!r.call(e,p)||c&&("length"==p||a(p,i))||n.push(p);return n}(e,!0):function(e){if(!c(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}(e),n=[];for(var s in e)("constructor"!=s||!t&&r.call(e,s))&&n.push(s);return n}(e)}function h(e){return e}e.exports=function(e,t){return null==e?e:function(e,t,n){for(var i=-1,r=Object(e),s=n(e),o=s.length;o--;){var a=s[++i];if(!1===t(r[a],a,r))break}return e}(e,"function"==typeof t?t:h,p)}},4537:e=>{var t=Array.isArray;e.exports=t},6160:(e,t,n)=>{e=n.nmd(e);var i,r,s,o="[object Map]",a="[object Promise]",u="[object Set]",l="[object WeakMap]",c="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,f=h||d||Function("return this")(),m=t&&!t.nodeType&&t,g=m&&e&&!e.nodeType&&e,v=g&&g.exports===m,y=Function.prototype,x=Object.prototype,b=f["__core-js_shared__"],E=(i=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",w=y.toString,C=x.hasOwnProperty,S=x.toString,A=RegExp("^"+w.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=v?f.Buffer:void 0,_=x.propertyIsEnumerable,k=D?D.isBuffer:void 0,T=(r=Object.keys,s=Object,function(e){return r(s(e))}),F=z(f,"DataView"),I=z(f,"Map"),N=z(f,"Promise"),P=z(f,"Set"),O=z(f,"WeakMap"),R=!_.call({valueOf:1},"valueOf"),M=U(F),L=U(I),B=U(N),j=U(P),V=U(O);function z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!H(e)||function(e){return!!E&&E in e}(e))return!1;var t=G(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?A:p;return t.test(U(e))}(n)?n:void 0}var q=function(e){return S.call(e)};function U(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(F&&q(new F(new ArrayBuffer(1)))!=c||I&&q(new I)!=o||N&&q(N.resolve())!=a||P&&q(new P)!=u||O&&q(new O)!=l)&&(q=function(e){var t=S.call(e),n="[object Object]"==t?e.constructor:void 0,i=n?U(n):void 0;if(i)switch(i){case M:return c;case L:return o;case B:return a;case j:return u;case V:return l}return t});var W=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!G(e)}var $=k||function(){return!1};function G(e){var t=H(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(K(e)&&(W(e)||"string"==typeof e||"function"==typeof e.splice||$(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}(e)&&C.call(e,"callee")&&(!_.call(e,"callee")||"[object Arguments]"==S.call(e))}(e)))return!e.length;var t=q(e);if(t==o||t==u)return!e.size;if(R||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}(e))return!T(e).length;for(var n in e)if(C.call(e,n))return!1;return!0}},3958:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",r=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",l="[object Error]",c="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",E=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[o]=C[x]=C[a]=C[b]=C[u]=C[l]=C[c]=C[p]=C[h]=C[d]=C[m]=C[g]=C[v]=C[y]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,D=S||A||Function("return this")(),_=t&&!t.nodeType&&t,k=_&&e&&!e.nodeType&&e,T=k&&k.exports===_,F=T&&S.process,I=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),N=I&&I.isTypedArray;function P(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function O(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var M,L,B,j=Array.prototype,V=Function.prototype,z=Object.prototype,q=D["__core-js_shared__"],U=V.toString,W=z.hasOwnProperty,K=(M=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",$=z.toString,G=RegExp("^"+U.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=T?D.Buffer:void 0,J=D.Symbol,X=D.Uint8Array,Z=z.propertyIsEnumerable,Y=j.splice,Q=J?J.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=H?H.isBuffer:void 0,ne=(L=Object.keys,B=Object,function(e){return L(B(e))}),ie=ke(D,"DataView"),re=ke(D,"Map"),se=ke(D,"Promise"),oe=ke(D,"Set"),ae=ke(D,"WeakMap"),ue=ke(Object,"create"),le=Ne(ie),ce=Ne(re),pe=Ne(se),he=Ne(oe),de=Ne(ae),fe=J?J.prototype:void 0,me=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ve(e);this.size=t.size}function Ee(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=W.call(e,Q),n=e[Q];try{e[Q]=void 0;var i=!0}catch(e){}var r=$.call(e);return i&&(t?e[Q]=n:delete e[Q]),r}(e):function(e){return $.call(e)}(e)}function Ce(e){return Ve(e)&&we(e)==s}function Se(e,t,n,i,r){return e===t||(null==e||null==t||!Ve(e)&&!Ve(t)?e!=e&&t!=t:function(e,t,n,i,r,c){var f=Re(e),y=Re(t),E=f?o:Fe(e),w=y?o:Fe(t),C=(E=E==s?d:E)==d,S=(w=w==s?d:w)==d,A=E==w;if(A&&Me(e)){if(!Me(t))return!1;f=!0,C=!1}if(A&&!C)return c||(c=new be),f||ze(e)?Ae(e,t,n,i,r,c):function(e,t,n,i,r,s,o){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case a:case u:case h:return Pe(+e,+t);case l:return e.name==t.name&&e.message==t.message;case m:case v:return e==t+"";case p:var c=O;case g:var d=1&i;if(c||(c=R),e.size!=t.size&&!d)return!1;var f=o.get(e);if(f)return f==t;i|=2,o.set(e,t);var y=Ae(c(e),c(t),i,r,s,o);return o.delete(e),y;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,E,n,i,r,c);if(!(1&n)){var D=C&&W.call(e,"__wrapped__"),_=S&&W.call(t,"__wrapped__");if(D||_){var k=D?e.value():e,T=_?t.value():t;return c||(c=new be),r(k,T,n,i,c)}}return!!A&&(c||(c=new be),function(e,t,n,i,r,s){var o=1&n,a=De(e),u=a.length;if(u!=De(t).length&&!o)return!1;for(var l=u;l--;){var c=a[l];if(!(o?c in t:W.call(t,c)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var h=!0;s.set(e,t),s.set(t,e);for(var d=o;++l<u;){var f=e[c=a[l]],m=t[c];if(i)var g=o?i(m,f,c,t,e,s):i(f,m,c,e,t,s);if(!(void 0===g?f===m||r(f,m,n,i,s):g)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,r,c))}(e,t,n,i,Se,r))}function Ae(e,t,n,i,r,s){var o=1&n,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var c=-1,p=!0,h=2&n?new xe:void 0;for(s.set(e,t),s.set(t,e);++c<a;){var d=e[c],f=t[c];if(i)var m=o?i(f,d,c,t,e,s):i(d,f,c,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!P(t,(function(e,t){if(o=t,!h.has(o)&&(d===e||r(d,e,n,i,s)))return h.push(t);var o}))){p=!1;break}}else if(d!==f&&!r(d,f,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function De(e){return function(e,t,n){var i=t(e);return Re(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,qe,Te)}function _e(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!je(e)||function(e){return!!K&&K in e}(e))&&(Le(e)?G:E).test(Ne(e))}(n)?n:void 0}ge.prototype.clear=function(){this.__data__=ue?ue(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(ue){var n=t[e];return n===i?void 0:n}return W.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return ue?void 0!==t[e]:W.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ue&&void 0===t?i:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=Ee(t,e);return!(n<0||(n==t.length-1?t.pop():Y.call(t,n,1),--this.size,0))},ve.prototype.get=function(e){var t=this.__data__,n=Ee(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return Ee(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,i=Ee(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(re||ve),string:new ge}},ye.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return _e(this,e).get(e)},ye.prototype.has=function(e){return _e(this,e).has(e)},ye.prototype.set=function(e,t){var n=_e(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,i),this},xe.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ve,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var i=n.__data__;if(!re||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var i=-1,r=null==t?0:t.length,s=0,o=[];++i<r;){var a=t[i];u=a,Z.call(e,u)&&(o[s++]=a)}var u;return o}(ee(e)))}:function(){return[]},Fe=we;function Ie(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Ne(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pe(e,t){return e===t||e!=e&&t!=t}(ie&&Fe(new ie(new ArrayBuffer(1)))!=b||re&&Fe(new re)!=p||se&&Fe(se.resolve())!=f||oe&&Fe(new oe)!=g||ae&&Fe(new ae)!=y)&&(Fe=function(e){var t=we(e),n=t==d?e.constructor:void 0,i=n?Ne(n):"";if(i)switch(i){case le:return b;case ce:return p;case pe:return f;case he:return g;case de:return y}return t});var Oe=Ce(function(){return arguments}())?Ce:function(e){return Ve(e)&&W.call(e,"callee")&&!Z.call(e,"callee")},Re=Array.isArray,Me=te||function(){return!1};function Le(e){if(!je(e))return!1;var t=we(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var ze=N?function(e){return function(t){return e(t)}}(N):function(e){return Ve(e)&&Be(e.length)&&!!C[we(e)]};function qe(e){return function(e){return null!=e&&Be(e.length)&&!Le(e)}(e)?function(e,t){var n=Re(e),i=!n&&Oe(e),r=!n&&!i&&Me(e),s=!n&&!i&&!r&&ze(e),o=n||i||r||s,a=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],u=a.length;for(var l in e)!t&&!W.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ie(l,u))||a.push(l);return a}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||z)}(e))return ne(e);var t=[];for(var n in Object(e))W.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e,t){return Se(e,t)}},4772:e=>{var t,n,i=Function.prototype,r=Object.prototype,s=i.toString,o=r.hasOwnProperty,a=s.call(Object),u=r.toString,l=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=u.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var n=o.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==a}},6496:e=>{var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},4622:e=>{var t,n,i=9007199254740991,r=/^(?:0|[1-9]\d*)$/,s=Object.prototype,o=s.hasOwnProperty,a=s.toString,u=s.propertyIsEnumerable,l=(t=Object.keys,n=Object,function(e){return t(n(e))});function c(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||r.test(e))&&e>-1&&e%1==0&&e<t}var p=Array.isArray;function h(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?a.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}e.exports=function(e){return h(e)?function(e,t){var n=p(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&h(e)}(e)&&o.call(e,"callee")&&(!u.call(e,"callee")||"[object Arguments]"==a.call(e))}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var s in e)!t&&!o.call(e,s)||r&&("length"==s||c(s,i))||n.push(s);return n}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||s)}(e))return l(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},6635:function(e,t,n){var i;e=n.nmd(e),function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,p=9007199254740991,h=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",x="[object Error]",b="[object Function]",E="[object GeneratorFunction]",w="[object Map]",C="[object Number]",S="[object Object]",A="[object Promise]",D="[object RegExp]",_="[object Set]",k="[object String]",T="[object Symbol]",F="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",V="[object Uint16Array]",z="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,G=RegExp(K.source),H=RegExp($.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+Se+"]",De="["+Ee+"]",_e="\\d+",ke="["+we+"]",Te="[^\\ud800-\\udfff"+Se+_e+"\\u2700-\\u27bf"+we+Ce+"]",Fe="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+Ce+"]",Re="(?:"+ke+"|"+Te+")",Me="(?:"+Oe+"|"+Te+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",je="(?:"+De+"|"+Fe+")?",Ve="[\\ufe0e\\ufe0f]?",ze=Ve+je+"(?:\\u200d(?:"+[Ie,Ne,Pe].join("|")+")"+Ve+je+")*",qe="(?:"+["[\\u2700-\\u27bf]",Ne,Pe].join("|")+")"+ze,Ue="(?:"+[Ie+De+"?",De,Ne,Pe,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(De,"g"),$e=RegExp(Fe+"(?="+Fe+")|"+Ue+ze,"g"),Ge=RegExp([Oe+"?"+ke+"+"+Le+"(?="+[Ae,Oe,"$"].join("|")+")",Me+"+"+Be+"(?="+[Ae,Oe+Re,"$"].join("|")+")",Oe+"?"+Re+"+"+Le,Oe+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_e,qe].join("|"),"g"),He=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ze=-1,Ye={};Ye[P]=Ye[O]=Ye[R]=Ye[M]=Ye[L]=Ye[B]=Ye[j]=Ye[V]=Ye[z]=!0,Ye[m]=Ye[g]=Ye[I]=Ye[v]=Ye[N]=Ye[y]=Ye[x]=Ye[b]=Ye[w]=Ye[C]=Ye[S]=Ye[D]=Ye[_]=Ye[k]=Ye[F]=!1;var Qe={};Qe[m]=Qe[g]=Qe[I]=Qe[N]=Qe[v]=Qe[y]=Qe[P]=Qe[O]=Qe[R]=Qe[M]=Qe[L]=Qe[w]=Qe[C]=Qe[S]=Qe[D]=Qe[_]=Qe[k]=Qe[T]=Qe[B]=Qe[j]=Qe[V]=Qe[z]=!0,Qe[x]=Qe[b]=Qe[F]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,st=it||rt||Function("return this")(),ot=t&&!t.nodeType&&t,at=ot&&e&&!e.nodeType&&e,ut=at&&at.exports===ot,lt=ut&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),pt=ct&&ct.isArrayBuffer,ht=ct&&ct.isDate,dt=ct&&ct.isMap,ft=ct&&ct.isRegExp,mt=ct&&ct.isSet,gt=ct&&ct.isTypedArray;function vt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r<s;){var o=e[r];t(i,o,n(o),e)}return i}function xt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function wt(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}function Ct(e,t){return!(null==e||!e.length)&&Pt(e,t,0)>-1}function St(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function At(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Dt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function _t(e,t,n,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function kt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Tt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Ft=Lt("length");function It(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Nt(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function Pt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Nt(e,Rt,n)}function Ot(e,t,n,i){for(var r=n-1,s=e.length;++r<s;)if(i(e[r],t))return r;return-1}function Rt(e){return e!=e}function Mt(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:h}function Lt(e){return function(t){return null==t?r:t[e]}}function Bt(e){return function(t){return null==e?r:e[t]}}function jt(e,t,n,i,r){return r(e,(function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)})),n}function Vt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function zt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function qt(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ut(e){return function(t){return e(t)}}function Wt(e,t){return At(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function $t(e,t){for(var n=-1,i=e.length;++n<i&&Pt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Pt(t,e[n],0)>-1;);return n}function Ht(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Jt=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xt=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Zt(e){return"\\"+et[e]}function Yt(e){return He.test(e)}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[r++]=n)}return s}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function sn(e){return Yt(e)?function(e){for(var t=$e.lastIndex=0;$e.test(e);)++t;return t}(e):Ft(e)}function on(e){return Yt(e)?function(e){return e.match($e)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var un=Bt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,i=(t=null==t?st:ln.defaults(st.Object(),t,ln.pick(st,Xe))).Array,re=t.Date,Ee=t.Error,we=t.Function,Ce=t.Math,Se=t.Object,Ae=t.RegExp,De=t.String,_e=t.TypeError,ke=i.prototype,Te=we.prototype,Fe=Se.prototype,Ie=t["__core-js_shared__"],Ne=Te.toString,Pe=Fe.hasOwnProperty,Oe=0,Re=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Me=Fe.toString,Le=Ne.call(Se),Be=st._,je=Ae("^"+Ne.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=ut?t.Buffer:r,ze=t.Symbol,qe=t.Uint8Array,Ue=Ve?Ve.allocUnsafe:r,$e=en(Se.getPrototypeOf,Se),He=Se.create,et=Fe.propertyIsEnumerable,it=ke.splice,rt=ze?ze.isConcatSpreadable:r,ot=ze?ze.iterator:r,at=ze?ze.toStringTag:r,lt=function(){try{var e=ls(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==st.clearTimeout&&t.clearTimeout,Ft=re&&re.now!==st.Date.now&&re.now,Bt=t.setTimeout!==st.setTimeout&&t.setTimeout,cn=Ce.ceil,pn=Ce.floor,hn=Se.getOwnPropertySymbols,dn=Ve?Ve.isBuffer:r,fn=t.isFinite,mn=ke.join,gn=en(Se.keys,Se),vn=Ce.max,yn=Ce.min,xn=re.now,bn=t.parseInt,En=Ce.random,wn=ke.reverse,Cn=ls(t,"DataView"),Sn=ls(t,"Map"),An=ls(t,"Promise"),Dn=ls(t,"Set"),_n=ls(t,"WeakMap"),kn=ls(Se,"create"),Tn=_n&&new _n,Fn={},In=Bs(Cn),Nn=Bs(Sn),Pn=Bs(An),On=Bs(Dn),Rn=Bs(_n),Mn=ze?ze.prototype:r,Ln=Mn?Mn.valueOf:r,Bn=Mn?Mn.toString:r;function jn(e){if(na(e)&&!Ko(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return js(e)}return new qn(e)}var Vn=function(){function e(){}return function(t){if(!ta(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Hn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Jn(e,t){var n=Ko(e),i=!n&&Wo(e),r=!n&&!i&&Jo(e),s=!n&&!i&&!r&&ca(e),o=n||i||r||s,a=o?zt(e.length,De):[],u=a.length;for(var l in e)!t&&!Pe.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||gs(l,u))||a.push(l);return a}function Xn(e){var t=e.length;return t?e[$i(0,t-1)]:r}function Zn(e,t){return Ps(_r(e),oi(t,0,e.length))}function Yn(e){return Ps(_r(e))}function Qn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Pe.call(e,t)&&zo(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if(zo(e[n][0],t))return n;return-1}function ni(e,t,n,i){return pi(e,(function(e,r,s){t(i,e,n(e),s)})),i}function ii(e,t){return e&&kr(t,Na(t),e)}function ri(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function si(e,t){for(var n=-1,s=t.length,o=i(s),a=null==e;++n<s;)o[n]=a?r:_a(e,t[n]);return o}function oi(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,s,o){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!ta(e))return e;var p=Ko(e);if(p){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return _r(e,a)}else{var h=hs(e),d=h==b||h==E;if(Jo(e))return Er(e,u);if(h==S||h==m||d&&!s){if(a=l||d?{}:fs(e),!u)return l?function(e,t){return kr(e,ps(e),t)}(e,function(e,t){return e&&kr(t,Pa(t),e)}(a,e)):function(e,t){return kr(e,cs(e),t)}(e,ii(a,e))}else{if(!Qe[h])return s?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case I:return wr(e);case v:case y:return new r(+e);case N:return function(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case O:case R:case M:case L:case B:case j:case V:case z:return Cr(e,n);case w:return new r;case C:case k:return new r(e);case D:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new r;case T:return i=e,Ln?Se(Ln.call(i)):{}}}(e,h,u)}}o||(o=new Hn);var f=o.get(e);if(f)return f;o.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,o))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,o))}));var g=p?r:(c?l?ns:ts:l?Pa:Na)(e);return xt(g||e,(function(i,r){g&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,o))})),a}function ui(e,t,n){var i=n.length;if(null==e)return!i;for(e=Se(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new _e(s);return Ts((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,s=Ct,o=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=At(t,Ut(n))),i?(s=St,o=!1):t.length>=200&&(s=Kt,o=!1,t=new Gn(t));e:for(;++r<a;){var c=e[r],p=null==n?c:n(c);if(c=i||0!==c?c:0,o&&p==p){for(var h=l;h--;)if(t[h]===p)continue e;u.push(c)}else s(t,p,i)||u.push(c)}return u}jn.templateSettings={escape:J,evaluate:X,interpolate:Z,variable:"",imports:{_:jn}},jn.prototype=zn.prototype,jn.prototype.constructor=jn,qn.prototype=Vn(zn.prototype),qn.prototype.constructor=qn,Un.prototype=Vn(zn.prototype),Un.prototype.constructor=Un,Wn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===o?r:n}return Pe.call(t,e)?t[e]:r},Wn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==r:Pe.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===r?o:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},Kn.prototype.has=function(e){return ti(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Kn),string:new Wn}},$n.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return as(this,e).get(e)},$n.prototype.has=function(e){return as(this,e).has(e)},$n.prototype.set=function(e,t){var n=as(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,o),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Hn.prototype.get=function(e){return this.__data__.get(e)},Hn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var i=n.__data__;if(!Sn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(i)}return n.set(e,t),this.size=n.size,this};var pi=Ir(xi),hi=Ir(bi,!0);function di(e,t){var n=!0;return pi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function fi(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(u===r?a==a&&!la(a):n(a,u)))var u=a,l=o}return l}function mi(e,t){var n=[];return pi(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function gi(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=ms),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?gi(a,t-1,n,i,r):Dt(r,a):i||(r[r.length]=a)}return r}var vi=Nr(),yi=Nr(!0);function xi(e,t){return e&&vi(e,t,Na)}function bi(e,t){return e&&yi(e,t,Na)}function Ei(e,t){return wt(t,(function(t){return Yo(e[t])}))}function wi(e,t){for(var n=0,i=(t=vr(t,e)).length;null!=e&&n<i;)e=e[Ls(t[n++])];return n&&n==i?e:r}function Ci(e,t,n){var i=t(e);return Ko(e)?i:Dt(i,n(e))}function Si(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Se(e)?function(e){var t=Pe.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var s=Me.call(e);return i&&(t?e[at]=n:delete e[at]),s}(e):function(e){return Me.call(e)}(e)}function Ai(e,t){return e>t}function Di(e,t){return null!=e&&Pe.call(e,t)}function _i(e,t){return null!=e&&t in Se(e)}function ki(e,t,n){for(var s=n?St:Ct,o=e[0].length,a=e.length,u=a,l=i(a),c=1/0,p=[];u--;){var h=e[u];u&&t&&(h=At(h,Ut(t))),c=yn(h.length,c),l[u]=!n&&(t||o>=120&&h.length>=120)?new Gn(u&&h):r}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&p.length<c;){var m=h[d],g=t?t(m):m;if(m=n||0!==m?m:0,!(f?Kt(f,g):s(p,g,n))){for(u=a;--u;){var v=l[u];if(!(v?Kt(v,g):s(e[u],g,n)))continue e}f&&f.push(g),p.push(m)}}return p}function Ti(e,t,n){var i=null==(e=As(e,t=vr(t,e)))?e:e[Ls(Xs(t))];return null==i?r:vt(i,e,n)}function Fi(e){return na(e)&&Si(e)==m}function Ii(e,t,n,i,s){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Ko(e),u=Ko(t),l=a?g:hs(e),c=u?g:hs(t),p=(l=l==m?S:l)==S,h=(c=c==m?S:c)==S,d=l==c;if(d&&Jo(e)){if(!Jo(t))return!1;a=!0,p=!1}if(d&&!p)return o||(o=new Hn),a||ca(e)?Qr(e,t,n,i,s,o):function(e,t,n,i,r,s,o){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!s(new qe(e),new qe(t)));case v:case y:case C:return zo(+e,+t);case x:return e.name==t.name&&e.message==t.message;case D:case k:return e==t+"";case w:var a=Qt;case _:var u=1&i;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;i|=2,o.set(e,t);var c=Qr(a(e),a(t),i,r,s,o);return o.delete(e),c;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,l,n,i,s,o);if(!(1&n)){var f=p&&Pe.call(e,"__wrapped__"),b=h&&Pe.call(t,"__wrapped__");if(f||b){var E=f?e.value():e,A=b?t.value():t;return o||(o=new Hn),s(E,A,n,i,o)}}return!!d&&(o||(o=new Hn),function(e,t,n,i,s,o){var a=1&n,u=ts(e),l=u.length;if(l!=ts(t).length&&!a)return!1;for(var c=l;c--;){var p=u[c];if(!(a?p in t:Pe.call(t,p)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<l;){var g=e[p=u[c]],v=t[p];if(i)var y=a?i(v,g,p,t,e,o):i(g,v,p,e,t,o);if(!(y===r?g===v||s(g,v,n,i,o):y)){f=!1;break}m||(m="constructor"==p)}if(f&&!m){var x=e.constructor,b=t.constructor;x==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,i,s,o))}(e,t,n,i,Ii,s))}function Ni(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Se(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var l=(u=n[s])[0],c=e[l],p=u[1];if(a&&u[2]){if(c===r&&!(l in e))return!1}else{var h=new Hn;if(i)var d=i(c,p,l,e,t,h);if(!(d===r?Ii(p,c,3,i,h):d))return!1}}return!0}function Pi(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Yo(e)?je:me).test(Bs(e));var t}function Oi(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ko(e)?ji(e[0],e[1]):Bi(e):du(e)}function Ri(e){if(!Es(e))return gn(e);var t=[];for(var n in Se(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Mi(e,t){return e<t}function Li(e,t){var n=-1,r=Go(e)?i(e.length):[];return pi(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Bi(e){var t=us(e);return 1==t.length&&t[0][2]?Cs(t[0][0],t[0][1]):function(n){return n===e||Ni(n,e,t)}}function ji(e,t){return ys(e)&&ws(t)?Cs(Ls(e),t):function(n){var i=_a(n,e);return i===r&&i===t?ka(n,e):Ii(t,i,3)}}function Vi(e,t,n,i,s){e!==t&&vi(t,(function(o,a){if(s||(s=new Hn),ta(o))!function(e,t,n,i,s,o,a){var u=_s(e,n),l=_s(t,n),c=a.get(l);if(c)Qn(e,n,c);else{var p=o?o(u,l,n+"",e,t,a):r,h=p===r;if(h){var d=Ko(l),f=!d&&Jo(l),m=!d&&!f&&ca(l);p=l,d||f||m?Ko(u)?p=u:Ho(u)?p=_r(u):f?(h=!1,p=Er(l,!0)):m?(h=!1,p=Cr(l,!0)):p=[]:sa(l)||Wo(l)?(p=u,Wo(u)?p=ya(u):ta(u)&&!Yo(u)||(p=fs(l))):h=!1}h&&(a.set(l,p),s(p,l,i,o,a),a.delete(l)),Qn(e,n,p)}}(e,t,a,n,Vi,i,s);else{var u=i?i(_s(e,a),o,a+"",e,t,s):r;u===r&&(u=o),Qn(e,a,u)}}),Pa)}function zi(e,t){var n=e.length;if(n)return gs(t+=t<0?n:0,n)?e[t]:r}function qi(e,t,n){t=t.length?At(t,(function(e){return Ko(e)?function(t){return wi(t,1===e.length?e[0]:e)}:e})):[ru];var i=-1;t=At(t,Ut(os()));var r=Li(e,(function(e,n,r){var s=At(t,(function(t){return t(e)}));return{criteria:s,index:++i,value:e}}));return function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var u=Sr(r[i],s[i]);if(u)return i>=a?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function Ui(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=wi(e,o);n(a,o)&&Zi(s,vr(o,e),a)}return s}function Wi(e,t,n,i){var r=i?Ot:Pt,s=-1,o=t.length,a=e;for(e===t&&(t=_r(t)),n&&(a=At(e,Ut(n)));++s<o;)for(var u=0,l=t[s],c=n?n(l):l;(u=r(a,c,u,i))>-1;)a!==e&&it.call(a,u,1),it.call(e,u,1);return e}function Ki(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;gs(r)?it.call(e,r,1):lr(e,r)}}return e}function $i(e,t){return e+pn(En()*(t-e+1))}function Gi(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pn(t/2))&&(e+=e)}while(t);return n}function Hi(e,t){return Fs(Ss(e,t,ru),e+"")}function Ji(e){return Xn(za(e))}function Xi(e,t){var n=za(e);return Ps(n,oi(t,0,n.length))}function Zi(e,t,n,i){if(!ta(e))return e;for(var s=-1,o=(t=vr(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var l=Ls(t[s]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var p=u[l];(c=i?i(p,l,u):r)===r&&(c=ta(p)?p:gs(t[s+1])?[]:{})}ei(u,l,c),u=u[l]}return e}var Yi=Tn?function(e,t){return Tn.set(e,t),e}:ru,Qi=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ru;function er(e){return Ps(za(e))}function tr(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r<s;)o[r]=e[r+t];return o}function nr(e,t){var n;return pi(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=e[s];null!==o&&!la(o)&&(n?o<=t:o<t)?i=s+1:r=s}return r}return rr(e,t,ru,n)}function rr(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===r;s<o;){var p=pn((s+o)/2),h=n(e[p]),d=h!==r,f=null===h,m=h==h,g=la(h);if(a)var v=i||m;else v=c?m&&(i||d):u?m&&d&&(i||!f):l?m&&d&&!f&&(i||!g):!f&&!g&&(i?h<=t:h<t);v?s=p+1:o=p}return yn(o,4294967294)}function sr(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n],a=t?t(o):o;if(!n||!zo(a,u)){var u=a;s[r++]=0===o?0:o}}return s}function or(e){return"number"==typeof e?e:la(e)?h:+e}function ar(e){if("string"==typeof e)return e;if(Ko(e))return At(e,ar)+"";if(la(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=Ct,s=e.length,o=!0,a=[],u=a;if(n)o=!1,r=St;else if(s>=200){var l=t?null:Gr(e);if(l)return nn(l);o=!1,r=Kt,u=new Gn}else u=t?[]:a;e:for(;++i<s;){var c=e[i],p=t?t(c):c;if(c=n||0!==c?c:0,o&&p==p){for(var h=u.length;h--;)if(u[h]===p)continue e;t&&u.push(p),a.push(c)}else r(u,p,n)||(u!==a&&u.push(p),a.push(c))}return a}function lr(e,t){return null==(e=As(e,t=vr(t,e)))||delete e[Ls(Xs(t))]}function cr(e,t,n,i){return Zi(e,t,n(wi(e,t)),i)}function pr(e,t,n,i){for(var r=e.length,s=i?r:-1;(i?s--:++s<r)&&t(e[s],s,e););return n?tr(e,i?0:s,i?s+1:r):tr(e,i?s+1:0,i?r:s)}function hr(e,t){var n=e;return n instanceof Un&&(n=n.value()),_t(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function dr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=e[s],u=-1;++u<r;)u!=s&&(o[s]=ci(o[s]||a,e[u],t,n));return ur(gi(o,1),t,n)}function fr(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var u=i<o?t[i]:r;n(a,e[i],u)}return a}function mr(e){return Ho(e)?e:[]}function gr(e){return"function"==typeof e?e:ru}function vr(e,t){return Ko(e)?e:ys(e,t)?[e]:Ms(xa(e))}var yr=Hi;function xr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=ct||function(e){return st.clearTimeout(e)};function Er(e,t){if(t)return e.slice();var n=e.length,i=Ue?Ue(n):new e.constructor(n);return e.copy(i),i}function wr(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Cr(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Sr(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=la(e),a=t!==r,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!o&&e>t||o&&a&&l&&!u&&!c||i&&a&&l||!n&&l||!s)return 1;if(!i&&!o&&!c&&e<t||c&&n&&s&&!i&&!o||u&&n&&s||!a&&s||!l)return-1}return 0}function Ar(e,t,n,r){for(var s=-1,o=e.length,a=n.length,u=-1,l=t.length,c=vn(o-a,0),p=i(l+c),h=!r;++u<l;)p[u]=t[u];for(;++s<a;)(h||s<o)&&(p[n[s]]=e[s]);for(;c--;)p[u++]=e[s++];return p}function Dr(e,t,n,r){for(var s=-1,o=e.length,a=-1,u=n.length,l=-1,c=t.length,p=vn(o-u,0),h=i(p+c),d=!r;++s<p;)h[s]=e[s];for(var f=s;++l<c;)h[f+l]=t[l];for(;++a<u;)(d||s<o)&&(h[f+n[a]]=e[s++]);return h}function _r(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function kr(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],l=i?i(n[u],e[u],u,n,e):r;l===r&&(l=e[u]),s?ri(n,u,l):ei(n,u,l)}return n}function Tr(e,t){return function(n,i){var r=Ko(n)?yt:ni,s=t?t():{};return r(n,e,os(i,2),s)}}function Fr(e){return Hi((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&vs(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Se(t);++i<s;){var u=n[i];u&&e(t,u,i,o)}return t}))}function Ir(e,t){return function(n,i){if(null==n)return n;if(!Go(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=Se(n);(t?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Nr(e){return function(t,n,i){for(var r=-1,s=Se(t),o=i(t),a=o.length;a--;){var u=o[e?a:++r];if(!1===n(s[u],u,s))break}return t}}function Pr(e){return function(t){var n=Yt(t=xa(t))?on(t):r,i=n?n[0]:t.charAt(0),s=n?xr(n,1).join(""):t.slice(1);return i[e]()+s}}function Or(e){return function(t){return _t(Ya(Wa(t).replace(We,"")),e,"")}}function Rr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Vn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Mr(e){return function(t,n,i){var s=Se(t);if(!Go(t)){var o=os(n,3);t=Na(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function Lr(e){return es((function(t){var n=t.length,i=n,o=qn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new _e(s);if(o&&!u&&"wrapper"==rs(a))var u=new qn([],!0)}for(i=u?i:n;++i<n;){var l=rs(a=t[i]),c="wrapper"==l?is(a):r;u=c&&xs(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[rs(c[0])].apply(u,c[3]):1==a.length&&xs(a)?u[l]():u.thru(a)}return function(){var e=arguments,i=e[0];if(u&&1==e.length&&Ko(i))return u.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Br(e,t,n,s,o,a,u,c,p,h){var d=t&l,f=1&t,m=2&t,g=24&t,v=512&t,y=m?r:Rr(e);return function r(){for(var l=arguments.length,x=i(l),b=l;b--;)x[b]=arguments[b];if(g)var E=ss(r),w=Ht(x,E);if(s&&(x=Ar(x,s,o,g)),a&&(x=Dr(x,a,u,g)),l-=w,g&&l<h){var C=tn(x,E);return Kr(e,t,Br,r.placeholder,n,x,C,c,p,h-l)}var S=f?n:this,A=m?S[e]:e;return l=x.length,c?x=Ds(x,c):v&&l>1&&x.reverse(),d&&p<l&&(x.length=p),this&&this!==st&&this instanceof r&&(A=y||Rr(A)),A.apply(S,x)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return xi(e,(function(e,r,s){t(i,n(e),r,s)})),i}(n,e,t(i),{})}}function Vr(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=or(n),i=or(i)),s=e(n,i)}return s}}function zr(e){return es((function(t){return t=At(t,Ut(os())),Hi((function(n){var i=this;return e(t,(function(e){return vt(e,i,n)}))}))}))}function qr(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?Gi(t,e):t;var i=Gi(t,cn(e/sn(t)));return Yt(t)?xr(on(i),0,e).join(""):i.slice(0,e)}function Ur(e){return function(t,n,s){return s&&"number"!=typeof s&&vs(t,n,s)&&(n=s=r),t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n,r){for(var s=-1,o=vn(cn((t-e)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=e,e+=n;return a}(t,n,s=s===r?t<n?1:-1:fa(s),e)}}function Wr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Kr(e,t,n,i,s,o,a,l,c,p){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,s,h?o:r,h?a:r,h?r:o,h?r:a,l,c,p],f=n.apply(r,d);return xs(e)&&ks(f,d),f.placeholder=i,Is(f,e,t)}function $r(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:yn(ma(n),292))&&fn(e)){var i=(xa(e)+"e").split("e");return+((i=(xa(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Gr=Dn&&1/nn(new Dn([,-0]))[1]==c?function(e){return new Dn(e)}:lu;function Hr(e){return function(t){var n=hs(t);return n==w?Qt(t):n==_?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jr(e,t,n,o,c,p,h,d){var f=2&t;if(!f&&"function"!=typeof e)throw new _e(s);var m=o?o.length:0;if(m||(t&=-97,o=c=r),h=h===r?h:vn(ma(h),0),d=d===r?d:ma(d),m-=c?c.length:0,64&t){var g=o,v=c;o=c=r}var y=f?r:is(e),x=[e,t,n,o,c,g,v,p,h,d];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,s=r<131,o=i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ar(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Dr(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),i&l&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(x,y),e=x[0],t=x[1],n=x[2],o=x[3],c=x[4],!(d=x[9]=x[9]===r?f?0:e.length:vn(x[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var s=Rr(e);return function o(){for(var a=arguments.length,u=i(a),l=a,c=ss(o);l--;)u[l]=arguments[l];var p=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=p.length)<n?Kr(e,t,Br,o.placeholder,r,u,p,r,r,n-a):vt(this&&this!==st&&this instanceof o?s:e,this,u)}}(e,t,d):t!=u&&33!=t||c.length?Br.apply(r,x):function(e,t,n,r){var s=1&t,o=Rr(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=r.length,p=i(c+u),h=this&&this!==st&&this instanceof t?o:e;++l<c;)p[l]=r[l];for(;u--;)p[l++]=arguments[++a];return vt(h,s?n:this,p)}}(e,t,n,o);else var b=function(e,t,n){var i=1&t,r=Rr(e);return function t(){return(this&&this!==st&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Is((y?Yi:ks)(b,x),e,t)}function Xr(e,t,n,i){return e===r||zo(e,Fe[n])&&!Pe.call(i,n)?t:e}function Zr(e,t,n,i,s,o){return ta(e)&&ta(t)&&(o.set(t,e),Vi(e,t,r,Zr,o),o.delete(t)),e}function Yr(e){return sa(e)?r:e}function Qr(e,t,n,i,s,o){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=o.get(e),p=o.get(t);if(c&&p)return c==t&&p==e;var h=-1,d=!0,f=2&n?new Gn:r;for(o.set(e,t),o.set(t,e);++h<u;){var m=e[h],g=t[h];if(i)var v=a?i(g,m,h,t,e,o):i(m,g,h,e,t,o);if(v!==r){if(v)continue;d=!1;break}if(f){if(!Tt(t,(function(e,t){if(!Kt(f,t)&&(m===e||s(m,e,n,i,o)))return f.push(t)}))){d=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function es(e){return Fs(Ss(e,r,Ks),e+"")}function ts(e){return Ci(e,Na,cs)}function ns(e){return Ci(e,Pa,ps)}var is=Tn?function(e){return Tn.get(e)}:lu;function rs(e){for(var t=e.name+"",n=Fn[t],i=Pe.call(Fn,t)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==e)return r.name}return t}function ss(e){return(Pe.call(jn,"placeholder")?jn:e).placeholder}function os(){var e=jn.iteratee||su;return e=e===su?Oi:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function us(e){for(var t=Na(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ws(r)]}return t}function ls(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Pi(n)?n:r}var cs=hn?function(e){return null==e?[]:(e=Se(e),wt(hn(e),(function(t){return et.call(e,t)})))}:gu,ps=hn?function(e){for(var t=[];e;)Dt(t,cs(e)),e=$e(e);return t}:gu,hs=Si;function ds(e,t,n){for(var i=-1,r=(t=vr(t,e)).length,s=!1;++i<r;){var o=Ls(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&ea(r)&&gs(o,r)&&(Ko(e)||Wo(e))}function fs(e){return"function"!=typeof e.constructor||Es(e)?{}:Vn($e(e))}function ms(e){return Ko(e)||Wo(e)||!!(rt&&e&&e[rt])}function gs(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Go(n)&&gs(t,n.length):"string"==i&&t in n)&&zo(n[t],e)}function ys(e,t){if(Ko(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||Q.test(e)||!Y.test(e)||null!=t&&e in Se(t)}function xs(e){var t=rs(e),n=jn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=is(n);return!!i&&e===i[0]}(Cn&&hs(new Cn(new ArrayBuffer(1)))!=N||Sn&&hs(new Sn)!=w||An&&hs(An.resolve())!=A||Dn&&hs(new Dn)!=_||_n&&hs(new _n)!=F)&&(hs=function(e){var t=Si(e),n=t==S?e.constructor:r,i=n?Bs(n):"";if(i)switch(i){case In:return N;case Nn:return w;case Pn:return A;case On:return _;case Rn:return F}return t});var bs=Ie?Yo:vu;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function ws(e){return e==e&&!ta(e)}function Cs(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Se(n))}}function Ss(e,t,n){return t=vn(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=vn(r.length-t,0),a=i(o);++s<o;)a[s]=r[t+s];s=-1;for(var u=i(t+1);++s<t;)u[s]=r[s];return u[t]=n(a),vt(e,this,u)}}function As(e,t){return t.length<2?e:wi(e,tr(t,0,-1))}function Ds(e,t){for(var n=e.length,i=yn(t.length,n),s=_r(e);i--;){var o=t[i];e[i]=gs(o,n)?s[o]:r}return e}function _s(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ks=Ns(Yi),Ts=Bt||function(e,t){return st.setTimeout(e,t)},Fs=Ns(Qi);function Is(e,t,n){var i=t+"";return Fs(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return xt(f,(function(n){var i="_."+n[0];t&n[1]&&!Ct(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(i),n)))}function Ns(e){var t=0,n=0;return function(){var i=xn(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ps(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=$i(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Os,Rs,Ms=(Os=Ro((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Rs.size&&Rs.clear(),e})),Rs=Os.cache,Os);function Ls(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bs(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function js(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=_r(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vs=Hi((function(e,t){return Ho(e)?ci(e,gi(t,1,Ho,!0)):[]})),zs=Hi((function(e,t){var n=Xs(t);return Ho(n)&&(n=r),Ho(e)?ci(e,gi(t,1,Ho,!0),os(n,2)):[]})),qs=Hi((function(e,t){var n=Xs(t);return Ho(n)&&(n=r),Ho(e)?ci(e,gi(t,1,Ho,!0),r,n):[]}));function Us(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Nt(e,os(t,3),r)}function Ws(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=ma(n),s=n<0?vn(i+s,0):yn(s,i-1)),Nt(e,os(t,3),s,!0)}function Ks(e){return null!=e&&e.length?gi(e,1):[]}function $s(e){return e&&e.length?e[0]:r}var Gs=Hi((function(e){var t=At(e,mr);return t.length&&t[0]===e[0]?ki(t):[]})),Hs=Hi((function(e){var t=Xs(e),n=At(e,mr);return t===Xs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?ki(n,os(t,2)):[]})),Js=Hi((function(e){var t=Xs(e),n=At(e,mr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?ki(n,r,t):[]}));function Xs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Zs=Hi(Ys);function Ys(e,t){return e&&e.length&&t&&t.length?Wi(e,t):e}var Qs=es((function(e,t){var n=null==e?0:e.length,i=si(e,t);return Ki(e,At(t,(function(e){return gs(e,n)?+e:e})).sort(Sr)),i}));function eo(e){return null==e?e:wn.call(e)}var to=Hi((function(e){return ur(gi(e,1,Ho,!0))})),no=Hi((function(e){var t=Xs(e);return Ho(t)&&(t=r),ur(gi(e,1,Ho,!0),os(t,2))})),io=Hi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,ur(gi(e,1,Ho,!0),r,t)}));function ro(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Ho(e))return t=vn(e.length,t),!0})),zt(t,(function(t){return At(e,Lt(t))}))}function so(e,t){if(!e||!e.length)return[];var n=ro(e);return null==t?n:At(n,(function(e){return vt(t,r,e)}))}var oo=Hi((function(e,t){return Ho(e)?ci(e,t):[]})),ao=Hi((function(e){return dr(wt(e,Ho))})),uo=Hi((function(e){var t=Xs(e);return Ho(t)&&(t=r),dr(wt(e,Ho),os(t,2))})),lo=Hi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,dr(wt(e,Ho),r,t)})),co=Hi(ro),po=Hi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,so(e,n)}));function ho(e){var t=jn(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var mo=es((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return si(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&gs(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:fo,args:[s],thisArg:r}),new qn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),go=Tr((function(e,t,n){Pe.call(e,n)?++e[n]:ri(e,n,1)})),vo=Mr(Us),yo=Mr(Ws);function xo(e,t){return(Ko(e)?xt:pi)(e,os(t,3))}function bo(e,t){return(Ko(e)?bt:hi)(e,os(t,3))}var Eo=Tr((function(e,t,n){Pe.call(e,n)?e[n].push(t):ri(e,n,[t])})),wo=Hi((function(e,t,n){var r=-1,s="function"==typeof t,o=Go(e)?i(e.length):[];return pi(e,(function(e){o[++r]=s?vt(t,e,n):Ti(e,t,n)})),o})),Co=Tr((function(e,t,n){ri(e,n,t)}));function So(e,t){return(Ko(e)?At:Li)(e,os(t,3))}var Ao=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Do=Hi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vs(e,t[0],t[1])?t=[]:n>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),qi(e,gi(t,1),[])})),_o=Ft||function(){return st.Date.now()};function ko(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Jr(e,l,r,r,r,r,t)}function To(e,t){var n;if("function"!=typeof t)throw new _e(s);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Fo=Hi((function(e,t,n){var i=1;if(n.length){var r=tn(n,ss(Fo));i|=u}return Jr(e,i,t,n,r)})),Io=Hi((function(e,t,n){var i=3;if(n.length){var r=tn(n,ss(Io));i|=u}return Jr(t,i,e,n,r)}));function No(e,t,n){var i,o,a,u,l,c,p=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new _e(s);function m(t){var n=i,s=o;return i=o=r,p=t,u=e.apply(s,n)}function g(e){return p=e,l=Ts(y,t),h?m(e):u}function v(e){var n=e-c;return c===r||n>=t||n<0||d&&e-p>=a}function y(){var e=_o();if(v(e))return x(e);l=Ts(y,function(e){var n=t-(e-c);return d?yn(n,a-(e-p)):n}(e))}function x(e){return l=r,f&&i?m(e):(i=o=r,u)}function b(){var e=_o(),n=v(e);if(i=arguments,o=this,c=e,n){if(l===r)return g(c);if(d)return br(l),l=Ts(y,t),m(c)}return l===r&&(l=Ts(y,t)),u}return t=va(t)||0,ta(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(va(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==r&&br(l),p=0,i=c=o=l=r},b.flush=function(){return l===r?u:x(_o())},b}var Po=Hi((function(e,t){return li(e,1,t)})),Oo=Hi((function(e,t,n){return li(e,va(t)||0,n)}));function Ro(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Ro.Cache||$n),n}function Mo(e){if("function"!=typeof e)throw new _e(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ro.Cache=$n;var Lo=yr((function(e,t){var n=(t=1==t.length&&Ko(t[0])?At(t[0],Ut(os())):At(gi(t,1),Ut(os()))).length;return Hi((function(i){for(var r=-1,s=yn(i.length,n);++r<s;)i[r]=t[r].call(this,i[r]);return vt(e,this,i)}))})),Bo=Hi((function(e,t){var n=tn(t,ss(Bo));return Jr(e,u,r,t,n)})),jo=Hi((function(e,t){var n=tn(t,ss(jo));return Jr(e,64,r,t,n)})),Vo=es((function(e,t){return Jr(e,256,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var qo=Wr(Ai),Uo=Wr((function(e,t){return e>=t})),Wo=Fi(function(){return arguments}())?Fi:function(e){return na(e)&&Pe.call(e,"callee")&&!et.call(e,"callee")},Ko=i.isArray,$o=pt?Ut(pt):function(e){return na(e)&&Si(e)==I};function Go(e){return null!=e&&ea(e.length)&&!Yo(e)}function Ho(e){return na(e)&&Go(e)}var Jo=dn||vu,Xo=ht?Ut(ht):function(e){return na(e)&&Si(e)==y};function Zo(e){if(!na(e))return!1;var t=Si(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function Yo(e){if(!ta(e))return!1;var t=Si(e);return t==b||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qo(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=dt?Ut(dt):function(e){return na(e)&&hs(e)==w};function ra(e){return"number"==typeof e||na(e)&&Si(e)==C}function sa(e){if(!na(e)||Si(e)!=S)return!1;var t=$e(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==Le}var oa=ft?Ut(ft):function(e){return na(e)&&Si(e)==D},aa=mt?Ut(mt):function(e){return na(e)&&hs(e)==_};function ua(e){return"string"==typeof e||!Ko(e)&&na(e)&&Si(e)==k}function la(e){return"symbol"==typeof e||na(e)&&Si(e)==T}var ca=gt?Ut(gt):function(e){return na(e)&&ea(e.length)&&!!Ye[Si(e)]},pa=Wr(Mi),ha=Wr((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Go(e))return ua(e)?on(e):_r(e);if(ot&&e[ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ot]());var t=hs(e);return(t==w?Qt:t==_?nn:za)(e)}function fa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?oi(ma(e),0,d):0}function va(e){if("number"==typeof e)return e;if(la(e))return h;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=fe.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?h:+e}function ya(e){return kr(e,Pa(e))}function xa(e){return null==e?"":ar(e)}var ba=Fr((function(e,t){if(Es(t)||Go(t))kr(t,Na(t),e);else for(var n in t)Pe.call(t,n)&&ei(e,n,t[n])})),Ea=Fr((function(e,t){kr(t,Pa(t),e)})),wa=Fr((function(e,t,n,i){kr(t,Pa(t),e,i)})),Ca=Fr((function(e,t,n,i){kr(t,Na(t),e,i)})),Sa=es(si),Aa=Hi((function(e,t){e=Se(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&vs(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Pa(o),u=-1,l=a.length;++u<l;){var c=a[u],p=e[c];(p===r||zo(p,Fe[c])&&!Pe.call(e,c))&&(e[c]=o[c])}return e})),Da=Hi((function(e){return e.push(r,Zr),vt(Ra,r,e)}));function _a(e,t,n){var i=null==e?r:wi(e,t);return i===r?n:i}function ka(e,t){return null!=e&&ds(e,t,_i)}var Ta=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=n}),tu(ru)),Fa=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),os),Ia=Hi(Ti);function Na(e){return Go(e)?Jn(e):Ri(e)}function Pa(e){return Go(e)?Jn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var i in e)("constructor"!=i||!t&&Pe.call(e,i))&&n.push(i);return n}(e)}var Oa=Fr((function(e,t,n){Vi(e,t,n)})),Ra=Fr((function(e,t,n,i){Vi(e,t,n,i)})),Ma=es((function(e,t){var n={};if(null==e)return n;var i=!1;t=At(t,(function(t){return t=vr(t,e),i||(i=t.length>1),t})),kr(e,ns(e),n),i&&(n=ai(n,7,Yr));for(var r=t.length;r--;)lr(n,t[r]);return n})),La=es((function(e,t){return null==e?{}:function(e,t){return Ui(e,t,(function(t,n){return ka(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=At(ns(e),(function(e){return[e]}));return t=os(t),Ui(e,n,(function(e,n){return t(e,n[0])}))}var ja=Hr(Na),Va=Hr(Pa);function za(e){return null==e?[]:Wt(e,Na(e))}var qa=Or((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Za(xa(e).toLowerCase())}function Wa(e){return(e=xa(e))&&e.replace(ye,Jt).replace(Ke,"")}var Ka=Or((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$a=Or((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Pr("toLowerCase"),Ha=Or((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ja=Or((function(e,t,n){return e+(n?" ":"")+Za(t)})),Xa=Or((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Za=Pr("toUpperCase");function Ya(e,t,n){return e=xa(e),(t=n?r:t)===r?function(e){return Je.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qa=Hi((function(e,t){try{return vt(e,r,t)}catch(e){return Zo(e)?e:new Ee(e)}})),eu=es((function(e,t){return xt(t,(function(t){t=Ls(t),ri(e,t,Fo(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Lr(),iu=Lr(!0);function ru(e){return e}function su(e){return Oi("function"==typeof e?e:ai(e,1))}var ou=Hi((function(e,t){return function(n){return Ti(n,e,t)}})),au=Hi((function(e,t){return function(n){return Ti(e,n,t)}}));function uu(e,t,n){var i=Na(t),r=Ei(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Ei(t,Na(t)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Yo(e);return xt(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=_r(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Dt([this.value()],arguments))})})),e}function lu(){}var cu=zr(At),pu=zr(Et),hu=zr(Tt);function du(e){return ys(e)?Lt(Ls(e)):function(e){return function(t){return wi(t,e)}}(e)}var fu=Ur(),mu=Ur(!0);function gu(){return[]}function vu(){return!1}var yu,xu=Vr((function(e,t){return e+t}),0),bu=$r("ceil"),Eu=Vr((function(e,t){return e/t}),1),wu=$r("floor"),Cu=Vr((function(e,t){return e*t}),1),Su=$r("round"),Au=Vr((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new _e(s);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=ko,jn.assign=ba,jn.assignIn=Ea,jn.assignInWith=wa,jn.assignWith=Ca,jn.at=Sa,jn.before=To,jn.bind=Fo,jn.bindAll=eu,jn.bindKey=Io,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ko(e)?e:[e]},jn.chain=ho,jn.chunk=function(e,t,n){t=(n?vs(e,t,n):t===r)?1:vn(ma(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,u=i(cn(s/t));o<s;)u[a++]=tr(e,o,o+=t);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Ko(n)?_r(n):[n],gi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=os();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new _e(s);return[n(e[0]),e[1]]})):[],Hi((function(n){for(var i=-1;++i<t;){var r=e[i];if(vt(r[0],this,n))return vt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ui(n,e,t)}}(ai(e,1))},jn.constant=tu,jn.countBy=go,jn.create=function(e,t){var n=Vn(e);return null==t?n:ii(n,t)},jn.curry=function e(t,n,i){var s=Jr(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.curryRight=function e(t,n,i){var s=Jr(t,16,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.debounce=No,jn.defaults=Aa,jn.defaultsDeep=Da,jn.defer=Po,jn.delay=Oo,jn.difference=Vs,jn.differenceBy=zs,jn.differenceWith=qs,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0):[]},jn.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&vs(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=ma(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:ma(i))<0&&(i+=s),i=n>i?0:ga(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Ko(e)?wt:mi)(e,os(t,3))},jn.flatMap=function(e,t){return gi(So(e,t),1)},jn.flatMapDeep=function(e,t){return gi(So(e,t),c)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),gi(So(e,t),n)},jn.flatten=Ks,jn.flattenDeep=function(e){return null!=e&&e.length?gi(e,c):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?gi(e,t=t===r?1:ma(t)):[]},jn.flip=function(e){return Jr(e,512)},jn.flow=nu,jn.flowRight=iu,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:Ei(e,Na(e))},jn.functionsIn=function(e){return null==e?[]:Ei(e,Pa(e))},jn.groupBy=Eo,jn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},jn.intersection=Gs,jn.intersectionBy=Hs,jn.intersectionWith=Js,jn.invert=Ta,jn.invertBy=Fa,jn.invokeMap=wo,jn.iteratee=su,jn.keyBy=Co,jn.keys=Na,jn.keysIn=Pa,jn.map=So,jn.mapKeys=function(e,t){var n={};return t=os(t,3),xi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=os(t,3),xi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},jn.matches=function(e){return Bi(ai(e,1))},jn.matchesProperty=function(e,t){return ji(e,ai(t,1))},jn.memoize=Ro,jn.merge=Oa,jn.mergeWith=Ra,jn.method=ou,jn.methodOf=au,jn.mixin=uu,jn.negate=Mo,jn.nthArg=function(e){return e=ma(e),Hi((function(t){return zi(t,e)}))},jn.omit=Ma,jn.omitBy=function(e,t){return Ba(e,Mo(os(t)))},jn.once=function(e){return To(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Ko(t)||(t=null==t?[]:[t]),Ko(n=i?r:n)||(n=null==n?[]:[n]),qi(e,t,n))},jn.over=cu,jn.overArgs=Lo,jn.overEvery=pu,jn.overSome=hu,jn.partial=Bo,jn.partialRight=jo,jn.partition=Ao,jn.pick=La,jn.pickBy=Ba,jn.property=du,jn.propertyOf=function(e){return function(t){return null==e?r:wi(e,t)}},jn.pull=Zs,jn.pullAll=Ys,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,os(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,r,n):e},jn.pullAt=Qs,jn.range=fu,jn.rangeRight=mu,jn.rearg=Vo,jn.reject=function(e,t){return(Ko(e)?wt:mi)(e,Mo(os(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=os(t,3);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Ki(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new _e(s);return Hi(e,t=t===r?t:ma(t))},jn.reverse=eo,jn.sampleSize=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),(Ko(e)?Zn:Xi)(e,t)},jn.set=function(e,t,n){return null==e?e:Zi(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Zi(e,t,n,i)},jn.shuffle=function(e){return(Ko(e)?Yn:er)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&vs(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),tr(e,t,n)):[]},jn.sortBy=Do,jn.sortedUniq=function(e){return e&&e.length?sr(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?sr(e,os(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&vs(e,t,n)&&(t=n=r),(n=n===r?d:n>>>0)?(e=xa(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=ar(t))&&Yt(e)?xr(on(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new _e(s);return t=null==t?0:vn(ma(t),0),Hi((function(n){var i=n[t],r=xr(n,0,t);return i&&Dt(r,i),vt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?pr(e,os(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new _e(s);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),No(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=fo,jn.toArray=da,jn.toPairs=ja,jn.toPairsIn=Va,jn.toPath=function(e){return Ko(e)?At(e,Ls):la(e)?[e]:_r(Ms(xa(e)))},jn.toPlainObject=ya,jn.transform=function(e,t,n){var i=Ko(e),r=i||Jo(e)||ca(e);if(t=os(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:ta(e)&&Yo(s)?Vn($e(e)):{}}return(r?xt:xi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return ko(e,1)},jn.union=to,jn.unionBy=no,jn.unionWith=io,jn.uniq=function(e){return e&&e.length?ur(e):[]},jn.uniqBy=function(e,t){return e&&e.length?ur(e,os(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},jn.unset=function(e,t){return null==e||lr(e,t)},jn.unzip=ro,jn.unzipWith=so,jn.update=function(e,t,n){return null==e?e:cr(e,t,gr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,gr(n),i)},jn.values=za,jn.valuesIn=function(e){return null==e?[]:Wt(e,Pa(e))},jn.without=oo,jn.words=Ya,jn.wrap=function(e,t){return Bo(gr(t),e)},jn.xor=ao,jn.xorBy=uo,jn.xorWith=lo,jn.zip=co,jn.zipObject=function(e,t){return fr(e||[],t||[],ei)},jn.zipObjectDeep=function(e,t){return fr(e||[],t||[],Zi)},jn.zipWith=po,jn.entries=ja,jn.entriesIn=Va,jn.extend=Ea,jn.extendWith=wa,uu(jn,jn),jn.add=xu,jn.attempt=Qa,jn.camelCase=qa,jn.capitalize=Ua,jn.ceil=bu,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=va(n))==n?n:0),t!==r&&(t=(t=va(t))==t?t:0),oi(va(e),t,n)},jn.clone=function(e){return ai(e,4)},jn.cloneDeep=function(e){return ai(e,5)},jn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||ui(e,t,Na(t))},jn.deburr=Wa,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Eu,jn.endsWith=function(e,t,n){e=xa(e),t=ar(t);var i=e.length,s=n=n===r?i:oi(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},jn.eq=zo,jn.escape=function(e){return(e=xa(e))&&H.test(e)?e.replace($,Xt):e},jn.escapeRegExp=function(e){return(e=xa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Ko(e)?Et:di;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.find=vo,jn.findIndex=Us,jn.findKey=function(e,t){return It(e,os(t,3),xi)},jn.findLast=yo,jn.findLastIndex=Ws,jn.findLastKey=function(e,t){return It(e,os(t,3),bi)},jn.floor=wu,jn.forEach=xo,jn.forEachRight=bo,jn.forIn=function(e,t){return null==e?e:vi(e,os(t,3),Pa)},jn.forInRight=function(e,t){return null==e?e:yi(e,os(t,3),Pa)},jn.forOwn=function(e,t){return e&&xi(e,os(t,3))},jn.forOwnRight=function(e,t){return e&&bi(e,os(t,3))},jn.get=_a,jn.gt=qo,jn.gte=Uo,jn.has=function(e,t){return null!=e&&ds(e,t,Di)},jn.hasIn=ka,jn.head=$s,jn.identity=ru,jn.includes=function(e,t,n,i){e=Go(e)?e:za(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=vn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Pt(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Pt(e,t,r)},jn.inRange=function(e,t,n){return t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=va(e),t,n)},jn.invoke=Ia,jn.isArguments=Wo,jn.isArray=Ko,jn.isArrayBuffer=$o,jn.isArrayLike=Go,jn.isArrayLikeObject=Ho,jn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Si(e)==v},jn.isBuffer=Jo,jn.isDate=Xo,jn.isElement=function(e){return na(e)&&1===e.nodeType&&!sa(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Go(e)&&(Ko(e)||"string"==typeof e||"function"==typeof e.splice||Jo(e)||ca(e)||Wo(e)))return!e.length;var t=hs(e);if(t==w||t==_)return!e.size;if(Es(e))return!Ri(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Ii(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ii(e,t,r,n):!!i},jn.isError=Zo,jn.isFinite=function(e){return"number"==typeof e&&fn(e)},jn.isFunction=Yo,jn.isInteger=Qo,jn.isLength=ea,jn.isMap=ia,jn.isMatch=function(e,t){return e===t||Ni(e,t,us(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ni(e,t,us(t),n)},jn.isNaN=function(e){return ra(e)&&e!=+e},jn.isNative=function(e){if(bs(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pi(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=ra,jn.isObject=ta,jn.isObjectLike=na,jn.isPlainObject=sa,jn.isRegExp=oa,jn.isSafeInteger=function(e){return Qo(e)&&e>=-9007199254740991&&e<=p},jn.isSet=aa,jn.isString=ua,jn.isSymbol=la,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return na(e)&&hs(e)==F},jn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Si(e)},jn.join=function(e,t){return null==e?"":mn.call(e,t)},jn.kebabCase=Ka,jn.last=Xs,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=ma(n))<0?vn(i+s,0):yn(s,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Nt(e,Rt,s,!0)},jn.lowerCase=$a,jn.lowerFirst=Ga,jn.lt=pa,jn.lte=ha,jn.max=function(e){return e&&e.length?fi(e,ru,Ai):r},jn.maxBy=function(e,t){return e&&e.length?fi(e,os(t,2),Ai):r},jn.mean=function(e){return Mt(e,ru)},jn.meanBy=function(e,t){return Mt(e,os(t,2))},jn.min=function(e){return e&&e.length?fi(e,ru,Mi):r},jn.minBy=function(e,t){return e&&e.length?fi(e,os(t,2),Mi):r},jn.stubArray=gu,jn.stubFalse=vu,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=Cu,jn.nth=function(e,t){return e&&e.length?zi(e,ma(t)):r},jn.noConflict=function(){return st._===this&&(st._=Be),this},jn.noop=lu,jn.now=_o,jn.pad=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return qr(pn(r),n)+e+qr(cn(r),n)},jn.padEnd=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?e+qr(t-i,n):e},jn.padStart=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?qr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(xa(e).replace(ie,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vs(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=fa(e),t===r?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=En();return yn(e+s*(t-e+tt("1e-"+((s+"").length-1))),t)}return $i(e,t)},jn.reduce=function(e,t,n){var i=Ko(e)?_t:jt,r=arguments.length<3;return i(e,os(t,4),n,r,pi)},jn.reduceRight=function(e,t,n){var i=Ko(e)?kt:jt,r=arguments.length<3;return i(e,os(t,4),n,r,hi)},jn.repeat=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),Gi(xa(e),t)},jn.replace=function(){var e=arguments,t=xa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,s=(t=vr(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Ls(t[i])];o===r&&(i=s,o=n),e=Yo(o)?o.call(e):o}return e},jn.round=Su,jn.runInContext=e,jn.sample=function(e){return(Ko(e)?Xn:Ji)(e)},jn.size=function(e){if(null==e)return 0;if(Go(e))return ua(e)?sn(e):e.length;var t=hs(e);return t==w||t==_?e.size:Ri(e).length},jn.snakeCase=Ha,jn.some=function(e,t,n){var i=Ko(e)?Tt:nr;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.sortedIndex=function(e,t){return ir(e,t)},jn.sortedIndexBy=function(e,t,n){return rr(e,t,os(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&zo(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return ir(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return rr(e,t,os(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if(zo(e[n],t))return n}return-1},jn.startCase=Ja,jn.startsWith=function(e,t,n){return e=xa(e),n=null==n?0:oi(ma(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},jn.subtract=Au,jn.sum=function(e){return e&&e.length?Vt(e,ru):0},jn.sumBy=function(e,t){return e&&e.length?Vt(e,os(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&vs(e,t,n)&&(t=r),e=xa(e),t=wa({},t,i,Xr);var s,o,a=wa({},t.imports,i.imports,Xr),u=Na(a),l=Wt(a,u),c=0,p=t.interpolate||xe,h="__p += '",d=Ae((t.escape||xe).source+"|"+p.source+"|"+(p===Z?pe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),f="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ze+"]")+"\n";e.replace(d,(function(t,n,i,r,a,u){return i||(i=r),h+=e.slice(c,u).replace(be,Zt),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),h+="';\n";var m=Pe.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(U,"$1").replace(W,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa((function(){return we(u,f+"return "+h).apply(r,l)}));if(g.source=h,Zo(g))throw g;return g},jn.times=function(e,t){if((e=ma(e))<1||e>p)return[];var n=d,i=yn(e,d);t=os(t),e-=d;for(var r=zt(i,t);++n<e;)t(n);return r},jn.toFinite=fa,jn.toInteger=ma,jn.toLength=ga,jn.toLower=function(e){return xa(e).toLowerCase()},jn.toNumber=va,jn.toSafeInteger=function(e){return e?oi(ma(e),-9007199254740991,p):0===e?e:0},jn.toString=xa,jn.toUpper=function(e){return xa(e).toUpperCase()},jn.trim=function(e,t,n){if((e=xa(e))&&(n||t===r))return qt(e);if(!e||!(t=ar(t)))return e;var i=on(e),s=on(t);return xr(i,$t(i,s),Gt(i,s)+1).join("")},jn.trimEnd=function(e,t,n){if((e=xa(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=on(e);return xr(i,0,Gt(i,on(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=xa(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=on(e);return xr(i,$t(i,on(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var s="separator"in t?t.separator:s;n="length"in t?ma(t.length):n,i="omission"in t?ar(t.omission):i}var o=(e=xa(e)).length;if(Yt(e)){var a=on(e);o=a.length}if(n>=o)return e;var u=n-sn(i);if(u<1)return i;var l=a?xr(a,0,u).join(""):e.slice(0,u);if(s===r)return l+i;if(a&&(u+=l.length-u),oa(s)){if(e.slice(u).search(s)){var c,p=l;for(s.global||(s=Ae(s.source,xa(he.exec(s))+"g")),s.lastIndex=0;c=s.exec(p);)var h=c.index;l=l.slice(0,h===r?u:h)}}else if(e.indexOf(ar(s),u)!=u){var d=l.lastIndexOf(s);d>-1&&(l=l.slice(0,d))}return l+i},jn.unescape=function(e){return(e=xa(e))&&G.test(e)?e.replace(K,un):e},jn.uniqueId=function(e){var t=++Oe;return xa(e)+t},jn.upperCase=Xa,jn.upperFirst=Za,jn.each=xo,jn.eachRight=bo,jn.first=$s,uu(jn,(yu={},xi(jn,(function(e,t){Pe.call(jn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jn.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),xt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:vn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,d),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:os(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),xt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Hi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ti(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Mo(os(e)))},Un.prototype.slice=function(e,t){e=ma(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ma(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(d)},xi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=jn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Un,l=a[0],c=u||Ko(t),p=function(e){var t=s.apply(jn,Dt([e],a));return i&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,f=o&&!h,m=u&&!d;if(!o&&c){t=m?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:fo,args:[p],thisArg:r}),new qn(g,h)}return f&&m?e.apply(this,a):(g=this.thru(p),f?i?g.value()[0]:g.value():g)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ke[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Ko(r)?r:[],e)}return this[n]((function(n){return t.apply(Ko(n)?n:[],e)}))}})),xi(Un.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Pe.call(Fn,i)||(Fn[i]=[]),Fn[i].push({name:t,func:n})}})),Fn[Br(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=_r(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_r(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_r(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ko(e),i=t<0,r=n?e.length:0,s=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=yn(t,e+o);break;case"takeRight":e=vn(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=s.start,a=s.end,u=a-o,l=i?a:o-1,c=this.__iteratees__,p=c.length,h=0,d=yn(u,this.__takeCount__);if(!n||!i&&r==u&&d==u)return hr(e,this.__actions__);var f=[];e:for(;u--&&h<d;){for(var m=-1,g=e[l+=t];++m<p;){var v=c[m],y=v.iteratee,x=v.type,b=y(g);if(2==x)g=b;else if(!b){if(1==x)continue e;break e}}f[h++]=g}return f},jn.prototype.at=mo,jn.prototype.chain=function(){return ho(this)},jn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var i=js(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},jn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:fo,args:[eo],thisArg:r}),new qn(t,this.__chain__)}return this.thru(eo)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return hr(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,ot&&(jn.prototype[ot]=function(){return this}),jn}();st._=ln,(i=function(){return ln}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},7866:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MongoLogManager=t.MongoLogWriter=t.mongoLogId=void 0;const r=n(345),s=n(7702),o=n(2048),a=i(n(5315)),u=n(6162),l=n(1764),c=n(1568);function p(e){return{__value:e}}t.mongoLogId=p;class h extends u.Writable{constructor(e,t,n,i){super({objectMode:!0}),this.mongoLogId=p,this._logId=e,this._logFilePath=t,this._target=n,this._now=null!=i?i:()=>new Date}get logId(){return this._logId}get logFilePath(){return this._logFilePath}get target(){return this._target}_write(e,t,i){var s;const o=function(e){var t;return"string"!=typeof e.s?new TypeError("Cannot log messages without a severity field"):"string"!=typeof e.c?new TypeError("Cannot log messages without a component field"):"number"!=typeof(null===(t=e.id)||void 0===t?void 0:t.__value)?new TypeError("Cannot log messages without an id field"):"string"!=typeof e.ctx?new TypeError("Cannot log messages without a context field"):"string"!=typeof e.msg?new TypeError("Cannot log messages without a message field"):null}(e);if(o)return void i(o);const a={t:null!==(s=e.t)&&void 0!==s?s:this._now(),s:e.s,c:e.c,id:e.id.__value,ctx:e.ctx,msg:e.msg};e.attr&&("[object Error]"===Object.prototype.toString.call(e.attr)?a.attr={stack:e.attr.stack,name:e.attr.name,message:e.attr.message,code:e.attr.code,...e.attr}:a.attr=e.attr),this.emit("log",a);try{r.EJSON.stringify(a.attr)}catch(e){try{const e=n(9672),t=e.deserialize(e.serialize(a.attr));r.EJSON.stringify(t),a.attr=t}catch(e){try{const e=JSON.parse(JSON.stringify(a.attr));r.EJSON.stringify(e),a.attr=e}catch(e){a.attr={_inspected:(0,l.inspect)(a.attr)}}}}this._target.write(r.EJSON.stringify(a,{relaxed:!0})+"\n",i)}_final(e){this._target.end(e)}async flush(){await new Promise((e=>this._target.write("",e)))}info(e,t,n,i,r){const s={s:"I",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}warn(e,t,n,i,r){const s={s:"W",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}error(e,t,n,i,r){const s={s:"E",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}fatal(e,t,n,i,r){const s={s:"F",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}bindComponent(e){return{unbound:this,component:e,write:(t,n)=>this.write({c:e,...t},n),info:this.info.bind(this,e),warn:this.warn.bind(this,e),error:this.error.bind(this,e),fatal:this.fatal.bind(this,e)}}}t.MongoLogWriter=h,t.MongoLogManager=class{constructor(e){this._options=e}async cleanupOldLogfiles(){var e,t;const n=this._options.directory;let i;try{i=await o.promises.opendir(n)}catch(e){return}for await(const s of i){if(!s.isFile())continue;const{id:i}=null!==(t=null===(e=s.name.match(/^(?<id>[a-f0-9]{24})_log(\.gz)?$/i))||void 0===e?void 0:e.groups)&&void 0!==t?t:{};if(i&&new r.ObjectId(i).generationTime<Date.now()/1e3-86400*this._options.retentionDays){const e=a.default.join(n,s.name);try{await o.promises.unlink(e)}catch(t){this._options.onerror(t,e)}}}}async createLogWriter(){const e=(new r.ObjectId).toString(),t=!!this._options.gzip,n=a.default.join(this._options.directory,`${e}_log${t?".gz":""}`);let i,l,p;try{l=(0,o.createWriteStream)(n,{mode:384}),i=l,await(0,s.once)(l,"ready"),t?(l=(0,c.createGzip)({flush:c.constants.Z_SYNC_FLUSH,level:c.constants.Z_MAX_LEVEL}),l.pipe(i)):l.on("finish",(()=>l.emit("log-finish")))}catch(t){this._options.onwarn(t,n),l=new u.Writable({write(e,t,n){n()}}),i=l,p=new h(e,null,l)}return p||(p=new h(e,n,l)),i.on("finish",(()=>null==p?void 0:p.emit("log-finish"))),p}}},4935:e=>{function t(e){if(!(this instanceof t))return new t(e);this.ns=e,this.dotIndex=e.indexOf("."),-1===this.dotIndex?(this.database=e,this.collection=""):(this.database=e.slice(0,this.dotIndex),this.collection=e.slice(this.dotIndex+1)),this.system=/^(?:system|enxcol_)\./.test(this.collection),this.oplog=/local\.oplog\.(\$main|rs)/.test(e),this.command="$cmd"===this.collection||0===this.collection.indexOf("$cmd.sys"),this.special=this.oplog||this.command||this.system||"config"===this.database,this.specialish=this.special||["local","admin"].indexOf(this.database)>-1,this.normal=this.oplog||-1===this.ns.indexOf("$"),this.validDatabaseName=new RegExp('^[^\\\\/". ]*$').test(this.database)&&this.database.length<=t.MAX_DATABASE_NAME_LENGTH,this.validCollectionName=this.collection.length>0&&(this.oplog||/^[^\0\$]*$/.test(this.collection)),this.databaseHash=7,this.ns.split("").every(function(e,t){return"."!==e&&(this.databaseHash+=11*this.ns.charCodeAt(t),this.databaseHash*=3,!0)}.bind(this))}t.prototype.database="",t.prototype.databaseHash=0,t.prototype.collection="",t.prototype.command=!1,t.prototype.special=!1,t.prototype.system=!1,t.prototype.oplog=!1,t.prototype.normal=!1,t.prototype.specialish=!1,["Command","Special","System","Oplog","Normal","Conf"].forEach((function(e){t.prototype["is"+e]=function(){return this[e.toLowerCase()]}})),t.prototype.toString=function(){return this.ns},t.MAX_DATABASE_NAME_LENGTH=128,e.exports=t;var n=t;e.exports.sort=function(e){return e.sort((function(e,t){return n(e).specialish&&n(t).specialish?0:n(e).specialish&&!n(t).specialish?1:!n(e).specialish&&n(t).specialish?-1:e>t?1:-1})),e}},1378:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8726:(e,t,n)=>{"use strict";var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(9497),o=u(s),a=u(n(23));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||d()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return h&&e?o.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=i({},this.props.style);t.display||(t.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,o.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),o.default.createElement("input",i({},r,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(s.Component);f.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},8559:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=(n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n?Symbol.for("react.fragment"):60107),r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,u=(n&&Symbol.for("react.async_mode"),n?Symbol.for("react.concurrent_mode"):60111),l=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116,f=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===r||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===h||e.$$typeof===o||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===f)}},3920:(e,t,n)=>{"use strict";e.exports=n(8559)},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6625:(e,t)=>{var n;t=e.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,r=t.re=[],s=t.src=[],o=0,a=o++;s[a]="0|[1-9]\\d*";var u=o++;s[u]="[0-9]+";var l=o++;s[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var c=o++;s[c]="("+s[a]+")\\.("+s[a]+")\\.("+s[a]+")";var p=o++;s[p]="("+s[u]+")\\.("+s[u]+")\\.("+s[u]+")";var h=o++;s[h]="(?:"+s[a]+"|"+s[l]+")";var d=o++;s[d]="(?:"+s[u]+"|"+s[l]+")";var f=o++;s[f]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=o++;s[m]="(?:-?("+s[d]+"(?:\\."+s[d]+")*))";var g=o++;s[g]="[0-9A-Za-z-]+";var v=o++;s[v]="(?:\\+("+s[g]+"(?:\\."+s[g]+")*))";var y=o++,x="v?"+s[c]+s[f]+"?"+s[v]+"?";s[y]="^"+x+"$";var b="[v=\\s]*"+s[p]+s[m]+"?"+s[v]+"?",E=o++;s[E]="^"+b+"$";var w=o++;s[w]="((?:<|>)?=?)";var C=o++;s[C]=s[u]+"|x|X|\\*";var S=o++;s[S]=s[a]+"|x|X|\\*";var A=o++;s[A]="[v=\\s]*("+s[S]+")(?:\\.("+s[S]+")(?:\\.("+s[S]+")(?:"+s[f]+")?"+s[v]+"?)?)?";var D=o++;s[D]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var _=o++;s[_]="^"+s[w]+"\\s*"+s[A]+"$";var k=o++;s[k]="^"+s[w]+"\\s*"+s[D]+"$";var T=o++;s[T]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var F=o++;s[F]="(?:~>?)";var I=o++;s[I]="(\\s*)"+s[F]+"\\s+",r[I]=new RegExp(s[I],"g");var N=o++;s[N]="^"+s[F]+s[A]+"$";var P=o++;s[P]="^"+s[F]+s[D]+"$";var O=o++;s[O]="(?:\\^)";var R=o++;s[R]="(\\s*)"+s[O]+"\\s+",r[R]=new RegExp(s[R],"g");var M=o++;s[M]="^"+s[O]+s[A]+"$";var L=o++;s[L]="^"+s[O]+s[D]+"$";var B=o++;s[B]="^"+s[w]+"\\s*("+b+")$|^$";var j=o++;s[j]="^"+s[w]+"\\s*("+x+")$|^$";var V=o++;s[V]="(\\s*)"+s[w]+"\\s*("+b+"|"+s[A]+")",r[V]=new RegExp(s[V],"g");var z=o++;s[z]="^\\s*("+s[A]+")\\s+-\\s+("+s[A]+")\\s*$";var q=o++;s[q]="^\\s*("+s[D]+")\\s+-\\s+("+s[D]+")\\s*$";var U=o++;s[U]="(<|>)?=?\\s*\\*";for(var W=0;W<35;W++)n(W,s[W]),r[W]||(r[W]=new RegExp(s[W]));function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?r[E]:r[y]).test(e))return null;try{return new $(e,t)}catch(e){return null}}function $(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?r[E]:r[y]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}t.parse=K,t.valid=function(e,t){var n=K(e,t);return n?n.version:null},t.clean=function(e,t){var n=K(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=$,$.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},$.prototype.toString=function(){return this.version},$.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof $||(e=new $(e,this.options)),this.compareMain(e)||this.comparePre(e)},$.prototype.compareMain=function(e){return e instanceof $||(e=new $(e,this.options)),H(this.major,e.major)||H(this.minor,e.minor)||H(this.patch,e.patch)},$.prototype.comparePre=function(e){if(e instanceof $||(e=new $(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var i=this.prerelease[t],r=e.prerelease[t];if(n("prerelease compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return H(i,r)}while(++t)},$.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,i){"string"==typeof n&&(i=n,n=void 0);try{return new $(e,n).inc(t,i).version}catch(e){return null}},t.diff=function(e,t){if(Y(e,t))return null;var n=K(e),i=K(t),r="";if(n.prerelease.length||i.prerelease.length){r="pre";var s="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==i[o])return r+o;return s},t.compareIdentifiers=H;var G=/^[0-9]+$/;function H(e,t){var n=G.test(e),i=G.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1}function J(e,t,n){return new $(e,n).compare(new $(t,n))}function X(e,t,n){return J(e,t,n)>0}function Z(e,t,n){return J(e,t,n)<0}function Y(e,t,n){return 0===J(e,t,n)}function Q(e,t,n){return 0!==J(e,t,n)}function ee(e,t,n){return J(e,t,n)>=0}function te(e,t,n){return J(e,t,n)<=0}function ne(e,t,n,i){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Y(e,n,i);case"!=":return Q(e,n,i);case">":return X(e,n,i);case">=":return ee(e,n,i);case"<":return Z(e,n,i);case"<=":return te(e,n,i);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===re?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return H(t,e)},t.major=function(e,t){return new $(e,t).major},t.minor=function(e,t){return new $(e,t).minor},t.patch=function(e,t){return new $(e,t).patch},t.compare=J,t.compareLoose=function(e,t){return J(e,t,!0)},t.rcompare=function(e,t,n){return J(t,e,n)},t.sort=function(e,n){return e.sort((function(e,i){return t.compare(e,i,n)}))},t.rsort=function(e,n){return e.sort((function(e,i){return t.rcompare(e,i,n)}))},t.gt=X,t.lt=Z,t.eq=Y,t.neq=Q,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=ie;var re={};function se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,i,r,s,o,a,u,l,c,p,h){return((t=oe(n)?"":oe(i)?">="+n+".0.0":oe(r)?">="+n+"."+i+".0":">="+t)+" "+(a=oe(u)?"":oe(l)?"<"+(+u+1)+".0.0":oe(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+a)).trim()}function ue(e,t,i){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!i.includePrerelease){for(r=0;r<e.length;r++)if(n(e[r].semver),e[r].semver!==re&&e[r].semver.prerelease.length>0){var s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}function le(e,t,n){try{t=new se(t,n)}catch(e){return!1}return t.test(e)}function ce(e,t,n,i){var r,s,o,a,u;switch(e=new $(e,i),t=new se(t,i),n){case">":r=X,s=te,o=Z,a=">",u=">=";break;case"<":r=Z,s=ee,o=X,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,i))return!1;for(var l=0;l<t.set.length;++l){var c=t.set[l],p=null,h=null;if(c.forEach((function(e){e.semver===re&&(e=new ie(">=0.0.0")),p=p||e,h=h||e,r(e.semver,p.semver,i)?p=e:o(e.semver,h.semver,i)&&(h=e)})),p.operator===a||p.operator===u)return!1;if((!h.operator||h.operator===a)&&s(e,h.semver))return!1;if(h.operator===u&&o(e,h.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?r[B]:r[j],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=re},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===re||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),le(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),le(e.semver,n,t);var i=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||r||s&&o||a||u},t.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var i=t?r[q]:r[z];e=e.replace(i,ae),n("hyphen replace",e),e=e.replace(r[V],"$1$2$3"),n("comparator trim",e,r[V]),e=(e=(e=e.replace(r[I],"$1~")).replace(r[R],"$1^")).split(/\s+/).join(" ");var s=t?r[B]:r[j],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var i=t.loose?r[L]:r[M];return e.replace(i,(function(t,i,r,s,o){var a;return n("caret",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a="0"===i?">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":">="+i+"."+r+".0 <"+(+i+1)+".0.0":o?(n("replaceCaret pr",o),a="0"===i?"0"===r?">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+"-"+o+" <"+(+i+1)+".0.0"):(n("no pr"),a="0"===i?"0"===r?">="+i+"."+r+"."+s+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+" <"+(+i+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var i=t.loose?r[P]:r[N];return e.replace(i,(function(t,i,r,s,o){var a;return n("tilde",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a=">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":o?(n("replaceTilde pr",o),a=">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0"):a=">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var i=t.loose?r[k]:r[_];return e.replace(i,(function(t,i,r,s,o,a){n("xRange",e,t,i,r,s,o,a);var u=oe(r),l=u||oe(s),c=l||oe(o);return"="===i&&c&&(i=""),u?t=">"===i||"<"===i?"<0.0.0":"*":i&&c?(l&&(s=0),o=0,">"===i?(i=">=",l?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===i&&(i="<",l?r=+r+1:s=+s+1),t=i+r+"."+s+"."+o):l?t=">="+r+".0.0 <"+(+r+1)+".0.0":c&&(t=">="+r+"."+s+".0 <"+r+"."+(+s+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(r[U],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(s)}))),o.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t<this.set.length;t++)if(ue(this.set[t],e,this.options))return!0;return!1},t.satisfies=le,t.maxSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&-1!==r.compare(e)||(r=new $(i=e,n)))})),i},t.minSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&1!==r.compare(e)||(r=new $(i=e,n)))})),i},t.minVersion=function(e,t){e=new se(e,t);var n=new $("0.0.0");if(e.test(n))return n;if(n=new $("0.0.0-0"),e.test(n))return n;n=null;for(var i=0;i<e.set.length;++i)e.set[i].forEach((function(e){var t=new $(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!X(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return ce(e,t,"<",n)},t.gtr=function(e,t,n){return ce(e,t,">",n)},t.outside=ce,t.prerelease=function(e,t){var n=K(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(r[T]);return null==t?null:K(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},4880:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8957:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2156)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2156:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(4880),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},2069:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7471)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7471:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},345:e=>{"use strict";e.exports=require("bson")},5840:e=>{"use strict";e.exports=require("electron")},7702:e=>{"use strict";e.exports=require("events")},2048:e=>{"use strict";e.exports=require("fs")},9801:e=>{"use strict";e.exports=require("os")},5315:e=>{"use strict";e.exports=require("path")},23:e=>{"use strict";e.exports=require("prop-types")},9497:e=>{"use strict";e.exports=require("react")},6162:e=>{"use strict";e.exports=require("stream")},1764:e=>{"use strict";e.exports=require("util")},9672:e=>{"use strict";e.exports=require("v8")},1568:e=>{"use strict";e.exports=require("zlib")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}},o=!0;try{e[i].call(s.exports,s,s.exports,n),o=!1}finally{o&&delete t[i]}return s.loaded=!0,s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(4719)})()}));
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AggregationsPlugin=t():e.AggregationsPlugin=t()}(self,(function(){return(()=>{var e={3168:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Aggregations:()=>iv,CreateViewPlugin:()=>ry,DuplicateViewPlugin:()=>cy,PipelineStorage:()=>lr,StageEditor:()=>Sd,activate:()=>yy,configureCreateViewStore:()=>dy,configureStore:()=>Sv,deactivate:()=>xy,default:()=>by,metadata:()=>fy});var i=n(9497),r=n.n(i),s=n(23),o=n.n(s);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}var l=o().shape({trySubscribe:o().func.isRequired,tryUnsubscribe:o().func.isRequired,notifyNestedSubs:o().func.isRequired,isSubscribed:o().func.isRequired}),c=o().shape({subscribe:o().func.isRequired,dispatch:o().func.isRequired,getState:o().func.isRequired});r().forwardRef;const p=function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",r=function(t){u(s,t);var r=s.prototype;function s(n,i){var r;return(r=t.call(this,n,i)||this)[e]=n.store,r}return r.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.render=function(){return i.Children.only(this.props.children)},s}(i.Component);return r.propTypes={store:c.isRequired,children:o().element.isRequired},r.childContextTypes=((t={})[e]=c.isRequired,t[n]=l,t),r}();function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}var m=n(3463),g=n.n(m),v=n(7677),y=n.n(v),x=n(3920),b=null,E={notify:function(){}},w=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=E}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=b,e=b},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},get:function(){return t},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==b&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=E)},e}(),C=void 0!==r().forwardRef,S=0,A={};function D(){}var _=Object.prototype.hasOwnProperty;function k(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(k(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!_.call(t,n[r])||!k(e[n[r]],t[n[r]]))return!1;return!0}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var O="function"==typeof Symbol&&Symbol.observable||"@@observable",R=function(){return Math.random().toString(36).substring(7).split("").join(".")},M={INIT:"@@redux/INIT"+R(),REPLACE:"@@redux/REPLACE"+R(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+R()}};function L(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function B(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(P(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(P(1));return n(B)(e,t)}if("function"!=typeof e)throw new Error(P(2));var r=e,s=t,o=[],a=o,u=!1;function l(){a===o&&(a=o.slice())}function c(){if(u)throw new Error(P(3));return s}function p(e){if("function"!=typeof e)throw new Error(P(4));if(u)throw new Error(P(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(P(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),o=null}}}function h(e){if(!L(e))throw new Error(P(7));if(void 0===e.type)throw new Error(P(8));if(u)throw new Error(P(9));try{u=!0,s=r(s,e)}finally{u=!1}for(var t=o=a,n=0;n<t.length;n++)(0,t[n])();return e}function d(e){if("function"!=typeof e)throw new Error(P(10));r=e,h({type:M.REPLACE})}function f(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(P(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[O]=function(){return this},e}return h({type:M.INIT}),(i={dispatch:h,subscribe:p,getState:c,replaceReducer:d})[O]=f,i}function j(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:M.INIT}))throw new Error(P(12));if(void 0===n(void 0,{type:M.PROBE_UNKNOWN_ACTION()}))throw new Error(P(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var i=!1,r={},a=0;a<o.length;a++){var u=o[a],l=n[u],c=e[u],p=l(c,t);if(void 0===p)throw t&&t.type,new Error(P(14));r[u]=p,i=i||p!==c}return(i=i||o.length!==Object.keys(e).length)?r:e}}function V(e,t){return function(){return t(e.apply(this,arguments))}}function z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(P(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},s=t.map((function(e){return e(r)}));return i=z.apply(void 0,s)(n.dispatch),N(N({},n),{},{dispatch:i})}}}function U(e){return function(t,n){var i=e(t,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function W(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function K(e,t){return function(t,n){n.displayName;var i=function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)};return i.dependsOnOwnProps=!0,i.mapToProps=function(t,n){i.mapToProps=e,i.dependsOnOwnProps=W(e);var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=W(r),r=i(t,n)),r},i}}function $(e,t,n){return d({},n,e,t)}const H=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var i,r=n.pure,s=n.areMergedPropsEqual,o=!1;return function(t,n,a){var u=e(t,n,a);return o?r&&s(u,i)||(i=u):(o=!0,i=u),i}}}(e):void 0},function(e){return e?void 0:function(){return $}}];function G(e,t,n,i){return function(r,s){return n(e(r,s),t(i,s),s)}}function J(e,t,n,i,r){var s,o,a,u,l,c=r.areStatesEqual,p=r.areOwnPropsEqual,h=r.areStatePropsEqual,d=!1;return function(r,f){return d?function(r,d){var f,m,g=!p(d,o),v=!c(r,s);return s=r,o=d,g&&v?(a=e(s,o),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):g?(e.dependsOnOwnProps&&(a=e(s,o)),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):v?(f=e(s,o),m=!h(f,a),a=f,m&&(l=n(a,u,o)),l):l}(r,f):(a=e(s=r,o=f),u=t(i,o),l=n(a,u,o),d=!0,l)}}function X(e,t,n){for(var i=t.length-1;i>=0;i--){var r=t[i](e);if(r)return r}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function Z(e,t){return e===t}const Y=(ee=(Q={}).connectHOC,te=void 0===ee?function(e,t){var n,r;void 0===t&&(t={});var s=t,o=s.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,p=s.methodName,m=void 0===p?"connectAdvanced":p,v=s.renderCountProp,b=void 0===v?void 0:v,E=s.shouldHandleStateChanges,_=void 0===E||E,k=s.storeKey,T=void 0===k?"store":k,F=s.withRef,I=void 0!==F&&F,N=f(s,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=T+"Subscription",O=S++,R=((n={})[T]=c,n[P]=l,n),M=((r={})[P]=l,r);return function(t){y()((0,x.isValidElementType)(t),"You must pass a component to the function returned by "+m+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",r=a(n),s=d({},N,{getDisplayName:a,methodName:m,renderCountProp:b,shouldHandleStateChanges:_,storeKey:T,withRef:I,displayName:r,wrappedComponentName:n,WrappedComponent:t}),o=function(n){function o(e,t){var i;return(i=n.call(this,e,t)||this).version=O,i.state={},i.renderCount=0,i.store=e[T]||t[T],i.propsMode=Boolean(e[T]),i.setWrappedInstance=i.setWrappedInstance.bind(h(h(i))),y()(i.store,'Could not find "'+T+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+T+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}u(o,n);var a=o.prototype;return a.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},a.componentDidMount=function(){_&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.componentWillReceiveProps=function(e){this.selector.run(e)},a.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=D,this.store=null,this.selector.run=D,this.selector.shouldComponentUpdate=!1},a.getWrappedInstance=function(){return y()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+m+"() call."),this.wrappedInstance},a.setWrappedInstance=function(e){this.wrappedInstance=e},a.initSelector=function(){var t=e(this.store.dispatch,s);this.selector=function(e,t){var n={run:function(i){try{var r=e(t.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},a.initSubscription=function(){if(_){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new w(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(A)):this.notifyNestedSubs()},a.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.addExtraProps=function(e){if(!(I||b||this.propsMode&&this.subscription))return e;var t=d({},e);return I&&(t.ref=this.setWrappedInstance),b&&(t[b]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},a.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return(0,i.createElement)(t,this.addExtraProps(e.props))},o}(i.Component);return C&&(o.prototype.UNSAFE_componentWillReceiveProps=o.prototype.componentWillReceiveProps,delete o.prototype.componentWillReceiveProps),o.WrappedComponent=t,o.displayName=r,o.childContextTypes=M,o.contextTypes=R,o.propTypes=R,g()(o,t)}}:ee,ie=void 0===(ne=Q.mapStateToPropsFactories)?[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:U((function(){return{}}))}]:ne,se=void 0===(re=Q.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:U((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?U((function(t){return function(e,t){if("function"==typeof e)return V(e,t);if("object"!=typeof e||null===e)throw new Error(P(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=V(r,t))}return n}(e,t)})):void 0}]:re,ae=void 0===(oe=Q.mergePropsFactories)?H:oe,le=void 0===(ue=Q.selectorFactory)?function(e,t){var n=t.initMapStateToProps,i=t.initMapDispatchToProps,r=t.initMergeProps,s=f(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,s),a=i(e,s),u=r(e,s);return(s.pure?J:G)(o,a,u,e,s)}:ue,function(e,t,n,i){void 0===i&&(i={});var r=i,s=r.pure,o=void 0===s||s,a=r.areStatesEqual,u=void 0===a?Z:a,l=r.areOwnPropsEqual,c=void 0===l?T:l,p=r.areStatePropsEqual,h=void 0===p?T:p,m=r.areMergedPropsEqual,g=void 0===m?T:m,v=f(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=X(e,ie,"mapStateToProps"),x=X(t,se,"mapDispatchToProps"),b=X(n,ae,"mergeProps");return te(le,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:b,pure:o,areStatesEqual:u,areOwnPropsEqual:c,areStatePropsEqual:h,areMergedPropsEqual:g},v))});var Q,ee,te,ne,ie,re,se,oe,ae,ue,le,ce=n(2779),pe=n.n(ce);const he=require("@mongodb-js/compass-components"),de=require("hadron-react-buttons");var fe=n(9388),me=n.n(fe),ge=n(6053),ve=n.n(ge),ye=n(1914),xe=n.n(ye),be=n(6566),Ee=n.n(be),we=n(370),Ce=n.n(we),Se=n(6682),Ae=n.n(Se),De=n(3981),_e={};_e.styleTagTransform=Ae(),_e.setAttributes=Ee(),_e.insert=xe().bind(null,"head"),_e.domAPI=ve(),_e.insertStyleElement=Ce(),me()(De.Z,_e);const ke=De.Z&&De.Z.locals?De.Z.locals:void 0;class Te extends i.PureComponent{static displayName="RestorePipelineButtonComponent";static propTypes={clickHandler:o().func.isRequired};render(){const e=pe()({btn:!0,"btn-xs":!0,"btn-default":!0,[ke["restore-pipeline-button"]]:!0});return r().createElement("div",{className:pe()(ke["restore-pipeline"])},r().createElement(de.TextButton,{text:"Open",className:e,clickHandler:this.props.clickHandler}))}}const Fe=Te;var Ie=n(1101),Ne={};Ne.styleTagTransform=Ae(),Ne.setAttributes=Ee(),Ne.insert=xe().bind(null,"head"),Ne.domAPI=ve(),Ne.insertStyleElement=Ce(),me()(Ie.Z,Ne);const Pe=Ie.Z&&Ie.Z.locals?Ie.Z.locals:void 0;class Oe extends i.PureComponent{static displayName="DeletePipelineButtonComponent";static propTypes={clickHandler:o().func.isRequired};render(){const e=pe()({btn:!0,"btn-xs":!0,"btn-default":!0,[Pe["delete-pipeline-button"]]:!0});return r().createElement("div",{className:pe()(Pe["delete-pipeline"])},r().createElement(de.IconButton,{title:"Delete",className:e,iconClassName:"fa fa-trash-o",clickHandler:this.props.clickHandler}))}}const Re=Oe;var Me=n(7866);Me.MongoLogManager;const Le=Me.MongoLogWriter,Be=Me.mongoLogId;var je=n(4283),Ve=n.n(je),ze=n(8957),qe=n.n(ze);function Ue(e,t,n){e?.callQuiet?.(t,n),"undefined"!=typeof process&&"function"==typeof process.emit&&process.emit(t,n)}function We(e){const t=Ve()?n(5709):null,i=new Le("",null,{write(e,n){Ue(t,"compass:log",{line:e}),n()},end(e){e()}}),r=async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.g?.hadronApp?.isFeatureEnabled("trackUsageStatistics");if(!r)return;const s={event:e,properties:i};"function"==typeof i&&(s.properties=await i()),Ue(t,"compass:track",s)},s=qe()(`mongodb-compass:${e.toLowerCase()}`);return i.on("log",(e=>{let{s:t,ctx:n,msg:i,attr:r}=e;s(i,r?{s:t,ctx:n,...r}:{s:t,ctx:n})})),{log:i.bindComponent(e),mongoLogId:Be,debug:s,track:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((()=>r(...t))).catch((e=>s("track failed",e)))}}}const Ke=We;var $e=n(2099),He={};He.styleTagTransform=Ae(),He.setAttributes=Ee(),He.insert=xe().bind(null,"head"),He.domAPI=ve(),He.insertStyleElement=Ce(),me()($e.Z,He);const Ge=$e.Z&&$e.Z.locals?$e.Z.locals:void 0,{track:Je}=We("COMPASS-AGGREGATIONS-UI");class Xe extends i.PureComponent{static displayName="SavePipelineCardComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,deletePipeline:o().func.isRequired,objectID:o().string.isRequired,name:o().string.isRequired};handleDelete=()=>{this.props.deletePipeline(this.props.objectID),Je("Aggregation Deleted",{id:this.props.objectID,screen:"aggregations"})};restoreClickHandler=()=>{this.props.restorePipelineFrom(this.props.objectID),this.props.restorePipelineModalToggle(1)};render(){return r().createElement("div",{className:pe()(Ge["save-pipeline-card"]),"data-pipeline-object-id":this.props.objectID},r().createElement("div",{className:pe()(Ge["save-pipeline-card-title"])},this.props.name),r().createElement(Fe,{clickHandler:this.restoreClickHandler}),r().createElement(Re,{clickHandler:this.handleDelete}))}}const Ze=Xe;var Ye=n(9593),Qe={};Qe.styleTagTransform=Ae(),Qe.setAttributes=Ee(),Qe.insert=xe().bind(null,"head"),Qe.domAPI=ve(),Qe.insertStyleElement=Ce(),me()(Ye.Z,Qe);const et=Ye.Z&&Ye.Z.locals?Ye.Z.locals:void 0;class tt extends i.Component{static displayName="SavePipelineComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,deletePipeline:o().func.isRequired,savedPipelinesListToggle:o().func.isRequired,savedPipeline:o().object.isRequired};handleSavedPipelinesClose=()=>{this.props.savedPipelinesListToggle(0)};render(){const e=this.props.savedPipeline.pipelines.map(((e,t)=>r().createElement(Ze,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,name:e.name,objectID:e.id,key:t}))),t=pe()({[et["save-pipeline"]]:!0,[et["save-pipeline-is-visible"]]:this.props.savedPipeline.isListVisible});return r().createElement("div",{className:t},r().createElement("div",{className:pe()(et["save-pipeline-header"])},r().createElement("div",{id:"saved-pipeline-header-title"},"Saved Pipelines"),r().createElement(de.IconButton,{title:"Close Saved Pipelines",className:"btn btn-xs btn-default",iconClassName:"fa fa-times",clickHandler:this.handleSavedPipelinesClose})),r().createElement("div",{className:pe()(et["save-pipeline-cards"])},e))}}const nt=tt,it=6e4,rt=1e5,st={$addFields:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/#pipe._S_addFields",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value."},$bucket:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucket/#pipe._S_bucket",tooltip:"Categorizes incoming documents into groups, called buckets, based on specified boundaries."},$bucketAuto:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#pipe._S_bucketAuto",tooltip:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible."},$collStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/collStats/#pipe._S_collStats",tooltip:"Returns statistics regarding a collection or view."},$count:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/count/#pipe._S_count",tooltip:"Returns a count of the number of documents at this stage of the aggregation pipeline."},$currentOp:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/#pipe._S_currentOp",tooltip:""},$densify:{link:"https://docs.mongodb.com/rapid/reference/operator/aggregation/densify",tooltip:"Creates new documents in a sequence of documents where certain values in a field are missing."},$documents:{link:"https://docs.mongodb.com/v5.1/reference/operator/aggregation/documents/#mongodb-pipeline-pipe.-documents",tooltip:"Returns literal documents from input values."},$facet:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/facet/#pipe._S_facet",tooltip:"Allows for multiple parallel aggregations to be specified."},$geoNear:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear",tooltip:"Returns documents based on proximity to a geospatial point."},$graphLookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#pipe._S_graphLookup",tooltip:"Performs a recursive search on a collection. To each output document, adds a new array field that contains the traversal results of the recursive search for that document."},$group:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/group/#pipe._S_group",tooltip:"Groups documents by a specified expression."},$indexStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/#pipe._S_indexStats",tooltip:"Returns statistics regarding the use of each index for the collection."},$limit:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/limit/#pipe._S_limit",tooltip:"Limits the number of documents that flow into subsequent stages."},$listLocalSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/#pipe._S_listLocalSessions",tooltip:""},$listSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listSessions/#pipe._S_listSessions",tooltip:""},$lookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#pipe._S_lookup",tooltip:"Performs a join between two collections."},$match:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/match/#pipe._S_match",tooltip:"Filters the document stream to allow only matching documents to pass through to subsequent stages."},$merge:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/merge/#pipe._S_merge",tooltip:"Merges the resulting documents into a collection, optionally overriding existing documents."},$out:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/out/#pipe._S_out",tooltip:"Writes the result of a pipeline to a new or existing collection."},$project:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/project/#pipe._S_project",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields."},$redact:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact",tooltip:"Restricts the content for each document based on information stored in the documents themselves."},$replaceRoot:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceRoot/#pipe._S_replaceRoot",tooltip:"Replaces a document with the specified embedded document."},$replaceWith:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/",tooltip:"Replaces a document with the specified embedded document."},$sample:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample",tooltip:"Randomly selects the specified number of documents from its input."},$search:{link:"https://docs.atlas.mongodb.com/reference/full-text-search/query-syntax/#pipe._S_search",tooltip:"Performs a full-text search on the specified field(s)."},$searchMeta:{link:"https://docs.atlas.mongodb.com/reference/atlas-search/query-syntax-dupl/#mongodb-pipeline-pipe.-searchMeta",tooltip:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query."},$set:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/set/#pipe._S_set",tooltip:"Adds new fields to documents."},$skip:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/skip/#pipe._S_skip",tooltip:"Skips a specified number of documents before advancing to the next stage."},$sort:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#pipe._S_sort",tooltip:"Reorders the document stream by a specified sort key and direction."},$sortByCount:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/#pipe._S_sortByCount",tooltip:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group."},$unset:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unset/",tooltip:"Removes or excludes fields from documents."},$unwind:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind",tooltip:"Outputs a new document for each element in a specified array. "}};var ot=n(6252),at={};at.styleTagTransform=Ae(),at.setAttributes=Ee(),at.insert=xe().bind(null,"head"),at.domAPI=ve(),at.insertStyleElement=Ce(),me()(ot.Z,at);const ut=ot.Z&&ot.Z.locals?ot.Z.locals:void 0;class lt extends i.PureComponent{static displayName="Settings";static propTypes={isAtlasDeployed:o().bool.isRequired,isCommenting:o().bool.isRequired,isExpanded:o().bool.isRequired,limit:o().number.isRequired,largeLimit:o().number.isRequired,maxTimeMS:o().number.isRequired,settings:o().object.isRequired,toggleSettingsIsExpanded:o().func.isRequired,toggleSettingsIsCommentMode:o().func.isRequired,setSettingsSampleSize:o().func.isRequired,setSettingsMaxTimeMS:o().func.isRequired,setSettingsLimit:o().func.isRequired,applySettings:o().func.isRequired,runStage:o().func.isRequired};onCancelClicked(e){e.preventDefault(),e.stopPropagation(),this.props.toggleSettingsIsExpanded()}onCommentModeClicked(){this.props.toggleSettingsIsCommentMode()}onSampleSizeChanged(e){this.props.setSettingsSampleSize(parseInt(e.currentTarget.value,10))}onMaxTimeoutChanged(e){this.props.setSettingsMaxTimeMS(parseInt(e.currentTarget.value,10))}onLimitChanged(e){this.props.setSettingsLimit(parseInt(e.currentTarget.value,10))}onApplyClicked(e){e.preventDefault(),e.stopPropagation(),this.props.applySettings(),this.props.runStage(0,!0),this.props.toggleSettingsIsExpanded()}renderLargeLimit(){if(!this.props.isAtlasDeployed){let e=this.props.largeLimit;return this.props.settings.isDirty&&(e=this.props.settings.limit),r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-limit"},"Limit"),r().createElement("div",{id:"aggregation-limit-description"},r().createElement(he.Description,null,"Limits input documents before $group, $bucket, and $bucketAuto stages. Set a limit to make the preview run faster."),r().createElement(he.Description,null,"Note: this setting is only applied for the document previews, it is not applied when the pipeline is run."))),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-limit","aria-describedby":"aggregation-limit-description",type:"number",min:"0",placeholder:rt,value:e,onChange:this.onLimitChanged.bind(this)})))}}renderFields(){let e=this.props.isCommenting,t=this.props.limit;return this.props.settings.isDirty&&(e=this.props.settings.isCommentMode,t=this.props.settings.sampleSize),r().createElement("div",{className:pe()(ut.body)},r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-comment-mode"},"Comment Mode"),r().createElement(he.Description,{id:"aggregation-comment-mode-description"},"When enabled, adds helper comments to each stage. Only applies to new stages.")),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-comment-mode","aria-describedby":"aggregation-comment-mode-description",type:"checkbox",checked:e,onChange:this.onCommentModeClicked.bind(this)}))),r().createElement("div",{className:pe()(ut["input-group"])},r().createElement("div",{className:pe()(ut["input-meta"])},r().createElement(he.Label,{htmlFor:"aggregation-sample-size"},"Number of Preview Documents"),r().createElement(he.Description,{id:"aggregation-sample-size-description"},"Specify the number of documents to show in the preview.")),r().createElement("div",{className:pe()(ut["input-control"])},r().createElement("input",{id:"aggregation-sample-size","aria-describedby":"aggregation-sample-size-description",type:"number",min:"0",placeholder:10,value:t,onChange:this.onSampleSizeChanged.bind(this)}))),this.renderLargeLimit())}render(){return this.props.isExpanded?r().createElement("div",{className:pe()(ut.container)},r().createElement("div",{className:pe()(ut.header)},r().createElement("div",{className:pe()(ut["header-title"])},"Settings"),r().createElement("div",{className:pe()(ut["header-btn-group"])},r().createElement(de.TextButton,{id:"aggregations-settings-cancel",className:"btn btn-default btn-xs",text:"Cancel",clickHandler:this.onCancelClicked.bind(this)}),r().createElement(de.TextButton,{id:"aggregation-settings-apply",className:"btn btn-primary btn-xs",text:"Apply",clickHandler:this.onApplyClicked.bind(this)}))),this.renderFields()):null}}const ct=lt,{track:pt}=We("COMPASS-AGGREGATIONS-UI");class ht extends i.Component{static displayName="RestorePipelineModalComponent";static propTypes={restorePipelineModalToggle:o().func.isRequired,openPipelineById:o().func.isRequired,restorePipeline:o().object.isRequired};onRestorePipelineModalToggle=()=>{this.props.restorePipelineModalToggle(0)};openPipeline=()=>{const e=this.props.restorePipeline.pipelineObjectID;pt("Aggregation Opened",{id:e,screen:"aggregations"}),this.props.openPipelineById(e)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to open this pipeline?",open:this.props.restorePipeline.isModalVisible,onConfirm:this.openPipeline,onCancel:this.onRestorePipelineModalToggle,buttonText:"Open Pipeline",trackingId:"restore_pipeline_modal"},"Opening this project will abandon ",r().createElement("b",null,"unsaved")," changes to the current pipeline you are building.")}}const dt=ht;var ft=n(5287),mt={};mt.styleTagTransform=Ae(),mt.setAttributes=Ee(),mt.insert=xe().bind(null,"head"),mt.domAPI=ve(),mt.insertStyleElement=Ce(),me()(ft.Z,mt);const gt=ft.Z&&ft.Z.locals?ft.Z.locals:void 0;class vt extends i.PureComponent{static displayName="ImportPipelineComponent";static propTypes={isOpen:o().bool.isRequired,closeImport:o().func.isRequired,changeText:o().func.isRequired,createNew:o().func.isRequired,text:o().string.isRequired,error:o().string};renderError(){if(this.props.error)return r().createElement("div",{className:gt["import-pipeline-error"]},this.props.error)}render(){return r().createElement(he.ConfirmationModal,{title:"New Pipeline From Plain Text",open:this.props.isOpen,onConfirm:this.props.createNew,onCancel:this.props.closeImport,buttonText:"Create New",submitDisabled:""===this.props.text,trackingId:"import_pipeline_modal"},r().createElement("div",{className:gt["import-pipeline-note"]},"Supports MongoDB Shell syntax. Pasting a pipeline will create a new pipeline."),r().createElement("div",{className:gt["import-pipeline-editor"]},r().createElement(he.Editor,{variant:he.EditorVariant.Shell,text:this.props.text,onChangeText:this.props.changeText,options:{minLines:10},name:"import-pipeline-editor"})),this.renderError())}}const yt=vt;var xt=n(1570),bt={};bt.styleTagTransform=Ae(),bt.setAttributes=Ee(),bt.insert=xe().bind(null,"head"),bt.domAPI=ve(),bt.insertStyleElement=Ce(),me()(xt.Z,bt);const Et=xt.Z&&xt.Z.locals?xt.Z.locals:void 0;class wt extends i.PureComponent{static displayName="ConfirmImportPipelineComponent";static propTypes={isConfirmationNeeded:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,closeImport:o().func.isRequired,confirmNew:o().func.isRequired,runStage:o().func.isRequired};onConfirm=()=>{this.props.confirmNew(),this.props.isAutoPreviewing&&this.props.runStage(0,!0)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isConfirmationNeeded,onConfirm:this.onConfirm,onCancel:this.props.closeImport,buttonText:"Confirm",trackingId:"confirm_import_pipeline_modal"},r().createElement("div",{className:Et["confirm-import-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const Ct=wt;class St extends i.PureComponent{static displayName="SavingPipelineModalComponent";static propTypes={isOpen:o().bool.isRequired,isSaveAs:o().bool.isRequired,name:o().string.isRequired,savingPipelineCancel:o().func.isRequired,savingPipelineApply:o().func.isRequired,savingPipelineNameChanged:o().func.isRequired,saveCurrentPipeline:o().func.isRequired,clonePipeline:o().func.isRequired};onNameChanged(e){this.props.savingPipelineNameChanged(e.currentTarget.value)}onSubmit(e){e.preventDefault(),e.stopPropagation(),this.save()}save(){this.props.isSaveAs&&this.props.clonePipeline(),this.props.savingPipelineApply(),this.props.saveCurrentPipeline()}render(){const e=this.props.isSaveAs?"Save Pipeline As...":"Save Pipeline";return r().createElement(he.ConfirmationModal,{title:e,open:this.props.isOpen,onConfirm:this.save.bind(this),onCancel:this.props.savingPipelineCancel,buttonText:"Save",submitDisabled:""===this.props.name,trackingId:"save_pipeline_modal"},r().createElement("form",{onSubmit:this.onSubmit.bind(this)},r().createElement("input",{id:"save-pipeline-name",type:"text",value:this.props.name,onChange:this.onNameChanged.bind(this),className:"form-control",placeholder:"Untitled"})))}}const At=St;var Dt=n(3777),_t={};_t.styleTagTransform=Ae(),_t.setAttributes=Ee(),_t.insert=xe().bind(null,"head"),_t.domAPI=ve(),_t.insertStyleElement=Ce(),me()(Dt.Z,_t);const kt=Dt.Z&&Dt.Z.locals?Dt.Z.locals:void 0;class Tt extends i.PureComponent{static displayName="ConfirmNewPipelineComponent";static propTypes={isNewPipelineConfirm:o().bool.isRequired,setIsNewPipelineConfirm:o().func.isRequired,newPipeline:o().func.isRequired};onConfirm=()=>{this.props.newPipeline(),this.onClose()};onClose=()=>{this.props.setIsNewPipelineConfirm(!1)};render(){return r().createElement(he.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isNewPipelineConfirm,onConfirm:this.onConfirm,onCancel:this.onClose,buttonText:"Confirm",trackingId:"confirm_new_pipeline_modal"},r().createElement("div",{className:kt["confirm-new-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const Ft=Tt;var It=n(4686),Nt={};Nt.styleTagTransform=Ae(),Nt.setAttributes=Ee(),Nt.insert=xe().bind(null,"head"),Nt.domAPI=ve(),Nt.insertStyleElement=Ce(),me()(It.Z,Nt);const Pt=It.Z&&It.Z.locals?It.Z.locals:void 0;n(7526),n(3354),n(5870),n(930),n(574),n(4116),n(3267),n(4614),n(9852),n(4306),n(6077),n(1072),n(183);const Ot=require("mongodb-ace-autocompleter"),Rt=require("mongodb-query-parser");var Mt=n.n(Rt),Lt=n(7386),Bt=n.n(Lt),jt=n(4935),Vt=n.n(jt);const zt="Stage must be a properly formatted document.";function qt(){const e=Mt()(...arguments);if(""===e)throw new Error(zt);return e}function Ut(e,t){const n=[];if("$project"!==e.stageOperator)return n;if($t(e))return n;if(!t){t={};try{const n=Bt()(e.stage);t[e.stageOperator]=qt(n)}catch(e){return n}}const i=t[e.stageOperator];return Object.keys(i).map((e=>{const t=i[e];t&&n.push({name:e,value:e,score:1,meta:JSON.stringify(t),version:"0.0.0"})})),n}function Wt(e){try{return qt(Bt()(e.stage)),{isValid:!0,syntaxError:null}}catch(e){return{isValid:!1,syntaxError:zt}}}function Kt(e){if($t(e))return{};const t={};try{const n=Bt()(e.stage);t[e.stageOperator]=qt(n)}catch(t){return e.syntaxError=zt,e.isValid=!1,e.previewDocuments=[],{}}return e.projections=Ut(e,t),e.isValid=!0,e.syntaxError=null,t}function $t(e){return!e.isEnabled||!e.stageOperator||""===e.stage}function Ht(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{database:n}=Vt()(e),{stage:i,stageOperator:r}=t;let s;try{s=qt(i)}catch{s={}}if("$merge"===r){const e="string"==typeof s?s:s.into;return"object"==typeof e?`${e.db}.${e.coll}`:`${n}.${e}`}if("$out"===r){if(s.s3)return null;const e=s;return"object"==typeof e?`${e.db}.${e.coll}`:`${n}.${e}`}return null}var Gt=n(2563),Jt=n.n(Gt),Xt=n(345),Zt=n(594),Yt=n.n(Zt),Qt=n(6496),en=n.n(Qt),tn=n(6625),nn=n.n(tn);function rn(e){return e?.every((e=>e===Ot.ATLAS))}function sn(e){return!e?.outputStage||"true"!==process?.env?.HADRON_READONLY}const on=e=>e.map(Kt).filter((e=>Object.keys(e).length>0)),an="aggregations/id/CREATE_ID",un=()=>({type:an}),ln="aggregations/projections/PROJECTIONS_CHANGED",cn=[],pn=()=>({type:ln}),hn="aggregations/is-modified/SET_IS_MODIFIED",dn=!1,fn=e=>({type:hn,isModified:e});let mn;!function(e){e.AutoPreviewToggled="compass-aggregations/autoPreviewToggled"}(mn||(mn={}));const gn=!0,vn=e=>t=>{t({type:mn.AutoPreviewToggled,value:e}),e&&t(ti(0,!0))},{track:yn}=We("COMPASS-AGGREGATIONS-UI"),xn="aggregations/pipeline",bn=`${xn}/STAGE_ADDED`,En=`${xn}/STAGE_ADDED_AFTER`,wn=`${xn}/STAGE_CHANGED`,Cn=`${xn}/STAGE_COLLAPSE_TOGGLED`,Sn=`${xn}/STAGE_DELETED`,An=`${xn}/STAGE_MOVED`,Dn=`${xn}/STAGE_OPERATOR_SELECTED`,_n=`${xn}/STAGE_TOGGLED`,kn=`${xn}/STAGE_PREVIEW_UPDATED`,Tn=`${xn}/LOADING_STAGE_RESULTS`,Fn=(Object.freeze({$limit:10}),Object.freeze({$limit:rt}),["$collStats","$currentOp","$indexStats","$listLocalSessions","$listSessions"]),In=["$group","$bucket","$bucketAuto"],Nn="$out",Pn="$merge",On="$search",Rn="$searchMeta",Mn="$documents",Ln=()=>({id:(new Xt.ObjectId).toHexString(),stageOperator:"",stage:"",isValid:!0,isEnabled:!0,isExpanded:!0,isLoading:!1,isComplete:!1,previewDocuments:[],syntaxError:null,error:null,projections:[]}),Bn=[Ln()],jn=e=>e.map((e=>Object.assign({},e))),Vn=(e,t,n)=>{const i=((e,t)=>Ot.STAGE_OPERATORS.find((n=>n.name===e&&n.env.includes(t))))(e,n),r=(i||{}).snippet||"{\n \n}",s=(i||{}).comment||"";return(t?`${s}${r}`:r).replace(/\${[0-9]+:?([a-z0-9.()]+)?}/gi,(function(e,t){return t??""}))},zn={};zn[wn]=(e,t)=>{const n=jn(e);n[t.index].stage=t.stage,n[t.index].isComplete=!1;const{isValid:i,syntaxError:r}=Wt(n[t.index]);return n[t.index].isValid=i,n[t.index].syntaxError=r,n},zn[bn]=e=>{const t=jn(e),n={...Ln()};return t.push(n),t},zn[En]=(e,t)=>{const n=jn(e),i={...Ln()};return n.splice(Number(t.index)+1,0,i),n},zn[Sn]=(e,t)=>{const n=jn(e);return n.splice(t.index,1),n},zn[An]=(e,t)=>{const n=jn(e);return n.splice(t.toIndex,0,n.splice(t.fromIndex,1)[0]),n},zn[Dn]=(e,t)=>{const n=t.stageOperator,i=e[t.index];if(n===i.stageOperator)return e;let r;var s,o;s=i,o=t.env,r=s.stageOperator&&s.stage&&Bt()(s.stage)!==Vn(s.stageOperator,!1,o)?i.stage:Vn(n,t.isCommenting,t.env);const a=jn(e);a[t.index].stageOperator=n,a[t.index].stage=r,a[t.index].isExpanded=!0,a[t.index].isComplete=!1,a[t.index].previewDocuments=[],a[t.index].isMissingAtlasOnlyStageSupport=!(![On,Rn,Mn].includes(n)||t.env===Ot.ADL||t.env===Ot.ATLAS);const{isValid:u,syntaxError:l}=Wt(a[t.index]);return a[t.index].isValid=u,a[t.index].syntaxError=l,a[t.index].error=null,a},zn[_n]=(e,t)=>{const n=jn(e);return n[t.index].isEnabled=!n[t.index].isEnabled,n},zn[Cn]=(e,t)=>{const n=jn(e);return n[t.index].isExpanded=!n[t.index].isExpanded,n},zn[kn]=(e,t)=>{const n=jn(e);return[On,Rn,Mn].includes(n[t.index].stageOperator)&&t.env!==Ot.ADL&&t.env!==Ot.ATLAS&&t.error&&(40324===t.error.code||31082===t.error.code)?(n[t.index].previewDocuments=[],n[t.index].error=null,n[t.index].isMissingAtlasOnlyStageSupport=!0):(n[t.index].previewDocuments=null===t.error||void 0===t.error?t.documents:[],n[t.index].error=t.error?t.error.message:null,n[t.index].isMissingAtlasOnlyStageSupport=!1),n[t.index].isLoading=!1,n[t.index].isComplete=t.isComplete,n},zn[Tn]=(e,t)=>{const n=jn(e);return n[t.index].isLoading=!0,n},zn[mn.AutoPreviewToggled]=(e,t)=>!1===t.value?jn(e).map((e=>(e.error=null,e))):e;const qn=()=>(e,t)=>{const{pipeline:n}=t();yn("Aggregation Edited",{num_stages:n.length,stage_action:"stage_added",stage_name:null}),e({type:bn})},Un=(e,t,n,i,r)=>({type:kn,documents:e,index:t,error:n,isComplete:i,env:r}),Wn=e=>({type:Tn,index:e}),Kn=(e,t)=>{const n=e.inputDocuments.count,i=e.largeLimit||rt;return e.pipeline.reduce(((r,s,o)=>(o<=t&&s.isEnabled&&(("N/A"===n&&e.sample||n>i&&In.includes(s.stageOperator)&&e.sample)&&r.push({$limit:i}),r.push(s.executor||Kt(s))),r)),[])},$n=(e,t)=>{let n=!1;return Hn.get(e)?.(),Hn.set(e,(()=>{n=!0})),e=>{n||t(e)}},Hn=new Map,Gn=new Map,Jn=(e,t,n,i,r)=>{const s=i().pipeline[r];s.executor=Kt(s),s.isValid&&s.isEnabled&&s.stageOperator&&s.stageOperator!==Nn&&s.stageOperator!==Pn?ei(e,t,n,i,r):n(Un([],r,null,!1,i().env))},Xn=e=>{if(Gn.has(e))return Gn.get(e);{const t=Yt()(Jn,750,{leading:!1,trailing:!0});return Gn.set(e,t),t}},Zn=function(e,t,n,i,r){let s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const o=`${i().aggregationWorkspaceId}::${r}`,a=$n(o,n),u=Xn(o);if(s)return u.cancel(),void Jn(e,t,a,i,r);u(e,t,a,i,r)},Yn=e=>(t,n)=>{const{aggregationWorkspaceId:i}=n(),r="number"==typeof e?t=>t===`${i}::${String(e)}`:e=>e.startsWith(`${i}::`);for(const[e,t]of Gn.entries())r(e)&&(t.cancel(),Gn.delete(e));for(const[e,t]of Hn.entries())r(e)&&(t(),Hn.delete(e))},Qn=(e,t,n,i,r,s)=>{const o={maxTimeMS:r().maxTimeMS??it,allowDiskUse:!0,collation:r().collationString.value??void 0};t.aggregate(n,e,o,((e,t)=>{if(e)return i(Un([],s,e,!1,r().env));t.toArray(((e,n)=>{i(Un(n||[],s,e,!0,r().env)),t.close(),i((0,Gt.globalAppRegistryEmit)("agg-pipeline-executed",{id:r().id,numStages:r().pipeline.length,stageOperators:r().pipeline.map((e=>e.stageOperator))}))}))}))},ei=(e,t,n,i,r)=>{n(Wn(r));const s=((e,t)=>{const n=Kn(e,t),i=e.pipeline[e.pipeline.length-1];return n.length>0&&!Fn.includes(i.stageOperator)&&n.push({$limit:e.limit||10}),n})(i(),r);Qn(s,e,t,n,i,r)},ti=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(n,i)=>{const r=i();if(!r.autoPreview)return;if(e>=r.pipeline.length)return void n(Yn(e));""===r.id&&n(un());const{dataService:s}=r.dataService;if(s){const o=r.namespace;for(let a=e;a<r.pipeline.length;a++)Zn(s,o,n,i,a,t)}}},ni="PromiseCancelledError";class ii extends Error{name=ni}const ri=()=>new ii("The operation was cancelled.");const{log:si,mongoLogId:oi}=Ke("compass-aggregations"),ai={promoteValues:!1,allowDiskUse:!0,bsonRegExp:!0};async function ui(e){let{dataService:t,signal:n,namespace:i,pipeline:r,options:s,skip:o,limit:a}=e;if(n.aborted)return Promise.reject(ri());const u=t.startSession("CRUD"),l=t.aggregate(i,r.concat(o?[{$skip:o}]:[]).concat(a?[{$limit:a}]:[]),{...ai,...s,session:u}),c=()=>{Promise.all([l.close(),t.killSessions(u)]).catch((e=>{si.warn(oi(1001000105),"Aggregations","Attempting to kill the session failed",{error:e.message})}))};let p;n.addEventListener("abort",c,{once:!0});try{p=await async function(e,t){if(t.aborted)return Promise.reject(ri());const n=new AbortController,i=function(e,t){if(e.aborted)return Promise.reject(ri());let n;const i=new Promise((function(e,t){n=t})),r=()=>{t.removeEventListener("abort",s),n(ri())},s=()=>{e.removeEventListener("abort",r)};return e.addEventListener("abort",r,{once:!0}),t.addEventListener("abort",s,{once:!0}),i}(t,n.signal);try{return await Promise.race([i,e])}finally{t.aborted||n.abort()}}(l.toArray(),n)}finally{n.removeEventListener("abort",c),p=p||[]}return p}const{log:li,mongoLogId:ci,track:pi}=We("COMPASS-AGGREGATIONS-UI");let hi;!function(e){e.AggregationStarted="compass-aggregations/aggregationStarted",e.AggregationFinished="compass-aggregations/aggregationFinished",e.AggregationFailed="compass-aggregations/aggregationFailed",e.AggregationCancelledByUser="compass-aggregations/aggregationCancelledByUser",e.LastPageReached="compass-aggregations/lastPageReached"}(hi||(hi={}));const di={documents:[],page:1,limit:20,isLast:!1,loading:!1},fi=()=>(e,t)=>{pi("Aggregation Canceled");const{aggregation:{abortController:n}}=t();mi(n),e({type:hi.AggregationCancelledByUser})},mi=e=>{e?.abort()},gi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return async(t,n)=>{const{id:i,pipeline:r,namespace:s,maxTimeMS:o,dataService:{dataService:a},aggregation:{limit:u,abortController:l},collationString:{value:c}}=n();if(a){mi(l);try{const n=new AbortController,l=n.signal;t({type:hi.AggregationStarted,abortController:n});const p=on(r),h={maxTimeMS:o??it,collation:c??void 0},d=p[p.length-1]??{},f=["$merge","$out"].includes(Object.keys(d)[0]),m=await ui({dataService:a,signal:l,namespace:s,pipeline:p,options:h,...!f&&{skip:(e-1)*u,limit:u}});f&&t((0,Gt.globalAppRegistryEmit)("agg-pipeline-out-executed",{id:i})),0===m.length?t({type:hi.LastPageReached,page:e}):t({type:hi.AggregationFinished,documents:m,page:e,isLast:m.length<u})}catch(n){if(n.name===ni)return;if(n.code)return t({type:hi.AggregationFailed,error:n.message,page:e}),"MaxTimeMSExpired"===n.codeName&&pi("Aggregation Timed Out",{max_time_ms:o??null}),void li.warn(ci(1001000106),"Aggregations","Failed to run aggregation",{message:n.message});throw n}}}};let vi;!function(e){e.CountStarted="compass-aggregations/countStarted",e.CountFinished="compass-aggregations/countFinished",e.CountFailed="compass-aggregations/countFailed"}(vi||(vi={}));const yi={loading:!1};let xi;!function(e){e.WorkspaceChanged="compass-aggregations/workspaceChanged"}(xi||(xi={}));const bi="builder",Ei=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),wi=(0,he.css)({padding:0}),Ci=(0,he.css)({border:"none",padding:0,backgroundColor:"transparent",span:{backgroundImage:"none !important"}}),Si=Y((e=>{let{pipeline:t,workspace:n}=e;return{stages:t.filter((e=>e.isEnabled)).map((e=>{let{stageOperator:t}=e;return t})).filter(Boolean),showAddNewStage:0===t.length,isResultsMode:"results"===n}}),{onStageAdded:qn,onChangeWorkspace:e=>t=>{"builder"===e&&(t(fi()),t(((e,t)=>{const{countDocuments:{abortController:n}}=t();n?.abort()}))),t({type:xi.WorkspaceChanged,view:e})}})((e=>{let{isResultsMode:t,stages:n,showAddNewStage:i,onStageAdded:s,onChangeWorkspace:o}=e;return r().createElement("div",{className:Ei,"data-testid":"toolbar-pipeline-stages"},0===n.length?r().createElement(he.Description,{className:(0,he.cx)(wi)},"Your pipeline is currently empty.",i&&r().createElement(r().Fragment,null," ","To get started select the ",r().createElement(he.Link,{className:Ci,as:"button",onClick:()=>s(),hideExternalIcon:!0,"data-testid":"pipeline-toolbar-add-stage-button"},"first stage."))):r().createElement(he.Pipeline,{size:"small"},n.map(((e,t)=>r().createElement(he.Stage,{key:`${t}-${e}`},e)))),t&&r().createElement(he.Button,{"data-testid":"pipeline-toolbar-edit-button",variant:"primaryOutline",size:"small",onClick:()=>o("builder"),leftGlyph:r().createElement(he.Icon,{glyph:"Edit"})},"Edit"))})),{track:Ai,debug:Di}=We("COMPASS-AGGREGATIONS-UI"),_i=null,ki="aggregations/update-view/ERROR_UPDATING_VIEW",Ti="aggregations/update-view/DISMISS_VIEW_UPDATE_ERROR",Fi=e=>({type:ki,error:`${e}`}),Ii=()=>({type:Ti}),Ni=()=>(e,t)=>{e(Ii());const n=t(),i=n.dataService.dataService,r=n.editViewName,s=n.pipeline.map((e=>e.executor||Kt(e))),o={viewOn:Vt()(n.namespace).collection,pipeline:s};try{Di("calling data-service.updateCollection",r),i.updateCollection(r,o,(t=>{if(t)return Di("error updating view",t),void e(Fi(t));e((0,Gt.globalAppRegistryEmit)("refresh-data")),Ai("View Updated",{num_stages:s.length}),e((0,Gt.globalAppRegistryEmit)("compass:aggregations:update-view",{numStages:s.length}));const i={namespace:r,isReadonly:!0,sourceName:n.namespace,editViewName:null,sourceReadonly:n.isReadonly,sourceViewOn:n.sourceName,sourcePipeline:s};Di("selecting namespace",i),e((0,Gt.globalAppRegistryEmit)("select-namespace",i))}))}catch(t){Di("Unexpected error updating view",t),e(Fi(t))}};var Pi=n(4767),Oi=n.n(Pi);const Ri=e=>{const t=e.stages[0],n=(0,Pi.getStageCursorKey)(t);if(!n)throw new Error("Can not find a cursor stage.");return Li(t[n])},Mi=e=>{const t=Object.keys(e.shards)[0],n=e.shards[t];return n.stages?Ri(n):Li(n)},Li=e=>e.queryPlanner,Bi=e=>e.queryPlanner.winningPlan.shards[0],ji=e=>{const t=e.stages[0],n=(0,Pi.getStageCursorKey)(t);if(!n)throw new Error("Can not find a cursor stage.");const i=e.stages[e.stages.length-1],r=zi(t[n]);return r.nReturned=i.nReturned,r.stageIndexes=Ui(e.stages),r.executionTimeMillis=function(e,t){const[,...n]=t;return e.executionTimeMillis+qi(n,"executionTimeMillisEstimate")}(r,e.stages),r},Vi=e=>{const t=[];let n=[];for(const i in e.shards){const r=e.shards[i].stages?ji(e.shards[i]):zi(e.shards[i]);t.push({shardName:i,...r}),n=n.concat(Ui(e.shards[i].stages??[],i))}const i=qi(t,"nReturned"),r=qi(t,"executionTimeMillis"),s=qi(t,"totalKeysExamined"),o=qi(t,"totalDocsExamined");return{nReturned:i,executionTimeMillis:r,totalKeysExamined:s,totalDocsExamined:o,allPlansExecution:[],executionSuccess:!0,stageIndexes:n,executionStages:{stage:1===t.length?"SINGLE_SHARD":"SHARD_MERGE",nReturned:i,executionTimeMillis:r,totalKeysExamined:s,totalDocsExamined:o,shards:t}}},zi=e=>e.executionStats;function qi(e,t){return e.reduce(((e,n)=>e+Number(n[t]??0)),0)}function Ui(e,t){return e.reduce(((e,t)=>e.concat(t?.indexesUsed??[])),[]).map((e=>({index:e,shard:t??null})))}const Wi=Symbol("ExplainPlan.kParent");class Ki{constructor(e){const t=Oi()(e),n=(e=>(0,Pi.isAggregationExplain)(e)?(e=>(0,Pi.isShardedAggregationExplain)(e)?Vi(e):ji(e))(e):zi(e))(t);Ki.addParentStages(n.executionStages);const i=(e=>{const t=(0,Pi.isAggregationExplain)(e)?(e=>(0,Pi.isShardedAggregationExplain)(e)?Mi(e):Ri(e))(e):(e=>(0,Pi.isShardedFindExplain)(e)?Bi(e):Li(e))(e);return{namespace:t.namespace,parsedQuery:t.parsedQuery}})(t),r=n?.executionStages?.shards?.[0]??n;this.executionStats=n,this.namespace=i.namespace,this.parsedQuery=i.parsedQuery,this.executionSuccess=r.executionSuccess,this.nReturned=n.nReturned,this.executionTimeMillis=n.executionTimeMillis,this.totalKeysExamined=n.totalKeysExamined,this.totalDocsExamined=n.totalDocsExamined,this.originalExplainData=e}get usedIndexes(){const e=this.findAllStagesByName("IXSCAN"),t=this.findStageByName("IDHACK"),n=this.executionStats.stageIndexes??[];for(const i of[...e,t]){if(!i)continue;let e=null;if(this.isSharded)for(const t of Ki.getParentStages(i))if("string"==typeof t.shardName){e=t.shardName;break}const r=i===t?"_id_":i.indexName;n.push({index:r,shard:e})}if(this.isSharded)for(const e of this.executionStats.executionStages.shards)n.some((t=>t.shard===e.shardName))||n.push({index:null,shard:e.shardName});return n.filter(((e,t,n)=>n.findIndex((t=>t.index===e.index&&t.shard===e.shard))===t))}get isCovered(){return!(this.totalDocsExamined>0)&&"FETCH"!==this.findStageByName("IXSCAN")?.parentName}get isMultiKey(){return this.findAllStagesByName("IXSCAN").some((e=>e.isMultiKey))}get inMemorySort(){return 0!==this.findAllStagesByName("SORT").length}get isCollectionScan(){return null!==this.findStageByName("COLLSCAN")}get isSharded(){return!!this.executionStats.executionStages.shards}get numShards(){return this.isSharded?this.executionStats.executionStages.shards.length:0}findStageByName(e,t){for(const n of this._getStageIterator(t))if(n.stage===e)return n;return null}findAllStagesByName(e,t){return[...this._getStageIterator(t)].filter((t=>t.stage===e))}*_getStageIterator(e){const t=e??this.executionStats.executionStages;yield t;for(const e of Ki.getChildStages(t))yield*this._getStageIterator(e)}static*getChildStages(e){e.inputStage&&(yield e.inputStage),e.executionStages&&(yield e.executionStages),e.innerStage&&(yield e.innerStage),e.outerStage&&(yield e.outerStage),e.thenStage&&(yield e.thenStage),e.elseStage&&(yield e.elseStage),e.shards&&(yield*e.shards),e.inputStages&&(yield*e.inputStages)}static addParentStages(e){e[Wi]=null;for(const t of Ki.getChildStages(e))Ki.addParentStages(t),t[Wi]=e}static*getParentStages(e){let t=e;for(;t=t?.[Wi];)yield t}}const{log:$i,mongoLogId:Hi,track:Gi}=We("COMPASS-AGGREGATIONS-UI");let Ji;!function(e){e.ExplainStarted="compass-aggregations/explainStarted",e.ExplainFinished="compass-aggregations/explainFinished",e.ExplainFailed="compass-aggregations/explainFailed",e.ExplainCancelled="compass-aggregations/explainCancelled"}(Ji||(Ji={}));const Xi={isLoading:!1,isModalOpen:!1},Zi=()=>(e,t)=>{const{explain:{abortController:n}}=t();n?.abort(),e({type:Ji.ExplainCancelled})},Yi=function(e,t){return t.filter((e=>e.index)).map((t=>{const n=e.find((e=>e.name===t.index));return{name:t.index,shard:t.shard,key:n?.key??{}}})).filter(Boolean)},Qi=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),er={onUpdateView:Ni,onRunAggregation:()=>(e,t)=>{const{pipeline:n}=t();return pi("Aggregation Executed",(()=>({num_stages:on(n).length}))),e(gi())},onExportAggregationResults:()=>(e,t)=>{const{pipeline:n,namespace:i,maxTimeMS:r,countDocuments:{count:s},collationString:{value:o}}=t(),a=on(n),u={maxTimeMS:r??it,allowDiskUse:!0,collation:o??void 0};e((0,Gt.globalAppRegistryEmit)("open-export",{namespace:i,aggregation:{stages:a,options:u},count:s}))},onExplainAggregation:()=>async(e,t)=>{const{isDataLake:n,pipeline:i,namespace:r,maxTimeMS:s,dataService:{dataService:o},indexes:a,collationString:{value:u}}=t();if(o)try{const t=new AbortController,l=t.signal;e({type:Ji.ExplainStarted,abortController:t});const c={maxTimeMS:s??it,allowDiskUse:!0,collation:u??void 0},p=on(i),h=((e,t)=>{if(t)return"queryPlannerExtended";const n=e[e.length-1]??{};return Object.prototype.hasOwnProperty.call(n,"$out")||Object.prototype.hasOwnProperty.call(n,"$merge")?"queryPlanner":"allPlansExecution"})(p,n),d=await o.explainAggregate(r,p,c,{abortSignal:l,explainVerbosity:h}),f={plan:d};try{const{nReturned:t,executionTimeMillis:n,usedIndexes:i}=new Ki(d),r={executionTimeMillis:n,nReturned:t,indexes:Yi(a,i)};f.stats=r}catch(e){$i.warn(Hi(1001000137),"Explain","Failed to parse aggregation explain",{message:e.message})}finally{Gi("Aggregation Explained",{num_stages:p.length,index_used:f.stats?.indexes?.length??0}),e({type:Ji.ExplainFinished,explain:f})}}catch(t){o.isOperationCancelledError(t)||(e({type:Ji.ExplainFailed,error:t.message}),$i.error(Hi(1001000138),"Explain","Failed to run aggregation explain",{message:t.message}))}}},tr=Y((e=>{let{pipeline:t,editViewName:n,isModified:i}=e;const r=t.filter((e=>!$t(e))),s=r[r.length-1],o=["$merge","$out"].includes(s?.stageOperator),a=r.some((e=>!e.isValid||Boolean(e.error))),u=0===t.length;return{isRunButtonDisabled:a||u,isExplainButtonDisabled:a,isExportButtonDisabled:o||a||u,showUpdateViewButton:Boolean(n),isUpdateViewButtonDisabled:!i||a||u}}),er)((e=>{let{isOptionsVisible:t,showRunButton:n,isRunButtonDisabled:i,showExportButton:s,isExportButtonDisabled:o,showUpdateViewButton:a,isUpdateViewButtonDisabled:u,isExplainButtonDisabled:l,showExplainButton:c,onUpdateView:p,onRunAggregation:h,onToggleOptions:d,onExportAggregationResults:f,onExplainAggregation:m}=e;return r().createElement("div",{className:Qi},a&&r().createElement(he.Button,{"aria-label":"Update view","data-testid":"pipeline-toolbar-update-view-aggregation-button",variant:"primary",size:"small",onClick:p,disabled:u},"Update view"),c&&r().createElement(he.Button,{"aria-label":"Explain aggregation","data-testid":"pipeline-toolbar-explain-aggregation-button",variant:"default",size:"small",onClick:m,disabled:l},"Explain"),!a&&s&&r().createElement(he.Button,{"aria-label":"Export aggregation","data-testid":"pipeline-toolbar-export-aggregation-button",variant:"default",size:"small",onClick:f,disabled:o},"Export"),!a&&n&&r().createElement(he.Button,{"aria-label":"Run aggregation","data-testid":"pipeline-toolbar-run-button",variant:"primary",size:"small",onClick:h,disabled:i},"Run"),r().createElement(he.MoreOptionsToggle,{isExpanded:!!t,"aria-controls":"pipeline-options",id:"pipeline-toolbar-options","data-testid":"pipeline-toolbar-options-button",onToggleOptions:d}))})),nr=()=>{const{remote:e}=n(5840),t=n(5315),i=process.env.MONGODB_COMPASS_AGGREGATIONS_TEST_BASE_PATH||e.app.getPath("userData");return t.join(i,"SavedPipelines")};var ir=n(2048),rr=n.n(ir),sr=n(5315),or=n.n(sr);const{debug:ar}=We("COMPASS-AGGREGATIONS-UI"),ur="utf8";class lr{async loadAll(){const e=nr(),t=(await ir.promises.readdir(e)).filter((e=>e.endsWith(".json"))).map((t=>or().join(e,t)));return(await Promise.all(t.map((e=>this._loadOne(e))))).filter(Boolean)}async _loadOne(e){try{const[t,n]=await Promise.all([this._getFileData(e),ir.promises.stat(e)]);return{...t,lastModified:n.mtimeMs}}catch(t){return ar(`Failed to load pipeline ${or().basename(e)}`,t),null}}async _getFileData(e){const t=await ir.promises.readFile(e,ur);return JSON.parse(t)}async updateAttributes(e,t){if(!e)throw new Error("pipelineId is required");const n=or().join(nr(),`${e}.json`),i=await this._getFileData(n);return await ir.promises.writeFile(n,JSON.stringify({...i,...t}),ur),this._loadOne(n)}async delete(e){const t=or().join(nr(),`${e}.json`);return ir.promises.unlink(t)}}const{track:cr,debug:pr}=We("COMPASS-AGGREGATIONS-UI"),hr="aggregations/saved-pipeline",dr=`${hr}/LIST_TOGGLED`,fr=`${hr}/ADD`,mr={pipelines:[],isLoaded:!1,isListVisible:!1},gr={};gr[dr]=(e,t)=>{const n=(e=>Object.assign({},e))(e);return n.isListVisible=!!t.index,n},gr[fr]=(e,t)=>({...e,pipelines:t.pipelines,isLoaded:!0});const vr=e=>({type:dr,index:e}),yr=e=>({type:fr,pipelines:e}),xr=()=>(e,t)=>{t().savedPipeline.isLoaded||e(br())},br=()=>(e,t)=>{const n=new lr,i=t();n.loadAll().then((t=>{const n=t.filter((e=>{let{namespace:t}=e;return t===i.namespace}));e(fn(!1)),e(yr(n)),e((0,Gt.globalAppRegistryEmit)("agg-pipeline-saved",{name:i.name}))})).catch((e=>{pr("Failed to load pipelines",e)}))},Er=()=>async(e,t)=>{const{promises:i}=n(2048),r=n(5315),s=t();""===t().id&&e(un());const o=s.pipeline.map((e=>({...e,previewDocuments:[]}))),{id:a,name:u,namespace:l,comments:c,sample:p,autoPreview:h,collationString:{text:d},dataService:f}=t(),m={id:a,name:u,namespace:l,comments:c,sample:p,autoPreview:h,collationString:d,pipeline:o,host:f?.dataService?.getConnectionString?.().hosts.join(",")??null};cr("Aggregation Saved",{id:m.id,num_stages:o.length});const g=nr();await i.mkdir(g,{recursive:!0});const v=r.join(g,`${m.id}.json`);await i.writeFile(v,JSON.stringify(m),{encoding:"utf8",flag:"w"}),e(br())},wr=(0,he.css)({display:"flex",gap:he.spacing[4],alignItems:"center"}),Cr=(0,he.css)({display:"flex",gap:he.spacing[2]}),Sr=(0,he.css)({border:"none",backgroundColor:"transparent",lineHeight:1,display:"flex",alignItems:"center","&:hover":{cursor:"pointer"}}),Ar=(0,he.css)({display:"flex",flex:1}),Dr=(0,he.css)({display:"flex",flex:"none",marginLeft:"auto"}),_r=Y((e=>({isOpenPipelineVisible:!e.editViewName&&!e.isAtlasDeployed})),{onShowSavedPipelines:()=>e=>{e(xr()),e(vr(1))}})((e=>{let{onShowSavedPipelines:t,showRunButton:n,showExportButton:i,showExplainButton:s,onToggleOptions:o,isOptionsVisible:a,isOpenPipelineVisible:u}=e;return r().createElement("div",{className:wr,"data-testid":"pipeline-header"},u&&r().createElement("div",{className:Cr},r().createElement(he.Body,{weight:"medium"},"Pipeline"),r().createElement("button",{"data-testid":"pipeline-toolbar-open-pipelines-button",onClick:t,className:Sr,"aria-label":"Open saved pipelines"},r().createElement(he.Icon,{glyph:"Folder"}),r().createElement(he.Icon,{glyph:"CaretDown"}))),r().createElement("div",{className:Ar},r().createElement(Si,null)),r().createElement("div",{className:Dr},r().createElement(tr,{onToggleOptions:o,isOptionsVisible:a,showRunButton:n,showExportButton:i,showExplainButton:s})))})),kr="aggregations/collation/COLLATION_STRING_CHANGED",Tr={text:"",value:null,isValid:!0};function Fr(e){const t=Mt().isCollationValid(e);return{text:e,value:!1===t?null:t,isValid:!1!==t}}const Ir=e=>({type:kr,value:e}),Nr=n(4283),Pr=e=>()=>{Nr?n(5840).shell.openExternal(e):window.open(e,"_new")},Or="aggregations/max-time-ms/MAX_TIME_MS_CHANGED",Rr=null,Mr=e=>({type:Or,maxTimeMS:isNaN(e)?null:e}),Lr=require("hadron-react-components");var Br=n(9430),jr={};jr.styleTagTransform=Ae(),jr.setAttributes=Ee(),jr.insert=xe().bind(null,"head"),jr.domAPI=ve(),jr.insertStyleElement=Ce(),me()(Br.Z,jr);const Vr=Br.Z&&Br.Z.locals?Br.Z.locals:void 0;class zr extends i.PureComponent{static displayName="CollationToolbarComponent";static propTypes={collationString:o().object,collationStringChanged:o().func.isRequired,maxTimeMS:o().number,maxTimeMSChanged:o().func,openLink:o().func.isRequired};state={hasFocus:!1};onCollationChange=e=>{this.props.collationStringChanged(e.target.value)};onMaxTimeMsChanged=e=>{this.props.maxTimeMSChanged&&this.props.maxTimeMSChanged(parseInt(e.currentTarget.value,10))};_onFocus=()=>{this.setState({hasFocus:!0})};_onBlur=()=>{this.setState({hasFocus:!1})};render(){return r().createElement("div",{"data-testid":"legacy-collation-toolbar",className:Vr["collation-toolbar"]},r().createElement("div",{onBlur:this._onBlur,onFocus:this._onFocus,className:pe()(Vr["toolbar-input-wrapper"],{[Vr["has-focus"]]:this.state.hasFocus})},r().createElement("div",{className:pe()(Vr["toolbar-input-label"],{[Vr["has-error"]]:!this.props.collationString.isValid}),"data-testid":"collation-toolbar-input-label"},r().createElement(Lr.InfoSprinkle,{helpLink:"https://docs.mongodb.com/master/reference/collation/",onClickHandler:this.props.openLink}),"Collation"),r().createElement("input",{"data-testid":"collation-string",placeholder:"{ locale: 'simple' }",type:"text",onChange:this.onCollationChange,value:this.props.collationString.text}),r().createElement("div",{className:pe()(Vr["max-time-ms"])},r().createElement("div",{className:pe()(Vr["toolbar-input-label"]),"data-testid":"maxtimems-toolbar-input-label"},r().createElement(Lr.InfoSprinkle,{helpLink:"https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS/",onClickHandler:this.props.openLink}),"Max Time MS"),r().createElement("input",{"data-testid":"max-time-ms",id:"max-time-limit","aria-describedby":"max-time-limit",type:"number",min:"0",placeholder:it,value:this.props.maxTimeMS??"",onChange:this.onMaxTimeMsChanged}))))}}const qr=zr,Ur=Y((e=>{let{collationString:t,settings:{maxTimeMS:n,isDirty:i},maxTimeMS:r}=e;return{collationString:t,maxTimeMS:i?n:r}}),{collationStringChanged:Ir,maxTimeMSChanged:Mr,openLink:Pr})((e=>{let{collationString:t,collationStringChanged:n,maxTimeMS:i,maxTimeMSChanged:s,openLink:o}=e;const a={collationString:t,collationStringChanged:n,maxTimeMS:i,maxTimeMSChanged:s,openLink:o};return r().createElement(qr,a)})),Wr=()=>r().createElement("div",{"data-testid":"pipeline-options",role:"region",id:"pipeline-options","aria-labelledby":"pipeline-toolbar-options"},r().createElement(Ur,null)),Kr=()=>(e,t)=>{const n=t();e((0,Gt.localAppRegistryEmit)("open-aggregation-export-to-language",((e,t)=>`[${e.pipeline.filter(((e,n)=>e.isEnabled&&n<=t)).map((e=>function(e){const t=Kt(e);return Mt().toJSString(t)}(e))).join(", ")}]`)(n,n.pipeline.length))),e((0,Gt.globalAppRegistryEmit)("compass:export-to-language:opened",{source:"Aggregations"}))};var $r={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Hr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Gr={5:Hr,"5module":Hr+" export import",6:Hr+" const class extends export import super"},Jr=/^in(stanceof)?$/,Xr="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Zr="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Yr=new RegExp("["+Xr+"]"),Qr=new RegExp("["+Xr+Zr+"]");Xr=Zr=null;var es=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],ts=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function ns(e,t){for(var n=65536,i=0;i<t.length;i+=2){if((n+=t[i])>e)return!1;if((n+=t[i+1])>=e)return!0}}function is(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Yr.test(String.fromCharCode(e)):!1!==t&&ns(e,es)))}function rs(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Qr.test(String.fromCharCode(e)):!1!==t&&(ns(e,es)||ns(e,ts)))))}var ss=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function os(e,t){return new ss(e,{beforeExpr:!0,binop:t})}var as={beforeExpr:!0},us={startsExpr:!0},ls={};function cs(e,t){return void 0===t&&(t={}),t.keyword=e,ls[e]=new ss(e,t)}var ps={num:new ss("num",us),regexp:new ss("regexp",us),string:new ss("string",us),name:new ss("name",us),privateId:new ss("privateId",us),eof:new ss("eof"),bracketL:new ss("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new ss("]"),braceL:new ss("{",{beforeExpr:!0,startsExpr:!0}),braceR:new ss("}"),parenL:new ss("(",{beforeExpr:!0,startsExpr:!0}),parenR:new ss(")"),comma:new ss(",",as),semi:new ss(";",as),colon:new ss(":",as),dot:new ss("."),question:new ss("?",as),questionDot:new ss("?."),arrow:new ss("=>",as),template:new ss("template"),invalidTemplate:new ss("invalidTemplate"),ellipsis:new ss("...",as),backQuote:new ss("`",us),dollarBraceL:new ss("${",{beforeExpr:!0,startsExpr:!0}),eq:new ss("=",{beforeExpr:!0,isAssign:!0}),assign:new ss("_=",{beforeExpr:!0,isAssign:!0}),incDec:new ss("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ss("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:os("||",1),logicalAND:os("&&",2),bitwiseOR:os("|",3),bitwiseXOR:os("^",4),bitwiseAND:os("&",5),equality:os("==/!=/===/!==",6),relational:os("</>/<=/>=",7),bitShift:os("<</>>/>>>",8),plusMin:new ss("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:os("%",10),star:os("*",10),slash:os("/",10),starstar:new ss("**",{beforeExpr:!0}),coalesce:os("??",1),_break:cs("break"),_case:cs("case",as),_catch:cs("catch"),_continue:cs("continue"),_debugger:cs("debugger"),_default:cs("default",as),_do:cs("do",{isLoop:!0,beforeExpr:!0}),_else:cs("else",as),_finally:cs("finally"),_for:cs("for",{isLoop:!0}),_function:cs("function",us),_if:cs("if"),_return:cs("return",as),_switch:cs("switch"),_throw:cs("throw",as),_try:cs("try"),_var:cs("var"),_const:cs("const"),_while:cs("while",{isLoop:!0}),_with:cs("with"),_new:cs("new",{beforeExpr:!0,startsExpr:!0}),_this:cs("this",us),_super:cs("super",us),_class:cs("class",us),_extends:cs("extends",as),_export:cs("export"),_import:cs("import",us),_null:cs("null",us),_true:cs("true",us),_false:cs("false",us),_in:cs("in",{beforeExpr:!0,binop:7}),_instanceof:cs("instanceof",{beforeExpr:!0,binop:7}),_typeof:cs("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:cs("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:cs("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},hs=/\r\n?|\n|\u2028|\u2029/,ds=new RegExp(hs.source,"g");function fs(e){return 10===e||13===e||8232===e||8233===e}var ms=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,vs=Object.prototype,ys=vs.hasOwnProperty,xs=vs.toString;function bs(e,t){return ys.call(e,t)}var Es=Array.isArray||function(e){return"[object Array]"===xs.call(e)};function ws(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Cs=function(e,t){this.line=e,this.column=t};Cs.prototype.offset=function(e){return new Cs(this.line,this.column+e)};var Ss=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function As(e,t){for(var n=1,i=0;;){ds.lastIndex=i;var r=ds.exec(e);if(!(r&&r.index<t))return new Cs(n,t-i);++n,i=r.index+r[0].length}}var Ds={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},_s=!1;function ks(e,t){return 2|(e?4:0)|(t?8:0)}var Ts=function(e,t,n){this.options=e=function(e){var t={};for(var n in Ds)t[n]=e&&bs(e,n)?e[n]:Ds[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!_s&&"object"==typeof console&&console.warn&&(_s=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Es(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return Es(t.onComment)&&(t.onComment=function(e,t){return function(n,i,r,s,o,a){var u={type:n?"Block":"Line",value:i,start:r,end:s};e.locations&&(u.loc=new Ss(this,o,a)),e.ranges&&(u.range=[r,s]),t.push(u)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=ws(Gr[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=$r[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=ws(i);var r=(i?i+" ":"")+$r.strict;this.reservedWordsStrict=ws(r),this.reservedWordsStrictBind=ws(r+" "+$r.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(hs).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=ps.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Fs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Ts.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Fs.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Fs.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Fs.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Fs.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Fs.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(64&t)>0||n||this.options.allowSuperOutsideMethod},Fs.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Fs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Fs.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(258&t)>0||n},Fs.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},Ts.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},Ts.parse=function(e,t){return new this(t,e).parse()},Ts.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()},Ts.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Ts.prototype,Fs);var Is=Ts.prototype,Ns=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function Ps(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Is.strictDirective=function(e){for(;;){gs.lastIndex=e,e+=gs.exec(this.input)[0].length;var t=Ns.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){gs.lastIndex=e+t[0].length;var n=gs.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return";"===r||"}"===r||hs.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(i+1))}e+=t[0].length,gs.lastIndex=e,e+=gs.exec(this.input)[0].length,";"===this.input[e]&&e++}},Is.eat=function(e){return this.type===e&&(this.next(),!0)},Is.isContextual=function(e){return this.type===ps.name&&this.value===e&&!this.containsEsc},Is.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Is.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Is.canInsertSemicolon=function(){return this.type===ps.eof||this.type===ps.braceR||hs.test(this.input.slice(this.lastTokEnd,this.start))},Is.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Is.semicolon=function(){this.eat(ps.semi)||this.insertSemicolon()||this.unexpected()},Is.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Is.expect=function(e){this.eat(e)||this.unexpected()},Is.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Is.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},Is.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,i=e.doubleProto;if(!t)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Is.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Is.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Os=Ts.prototype;Os.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==ps.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Rs={kind:"loop"},Ms={kind:"switch"};Os.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;gs.lastIndex=this.pos;var t=gs.exec(this.input),n=this.pos+t[0].length,i=this.input.charCodeAt(n);if(91===i||92===i||i>55295&&i<56320)return!0;if(e)return!1;if(123===i)return!0;if(is(i,!0)){for(var r=n+1;rs(i=this.input.charCodeAt(r),!0);)++r;if(92===i||i>55295&&i<56320)return!0;var s=this.input.slice(n,r);if(!Jr.test(s))return!0}return!1},Os.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;gs.lastIndex=this.pos;var e,t=gs.exec(this.input),n=this.pos+t[0].length;return!(hs.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(rs(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},Os.parseStatement=function(e,t,n){var i,r=this.type,s=this.startNode();switch(this.isLet(e)&&(r=ps._var,i="let"),r){case ps._break:case ps._continue:return this.parseBreakContinueStatement(s,r.keyword);case ps._debugger:return this.parseDebuggerStatement(s);case ps._do:return this.parseDoStatement(s);case ps._for:return this.parseForStatement(s);case ps._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case ps._class:return e&&this.unexpected(),this.parseClass(s,!0);case ps._if:return this.parseIfStatement(s);case ps._return:return this.parseReturnStatement(s);case ps._switch:return this.parseSwitchStatement(s);case ps._throw:return this.parseThrowStatement(s);case ps._try:return this.parseTryStatement(s);case ps._const:case ps._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(s,i);case ps._while:return this.parseWhileStatement(s);case ps._with:return this.parseWithStatement(s);case ps.braceL:return this.parseBlock(!0,s);case ps.semi:return this.parseEmptyStatement(s);case ps._export:case ps._import:if(this.options.ecmaVersion>10&&r===ps._import){gs.lastIndex=this.pos;var o=gs.exec(this.input),a=this.pos+o[0].length,u=this.input.charCodeAt(a);if(40===u||46===u)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===ps._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.value,c=this.parseExpression();return r===ps.name&&"Identifier"===c.type&&this.eat(ps.colon)?this.parseLabeledStatement(s,l,c,e):this.parseExpressionStatement(s,c)}},Os.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(ps.semi)||this.insertSemicolon()?e.label=null:this.type!==ps.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(n||"loop"===r.kind))break;if(e.label&&n)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},Os.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Os.parseDoStatement=function(e){return this.next(),this.labels.push(Rs),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(ps._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(ps.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Os.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Rs),this.enterScope(0),this.expect(ps.parenL),this.type===ps.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===ps._var||this.type===ps._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),(this.type===ps._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===ps._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var s=this.isContextual("let"),o=!1,a=new Ps,u=this.parseExpression(!(t>-1)||"await",a);return this.type===ps._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===ps._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,a),this.checkLValPattern(u),this.parseForIn(e,u)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,u))},Os.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Bs|(n?0:js),!1,t)},Os.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(ps._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Os.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(ps.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Os.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(ps.braceL),this.labels.push(Ms),this.enterScope(0);for(var n=!1;this.type!==ps.braceR;)if(this.type===ps._case||this.type===ps._default){var i=this.type===ps._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(ps.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},Os.parseThrowStatement=function(e){return this.next(),hs.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ls=[];Os.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===ps._catch){var t=this.startNode();if(this.next(),this.eat(ps.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLValPattern(t.param,n?4:2),this.expect(ps.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(ps._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Os.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Os.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Rs),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Os.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},Os.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Os.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1)s[r].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===ps._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==e.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},Os.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Os.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(ps.braceL),e&&this.enterScope(0);this.type!==ps.braceR;){var i=this.parseStatement(null);t.body.push(i)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Os.parseFor=function(e,t){return e.init=t,this.expect(ps.semi),e.test=this.type===ps.semi?null:this.parseExpression(),this.expect(ps.semi),e.update=this.type===ps.parenR?null:this.parseExpression(),this.expect(ps.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Os.parseForIn=function(e,t){var n=this.type===ps._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(ps.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},Os.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(ps.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===ps._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===i.id.type||t&&(this.type===ps._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(ps.comma))break}return e},Os.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Bs=1,js=2;function Vs(e,t){var n=t.key.name,i=e[n],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===r||"iset"===i&&"iget"===r||"sget"===i&&"sset"===r||"sset"===i&&"sget"===r?(e[n]="true",!1):!!i||(e[n]=r,!1)}function zs(e,t){var n=e.computed,i=e.key;return!n&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Os.parseFunction=function(e,t,n,i,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===ps.star&&t&js&&this.unexpected(),e.generator=this.eat(ps.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&Bs&&(e.id=4&t&&this.type!==ps.name?null:this.parseIdent(),!e.id||t&js||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ks(e.async,e.generator)),t&Bs||(e.id=this.type===ps.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Bs?"FunctionDeclaration":"FunctionExpression")},Os.parseFunctionParams=function(e){this.expect(ps.parenL),e.params=this.parseBindingList(ps.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Os.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(ps.braceL);this.type!==ps.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(r.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&Vs(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Os.parseClassElement=function(e){if(this.eat(ps.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(ps.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===ps.star?a=!0:i="static"}if(n.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==ps.star||this.canInsertSemicolon()?i="async":s=!0),!i&&(t>=9||!s)&&this.eat(ps.star)&&(r=!0),!i&&!s&&!r){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:i=u)}if(i?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===ps.parenL||"method"!==o||r||s){var l=!n.static&&zs(n,"constructor"),c=l&&e;l&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=l?"constructor":o,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n},Os.isClassElementNameStart=function(){return this.type===ps.name||this.type===ps.privateId||this.type===ps.num||this.type===ps.string||this.type===ps.bracketL||this.type.keyword},Os.parseClassElementName=function(e){this.type===ps.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Os.parseClassMethod=function(e,t,n,i){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):e.static&&zs(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Os.parseClassField=function(e){if(zs(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&zs(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(ps.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Os.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==ps.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Os.parseClassId=function(e,t){this.type===ps.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Os.parseClassSuper=function(e){e.superClass=this.eat(ps._extends)?this.parseExprSubscripts(!1):null},Os.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Os.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,i=this.privateNameStack.length,r=0===i?null:this.privateNameStack[i-1],s=0;s<n.length;++s){var o=n[s];bs(t,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},Os.parseExport=function(e,t){if(this.next(),this.eat(ps.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==ps.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(ps._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===ps._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,4|Bs,!1,n)}else if(this.type===ps._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==ps.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},Os.checkExport=function(e,t,n){e&&(bs(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},Os.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(e,u)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},Os.checkVariableExport=function(e,t){if(e)for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}},Os.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Os.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(ps.braceL);!this.eat(ps.braceR);){if(n)n=!1;else if(this.expect(ps.comma),this.afterTrailingComma(ps.braceR))break;var i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"ExportSpecifier"))}return t},Os.parseImport=function(e){return this.next(),this.type===ps.string?(e.specifiers=Ls,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===ps.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Os.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===ps.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLValSimple(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(ps.comma))return e}if(this.type===ps.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(ps.braceL);!this.eat(ps.braceR);){if(t)t=!1;else if(this.expect(ps.comma),this.afterTrailingComma(ps.braceR))break;var r=this.startNode();r.imported=this.parseIdent(!0),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportSpecifier"))}return e},Os.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Os.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var qs=Ts.prototype;qs.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},qs.toAssignableList=function(e,t){for(var n=e.length,i=0;i<n;i++){var r=e[i];r&&this.toAssignable(r,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},qs.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},qs.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==ps.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},qs.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case ps.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(ps.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case ps.braceL:return this.parseObj(!0)}return this.parseIdent()},qs.parseBindingList=function(e,t,n){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(ps.comma),t&&this.type===ps.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===ps.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),i.push(o)}return i},qs.parseBindingListItem=function(e){return e},qs.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(ps.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},qs.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var i=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(bs(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}},qs.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var u=a[o];u&&this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}},qs.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Us=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},Ws={b_stat:new Us("{",!1),b_expr:new Us("{",!0),b_tmpl:new Us("${",!1),p_stat:new Us("(",!1),p_expr:new Us("(",!0),q_tmpl:new Us("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new Us("function",!1),f_expr:new Us("function",!0),f_expr_gen:new Us("function",!0,!1,null,!0),f_gen:new Us("function",!1,!1,null,!0)},Ks=Ts.prototype;Ks.initialContext=function(){return[Ws.b_stat]},Ks.curContext=function(){return this.context[this.context.length-1]},Ks.braceIsBlock=function(e){var t=this.curContext();return t===Ws.f_expr||t===Ws.f_stat||(e!==ps.colon||t!==Ws.b_stat&&t!==Ws.b_expr?e===ps._return||e===ps.name&&this.exprAllowed?hs.test(this.input.slice(this.lastTokEnd,this.start)):e===ps._else||e===ps.semi||e===ps.eof||e===ps.parenR||e===ps.arrow||(e===ps.braceL?t===Ws.b_stat:e!==ps._var&&e!==ps._const&&e!==ps.name&&!this.exprAllowed):!t.isExpr)},Ks.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},Ks.updateContext=function(e){var t,n=this.type;n.keyword&&e===ps.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Ks.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},ps.parenR.updateContext=ps.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Ws.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},ps.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Ws.b_stat:Ws.b_expr),this.exprAllowed=!0},ps.dollarBraceL.updateContext=function(){this.context.push(Ws.b_tmpl),this.exprAllowed=!0},ps.parenL.updateContext=function(e){var t=e===ps._if||e===ps._for||e===ps._with||e===ps._while;this.context.push(t?Ws.p_stat:Ws.p_expr),this.exprAllowed=!0},ps.incDec.updateContext=function(){},ps._function.updateContext=ps._class.updateContext=function(e){!e.beforeExpr||e===ps._else||e===ps.semi&&this.curContext()!==Ws.p_stat||e===ps._return&&hs.test(this.input.slice(this.lastTokEnd,this.start))||(e===ps.colon||e===ps.braceL)&&this.curContext()===Ws.b_stat?this.context.push(Ws.f_stat):this.context.push(Ws.f_expr),this.exprAllowed=!1},ps.backQuote.updateContext=function(){this.curContext()===Ws.q_tmpl?this.context.pop():this.context.push(Ws.q_tmpl),this.exprAllowed=!1},ps.star.updateContext=function(e){if(e===ps._function){var t=this.context.length-1;this.context[t]===Ws.f_expr?this.context[t]=Ws.f_expr_gen:this.context[t]=Ws.f_gen}this.exprAllowed=!0},ps.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==ps.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var $s=Ts.prototype;function Hs(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Hs(e.expression)}$s.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i,r=e.key;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===i&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[i="$"+i];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(r.start,"Redefinition of property"):o=t[i]={init:!1,get:!1,set:!1},o[s]=!0}}},$s.parseExpression=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===ps.comma){var s=this.startNodeAt(n,i);for(s.expressions=[r];this.eat(ps.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return r},$s.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,r=-1,s=-1;t?(r=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ps,i=!0);var o=this.start,a=this.startLoc;this.type!==ps.parenL&&this.type!==ps.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){var l=this.startNodeAt(o,a);return l.operator=this.value,this.type===ps.eq&&(u=this.toAssignable(u,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===ps.eq?this.checkLValPattern(u):this.checkLValSimple(u),l.left=u,this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),s>-1&&(t.trailingComma=s),u},$s.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(ps.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(ps.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r},$s.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===n&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,n,i,-1,e)},$s.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==ps._in)&&s>i){var o=this.type===ps.logicalOR||this.type===ps.logicalAND,a=this.type===ps.coalesce;a&&(s=ps.logicalAND.binop);var u=this.value;this.next();var l=this.start,c=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),l,c,s,r),h=this.buildBinary(t,n,e,p,u,o||a);return(o&&this.type===ps.coalesce||a&&(this.type===ps.logicalOR||this.type===ps.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,i,r)}return e},$s.buildBinary=function(e,t,n,i,r,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=r,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},$s.parseMaybeUnary=function(e,t,n,i){var r,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(i),t=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===ps.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,i),this.checkExpressionErrors(e,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&Hs(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,r=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else{if(r=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,o);l.operator=this.value,l.prefix=!1,l.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(l,"UpdateExpression")}}return n||!this.eat(ps.starstar)?r:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,r,this.parseMaybeUnary(null,!1,!1,i),"**",!1)},$s.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var s=this.parseSubscripts(r,n,i,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},$s.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,o=!1;;){var a=this.parseSubscript(e,t,n,i,s,o,r);if(a.optional&&(o=!0),a===e||"ArrowFunctionExpression"===a.type){if(o){var u=this.startNodeAt(t,n);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}e=a}},$s.parseSubscript=function(e,t,n,i,r,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(ps.questionDot);i&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(ps.bracketL);if(l||u&&this.type!==ps.parenL&&this.type!==ps.backQuote||this.eat(ps.dot)){var c=this.startNodeAt(t,n);c.object=e,l?(c.property=this.parseExpression(),this.expect(ps.bracketR)):this.type===ps.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!l,a&&(c.optional=u),e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(ps.parenL)){var p=new Ps,h=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(ps.parenR,this.options.ecmaVersion>=8,!1,p);if(r&&!u&&!this.canInsertSemicolon()&&this.eat(ps.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=d,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(t,n),m,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=m,a&&(g.optional=u),e=this.finishNode(g,"CallExpression")}else if(this.type===ps.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(t,n);v.tag=e,v.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(v,"TaggedTemplateExpression")}return e},$s.parseExprAtom=function(e,t){this.type===ps.slash&&this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case ps._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type!==ps.parenL||this.allowDirectSuper||this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==ps.dot&&this.type!==ps.bracketL&&this.type!==ps.parenL&&this.unexpected(),this.finishNode(n,"Super");case ps._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case ps.name:var r=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(ps._function))return this.overrideContext(Ws.f_expr),this.parseFunction(this.startNodeAt(r,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(ps.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[a],!1,t);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===ps.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(ps.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[a],!0,t)}return a;case ps.regexp:var u=this.value;return(n=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},n;case ps.num:case ps.string:return this.parseLiteral(this.value);case ps._null:case ps._true:case ps._false:return(n=this.startNode()).value=this.type===ps._null?null:this.type===ps._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case ps.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case ps.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(ps.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case ps.braceL:return this.overrideContext(Ws.b_expr),this.parseObj(!1,e);case ps._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case ps._class:return this.parseClass(this.startNode(),!1);case ps._new:return this.parseNew();case ps.backQuote:return this.parseTemplate();case ps._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},$s.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case ps.parenL:return this.parseDynamicImport(e);case ps.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},$s.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(ps.parenR)){var t=this.start;this.eat(ps.comma)&&this.eat(ps.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},$s.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},$s.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},$s.parseParenExpression=function(){this.expect(ps.parenL);var e=this.parseExpression();return this.expect(ps.parenR),e},$s.parseParenAndDistinguishExpression=function(e,t){var n,i=this.start,r=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,u=this.startLoc,l=[],c=!0,p=!1,h=new Ps,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==ps.parenR;){if(c?c=!1:this.expect(ps.comma),s&&this.afterTrailingComma(ps.parenR,!0)){p=!0;break}if(this.type===ps.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(ps.parenR),e&&!this.canInsertSemicolon()&&this.eat(ps.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(i,r,l,t);l.length&&!p||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,l.length>1?((n=this.startNodeAt(a,u)).expressions=l,this.finishNodeAt(n,"SequenceExpression",m,g)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(i,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},$s.parseParenItem=function(e){return e},$s.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,i)};var Gs=[];$s.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ps.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc,s=this.type===ps._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,!0,!1),s&&"ImportExpression"===e.callee.type&&this.raise(i,"Cannot use new with import()"),this.eat(ps.parenL)?e.arguments=this.parseExprList(ps.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Gs,this.finishNode(e,"NewExpression")},$s.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===ps.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===ps.backQuote,this.finishNode(n,"TemplateElement")},$s.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(n.quasis=[i];!i.tail;)this.type===ps.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(ps.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(ps.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},$s.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===ps.name||this.type===ps.num||this.type===ps.string||this.type===ps.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===ps.star)&&!hs.test(this.input.slice(this.lastTokEnd,this.start))},$s.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(ps.braceR);){if(i)i=!1;else if(this.expect(ps.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(ps.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,r,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},$s.parseProperty=function(e,t){var n,i,r,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(ps.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===ps.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===ps.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===ps.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(r=this.start,s=this.startLoc),e||(n=this.eat(ps.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(ps.star),this.parsePropertyName(o,t)):i=!1,this.parsePropertyValue(o,e,n,i,r,s,t,a),this.finishNode(o,"Property")},$s.parsePropertyValue=function(e,t,n,i,r,s,o,a){if((n||i)&&this.type===ps.colon&&this.unexpected(),this.eat(ps.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===ps.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,i);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===ps.comma||this.type===ps.braceR||this.type===ps.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key)):this.type===ps.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(n||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var u="get"===e.kind?0:1;if(e.value.params.length!==u){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},$s.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ps.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(ps.bracketR),e.key;e.computed=!1}return e.key=this.type===ps.num||this.type===ps.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},$s.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},$s.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|ks(t,i.generator)|(n?128:0)),this.expect(ps.parenL),i.params=this.parseBindingList(ps.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},$s.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|ks(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},$s.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==ps.braceL,s=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()},$s.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},$s.checkParams=function(e,t){for(var n=Object.create(null),i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,1,t?null:n)}},$s.parseExprList=function(e,t,n,i){for(var r=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(ps.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===ps.comma?o=null:this.type===ps.ellipsis?(o=this.parseSpread(i),i&&this.type===ps.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),r.push(o)}return r},$s.checkUnreserved=function(e){var t=e.start,n=e.end,i=e.name;this.inGenerator&&"yield"===i&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===i&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==i&&"await"!==i||this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||"await"!==i||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))},$s.parseIdent=function(e,t){var n=this.startNode();return this.type===ps.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},$s.parsePrivateIdent=function(){var e=this.startNode();return this.type===ps.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},$s.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===ps.semi||this.canInsertSemicolon()||this.type!==ps.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(ps.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},$s.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Js=Ts.prototype;Js.raise=function(e,t){var n=As(this.input,e);t+=" ("+n.line+":"+n.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},Js.raiseRecoverable=Js.raise,Js.curPosition=function(){if(this.options.locations)return new Cs(this.curLine,this.pos-this.lineStart)};var Xs=Ts.prototype,Zs=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Xs.enterScope=function(e){this.scopeStack.push(new Zs(e))},Xs.exitScope=function(){this.scopeStack.pop()},Xs.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Xs.declareName=function(e,t,n){var i=!1;if(2===t){var r=this.currentScope();i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();i=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Xs.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Xs.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Xs.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Xs.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var Ys=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ss(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Qs=Ts.prototype;function eo(e,t,n,i){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=n),e}Qs.startNode=function(){return new Ys(this,this.start,this.startLoc)},Qs.startNodeAt=function(e,t){return new Ys(this,e,t)},Qs.finishNode=function(e,t){return eo.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Qs.finishNodeAt=function(e,t,n,i){return eo.call(this,e,t,n,i)},Qs.copyNode=function(e){var t=new Ys(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var to="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",no=to+" Extended_Pictographic",io={9:to,10:no,11:no,12:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict"},ro="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",so="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",oo=so+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ao={9:so,10:oo,11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",12:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"},uo={};function lo(e){var t=uo[e]={binary:ws(io[e]+" "+ro),nonBinary:{General_Category:ws(ro),Script:ws(ao[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}lo(9),lo(10),lo(11),lo(12);var co=Ts.prototype,po=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=uo[e.options.ecmaVersion>=12?12:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function ho(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function fo(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function mo(e){return e>=65&&e<=90||e>=97&&e<=122}function go(e){return mo(e)||95===e}function vo(e){return go(e)||yo(e)}function yo(e){return e>=48&&e<=57}function xo(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function bo(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Eo(e){return e>=48&&e<=55}po.prototype.reset=function(e,t,n){var i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchN=i&&this.parser.options.ecmaVersion>=9},po.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},po.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return-1;var r=n.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=i)return r;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(r<<10)+s-56613888:r},po.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return i;var r,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=i||(r=n.charCodeAt(e+1))<56320||r>57343?e+1:e+2},po.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},po.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},po.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},po.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},co.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,i=0;i<n.length;i++){var r=n.charAt(i);-1===t.indexOf(r)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(r,i+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},co.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},co.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var i=n[t];-1===e.groupNames.indexOf(i)&&e.raise("Invalid named capture referenced")}},co.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},co.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},co.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},co.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},co.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},co.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},co.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},co.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},co.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},co.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},co.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},co.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},co.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},co.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!fo(t)&&(e.lastIntValue=t,e.advance(),!0)},co.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!fo(n);)e.advance();return e.pos!==t},co.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},co.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},co.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},co.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ho(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ho(e.lastIntValue);return!0}return!1},co.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return is(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},co.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return rs(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},co.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},co.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},co.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},co.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},co.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},co.regexp_eatZero=function(e){return 48===e.current()&&!yo(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},co.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},co.regexp_eatControlLetter=function(e){var t=e.current();return!!mo(t)&&(e.lastIntValue=t%32,e.advance(),!0)},co.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1},co.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},co.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},co.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},co.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,i),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r),!0}return!1},co.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){bs(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},co.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},co.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";go(t=e.current());)e.lastStringValue+=ho(t),e.advance();return""!==e.lastStringValue},co.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";vo(t=e.current());)e.lastStringValue+=ho(t),e.advance();return""!==e.lastStringValue},co.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},co.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},co.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},co.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Eo(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},co.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},co.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!yo(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},co.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},co.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;yo(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},co.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;xo(n=e.current());)e.lastIntValue=16*e.lastIntValue+bo(n),e.advance();return e.pos!==t},co.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},co.regexp_eatOctalDigit=function(e){var t=e.current();return Eo(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},co.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var r=e.current();if(!xo(r))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+bo(r),e.advance()}return!0};var wo=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ss(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Co=Ts.prototype;function So(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Ao(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Co.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new wo(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Co.getToken=function(){return this.next(),new wo(this)},"undefined"!=typeof Symbol&&(Co[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===ps.eof,value:t}}}}),Co.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(ps.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Co.readToken=function(e){return is(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Co.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Co.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(ds.lastIndex=n;(e=ds.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,i),n,this.pos,t,this.curPosition())},Co.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!fs(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Co.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&ms.test(String.fromCharCode(e))))break e;++this.pos}}},Co.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Co.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(ps.ellipsis)):(++this.pos,this.finishToken(ps.dot))},Co.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(ps.assign,2):this.finishOp(ps.slash,1)},Co.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?ps.star:ps.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,i=ps.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(ps.assign,n+1):this.finishOp(i,n)},Co.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(ps.assign,3):this.finishOp(124===e?ps.logicalOR:ps.logicalAND,2):61===t?this.finishOp(ps.assign,2):this.finishOp(124===e?ps.bitwiseOR:ps.bitwiseAND,1)},Co.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(ps.assign,2):this.finishOp(ps.bitwiseXOR,1)},Co.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!hs.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(ps.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(ps.assign,2):this.finishOp(ps.plusMin,1)},Co.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(ps.assign,n+1):this.finishOp(ps.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(ps.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Co.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(ps.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(ps.arrow)):this.finishOp(61===e?ps.eq:ps.prefix,1)},Co.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(ps.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(ps.assign,3):this.finishOp(ps.coalesce,2)}return this.finishOp(ps.question,1)},Co.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,is(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(ps.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ao(e)+"'")},Co.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(ps.parenL);case 41:return++this.pos,this.finishToken(ps.parenR);case 59:return++this.pos,this.finishToken(ps.semi);case 44:return++this.pos,this.finishToken(ps.comma);case 91:return++this.pos,this.finishToken(ps.bracketL);case 93:return++this.pos,this.finishToken(ps.bracketR);case 123:return++this.pos,this.finishToken(ps.braceL);case 125:return++this.pos,this.finishToken(ps.braceR);case 58:return++this.pos,this.finishToken(ps.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(ps.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(ps.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ao(e)+"'")},Co.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Co.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(hs.test(i)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new po(this));a.reset(n,r,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(ps.regexp,{pattern:r,flags:o,value:u})},Co.readInt=function(e,t,n){for(var i=this.options.ecmaVersion>=12&&void 0===t,r=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,u=0,l=null==t?1/0:t;u<l;++u,++this.pos){var c=this.input.charCodeAt(this.pos),p=void 0;if(i&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===u&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((p=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;a=c,o=o*e+p}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},Co.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=So(this.input.slice(t,this.pos)),++this.pos):is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ps.num,n)},Co.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===i){var r=So(this.input.slice(t,this.pos));return++this.pos,is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ps.num,r)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==i||n||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||n||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),is(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(t,this.pos),n?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(ps.num,o)},Co.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Co.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(fs(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(ps.string,t)};var Do={};Co.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Do)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Co.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Do;this.raise(e,t)},Co.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==ps.template&&this.type!==ps.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(ps.template,e)):36===n?(this.pos+=2,this.finishToken(ps.dollarBraceL)):(++this.pos,this.finishToken(ps.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(fs(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Co.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(ps.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Co.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ao(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;return this.invalidStringToken(n,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return fs(t)?"":String.fromCharCode(t)}},Co.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Co.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(rs(r,i))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?is:rs)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Ao(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Co.readWord=function(){var e=this.readWord1(),t=ps.name;return this.keywords.test(e)&&(t=ls[e]),this.finishToken(t,e)},Ts.acorn={Parser:Ts,version:"8.5.0",defaultOptions:Ds,Position:Cs,SourceLocation:Ss,getLineInfo:As,Node:Ys,TokenType:ss,tokTypes:ps,keywordTypes:ls,TokContext:Us,tokContexts:Ws,isIdentifierChar:rs,isIdentifierStart:is,Token:wo,isNewLine:fs,lineBreak:hs,lineBreakG:ds,nonASCIIwhitespace:ms};var _o="✖";function ko(e){return e.name===_o}function To(){}var Fo=function(e,t){if(void 0===t&&(t={}),this.toks=this.constructor.BaseParser.tokenizer(e,t),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:ps.eof,start:0,end:0},this.tok.validateRegExpFlags=To,this.tok.validateRegExpPattern=To,this.options.locations){var n=this.toks.curPosition();this.tok.loc=new Ss(this.toks,n,n)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};Fo.prototype.startNode=function(){return new Ys(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)},Fo.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start},Fo.prototype.startNodeAt=function(e){return this.options.locations?new Ys(this.toks,e[0],e[1]):new Ys(this.toks,e)},Fo.prototype.finishNode=function(e,t){return e.type=t,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e},Fo.prototype.dummyNode=function(e){var t=this.startNode();return t.type=e,t.end=t.start,this.options.locations&&(t.loc.end=t.loc.start),this.options.ranges&&(t.range[1]=t.start),this.last={type:ps.name,start:t.start,end:t.start,loc:t.loc},t},Fo.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=_o,e},Fo.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=_o,e},Fo.prototype.eat=function(e){return this.tok.type===e&&(this.next(),!0)},Fo.prototype.isContextual=function(e){return this.tok.type===ps.name&&this.tok.value===e},Fo.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(ps.name)},Fo.prototype.canInsertSemicolon=function(){return this.tok.type===ps.eof||this.tok.type===ps.braceR||hs.test(this.input.slice(this.last.end,this.tok.start))},Fo.prototype.semicolon=function(){return this.eat(ps.semi)},Fo.prototype.expect=function(e){if(this.eat(e))return!0;for(var t=1;t<=2;t++)if(this.lookAhead(t).type===e){for(var n=0;n<t;n++)this.next();return!0}},Fo.prototype.pushCx=function(){this.context.push(this.curIndent)},Fo.prototype.popCx=function(){this.curIndent=this.context.pop()},Fo.prototype.lineEnd=function(e){for(;e<this.input.length&&!fs(this.input.charCodeAt(e));)++e;return e},Fo.prototype.indentationAfter=function(e){for(var t=0;;++e){var n=this.input.charCodeAt(e);if(32===n)++t;else{if(9!==n)return t;t+=this.options.tabSize}}},Fo.prototype.closes=function(e,t,n,i){return this.tok.type===e||this.tok.type===ps.eof||n!==this.curLineStart&&this.curIndent<t&&this.tokenStartsLine()&&(!i||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<t)},Fo.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var t=this.input.charCodeAt(e);if(9!==t&&32!==t)return!1}return!0},Fo.prototype.extend=function(e,t){this[e]=t(this[e])},Fo.prototype.parse=function(){return this.next(),this.parseTopLevel()},Fo.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},Fo.parse=function(e,t){return new this(e,t).parse()},Fo.BaseParser=Ts;var Io=Fo.prototype;function No(e){return e<14&&e>8||32===e||160===e||fs(e)}Io.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}},Io.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===ps.dot&&"."===this.input.substr(this.toks.end,1)&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=ps.ellipsis),new wo(this.toks)}catch(s){if(!(s instanceof SyntaxError))throw s;var e=s.message,t=s.raisedAt,n=!0;if(/unterminated/i.test(e))if(t=this.lineEnd(s.pos+1),/string/.test(e))n={start:s.pos,end:t,type:ps.string,value:this.input.slice(s.pos+1,t)};else if(/regular expr/i.test(e)){var i=this.input.slice(s.pos,t);try{i=new RegExp(i)}catch(e){}n={start:s.pos,end:t,type:ps.regexp,value:i}}else n=!!/template/.test(e)&&{start:s.pos,end:t,type:ps.template,value:this.input.slice(s.pos,t)};else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(e))for(;t<this.input.length&&!No(this.input.charCodeAt(t));)++t;else if(/character escape|expected hexadecimal/i.test(e))for(;t<this.input.length;){var r=this.input.charCodeAt(t++);if(34===r||39===r||fs(r))break}else if(/unexpected character/i.test(e))t++,n=!1;else{if(!/regular expression/i.test(e))throw s;n=!0}if(this.resetTo(t),!0===n&&(n={start:t,end:t,type:ps.name,value:_o}),n)return this.options.locations&&(n.loc=new Ss(this.toks,As(this.input,n.start),As(this.input,n.end))),n}},Io.resetTo=function(e){this.toks.pos=e;var t,n=this.input.charAt(e-1);if(this.toks.exprAllowed=!n||/[[{(,;:?/*=+\-~!|&%^<>]/.test(n)||/[enwfd]/.test(n)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(e-10,e)),this.options.locations)for(this.toks.curLine=1,this.toks.lineStart=ds.lastIndex=0;(t=ds.exec(this.input))&&t.index<e;)++this.toks.curLine,this.toks.lineStart=t.index+t[0].length},Io.lookAhead=function(e){for(;e>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[e-1]};var Po=Fo.prototype;Po.parseTopLevel=function(){var e=this.startNodeAt(this.options.locations?[0,As(this.input,0)]:0);for(e.body=[];this.tok.type!==ps.eof;)e.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(e.body),this.last=this.tok,e.sourceType=this.options.sourceType,this.finishNode(e,"Program")},Po.parseStatement=function(){var e,t=this.tok.type,n=this.startNode();switch(this.toks.isLet()&&(t=ps._var,e="let"),t){case ps._break:case ps._continue:this.next();var i=t===ps._break;return this.semicolon()||this.canInsertSemicolon()?n.label=null:(n.label=this.tok.type===ps.name?this.parseIdent():null,this.semicolon()),this.finishNode(n,i?"BreakStatement":"ContinueStatement");case ps._debugger:return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement");case ps._do:return this.next(),n.body=this.parseStatement(),n.test=this.eat(ps._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(n,"DoWhileStatement");case ps._for:this.next();var r=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(ps.parenL),this.tok.type===ps.semi)return this.parseFor(n,null);var s=this.toks.isLet();if(s||this.tok.type===ps._var||this.tok.type===ps._const){var o=this.parseVar(this.startNode(),!0,s?"let":this.tok.value);return 1!==o.declarations.length||this.tok.type!==ps._in&&!this.isContextual("of")?this.parseFor(n,o):(this.options.ecmaVersion>=9&&this.tok.type!==ps._in&&(n.await=r),this.parseForIn(n,o))}var a=this.parseExpression(!0);return this.tok.type===ps._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==ps._in&&(n.await=r),this.parseForIn(n,this.toAssignable(a))):this.parseFor(n,a);case ps._function:return this.next(),this.parseFunction(n,!0);case ps._if:return this.next(),n.test=this.parseParenExpression(),n.consequent=this.parseStatement(),n.alternate=this.eat(ps._else)?this.parseStatement():null,this.finishNode(n,"IfStatement");case ps._return:return this.next(),this.eat(ps.semi)||this.canInsertSemicolon()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement");case ps._switch:var u,l=this.curIndent,c=this.curLineStart;for(this.next(),n.discriminant=this.parseParenExpression(),n.cases=[],this.pushCx(),this.expect(ps.braceL);!this.closes(ps.braceR,l,c,!0);)if(this.tok.type===ps._case||this.tok.type===ps._default){var p=this.tok.type===ps._case;u&&this.finishNode(u,"SwitchCase"),n.cases.push(u=this.startNode()),u.consequent=[],this.next(),u.test=p?this.parseExpression():null,this.expect(ps.colon)}else u||(n.cases.push(u=this.startNode()),u.consequent=[],u.test=null),u.consequent.push(this.parseStatement());return u&&this.finishNode(u,"SwitchCase"),this.popCx(),this.eat(ps.braceR),this.finishNode(n,"SwitchStatement");case ps._throw:return this.next(),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement");case ps._try:if(this.next(),n.block=this.parseBlock(),n.handler=null,this.tok.type===ps._catch){var h=this.startNode();this.next(),this.eat(ps.parenL)?(h.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(ps.parenR)):h.param=null,h.body=this.parseBlock(),n.handler=this.finishNode(h,"CatchClause")}return n.finalizer=this.eat(ps._finally)?this.parseBlock():null,n.handler||n.finalizer?this.finishNode(n,"TryStatement"):n.block;case ps._var:case ps._const:return this.parseVar(n,!1,e||this.tok.value);case ps._while:return this.next(),n.test=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WhileStatement");case ps._with:return this.next(),n.object=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WithStatement");case ps.braceL:return this.parseBlock();case ps.semi:return this.next(),this.finishNode(n,"EmptyStatement");case ps._class:return this.parseClass(!0);case ps._import:if(this.options.ecmaVersion>10){var d=this.lookAhead(1).type;if(d===ps.parenL||d===ps.dot)return n.expression=this.parseExpression(),this.semicolon(),this.finishNode(n,"ExpressionStatement")}return this.parseImport();case ps._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,!0,!0);var f=this.parseExpression();return ko(f)?(this.next(),this.tok.type===ps.eof?this.finishNode(n,"EmptyStatement"):this.parseStatement()):t===ps.name&&"Identifier"===f.type&&this.eat(ps.colon)?(n.body=this.parseStatement(),n.label=f,this.finishNode(n,"LabeledStatement")):(n.expression=f,this.semicolon(),this.finishNode(n,"ExpressionStatement"))}},Po.parseBlock=function(){var e=this.startNode();this.pushCx(),this.expect(ps.braceL);var t=this.curIndent,n=this.curLineStart;for(e.body=[];!this.closes(ps.braceR,t,n,!0);)e.body.push(this.parseStatement());return this.popCx(),this.eat(ps.braceR),this.finishNode(e,"BlockStatement")},Po.parseFor=function(e,t){return e.init=t,e.test=e.update=null,this.eat(ps.semi)&&this.tok.type!==ps.semi&&(e.test=this.parseExpression()),this.eat(ps.semi)&&this.tok.type!==ps.parenR&&(e.update=this.parseExpression()),this.popCx(),this.expect(ps.parenR),e.body=this.parseStatement(),this.finishNode(e,"ForStatement")},Po.parseForIn=function(e,t){var n=this.tok.type===ps._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.popCx(),this.expect(ps.parenR),e.body=this.parseStatement(),this.finishNode(e,n)},Po.parseVar=function(e,t,n){e.kind=n,this.next(),e.declarations=[];do{var i=this.startNode();i.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),i.init=this.eat(ps.eq)?this.parseMaybeAssign(t):null,e.declarations.push(this.finishNode(i,"VariableDeclarator"))}while(this.eat(ps.comma));if(!e.declarations.length){var r=this.startNode();r.id=this.dummyIdent(),e.declarations.push(this.finishNode(r,"VariableDeclarator"))}return t||this.semicolon(),this.finishNode(e,"VariableDeclaration")},Po.parseClass=function(e){var t=this.startNode();this.next(),this.tok.type===ps.name?t.id=this.parseIdent():t.id=!0===e?this.dummyIdent():null,t.superClass=this.eat(ps._extends)?this.parseExpression():null,t.body=this.startNode(),t.body.body=[],this.pushCx();var n=this.curIndent+1,i=this.curLineStart;for(this.eat(ps.braceL),this.curIndent+1<n&&(n=this.curIndent,i=this.curLineStart);!this.closes(ps.braceR,n,i);){var r=this.parseClassElement();r&&t.body.body.push(r)}return this.popCx(),this.eat(ps.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(t.body,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Po.parseClassElement=function(){if(this.eat(ps.semi))return null;var e=this.options,t=e.ecmaVersion,n=e.locations,i=this.curIndent,r=this.curLineStart,s=this.startNode(),o="",a=!1,u=!1,l="method";if(s.static=!1,this.eatContextual("static")&&(this.isClassElementNameStart()||this.toks.type===ps.star?s.static=!0:o="static"),!o&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.toks.type!==ps.star||this.canInsertSemicolon()?o="async":u=!0),!o){a=this.eat(ps.star);var c=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?l=c:o=c)}if(o)s.computed=!1,s.key=this.startNodeAt(n?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),s.key.name=o,this.finishNode(s.key,"Identifier");else if(this.parseClassElementName(s),ko(s.key))return ko(this.parseMaybeAssign())&&this.next(),this.eat(ps.comma),null;if(t<13||this.toks.type===ps.parenL||"method"!==l||a||u){var p=!s.computed&&!s.static&&!a&&!u&&"method"===l&&("Identifier"===s.key.type&&"constructor"===s.key.name||"Literal"===s.key.type&&"constructor"===s.key.value);s.kind=p?"constructor":l,s.value=this.parseMethod(a,u),this.finishNode(s,"MethodDefinition")}else{if(this.eat(ps.eq))if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine())s.value=null;else{var h=this.inAsync,d=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=h,this.inGenerator=d}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s},Po.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()},Po.parseClassElementName=function(e){this.toks.type===ps.privateId?(e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Po.parseFunction=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=6&&(e.generator=this.eat(ps.star)),this.options.ecmaVersion>=8&&(e.async=!!n),this.tok.type===ps.name?e.id=this.parseIdent():!0===t&&(e.id=this.dummyIdent()),this.inAsync=e.async,this.inGenerator=e.generator,this.inFunction=!0,e.params=this.parseFunctionParams(),e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},Po.parseExport=function(){var e=this.startNode();if(this.next(),this.eat(ps.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?e.exported=this.parseExprAtom():e.exported=null),e.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(ps._default)){var t;if(this.tok.type===ps._function||(t=this.toks.isAsyncFunction())){var n=this.startNode();this.next(),t&&this.next(),e.declaration=this.parseFunction(n,"nullableID",t)}else this.tok.type===ps._class?e.declaration=this.parseClass("nullableID"):(e.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(e,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(e.declaration=this.parseStatement(),e.specifiers=[],e.source=null):(e.declaration=null,e.specifiers=this.parseExportSpecifierList(),e.source=this.eatContextual("from")?this.parseExprAtom():null,this.semicolon()),this.finishNode(e,"ExportNamedDeclaration")},Po.parseImport=function(){var e,t=this.startNode();return this.next(),this.tok.type===ps.string?(t.specifiers=[],t.source=this.parseExprAtom()):(this.tok.type===ps.name&&"from"!==this.tok.value&&((e=this.startNode()).local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(ps.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===ps.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Po.parseImportSpecifiers=function(){var e=[];if(this.tok.type===ps.star){var t=this.startNode();this.next(),t.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),e.push(this.finishNode(t,"ImportNamespaceSpecifier"))}else{var n=this.curIndent,i=this.curLineStart,r=this.nextLineStart;for(this.pushCx(),this.eat(ps.braceL),this.curLineStart>r&&(r=this.curLineStart);!this.closes(ps.braceR,n+(this.curLineStart<=r?1:0),i);){var s=this.startNode();if(this.eat(ps.star))s.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),this.finishNode(s,"ImportNamespaceSpecifier");else{if(this.isContextual("from"))break;if(s.imported=this.parseIdent(),ko(s.imported))break;s.local=this.eatContextual("as")?this.parseIdent():s.imported,this.finishNode(s,"ImportSpecifier")}e.push(s),this.eat(ps.comma)}this.eat(ps.braceR),this.popCx()}return e},Po.parseExportSpecifierList=function(){var e=[],t=this.curIndent,n=this.curLineStart,i=this.nextLineStart;for(this.pushCx(),this.eat(ps.braceL),this.curLineStart>i&&(i=this.curLineStart);!this.closes(ps.braceR,t+(this.curLineStart<=i?1:0),n)&&!this.isContextual("from");){var r=this.startNode();if(r.local=this.parseIdent(),ko(r.local))break;r.exported=this.eatContextual("as")?this.parseIdent():r.local,this.finishNode(r,"ExportSpecifier"),e.push(r),this.eat(ps.comma)}return this.eat(ps.braceR),this.popCx(),e};var Oo=Fo.prototype;Oo.checkLVal=function(e){if(!e)return e;switch(e.type){case"Identifier":case"MemberExpression":return e;case"ParenthesizedExpression":return e.expression=this.checkLVal(e.expression),e;default:return this.dummyIdent()}},Oo.parseExpression=function(e){var t=this.storeCurrentPos(),n=this.parseMaybeAssign(e);if(this.tok.type===ps.comma){var i=this.startNodeAt(t);for(i.expressions=[n];this.eat(ps.comma);)i.expressions.push(this.parseMaybeAssign(e));return this.finishNode(i,"SequenceExpression")}return n},Oo.parseParenExpression=function(){this.pushCx(),this.expect(ps.parenL);var e=this.parseExpression();return this.popCx(),this.expect(ps.parenR),e},Oo.parseMaybeAssign=function(e){if(this.inGenerator&&this.toks.isContextual("yield")){var t=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==ps.star&&!this.tok.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(ps.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")}var n=this.storeCurrentPos(),i=this.parseMaybeConditional(e);if(this.tok.type.isAssign){var r=this.startNodeAt(n);return r.operator=this.tok.value,r.left=this.tok.type===ps.eq?this.toAssignable(i):this.checkLVal(i),this.next(),r.right=this.parseMaybeAssign(e),this.finishNode(r,"AssignmentExpression")}return i},Oo.parseMaybeConditional=function(e){var t=this.storeCurrentPos(),n=this.parseExprOps(e);if(this.eat(ps.question)){var i=this.startNodeAt(t);return i.test=n,i.consequent=this.parseMaybeAssign(),i.alternate=this.expect(ps.colon)?this.parseMaybeAssign(e):this.dummyIdent(),this.finishNode(i,"ConditionalExpression")}return n},Oo.parseExprOps=function(e){var t=this.storeCurrentPos(),n=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),t,-1,e,n,i)},Oo.parseExprOp=function(e,t,n,i,r,s){if(this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())return e;var o=this.tok.type.binop;if(null!=o&&(!i||this.tok.type!==ps._in)&&o>n){var a=this.startNodeAt(t);if(a.left=e,a.operator=this.tok.value,this.next(),this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())a.right=this.dummyIdent();else{var u=this.storeCurrentPos();a.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,i,r,s)}return this.finishNode(a,/&&|\|\||\?\?/.test(a.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,n,i,r,s)}return e},Oo.parseMaybeUnary=function(e){var t,n=this.storeCurrentPos();if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))t=this.parseAwait(),e=!0;else if(this.tok.type.prefix){var i=this.startNode(),r=this.tok.type===ps.incDec;r||(e=!0),i.operator=this.tok.value,i.prefix=!0,this.next(),i.argument=this.parseMaybeUnary(!0),r&&(i.argument=this.checkLVal(i.argument)),t=this.finishNode(i,r?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===ps.ellipsis){var s=this.startNode();this.next(),s.argument=this.parseMaybeUnary(e),t=this.finishNode(s,"SpreadElement")}else for(t=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(n);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(t),this.next(),t=this.finishNode(o,"UpdateExpression")}if(!e&&this.eat(ps.starstar)){var a=this.startNodeAt(n);return a.operator="**",a.left=t,a.right=this.parseMaybeUnary(!1),this.finishNode(a,"BinaryExpression")}return t},Oo.parseExprSubscripts=function(){var e=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),e,!1,this.curIndent,this.curLineStart)},Oo.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()){if(this.tok.type!==ps.dot||this.curIndent!==i)break;--i}var a="Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon(),u=s&&this.eat(ps.questionDot);if(u&&(o=!0),u&&this.tok.type!==ps.parenL&&this.tok.type!==ps.bracketL&&this.tok.type!==ps.backQuote||this.eat(ps.dot)){var l=this.startNodeAt(t);l.object=e,this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()?l.property=this.dummyIdent():l.property=this.parsePropertyAccessor()||this.dummyIdent(),l.computed=!1,s&&(l.optional=u),e=this.finishNode(l,"MemberExpression")}else if(this.tok.type===ps.bracketL){this.pushCx(),this.next();var c=this.startNodeAt(t);c.object=e,c.property=this.parseExpression(),c.computed=!0,s&&(c.optional=u),this.popCx(),this.expect(ps.bracketR),e=this.finishNode(c,"MemberExpression")}else if(n||this.tok.type!==ps.parenL){if(this.tok.type!==ps.backQuote)break;var p=this.startNodeAt(t);p.tag=e,p.quasi=this.parseTemplate(),e=this.finishNode(p,"TaggedTemplateExpression")}else{var h=this.parseExprList(ps.parenR);if(a&&this.eat(ps.arrow))return this.parseArrowExpression(this.startNodeAt(t),h,!0);var d=this.startNodeAt(t);d.callee=e,d.arguments=h,s&&(d.optional=u),e=this.finishNode(d,"CallExpression")}}if(o){var f=this.startNodeAt(t);f.expression=e,e=this.finishNode(f,"ChainExpression")}return e},Oo.parseExprAtom=function(){var e;switch(this.tok.type){case ps._this:case ps._super:var t=this.tok.type===ps._this?"ThisExpression":"Super";return e=this.startNode(),this.next(),this.finishNode(e,t);case ps.name:var n=this.storeCurrentPos(),i=this.parseIdent(),r=!1;if("async"===i.name&&!this.canInsertSemicolon()){if(this.eat(ps._function))return this.parseFunction(this.startNodeAt(n),!1,!0);this.tok.type===ps.name&&(i=this.parseIdent(),r=!0)}return this.eat(ps.arrow)?this.parseArrowExpression(this.startNodeAt(n),[i],r):i;case ps.regexp:e=this.startNode();var s=this.tok.value;return e.regex={pattern:s.pattern,flags:s.flags},e.value=s.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(e,"Literal");case ps.num:case ps.string:return(e=this.startNode()).value=this.tok.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===ps.num&&110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal");case ps._null:case ps._true:case ps._false:return(e=this.startNode()).value=this.tok.type===ps._null?null:this.tok.type===ps._true,e.raw=this.tok.type.keyword,this.next(),this.finishNode(e,"Literal");case ps.parenL:var o=this.storeCurrentPos();this.next();var a=this.parseExpression();if(this.expect(ps.parenR),this.eat(ps.arrow)){var u=a.expressions||[a];return u.length&&ko(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var l=this.startNodeAt(o);l.expression=a,a=this.finishNode(l,"ParenthesizedExpression")}return a;case ps.bracketL:return(e=this.startNode()).elements=this.parseExprList(ps.bracketR,!0),this.finishNode(e,"ArrayExpression");case ps.braceL:return this.parseObj();case ps._class:return this.parseClass(!1);case ps._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case ps._new:return this.parseNew();case ps.backQuote:return this.parseTemplate();case ps._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}},Oo.parseExprImport=function(){var e=this.startNode(),t=this.parseIdent(!0);switch(this.tok.type){case ps.parenL:return this.parseDynamicImport(e);case ps.dot:return e.meta=t,this.parseImportMeta(e);default:return e.name="import",this.finishNode(e,"Identifier")}},Oo.parseDynamicImport=function(e){return e.source=this.parseExprList(ps.parenR)[0]||this.dummyString(),this.finishNode(e,"ImportExpression")},Oo.parseImportMeta=function(e){return this.next(),e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty")},Oo.parseNew=function(){var e=this.startNode(),t=this.curIndent,n=this.curLineStart,i=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ps.dot))return e.meta=i,e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty");var r=this.storeCurrentPos();return e.callee=this.parseSubscripts(this.parseExprAtom(),r,!0,t,n),this.tok.type===ps.parenL?e.arguments=this.parseExprList(ps.parenR):e.arguments=[],this.finishNode(e,"NewExpression")},Oo.parseTemplateElement=function(){var e=this.startNode();return this.tok.type===ps.invalidTemplate?e.value={raw:this.tok.value,cooked:null}:e.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,"\n"),cooked:this.tok.value},this.next(),e.tail=this.tok.type===ps.backQuote,this.finishNode(e,"TemplateElement")},Oo.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.next(),e.expressions.push(this.parseExpression()),this.expect(ps.braceR)?t=this.parseTemplateElement():((t=this.startNode()).value={cooked:"",raw:""},t.tail=!0,this.finishNode(t,"TemplateElement")),e.quasis.push(t);return this.expect(ps.backQuote),this.finishNode(e,"TemplateLiteral")},Oo.parseObj=function(){var e=this.startNode();e.properties=[],this.pushCx();var t=this.curIndent+1,n=this.curLineStart;for(this.eat(ps.braceL),this.curIndent+1<t&&(t=this.curIndent,n=this.curLineStart);!this.closes(ps.braceR,t,n);){var i=this.startNode(),r=void 0,s=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(ps.ellipsis))i.argument=this.parseMaybeAssign(),e.properties.push(this.finishNode(i,"SpreadElement")),this.eat(ps.comma);else if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),i.method=!1,i.shorthand=!1,r=this.eat(ps.star)),this.parsePropertyName(i),this.toks.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(ps.star),this.parsePropertyName(i)):s=!1,ko(i.key))ko(this.parseMaybeAssign())&&this.next(),this.eat(ps.comma);else{if(this.eat(ps.colon))i.kind="init",i.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===ps.parenL||this.tok.type===ps.braceL))i.kind="init",i.method=!0,i.value=this.parseMethod(r,s);else if(this.options.ecmaVersion>=5&&"Identifier"===i.key.type&&!i.computed&&("get"===i.key.name||"set"===i.key.name)&&this.tok.type!==ps.comma&&this.tok.type!==ps.braceR&&this.tok.type!==ps.eq)i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);else{if(i.kind="init",this.options.ecmaVersion>=6)if(this.eat(ps.eq)){var a=this.startNodeAt(o);a.operator="=",a.left=i.key,a.right=this.parseMaybeAssign(),i.value=this.finishNode(a,"AssignmentExpression")}else i.value=i.key;else i.value=this.dummyIdent();i.shorthand=!0}e.properties.push(this.finishNode(i,"Property")),this.eat(ps.comma)}}return this.popCx(),this.eat(ps.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(e,"ObjectExpression")},Oo.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ps.bracketL))return e.computed=!0,e.key=this.parseExpression(),void this.expect(ps.bracketR);e.computed=!1}var t=this.tok.type===ps.num||this.tok.type===ps.string?this.parseExprAtom():this.parseIdent();e.key=t||this.dummyIdent()},Oo.parsePropertyAccessor=function(){return this.tok.type===ps.name||this.tok.type.keyword?this.parseIdent():this.tok.type===ps.privateId?this.parsePrivateIdent():void 0},Oo.parseIdent=function(){var e=this.tok.type===ps.name?this.tok.value:this.tok.type.keyword;if(!e)return this.dummyIdent();var t=this.startNode();return this.next(),t.name=e,this.finishNode(t,"Identifier")},Oo.parsePrivateIdent=function(){var e=this.startNode();return e.name=this.tok.value,this.next(),this.finishNode(e,"PrivateIdentifier")},Oo.initFunction=function(e){e.id=null,e.params=[],this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Oo.toAssignable=function(e,t){if(!e||"Identifier"===e.type||"MemberExpression"===e.type&&!t);else if("ParenthesizedExpression"===e.type)this.toAssignable(e.expression,t);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if("ObjectExpression"===e.type){e.type="ObjectPattern";for(var n=0,i=e.properties;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}}else if("ArrayExpression"===e.type)e.type="ArrayPattern",this.toAssignableList(e.elements,t);else if("Property"===e.type)this.toAssignable(e.value,t);else if("SpreadElement"===e.type)e.type="RestElement",this.toAssignable(e.argument,t);else{if("AssignmentExpression"!==e.type)return this.dummyIdent();e.type="AssignmentPattern",delete e.operator}}return e},Oo.toAssignableList=function(e,t){for(var n=0,i=e;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}return e},Oo.parseFunctionParams=function(e){return e=this.parseExprList(ps.parenR),this.toAssignableList(e,!0)},Oo.parseMethod=function(e,t){var n=this.startNode(),i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=!!e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inAsync=n.async,this.inGenerator=n.generator,this.inFunction=!0,n.params=this.parseFunctionParams(),n.body=this.parseBlock(),this.toks.adaptDirectivePrologue(n.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(n,"FunctionExpression")},Oo.parseArrowExpression=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inAsync=e.async,this.inGenerator=!1,this.inFunction=!0,e.params=this.toAssignableList(t,!0),e.expression=this.tok.type!==ps.braceL,e.expression?e.body=this.parseMaybeAssign():(e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body)),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},Oo.parseExprList=function(e,t){this.pushCx();var n=this.curIndent,i=this.curLineStart,r=[];for(this.next();!this.closes(e,n+1,i);)if(this.eat(ps.comma))r.push(t?null:this.dummyIdent());else{var s=this.parseMaybeAssign();if(ko(s)){if(this.closes(e,n,i))break;this.next()}else r.push(s);this.eat(ps.comma)}return this.popCx(),this.eat(e)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),r},Oo.parseAwait=function(){var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Ds.tabSize=4;const{stringify:Ro}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const Mo={"||":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Lo=17,Bo={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:Lo,ClassExpression:Lo,FunctionExpression:Lo,ObjectExpression:Lo,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function jo(e,t){const{generator:n}=e;if(e.write("("),null!=t&&t.length>0){n[t[0].type](t[0],e);const{length:i}=t;for(let r=1;r<i;r++){const i=t[r];e.write(", "),n[i.type](i,e)}}e.write(")")}function Vo(e,t,n,i){const r=e.expressionsPrecedence[t.type];if(r===Lo)return!0;const s=e.expressionsPrecedence[n.type];return r!==s?!i&&15===r&&14===s&&"**"===n.operator||r<s:(13===r||14===r)&&("**"===t.operator&&"**"===n.operator?!i:i?Mo[t.operator]<=Mo[n.operator]:Mo[t.operator]<Mo[n.operator])}function zo(e,t,n,i){const{generator:r}=e;Vo(e,t,n,i)?(e.write("("),r[t.type](t,e),e.write(")")):r[t.type](t,e)}function qo(e,t,n,i){const r=t.split("\n"),s=r.length-1;if(e.write(r[0].trim()),s>0){e.write(i);for(let t=1;t<s;t++)e.write(n+r[t].trim()+i);e.write(n+r[s].trim())}}function Uo(e,t,n,i){const{length:r}=t;for(let s=0;s<r;s++){const r=t[s];e.write(n),"L"===r.type[0]?e.write("// "+r.value.trim()+"\n",r):(e.write("/*"),qo(e,r.value,n,i),e.write("*/"+i))}}function Wo(e,t){const{generator:n}=e,{declarations:i}=t;e.write(t.kind+" ");const{length:r}=i;if(r>0){n.VariableDeclarator(i[0],e);for(let t=1;t<r;t++)e.write(", "),n.VariableDeclarator(i[t],e)}}let Ko,$o,Ho,Go,Jo,Xo;const Zo={Program(e,t){const n=t.indent.repeat(t.indentLevel),{lineEnd:i,writeComments:r}=t;r&&null!=e.comments&&Uo(t,e.comments,n,i);const s=e.body,{length:o}=s;for(let e=0;e<o;e++){const o=s[e];r&&null!=o.comments&&Uo(t,o.comments,n,i),t.write(n),this[o.type](o,t),t.write(i)}r&&null!=e.trailingComments&&Uo(t,e.trailingComments,n,i)},BlockStatement:Xo=function(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;t.write("{");const o=e.body;if(null!=o&&o.length>0){t.write(i),r&&null!=e.comments&&Uo(t,e.comments,s,i);const{length:a}=o;for(let e=0;e<a;e++){const n=o[e];r&&null!=n.comments&&Uo(t,n.comments,s,i),t.write(s),this[n.type](n,t),t.write(i)}t.write(n)}else r&&null!=e.comments&&(t.write(i),Uo(t,e.comments,s,i),t.write(n));r&&null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write("}"),t.indentLevel--},ClassBody:Xo,EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const n=t.expressionsPrecedence[e.expression.type];n===Lo||3===n&&"O"===e.expression.left.type[0]?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),null!=e.alternate&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t;t.indentLevel++;const s=n+t.indent,o=s+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+i);const{cases:a}=e,{length:u}=a;for(let e=0;e<u;e++){const n=a[e];r&&null!=n.comments&&Uo(t,n.comments,s,i),n.test?(t.write(s+"case "),this[n.test.type](n.test,t),t.write(":"+i)):t.write(s+"default:"+i);const{consequent:u}=n,{length:l}=u;for(let e=0;e<l;e++){const n=u[e];r&&null!=n.comments&&Uo(t,n.comments,o,i),t.write(o),this[n.type](n,t),t.write(i)}}t.indentLevel-=2,t.write(n+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:n}=e;null==n.param?t.write(" catch "):(t.write(" catch ("),this[n.param.type](n.param,t),t.write(") ")),this[n.body.type](n.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),null!=e.init){const{init:n}=e;"V"===n.type[0]?Wo(t,n):this[n.type](n,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:Ko=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:n}=e;"V"===n.type[0]?Wo(t,n):this[n.type](n,t),t.write("I"===e.type[3]?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:Ko,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:$o=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),jo(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:$o,VariableDeclaration(e,t){Wo(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),null!=e.init&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:n}=e,{type:i}=n,r=t.expressionsPrecedence[i];"C"===i[0]&&"l"===i[1]&&"E"===i[5]||!(r===Lo||r<t.expressionsPrecedence.ClassExpression)?this[n.type](n,t):(t.write("("),this[e.superClass.type](n,t),t.write(")")),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:n}=e,{length:i}=n;let r=0;if(i>0){for(;r<i;){r>0&&t.write(", ");const e=n[r],i=e.type[6];if("D"===i)t.write(e.local.name,e),r++;else{if("N"!==i)break;t.write("* as "+e.local.name,e),r++}}if(r<i){for(t.write("{");;){const e=n[r],{name:s}=e.imported;if(t.write(s,e),s!==e.local.name&&t.write(" as "+e.local.name),!(++r<i))break;t.write(", ")}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),null!=t.expressionsPrecedence[e.declaration.type]&&"F"!==e.declaration.type[0]&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:n}=e,{length:i}=n;if(i>0)for(let e=0;;){const r=n[e],{name:s}=r.local;if(t.write(s,r),s!==r.exported.name&&t.write(" as "+r.exported.name),!(++e<i))break;t.write(", ")}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration(e,t){null!=e.exported?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const n=e.kind[0];"g"!==n&&"s"!==n||t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),jo(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:n}=e;null!=n&&(1===n.length&&"I"===n[0].type[0]?t.write(n[0].name,n[0]):jo(t,e.params)),t.write(" => "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:Ho=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:Ho,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),zo(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:n,expressions:i}=e;t.write("`");const{length:r}=i;for(let e=0;e<r;e++){const r=i[e],s=n[e];t.write(s.value.raw,s),t.write("${"),this[r.type](r,t),t.write("}")}const s=n[n.length-1];t.write(s.value.raw,s),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){this[e.tag.type](e.tag,t),this[e.quasi.type](e.quasi,t)},ArrayExpression:Jo=function(e,t){if(t.write("["),e.elements.length>0){const{elements:n}=e,{length:i}=n;for(let e=0;;){const r=n[e];if(null!=r&&this[r.type](r,t),!(++e<i)){null==r&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:Jo,ObjectExpression(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;if(t.write("{"),e.properties.length>0){t.write(i),r&&null!=e.comments&&Uo(t,e.comments,s,i);const o=","+i,{properties:a}=e,{length:u}=a;for(let e=0;;){const n=a[e];if(r&&null!=n.comments&&Uo(t,n.comments,s,i),t.write(s),this[n.type](n,t),!(++e<u))break;t.write(o)}t.write(i),r&&null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write(n+"}")}else r?null!=e.comments?(t.write(i),Uo(t,e.comments,s,i),null!=e.trailingComments&&Uo(t,e.trailingComments,s,i),t.write(n+"}")):null!=e.trailingComments?(t.write(i),Uo(t,e.trailingComments,s,i),t.write(n+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||"i"!==e.kind[0]?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:n}=e,{length:i}=n;for(let e=0;this[n[e].type](n[e],t),++e<i;)t.write(", ")}t.write("}")},SequenceExpression(e,t){jo(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:n,argument:i,argument:{type:r}}=e;t.write(n);const s=Vo(t,i,e);s||!(n.length>1)&&("U"!==r[0]||"n"!==r[1]&&"p"!==r[1]||!i.prefix||i.operator[0]!==n||"+"!==n&&"-"!==n)||t.write(" "),s?(t.write(n.length>1?" (":"("),this[r](i,t),t.write(")")):this[r](i,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:Go=function(e,t){const n="in"===e.operator;n&&t.write("("),zo(t,e.left,e,!1),t.write(" "+e.operator+" "),zo(t,e.right,e,!0),n&&t.write(")")},LogicalExpression:Go,ConditionalExpression(e,t){const{test:n}=e,i=t.expressionsPrecedence[n.type];i===Lo||i<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[n.type](n,t),t.write(")")):this[n.type](n,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const n=t.expressionsPrecedence[e.callee.type];n===Lo||n<t.expressionsPrecedence.CallExpression||function(e){let t=e;for(;null!=t;){const{type:e}=t;if("C"===e[0]&&"a"===e[1])return!0;if("M"!==e[0]||"e"!==e[1]||"m"!==e[2])return!1;t=t.object}}(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),jo(t,e.arguments)},CallExpression(e,t){const n=t.expressionsPrecedence[e.callee.type];n===Lo||n<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),jo(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const n=t.expressionsPrecedence[e.object.type];n===Lo||n<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},Literal(e,t){null!=e.raw?t.write(e.raw,e):null!=e.regex?this.RegExpLiteral(e,t):null!=e.bigint?t.write(e.bigint+"n",e):t.write(Ro(e.value),e)},RegExpLiteral(e,t){const{regex:n}=e;t.write(`/${n.pattern}/${n.flags}`,e)}},Yo={};class Qo{constructor(e){const t=null==e?Yo:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:Zo,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:Bo,this.indent=null!=t.indent?t.indent:" ",this.lineEnd=null!=t.lineEnd?t.lineEnd:"\n",this.indentLevel=null!=t.startingIndentLevel?t.startingIndentLevel:0,this.writeComments=!!t.comments&&t.comments,null!=t.sourceMap&&(this.write=null==t.output?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=t.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split("\n").length-1,this.mapping={original:null,generated:this,name:void 0,source:t.sourceMap.file||t.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,t){this.output+=e,this.map(e,t)}writeToStreamAndMap(e,t){this.output.write(e),this.map(e,t)}map(e,t){if(null!=t){const{type:n}=t;if("L"===n[0]&&"n"===n[2])return this.column=0,void this.line++;if(null!=t.loc){const{mapping:e}=this;e.original=t.loc.start,e.name=t.name,this.sourceMap.addMapping(e)}if("T"===n[0]&&"E"===n[8]||"L"===n[0]&&"i"===n[1]&&"string"==typeof t.value){const{length:t}=e;let{column:n,line:i}=this;for(let r=0;r<t;r++)"\n"===e[r]?(n=0,i++):n++;return this.column=n,void(this.line=i)}}const{length:n}=e,{lineEnd:i}=this;n>0&&(this.lineEndSize>0&&(1===i.length?e[n-1]===i:e.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}}function ea(e,t){const n=new Qo(t);return n.generator[e.type](e,n),n.output}const ta=n(1227)("mongodb-aggregations:modules:import-pipeline"),na="aggregations/import-pipeline",ia=`${na}/NEW_PIPELINE_FROM_TEXT`,ra=`${na}/CLOSE_IMPORT`,sa=`${na}/CHANGE_TEXT`,oa=`${na}/CREATE_NEW`,aa=`${na}/CONFIRM_NEW`,ua={isOpen:!1,text:"",isConfirmationNeeded:!1,syntaxError:null},la={[ia]:e=>({...e,isOpen:!0,text:""}),[ra]:e=>({...e,isOpen:!1,isConfirmationNeeded:!1,syntaxError:null}),[sa]:(e,t)=>({...e,text:t.text}),[oa]:e=>({...e,isOpen:!1,isConfirmationNeeded:!0})},ca=()=>({type:ia}),pa=e=>{try{return function(e){const t=function(e){if(!e.body||1!==e.body.length)return;const t=e.body[0];if("ExpressionStatement"!==t.type)return;const{type:n,elements:i}=t.expression||{};return"ArrayExpression"!==n||i.find((e=>!function(e){return"ObjectExpression"===e.type&&e.properties&&1===e.properties.length}(e)))?void 0:i.map((e=>function(e){const{key:t,value:n}=e.properties[0];return{operator:t.name||t.value,source:ea(n,{comments:!0,indent:" "})}}(e)))}(function(e){try{const t=function(e,t){return Fo.parse(e,{ecmaVersion:6})}(e);return t}catch(e){const t=new Error(`Unable to parse the pipeline source: ${e.message}`);throw t.stack=e.stack,t}}(e));if(!t)throw new Error("Unable to extract pipeline stages: the provided input is not an array of objects.");return t}(e).map((e=>ha(e.operator,e.source,null)))}catch(e){return ta(e),[ha(null,"",e.message)]}},ha=(e,t,n)=>({...Ln(),stageOperator:e,stage:t,isValid:!n,syntaxError:n});var da=n(6160),fa=n.n(da);const ma="aggregations/data-service/DATA_SERVICE_CONNECTED",ga={error:null,dataService:null};function va(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ga,t=arguments.length>1?arguments[1]:void 0;return t.type===ma?{error:t.error,dataService:t.dataService}:e}const ya=(e,t)=>({type:ma,error:e,dataService:t}),xa="aggregations/fields/FIELDS_CHANGED",ba=[],Ea=null,wa="aggregations/source-name/SOURCE_NAME_CHANGED",Ca=null,Sa=n(1227)("mongodb-aggregations:modules:input-document"),Aa="aggregations/input-documents",Da=`${Aa}/TOGGLE_INPUT_COLLAPSED`,_a=`${Aa}/UPDATE_INPUT_DOCUMENTS`,ka=`${Aa}/LOADING_INPUT_DOCUMENTS`,Ta={count:0,documents:[],error:null,isExpanded:!0,isLoading:!1},Fa=(e,t,n)=>({type:_a,count:e,documents:t,error:n}),Ia=()=>(e,t)=>{const n=t(),i=n.dataService.dataService,r=n.namespace,s={maxTimeMS:n.settings.maxTimeMS},o=[{$limit:n.settings.sampleSize}];i&&i.isConnected()?(e({type:ka}),i.estimatedCount(r,s,((t,n)=>{i.aggregate(r,o,s,((i,r)=>{if(i)return e(Fa(t?"N/A":n,[],i));r.toArray(((i,s)=>{e(Fa(t?"N/A":n,s,i)),r.close()}))}))}))):i&&!i.isConnected()&&Sa("warning: trying to refresh aggregation but dataService is disconnected",i)},Na="aggregations/namespace/NAMESPACE_CHANGED",Pa=e=>({type:Na,namespace:e}),Oa="aggregations/env/ENV_CHANGED",Ra=Ot.ON_PREM,Ma="aggregations/env/IS_TIME_SERIES_CHANGED",La=!1,Ba="aggregations/server-version/SERVER_VERSION_CHANGED",ja="4.0.0",Va="aggregations/name/NAME_CHANGED",za="aggregations/limit/LIMIT_CHANGED",qa="aggregations/large-limit/LARGE_LIMIT_CHANGED",Ua=rt,Wa="aggregations/is-atlas-deployed/SET_IS_ATLAS_DEPLOYED",Ka=!1,$a="aggregations/is-readonly/IS_READONLY_CHANGED",Ha=!1,Ga="aggregations/comments/TOGGLE_COMMENTS",Ja=!0,Xa="aggregations/sample/TOGGLE_SAMPLE",Za=!0,Ya="agreggations/restore-pipeline",Qa=`${Ya}/MODAL_TOGGLE`,eu=`${Ya}/OBJECT_ID`,tu={isModalVisible:!1,pipelineObjectID:""},nu="aggregations/is-overview-on/TOGGLE_OVERVIEW",iu=!1,ru="aggregations/settings",su=`${ru}/TOGGLE_IS_EXPANDED`,ou=`${ru}/TOGGLE_COMMENT_MODE`,au=`${ru}/SET_SAMPLE_SIZE`,uu=`${ru}/SET_MAX_TIME_MS`,lu=`${ru}/SET_LIMIT`,cu=`${ru}/APPLY_SETTINGS`,pu={isExpanded:!1,isCommentMode:!0,isDirty:!1,sampleSize:10,maxTimeMS:it,limit:rt},hu=()=>({type:su}),du="aggregations/is-fullscreen-on/TOGGLE_FULLSCREEN",fu=!1,mu="aggregations/saving-pipeline/NAME_CHANGED",gu="aggregations/saving-pipeline/APPLY",vu="aggregations/saving-pipeline/CANCEL",yu="aggregations/saving-pipeline/OPEN",xu={isOpen:!1,name:"",isSaveAs:!1},bu=function(){let{name:e="",isSaveAs:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:yu,isSaveAs:t,name:e}},Eu="aggregations/out-results-fn/OUT_RESULTS_FN_CHANGED",wu=null,Cu="aggregations/is-new-pipeline-confirm/SET_IS_NEW_PIPELINE_CONFIRM",Su=!1,Au=e=>({type:Cu,isNewPipelineConfirm:e});var Du;!function(e){e.SetDataLake="compass-aggregations/setDataLake"}(Du||(Du={}));const _u=!1,ku=e=>({type:Du.SetDataLake,dataLake:e});let Tu;!function(e){e.IndexesFetched="compass-aggregations/indexesFetched"}(Tu||(Tu={}));const Fu=[],{track:Iu,debug:Nu}=We("COMPASS-AGGREGATIONS-UI"),Pu={appRegistry:Gt.INITIAL_STATE,dataService:ga,fields:ba,inputDocuments:Ta,namespace:"",env:Ra,isTimeSeries:La,serverVersion:ja,pipeline:Bn,savedPipeline:mr,restorePipeline:tu,name:"",collationString:Tr,isAtlasDeployed:Ka,isReadonly:Ha,isOverviewOn:iu,comments:Ja,sample:Za,autoPreview:gn,id:"",isModified:dn,importPipeline:ua,settings:pu,limit:10,largeLimit:Ua,maxTimeMS:Rr,isFullscreenOn:fu,savingPipeline:xu,projections:cn,outResultsFn:wu,editViewName:Ea,sourceName:Ca,isNewPipelineConfirm:Su,updateViewError:_i,aggregation:di,workspace:bi,countDocuments:yi,explain:Xi,isDataLake:_u,indexes:Fu},Ou="aggregations/CLEAR_PIPELINE",Ru="aggregations/RESTORE_PIPELINE",Mu="aggregations/NEW_PIPELINE",Lu="aggregations/CLONE_PIPELINE",Bu="aggregations/NEW_FROM_PASTE",ju="aggregations/MODIFY_VIEW",Vu=j({appRegistry:Jt(),comments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ja,t=arguments.length>1?arguments[1]:void 0;return t.type===Ga?!e:e},sample:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Za,t=arguments.length>1?arguments[1]:void 0;return t.type===Xa?!e:e},autoPreview:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gn,t=arguments.length>1?arguments[1]:void 0;return t.type===mn.AutoPreviewToggled?t.value:e},dataService:va,fields:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ba,t=arguments.length>1?arguments[1]:void 0;return t.type===xa?t.fields:e},inputDocuments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ta,t=arguments.length>1?arguments[1]:void 0;return t.type===Da?{...e,isExpanded:!e.isExpanded}:t.type===ka?{...e,isLoading:!0}:t.type===_a?{...e,count:t.count,documents:t.documents,error:t.error,isLoading:!1}:e},namespace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Na?t.namespace:e},env:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ra,t=arguments.length>1?arguments[1]:void 0;return t.type===Oa?t.env:e},isTimeSeries:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:La,t=arguments.length>1?arguments[1]:void 0;return t.type===Ma?t.isTimeSeries:e},serverVersion:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ja,t=arguments.length>1?arguments[1]:void 0;return t.type===Ba&&t.version||e},savedPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mr,t=arguments.length>1?arguments[1]:void 0;const n=gr[t.type];return n?n(e,t):e},restorePipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tu,t=arguments.length>1?arguments[1]:void 0;return t.type===Qa?{...e,isModalVisible:!!t.index}:t.type===eu?{...e,pipelineObjectID:t.objectID}:e},pipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[Ln()],t=arguments.length>1?arguments[1]:void 0;const n=zn[t.type];return n?n(e,t):e},name:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Va?t.name:e},collationString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tr,t=arguments.length>1?arguments[1]:void 0;return t.type===kr?Fr(t.value):e},id:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===an?(new Xt.ObjectId).toHexString():e},isModified:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dn,t=arguments.length>1?arguments[1]:void 0;return t.type===hn?t.isModified:e},isAtlasDeployed:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ka,t=arguments.length>1?arguments[1]:void 0;return t.type===Wa?t.isAtlasDeployed:e},isReadonly:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ha,t=arguments.length>1?arguments[1]:void 0;return t.type===$a?t.isReadonly:e},importPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ua,t=arguments.length>1?arguments[1]:void 0;const n=la[t.type];return n?n(e,t):e},isOverviewOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iu;return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pu,t=arguments.length>1?arguments[1]:void 0;return t.type===su?0==!e.isExpanded&&!0===e.isDirty?{...e,...pu}:{...e,isExpanded:!e.isExpanded}:t.type===ou?{...e,isCommentMode:!e.isCommentMode,isDirty:!0}:t.type===au?{...e,sampleSize:t.value,isDirty:!0}:t.type===uu?{...e,maxTimeMS:t.value,isDirty:!0}:t.type===lu?{...e,limit:t.value,isDirty:!0}:(t.type,e)},limit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1?arguments[1]:void 0;return t.type===za?t.limit:e},largeLimit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ua,t=arguments.length>1?arguments[1]:void 0;return t.type===qa?t.largeLimit:e},maxTimeMS:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rr,t=arguments.length>1?arguments[1]:void 0;return t.type===Or?t.maxTimeMS:e},isFullscreenOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fu,t=arguments.length>1?arguments[1]:void 0;return t.type===du?!e:e},savingPipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xu,t=arguments.length>1?arguments[1]:void 0;return t.type===mu?{...e,name:t.name}:t.type===yu?{...e,isOpen:!0,isSaveAs:t.isSaveAs,name:t.name}:t.type===vu?{...e,name:"",isOpen:!1}:e},projections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cn;return e},editViewName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ea;return e},sourceName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ca,t=arguments.length>1?arguments[1]:void 0;return t.type===wa?t.sourceName:e},outResultsFn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wu,t=arguments.length>1?arguments[1]:void 0;return t.type===Eu?t.outResultsFn:e},isNewPipelineConfirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Su,t=arguments.length>1?arguments[1]:void 0;return t.type===Cu?t.isNewPipelineConfirm:e},updateViewError:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_i,t=arguments.length>1?arguments[1]:void 0;return t.type===ki?t.error:t.type===Ti?null:e},aggregation:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return di;case hi.AggregationStarted:return{...e,loading:!0,error:void 0,documents:[],abortController:t.abortController,previousPageData:{page:e.page,documents:e.documents,isLast:e.isLast}};case hi.AggregationFinished:return{...e,isLast:t.isLast,page:t.page,documents:t.documents,loading:!1,abortController:void 0,error:void 0,previousPageData:void 0};case hi.AggregationFailed:return{...e,documents:[],loading:!1,abortController:void 0,error:t.error,page:t.page,previousPageData:void 0};case hi.AggregationCancelledByUser:return{...e,loading:!1,abortController:void 0,documents:e.previousPageData?.documents||[],page:e.previousPageData?.page||1,isLast:e.previousPageData?.isLast||!1,previousPageData:void 0};case hi.LastPageReached:return{...e,isLast:!0,loading:!1,page:t.page};default:return e}},workspace:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return t.view;case hi.AggregationStarted:return"results";default:return e}},countDocuments:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case xi.WorkspaceChanged:return yi;case vi.CountStarted:return{loading:!0,abortController:t.abortController};case vi.CountFinished:return{loading:!1,abortController:void 0,count:t.count};case vi.CountFailed:return{...e,loading:!1,abortController:void 0};default:return e}},aggregationWorkspaceId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Xt.UUID).toHexString();return e},explain:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ji.ExplainStarted:return{isModalOpen:!0,isLoading:!0,explain:void 0,error:void 0,abortController:t.abortController};case Ji.ExplainFinished:return{isModalOpen:!0,isLoading:!1,explain:t.explain,error:void 0,abortController:void 0};case Ji.ExplainFailed:return{isModalOpen:!0,isLoading:!1,explain:void 0,error:t.error,abortController:void 0};case Ji.ExplainCancelled:return Xi;default:return e}},isDataLake:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_u,t=arguments.length>1?arguments[1]:void 0;return t.type===Du.SetDataLake?t.dataLake:e},indexes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fu,t=arguments.length>1?arguments[1]:void 0;return t.type===Tu.IndexesFetched?t.indexes:e}}),zu={[Na]:(e,t)=>{const n={...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,serverVersion:e.serverVersion,dataService:e.dataService,appRegistry:e.appRegistry};return Vu(n,t)},"aggregations/reset":e=>({...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId}),[Ru]:(e,t)=>{const{id:n,name:i,comments:r,sample:s,autoPreview:o,collationString:a,pipeline:u}=t.restoreState;return{...e,id:n,name:i,comments:r,sample:s,autoPreview:o,collationString:Fr(a),pipeline:u,savedPipeline:{...e.savedPipeline,isListVisible:!1},restorePipeline:{isModalVisible:!1,pipelineObjectID:""}}},[Ou]:e=>({...e,pipeline:[],limit:10,largeLimit:Ua,maxTimeMS:Rr,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,savedPipeline:{...e.savedPipeline,isListVisible:!0}}),[Mu]:e=>({...Pu,aggregationWorkspaceId:e.aggregationWorkspaceId,appRegistry:e.appRegistry,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,fields:e.fields,serverVersion:e.serverVersion,dataService:e.dataService,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,inputDocuments:e.inputDocuments}),[Lu]:e=>({...e,id:(new Xt.ObjectId).toHexString(),name:`${e.name} (copy)`,isModified:!0}),[aa]:e=>{const t=pa(e.importPipeline.text),n=t.length>0?t[0].syntaxError:null;return n||Iu("Aggregation Imported From Text",{num_stages:t.length}),{...e,name:"",collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n?[]:t,importPipeline:{isOpen:!!n,isConfirmationNeeded:!1,text:n?e.importPipeline.text:"",syntaxError:n}}},[nu]:e=>{const t={...e,isOverviewOn:!e.isOverviewOn};return t.pipeline&&t.pipeline.forEach((e=>{e.isExpanded=!t.isOverviewOn})),t.inputDocuments&&(t.inputDocuments.isExpanded=!t.isOverviewOn),t},[cu]:e=>{const t={...e,limit:e.settings.sampleSize,largeLimit:e.settings.limit,comments:e.settings.isCommentMode,maxTimeMS:e.settings.maxTimeMS};return t.settings.isDirty=!1,t},[gu]:e=>{const t={...e,name:e.savingPipeline.name};return t.savingPipeline.isOpen=!1,t},[ln]:e=>{const t={...e,projections:[]};return t.pipeline.map(((e,n)=>{e.projections=Ut(e,null),e.projections.map((e=>{e.index=n,t.projections.push(e)}))})),t},[Bu]:(e,t)=>{const n=pa(t.text),i=n.length>0?n[0].syntaxError:null;return i||e.pipeline.length>1?e:{...e,name:"",collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:t.text,syntaxError:i}}},[ju]:(e,t)=>{const n=t.pipeline.map((e=>ha(Object.keys(e)[0],(0,Rt.toJSString)(Object.values(e)[0]," "),null)));return{...e,editViewName:t.name,isReadonly:t.isReadonly,sourceName:t.sourceName,collationString:Tr,id:(new Xt.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:"",syntaxError:null}}}},qu=(e,t)=>{const n=zu[t.type];return n?n(e,t):Vu(e,t)},Uu=()=>({type:Ou}),Wu=e=>({type:Ru,restoreState:e}),Ku=e=>t=>{t(Uu()),t(Wu(e)),t((0,Gt.globalAppRegistryEmit)("compass:aggregations:pipeline-opened")),t(ti(0,!0))},$u=()=>(e,t)=>{const n=t(),i={source:n.namespace,pipeline:n.pipeline.map((e=>e.executor||Kt(e))).filter((e=>!fa()(e)))};Nu("emitting","open-create-view",i),e((0,Gt.localAppRegistryEmit)("open-create-view",i))};function Hu(e){let{onAction:t,title:n,glyph:s,menuItems:o,"data-testid":a}=e;const[u,l]=(0,i.useState)(!1),c=(0,i.useCallback)((e=>{e.stopPropagation(),l(!1),t(e.currentTarget.dataset.action)}),[t]);return r().createElement(he.Menu,{"data-testid":`${a}-content`,open:u,setOpen:l,justify:"start",trigger:e=>{let{onClick:t,children:i}=e;return r().createElement(he.Button,{"data-testid":a,title:n,"aria-label":n,variant:"primary",size:"xsmall",leftGlyph:r().createElement(he.Icon,{glyph:s}),onClick:e=>{e.stopPropagation(),t()}},n,i)}},o.map((e=>r().createElement(he.MenuItem,{key:e.title,"data-action":e.action,"data-testid":`${a}-${e.action}`,onClick:c,"aria-label":e.title},e.title))))}const Gu=Y((e=>{let{name:t,serverVersion:n}=e;return{pipelineName:t,isCreateViewAvailable:nn().gte(n,"3.4.0")}}),{onSave:e=>""===e?bu():Er(),onSaveAs:e=>""===e?bu():bu({name:e,isSaveAs:!0}),onCreateView:()=>$u()})((e=>{let{pipelineName:t,isCreateViewAvailable:n,onSave:i,onSaveAs:s,onCreateView:o}=e;return r().createElement(Hu,{"data-testid":"save-menu",title:"Save",glyph:"Save",onAction:e=>{switch(e){case"save":return i(t);case"saveAs":return s(t);case"createView":return o()}},menuItems:[{action:"save",title:"Save"},{action:"saveAs",title:"Save as"},n&&{action:"createView",title:"Create view"}].filter(Boolean)})})),Ju=Y(null,(e=>({onCreatePipeline:()=>e(Au(!0)),onCreatePipelineFromText:()=>e(ca())})))((e=>{let{onCreatePipeline:t,onCreatePipelineFromText:n}=e;return r().createElement(Hu,{"data-testid":"create-new-menu",title:"Create new",glyph:"Plus",onAction:e=>{switch(e){case"createPipleine":return t();case"createPipleineFromText":return n()}},menuItems:[{action:"createPipleine",title:"Pipeline"},{action:"createPipleineFromText",title:"Pipeline from text"}]})})),Xu=(0,he.css)({display:"flex",alignItems:"center"}),Zu=(0,he.css)({maxWidth:"100px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),Yu=(0,he.css)({fontStyle:"italic",whiteSpace:"nowrap"}),Qu=Y((e=>{let{name:t,isModified:n}=e;return{name:t,isModified:n}}))((e=>{let{name:t,isModified:n}=e;return r().createElement(he.Body,{className:Xu,"data-testid":"pipeline-name"},""===t?"Untitled":r().createElement(he.Tooltip,{trigger:e=>{let{children:n,...i}=e;return r().createElement("span",d({},i,{className:Zu}),n,t)}},r().createElement(he.Body,null,t)),n&&r().createElement("span",{className:Yu}," – modified"))})),el=(0,he.css)({display:"flex",gap:he.spacing[2],justifyItems:"center"}),tl=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[1]}),nl=(0,he.css)({marginBottom:0,padding:0,textTransform:"uppercase"}),il=Y((e=>{let{autoPreview:t}=e;return{isAutoPreview:t}}),{onToggleAutoPreview:vn,onToggleSettings:hu})((e=>{let{isAutoPreview:t,onToggleAutoPreview:n,onToggleSettings:i}=e;return r().createElement("div",{className:el,"data-testid":"pipeline-toolbar-extra-settings"},r().createElement("div",{className:tl},r().createElement(he.Toggle,{id:"auto-preview",size:"xsmall","aria-label":"Toggle Auto Preview",onChange:e=>{n(e)},"data-testid":"pipeline-toolbar-preview-toggle",checked:t}),r().createElement(he.Label,{className:nl,htmlFor:"auto-preview"},"Auto Preview")),r().createElement(he.IconButton,{"aria-label":"More Settings",onClick:()=>i(),"data-testid":"pipeline-toolbar-settings-button"},r().createElement(he.Icon,{glyph:"Settings"})))})),rl=(0,he.css)({display:"grid",gap:he.spacing[2],gridTemplateAreas:'"settings extraSettings"',gridTemplateColumns:"1fr min-content",alignItems:"center",whiteSpace:"nowrap"}),sl=(0,he.css)({display:"flex",gap:he.spacing[2],alignItems:"center"}),ol=(0,he.css)({gridArea:"extraSettings",display:"flex"}),al=Y((e=>({isSavePipelineEnabled:!e.editViewName&&!e.isAtlasDeployed,isCreatePipelineEnabled:!e.editViewName})),{onExportToLanguage:Kr})((e=>{let{isSavePipelineEnabled:t,isCreatePipelineEnabled:n,onExportToLanguage:i}=e;return r().createElement("div",{className:rl,"data-testid":"pipeline-settings"},r().createElement("div",{className:sl},t&&r().createElement(r().Fragment,null,r().createElement(Qu,null),r().createElement(Gu,null)),n&&r().createElement(Ju,null),r().createElement(he.Button,{variant:"primaryOutline",size:"xsmall",leftGlyph:r().createElement(he.Icon,{glyph:"Export"}),onClick:i,"data-testid":"pipeline-toolbar-export-button"},"Export to language")),r().createElement("div",{className:ol},r().createElement(il,null)))})),ul=(0,he.css)({paddingTop:he.spacing[3],paddingRight:he.spacing[5],paddingBottom:he.spacing[3],paddingLeft:he.spacing[3]}),ll=(0,he.css)({display:"grid",gap:he.spacing[3],gridTemplateAreas:'\n "headerAndOptionsRow"\n ',marginLeft:he.spacing[1],marginRight:he.spacing[1]}),cl=(0,he.css)({gridTemplateAreas:'\n "headerAndOptionsRow"\n "settingsRow"\n '}),pl=(0,he.css)({gridArea:"headerAndOptionsRow",border:"1px solid",borderRadius:"6px",borderColor:he.uiColors.gray.light2,padding:he.spacing[2]}),hl=(0,he.css)({gridArea:"settingsRow"}),dl=(0,he.css)({marginTop:he.spacing[2]}),fl=Y((e=>{let{workspace:t}=e;return{isSettingsVisible:"builder"===t}}))((e=>{let{isSettingsVisible:t,showRunButton:n,showExportButton:s,showExplainButton:o}=e;const[a,u]=(0,i.useState)(!1);return r().createElement(he.Toolbar,{className:(0,he.cx)(ul,ll,t&&cl),"data-testid":"pipeline-toolbar"},r().createElement(r().Fragment,null,r().createElement("div",{className:pl},r().createElement(_r,{isOptionsVisible:a,onToggleOptions:()=>u(!a),showRunButton:n,showExportButton:s,showExplainButton:o}),a&&r().createElement("div",{className:dl},r().createElement(Wr,null))),t&&r().createElement("div",{className:hl},r().createElement(al,null))))})),ml=require("@mongodb-js/compass-crud");n(8423);var gl=n(161),vl=n.n(gl),yl=n(4772),xl=n.n(yl),bl=n(4537),El=n.n(bl),wl=n(3958),Cl=n.n(wl);const Sl=Symbol.for("@@mdb.decryptedKeys");function Al(e,t){t.isValueDecrypted()&&(e[Sl]||Object.defineProperty(e,Sl,{value:[],writable:!0,configurable:!0,enumerable:!1}),e[Sl].push(String(t.currentKey)))}const Dl=class{static generate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n={};for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isRemoved()||""===i.currentKey||(n[i.currentKey]=i.generateObject(t),Al(n,i));return n}return e}static generateOriginal(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n={};for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isAdded()||(n[i.key]=i.generateOriginalObject(t),Al(n,i));return n}return e}static generateArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n=[];for(const i of e)t.excludeInternalFields&&i.isInternalField()||i.isRemoved()||(i.elements?n.push(i.generateObject(t)):n.push(i.currentValue),Al(n,i));return n}return e}static generateOriginalArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){const n=[];for(const i of e)t.excludeInternalFields&&i.isInternalField()||(i.originalExpandableValue?n.push(i.generateOriginalObject(t)):i.isAdded()||n.push(i.value),Al(n,i));return n}return e}};var _l=n(9500),kl=n.n(_l);const Tl={Added:"Element::Added",Edited:"Element::Edited",Removed:"Element::Removed",Reverted:"Element::Reverted",Converted:"Element::Converted",Invalid:"Element::Invalid",Valid:"Element::Valid"};function Fl(e){const t=String(e).length;return 0===t?1:t}function Il(e){if(e&&"object"==typeof e)for(const t of Object.keys(e)){const n=e[t];"object"==typeof n&&null!==n&&(n.$numberInt?e[t]=+n.$numberInt:n.$numberDouble?e[t]=+n.$numberDouble:Il(n))}}const Nl=/^(\[|\{)(.+)(\]|\})$/;class Pl{constructor(e){this.element=e,this.type=e.currentType,this.editing=!1}edit(e){const t=this.element.currentType;try{const n=kl().cast(e,t);this.element.edit(n)}catch(n){this.element.setInvalid(e,t,n.message)}}paste(e){Nl.exec(e)?(this.edit(JSON.parse(e)),this.element._bubbleUp(Tl.Converted,this.element)):this.edit(e)}size(){return Fl(this.element.currentValue)}value(){return String(this.element.currentValue)}start(){this.editing=!0}complete(){this.editing=!1}}class Ol extends Pl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(kl().cast(this._formattedValue(),"Date"))}edit(e){try{"Invalid Date"===kl().cast(e,"Date").toString()?this.element.setInvalid(e,"Date",`${String(e)} is not in a valid date format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Tl.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(e){const t=this.element.currentValue;return e?Fl(t):this.element.isCurrentTypeValid()?Fl(this._formattedValue()):Fl(t)}start(){super.start(),this.element.isCurrentTypeValid()&&this.edit(this._formattedValue())}value(){const e=this.element.currentValue;return!this.editing&&this.element.isCurrentTypeValid()?this._formattedValue():String(e)}_formattedValue(){return new Date(this.element.currentValue).toISOString().replace("Z","+00:00")}}const Rl=["Binary","Code","MinKey","MaxKey","Timestamp","BSONRegExp","Undefined","Null","DBRef"];class Ml extends(vl()){cancel(){if(this.elements)for(const e of Array.from(this.elements))e.cancel();this.isModified()&&this.revert()}constructor(e,t){let n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];super(),this.uuid=(new Xt.UUID).toHexString(),this.key=e,this.currentKey=e,this.parent=i,this.added=r,this.removed=!1,this.type=kl().type(t),this.currentType=this.type,this.level=this._getLevel(),this.setValid(),"number"==typeof t&&(t=kl().cast(t,kl().type(t))),this._isExpandable(t)?(this.originalExpandableValue=t,this.elements=this._generateElements(t)):(this.value=t,this.currentValue=t),this.parent&&(n=this.parent.isRoot()?this.parent.doc:this.parent.originalExpandableValue);const s=n&&n[Symbol.for("@@mdb.decryptedKeys")];this.decrypted=(s||[]).map(String).includes(String(e))}get nextElement(){return this.parent?.elements?.findNext(this)}get previousElement(){return this.parent?.elements?.findPrevious(this)}_getLevel(){let e=-1,t=this.parent;for(;t;)e++,t=t.parent;return e}edit(e){this.currentType=kl().type(e),this._isExpandable(e)&&!this._isExpandable(this.currentValue)?(this.currentValue=null,this.elements=this._generateElements(e)):!this._isExpandable(e)&&this.elements?(this.currentValue=e,this.elements=void 0):this.currentValue=e,this.setValid(),this._bubbleUp(Tl.Edited,this)}changeType(e){if("Object"===e)this._convertToEmptyObject();else if("Array"===e)this._convertToEmptyArray();else try{if("Date"===e){const e=new Ol(this);e.edit(this.generateObject()),e.complete()}else this.edit(kl().cast(this.generateObject(),e))}catch(t){this.setInvalid(this.currentValue,e,t.message)}}getRoot(){let e=this.parent;for(;e?.parent;)e=e.parent;return e}get(e){return this.elements?.get(e)}at(e){return this.elements?.at(e)}rename(e){this.currentKey=e,this._bubbleUp(Tl.Edited,this)}generateObject(e){return"Array"===this.currentType?Dl.generateArray(this.elements,e):"Object"===this.currentType?Dl.generate(this.elements,e):this.currentValue}generateOriginalObject(e){if("Array"===this.type){const t=this._generateElements(this.originalExpandableValue);return Dl.generateOriginalArray(t,e)}if("Object"===this.type){const t=this._generateElements(this.originalExpandableValue);return Dl.generateOriginal(t,e)}return this.value}insertAfter(e,t,n){if(!this.elements)throw new Error("Cannot insert values on non-array/non-object elements");const i=this.elements.insertAfter(e,t,n);return i._bubbleUp(Tl.Added,i,this),i}insertEnd(e,t){if(!this.elements)throw new Error("Cannot insert values on non-array/non-object elements");const n=this.elements.insertEnd(e,t,!0);return this._bubbleUp(Tl.Added,n),n}insertPlaceholder(){return this.insertEnd("","")}insertSiblingPlaceholder(){return this.parent.insertAfter(this,"","")}isAdded(){return this.added||!!this.parent?.isAdded()}isBlank(){return""===this.currentKey&&""===this.currentValue}isCurrentTypeValid(){return!!this.currentTypeValid}setValid(){this.currentTypeValid=!0,this.invalidTypeMessage=void 0,this._bubbleUp(Tl.Valid,this)}setInvalid(e,t,n){this.currentValue=e,this.currentType=t,this.currentTypeValid=!1,this.invalidTypeMessage=n,this._bubbleUp(Tl.Invalid,this)}isDuplicateKey(e){if(""===e)return!1;for(const t of this.parent?.elements??[])if(t.uuid!==this.uuid&&t.currentKey===e)return!0;return!1}isEdited(){return(this.isRenamed()||!this._valuesEqual()||this.type!==this.currentType)&&!this.isAdded()}_valuesEqual(){return"Date"===this.currentType&&en()(this.currentValue)?Cl()(this.value,new Date(this.currentValue)):"ObjectId"===this.currentType&&en()(this.currentValue)?this._isObjectIdEqual():Cl()(this.value,this.currentValue)}_isObjectIdEqual(){try{return this.value.toHexString()===this.currentValue}catch(e){return!1}}isLast(){return this.parent?.elements?.lastElement===this}isRenamed(){return!(this.parent&&!this.parent.isRoot()&&"Object"!==this.parent.currentType)&&this.key!==this.currentKey}isRevertable(){return this.isEdited()||this.isRemoved()}isRemovable(){return!this.parent.isRemoved()}isNotActionable(){return("_id"===this.key||this.isInternalField())&&!this.isAdded()||!this.isRemovable()}isValueDecrypted(){return this.decrypted}containsDecryptedChildren(){if(this.isValueDecrypted())return!0;for(const e of this.elements||[])if(e.containsDecryptedChildren())return!0;return!1}isValueEditable(){return this._isKeyLegallyEditable()&&!Rl.includes(this.currentType)}isParentEditable(){return!(this.parent&&!this.parent.isRoot())||this.parent._isKeyLegallyEditable()}_isKeyLegallyEditable(){return this.isParentEditable()&&(this.isAdded()||"_id"!==this.currentKey&&!this.isInternalField())}isKeyEditable(){return this._isKeyLegallyEditable()&&!this.containsDecryptedChildren()}isInternalField(){return!(!this.parent||(this.parent.isRoot()||!this.parent.isInternalField())&&(!this.parent.isRoot()||(e=this.currentKey,"string"!=typeof e||!/^__safeContent__($|\.)/.test(e))));var e}isModified(){if(this.elements)for(const e of this.elements)if(e.isModified())return!0;return this.isAdded()||this.isEdited()||this.isRemoved()}isRemoved(){return this.removed}isRoot(){return!1}remove(){this.revert(),this.removed=!0,this.parent&&this._bubbleUp(Tl.Removed,this,this.parent)}revert(){this.isAdded()?(this.parent.elements.remove(this),this._bubbleUp(Tl.Removed,this,this.parent),delete this.parent):(this.originalExpandableValue?(this.elements=this._generateElements(this.originalExpandableValue),this.currentValue=void 0):(null===this.currentValue&&null!==this.value?delete this.elements:this._removeAddedElements(),this.currentValue=this.value),this.currentKey=this.key,this.currentType=this.type,this.removed=!1),this.setValid(),this._bubbleUp(Tl.Reverted,this)}_bubbleUp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emit(e,...n);const r=this.parent;r&&(r.isRoot()?r.emit(e,...n):r._bubbleUp(e,...n))}_convertToEmptyObject(){this.edit({}),this.insertPlaceholder()}_convertToEmptyArray(){this.edit([]),this.insertPlaceholder()}_isElementEmpty(e){return!!e&&e.isAdded()&&e.isBlank()}_isExpandable(e){return xl()(e)||El()(e)}_generateElements(e){return new Ll(this,e)}_removeAddedElements(){if(this.elements)for(const e of this.elements)e.isAdded()&&this.elements.remove(e)}static get Events(){return Tl}}class Ll{constructor(e,t){this.parent=e,this.elements=Object.entries(t??{}).map((t=>{let[n,i]=t;return new Ml(this.isArray()?parseInt(n,10):n,i,e,!!e.isRoot()&&e.cloned)}))}isArray(){return"Array"===this.parent.currentType}get size(){return this.elements.length}at(e){return this.elements[e]}get(e){return this.elements.find((t=>t.currentKey===e))}get firstElement(){return this.elements[0]}get lastElement(){return this.elements[this.elements.length-1]}insertAfter(e,t,n){let i,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=-1;for(const[o,a]of this.elements.entries())e!==a?i&&this.isArray()&&(a.currentKey=o+1):(s=o+1,i=new Ml(this.isArray()?s:t,n,this.parent,r));return i&&this.elements.splice(s,0,i),i}insertBefore(e,t,n){let i,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=-1;for(const[o,a]of this.elements.entries())e===a&&(s=o,i=new Ml(this.isArray()?s:t,n,this.parent,r)),i&&this.isArray()&&(a.currentKey=o+1);return i&&this.elements.splice(s,0,i),i}insertBeginning(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=new Ml(this.isArray()?0:e,t,this.parent,n);return this.isArray()&&this.elements.forEach((e=>{e.currentKey+=1})),this.elements.unshift(i),i}insertEnd(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=new Ml(this.isArray()?this.elements.length:e,t,this.parent,n);return this.elements.push(i),i}remove(e){let t=-1;for(const[n,i]of this.elements.entries())i!==e?-1!==t&&this.isArray()&&(i.currentKey-=1):t=n;return-1!==t&&this.elements.splice(t,1),this}findNext(e){const t=this.elements.indexOf(e);return-1!==t?this.elements[t+1]:void 0}findPrevious(e){const t=this.elements.indexOf(e);return-1!==t?this.elements[t-1]:void 0}*[Symbol.iterator](){yield*this.elements}}const Bl={Cancel:"Document::Cancel"};class jl extends(vl()){cancel(){for(const e of Array.from(this.elements))e.cancel();this.emit(Bl.Cancel)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(),this.uuid=(new Xt.UUID).toHexString(),this.doc=e,this.cloned=t||!1,this.isUpdatable=!0,this.type="Document",this.currentType="Document",this.elements=this._generateElements()}apply(e){"function"==typeof e?.generateObject&&(e=e.generateObject());const t=[];let n=null;for(const[i,r]of Object.entries(e))this.get(i)?this.get(i).edit(r):n?this.insertAfter(this.get(n),i,r):this.insertBeginning(i,r),n=i,t.push(i);for(const e of[...this.elements])t.includes(e.currentKey)||e.remove()}generateObject(e){return Dl.generate(this.elements,e)}generateOriginalObject(e){return Dl.generateOriginal(this.elements,e)}generateUpdateUnlessChangedInBackgroundQuery(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.getOriginalKeysAndValuesForFieldsThatWereUpdated(e),n={_id:this.getId(),...t},i=this.getSetUpdateForDocumentChanges(),r=this.getUnsetUpdateForDocumentChanges(),s={};return i&&Object.keys(i).length>0&&(s.$set=i),r&&Object.keys(r).length>0&&(s.$unset=r),{query:n,updateDoc:s}}get(e){return this.elements.get(e)}getChild(e){if(!e)return;let t=this.elements.get(e[0]),n=1;for(;n<e.length;){if(void 0===t)return;t="Array"===t.currentType?t.at(e[n]):t.get(e[n]),n++}return t}getId(){const e=this.get("_id");return e?e.generateObject():null}getOriginalKeysAndValuesForFieldsThatWereUpdated(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t={};if(this.elements)for(const n of this.elements)(n.isModified()&&!n.isAdded()||e&&n.key in e)&&(t[n.key]=n.generateOriginalObject()),n.isAdded()&&""!==n.currentKey&&(t[n.currentKey]={$exists:!1});return t}getOriginalKeysAndValuesForSpecifiedKeys(e){const t={};if(this.elements)for(const n of this.elements)n.key in e&&(t[n.key]=n.generateOriginalObject());return t}getSetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isRemoved()&&""!==t.currentKey&&t.isModified()&&(e[t.currentKey]=t.generateObject());return e}getStringId(){const e=this.get("_id");return e?"Array"===e.currentType||"Object"===e.currentType?JSON.stringify(e.generateObject()):String(e.value):null}getUnsetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isAdded()&&t.isRemoved()&&""!==t.key&&(e[t.key]=!0),!t.isAdded()&&t.isRenamed()&&""!==t.key&&(e[t.key]=!0);return e}insertPlaceholder(){return this.insertEnd("","")}insertBeginning(e,t){const n=this.elements.insertBeginning(e,t);return n._bubbleUp(Tl.Added,n,this),n}insertEnd(e,t){const n=this.elements.insertEnd(e,t);return n._bubbleUp(Tl.Added,n,this),n}insertAfter(e,t,n){const i=this.elements.insertAfter(e,t,n);return i?._bubbleUp(Tl.Added,i,this),i}isAdded(){return!1}isModified(){for(const e of this.elements)if(e.isModified())return!0;return!1}isRemoved(){return!1}isRoot(){return!0}_generateElements(){return new Ll(this,this.doc)}static get Events(){return Bl}static FromEJSON(e){const t=Xt.EJSON.parse(e,{relaxed:!1});return new jl(t)}static FromEJSONArray(e){const t=Xt.EJSON.parse(e,{relaxed:!1});return Array.isArray(t)?t.map((e=>new jl(e))):[new jl(t)]}toEJSON(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Xt.EJSON.serialize(e,{relaxed:!1});return Il(n),JSON.stringify(n,null,"indent"in t?t.indent:2)}("original"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"current")?this.generateOriginalObject():this.generateObject(),e)}}const Vl=jl;class zl extends Pl{constructor(e){super(e)}}class ql extends Pl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(kl().cast(this.element.currentValue,"Decimal128"))}edit(e){try{kl().cast(e,"Decimal128"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Tl.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}class Ul extends Pl{constructor(e){super(e)}size(){return Fl(this.element.currentValue.valueOf())}}class Wl extends Pl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(kl().cast(this.element.currentValue,"Int64"))}edit(e){try{kl().cast(e,"Int64"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Tl.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}class Kl extends Pl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(kl().cast(this.element.currentValue,"Double"))}edit(e){try{const t=kl().cast(e,"Double");isNaN(t.value)?this.element.setInvalid(e,"Double",`${String(e)} is not a valid double format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Tl.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(){const e=this.element.currentValue;return Fl("function"==typeof e.valueOf?e.valueOf():e)}}class $l extends Pl{constructor(e){super(e)}size(){return 4}value(){return"null"}}const Hl="undefined";class Gl extends Pl{constructor(e){super(e)}size(){return Hl.length}value(){return Hl}}class Jl extends Pl{constructor(e){super(e)}complete(){super.complete(),this.element.isCurrentTypeValid()&&this.element.edit(kl().cast(this.element.currentValue,"ObjectId"))}edit(e){try{kl().cast(e,"ObjectId"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(Tl.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}start(){super.start(),this.element.isCurrentTypeValid()&&this.edit(String(this.element.currentValue))}}Object.assign((e=>({Standard:new Pl(e),String:new zl(e),Decimal128:new ql(e),Date:new Ol(e),Double:new Kl(e),Int32:new Ul(e),Int64:new Wl(e),Null:new $l(e),Undefined:new Gl(e),ObjectId:new Jl(e)})),{DateEditor:Ol,StandardEditor:Pl,StringEditor:zl,Decimal128Editor:ql,DoubleEditor:Kl,Int32Editor:Ul,Int64Editor:Wl,NullEditor:$l,UndefinedEditor:Gl,ObjectIdEditor:Jl});const Xl=Vl,Zl=e=>{let{direction:t}=e;return 1===t?r().createElement(he.Icon,{glyph:"ArrowUp"}):-1===t?r().createElement(he.Icon,{glyph:"ArrowDown"}):r().createElement(r().Fragment,null,"(",String(t),")")},Yl=(0,he.css)({display:"flex",flexDirection:"column",gap:he.spacing[1]}),Ql=(0,he.css)({marginTop:he.spacing[1],marginBottom:he.spacing[1]}),ec=(0,he.css)({marginTop:he.spacing[1],"*:not(:last-child)":{marginRight:he.spacing[1]}}),tc=(0,he.css)({color:he.uiColors.gray.dark1}),nc=e=>{let{indexes:t}=e;return 0===t.length?null:r().createElement("div",{className:Yl},t.map(((e,t)=>{let{name:n,shard:i,key:s}=e;const o=i?r().createElement(r().Fragment,null,n," ",r().createElement("span",{className:tc},"(",i,")")):n;return r().createElement("div",{className:Ql,key:t},r().createElement(he.Accordion,{text:o,"data-testid":`explain-index-button-${n}-${i??""}`},r().createElement("div",{className:ec,"data-testid":`explain-index-content-${n}-${i??""}`},Object.entries(s).map(((e,t)=>{let[n,i]=e;return r().createElement(he.Badge,{variant:he.BadgeVariant.LightGray,key:t},n," ",r().createElement(Zl,{direction:i}))})))))})))},ic=(0,he.css)({display:"flex",gap:he.spacing[3],flexDirection:"column"}),rc=(0,he.css)({gap:he.spacing[1],display:"flex",flexDirection:"column"}),sc=(0,he.css)({display:"flex",gap:he.spacing[1],alignItems:"baseline"}),oc=(0,he.css)({whiteSpace:"nowrap"}),ac=e=>{let{nReturned:t,executionTimeMillis:n,indexes:i}=e;return r().createElement("div",{className:ic,"data-testid":"pipeline-explain-results-summary"},r().createElement(he.Subtitle,null,"Query Performance Summary"),r().createElement("div",{className:rc},"number"==typeof t&&r().createElement("div",{className:sc},r().createElement(he.Body,null,"Documents returned:"),r().createElement(he.Body,{weight:"medium"},t)),n>0&&r().createElement("div",{className:sc},r().createElement(he.Body,null,"Actual query execution time (ms):"),r().createElement(he.Body,{weight:"medium"},n)),i.length>0&&r().createElement("div",{className:sc},r().createElement(he.Body,{className:oc},"Query used the following indexes:"),r().createElement(he.Body,{weight:"medium"},i.length)),r().createElement(nc,{indexes:i})))},uc=(0,he.css)({gap:he.spacing[4],display:"grid",gridTemplateRows:"auto 1fr",height:"100%"}),lc=(0,he.css)({gridTemplateAreas:"\n 'stats'\n 'card'\n "}),cc=(0,he.css)({gridTemplateAreas:"\n 'card'\n "}),pc=(0,he.css)({gridArea:"stats"}),hc=(0,he.css)({gridArea:"card",maxHeight:"50vh",overflowY:"scroll"}),dc=e=>{let{plan:t,stats:n}=e;return r().createElement("div",{className:(0,he.cx)(n?lc:cc,uc),"data-testid":"pipeline-explain-results"},n&&r().createElement("div",{className:pc},r().createElement(ac,{nReturned:n.nReturned,executionTimeMillis:n.executionTimeMillis,indexes:n.indexes})),r().createElement(he.Card,{className:hc,"data-testid":"pipeline-explain-results-json"},r().createElement(ml.Document,{doc:t,editable:!1,copyToClipboard:()=>{navigator.clipboard.writeText(new Xl(t).toEJSON())}})))},fc=(0,he.css)({display:"grid",gap:he.spacing[3],gridTemplateRows:"auto 1fr auto"}),mc=(0,he.css)({gridTemplateAreas:"\n 'header'\n 'content'\n 'footer'\n "}),gc=(0,he.css)({gridTemplateAreas:"\n 'header'\n 'content'\n "}),vc=(0,he.css)({gridArea:"header"}),yc=(0,he.css)({gridArea:"content"}),xc=(0,he.css)({gridArea:"footer",paddingRight:0,paddingBottom:0}),bc=(0,he.css)({display:"flex",justifyContent:"center",height:"100%"}),Ec=()=>window.innerWidth<=he.breakpoints.XLDesktop?"default":"large",wc=Y((e=>{let{explain:{isModalOpen:t,isLoading:n,error:i,explain:r}}=e;return{isModalOpen:t,isLoading:n,error:i,explain:r}}),{onCloseModal:()=>e=>{e(Zi())},onCancelExplain:Zi})((e=>{let{isModalOpen:t,isLoading:n,error:s,explain:o,onCloseModal:a,onCancelExplain:u}=e;const[l,c]=(0,i.useState)(Ec());(0,i.useEffect)((()=>{if(!t)return;const e=()=>{c(Ec())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),(0,i.useEffect)((()=>{c(Ec())}),[t]);let p=null;return n?p=r().createElement("div",{className:bc},r().createElement(he.CancelLoader,{"data-testid":"pipeline-explain-cancel",cancelText:"Cancel",onCancel:()=>u(),progressText:"Running explain"})):s?p=r().createElement(he.ErrorSummary,{"data-testid":"pipeline-explain-error",errors:s}):o&&(p=r().createElement(dc,{plan:o.plan,stats:o.stats})),p?r().createElement(he.Modal,{size:l,setOpen:a,open:t,"data-testid":"pipeline-explain-modal",contentClassName:(0,he.cx)(n?gc:mc,fc)},r().createElement(he.H3,{className:vc},"Explain Plan"),r().createElement("div",{className:yc},p),!n&&r().createElement(he.ModalFooter,{className:xc},r().createElement(he.Button,{onClick:a,"data-testid":"pipeline-explain-footer-close-button"},"Close"))):null}));var Cc,Sc=(Cc=function(e,t){return Cc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Cc(e,t)},function(e,t){function n(){this.constructor=e}Cc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Ac=function(){return Ac=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ac.apply(this,arguments)},Dc={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return Sc(t,e),t.prototype.render=function(){return i.createElement("div",{className:this.props.className||"",style:Ac(Ac({position:"absolute",userSelect:"none"},Dc[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(i.PureComponent),kc=n(6238),Tc=n.n(kc),Fc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ic=function(){return Ic=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ic.apply(this,arguments)},Nc={width:"auto",height:"auto"},Pc=Tc()((function(e,t,n){return Math.max(Math.min(e,n),t)})),Oc=Tc()((function(e,t){return Math.round(e/t)*t})),Rc=Tc()((function(e,t){return new RegExp(e,"i").test(t)})),Mc=function(e){return Boolean(e.touches&&e.touches.length)},Lc=Tc()((function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,r){return Math.abs(i-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[i]-e);return 0===n||r<n?t[i]:e})),Bc=Tc()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),jc=Tc()((function(e){return"auto"===(e=e.toString())||Bc(e,"px")||Bc(e,"%")||Bc(e,"vh")||Bc(e,"vw")||Bc(e,"vmax")||Bc(e,"vmin")?e:e+"px"})),Vc=function(e,t,n,i){if(e&&"string"==typeof e){if(Bc(e,"px"))return Number(e.replace("px",""));if(Bc(e,"%"))return t*(Number(e.replace("%",""))/100);if(Bc(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(Bc(e,"vh"))return i*(Number(e.replace("vh",""))/100)}return e},zc=Tc()((function(e,t,n,i,r,s,o){return i=Vc(i,e.width,t,n),r=Vc(r,e.height,t,n),s=Vc(s,e.width,t,n),o=Vc(o,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===s?void 0:Number(s),minHeight:void 0===o?void 0:Number(o)}})),qc=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Uc="__resizable_base__",Wc=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(Uc):t.className+=Uc,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Fc(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Nc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=r}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&Bc(e.propsSize[t].toString(),"%")){if(Bc(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return jc(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?jc(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?jc(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,r=this.props.boundsByDirection,s=this.state.direction,o=r&&Rc("left",s),a=r&&Rc("top",s);if("parent"===this.props.bounds){var u=this.parentNode;u&&(n=o?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,r=this.state,s=r.direction,o=r.original,a=this.props,u=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,p=o.width,h=o.height,d=l||0,f=c||0;return Rc("right",s)&&(p=o.width+(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Rc("left",s)&&(p=o.width-(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Rc("bottom",s)&&(h=o.height+(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),Rc("top",s)&&(h=o.height-(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var r=this.props,s=r.lockAspectRatio,o=r.lockAspectRatioExtraHeight,a=r.lockAspectRatioExtraWidth,u=void 0===i.width?10:i.width,l=void 0===n.width||n.width<0?e:n.width,c=void 0===i.height?10:i.height,p=void 0===n.height||n.height<0?t:n.height,h=o||0,d=a||0;if(s){var f=(c-h)*this.ratio+d,m=(p-h)*this.ratio+d,g=(u-d)/this.ratio+h,v=(l-d)/this.ratio+h,y=Math.max(u,f),x=Math.min(l,m),b=Math.max(c,g),E=Math.min(p,v);e=Pc(e,y,x),t=Pc(t,b,E)}else e=Pc(e,u,l),t=Pc(t,c,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),r=i.left,s=i.top,o=i.right,a=i.bottom;this.resizableLeft=r,this.resizableRight=o,this.resizableTop=s,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(i=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&Mc(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var o=this.parentNode;if(o){var a=this.window.getComputedStyle(o).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:i,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Ic(Ic({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(u)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Mc(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,i=t.maxHeight,r=t.minWidth,s=t.minHeight,o=Mc(e)?e.touches[0].clientX:e.clientX,a=Mc(e)?e.touches[0].clientY:e.clientY,u=this.state,l=u.direction,c=u.original,p=u.width,h=u.height,d=this.getParentSize(),f=zc(d,this.window.innerWidth,this.window.innerHeight,n,i,r,s);n=f.maxWidth,i=f.maxHeight,r=f.minWidth,s=f.minHeight;var m=this.calculateNewSizeFromDirection(o,a),g=m.newHeight,v=m.newWidth,y=this.calculateNewMaxFromBoundary(n,i),x=this.calculateNewSizeFromAspectRatio(v,g,{width:y.maxWidth,height:y.maxHeight},{width:r,height:s});if(v=x.newWidth,g=x.newHeight,this.props.grid){var b=Oc(v,this.props.grid[0]),E=Oc(g,this.props.grid[1]),w=this.props.snapGap||0;v=0===w||Math.abs(b-v)<=w?b:v,g=0===w||Math.abs(E-g)<=w?E:g}this.props.snap&&this.props.snap.x&&(v=Lc(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=Lc(g,this.props.snap.y,this.props.snapGap));var C={width:v-c.width,height:g-c.height};p&&"string"==typeof p&&(Bc(p,"%")?v=v/d.width*100+"%":Bc(p,"vw")?v=v/this.window.innerWidth*100+"vw":Bc(p,"vh")&&(v=v/this.window.innerHeight*100+"vh")),h&&"string"==typeof h&&(Bc(h,"%")?g=g/d.height*100+"%":Bc(h,"vw")?g=g/this.window.innerWidth*100+"vw":Bc(h,"vh")&&(g=g/this.window.innerHeight*100+"vh"));var S={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?S.flexBasis=S.width:"column"===this.flexDir&&(S.flexBasis=S.height),this.setState(S),this.props.onResize&&this.props.onResize(e,l,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,r=t.original;if(n&&this.resizable){var s={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Ic(Ic({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,s=t.handleClasses,o=t.handleWrapperStyle,a=t.handleWrapperClass,u=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?i.createElement(_c,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:s&&s[t]},u&&u[t]?u[t]:null):null}));return i.createElement("div",{className:a,style:o},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==qc.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=Ic(Ic(Ic({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return i.createElement(r,Ic({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&i.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(i.PureComponent);function Kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $c(e,t){if(e){if("string"==typeof e)return Kc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kc(e,t):void 0}}function Hc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(a)throw r}}return s}}(e,t)||$c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){F(e,t,n[t])}))}return e}function Jc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zc(e,t,n){return t&&Xc(e.prototype,t),n&&Xc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yc(e){return Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yc(e)}function Qc(e,t){if(t&&("object"===Yc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function ep(e){return ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ep(e)}function tp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}const np=require("react-dom");var ip=function(){function e(){Jc(this,e),F(this,"refs",{})}return Zc(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(rp)}}]),e}();function rp(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function sp(e,t){return Object.keys(e).reduce((function(n,i){return-1===t.indexOf(i)&&(n[i]=e[i]),n}),{})}var op={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},ap=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function up(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function lp(e,t){e.style["".concat(ap,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function cp(e,t){e.style["".concat(ap,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function pp(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function hp(e,t,n){return Math.max(e,Math.min(n,t))}function dp(e){return"px"===e.substr(-2)?parseFloat(e):0}function fp(e){var t=window.getComputedStyle(e);return{bottom:dp(t.marginBottom),left:dp(t.marginLeft),right:dp(t.marginRight),top:dp(t.marginTop)}}function mp(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function gp(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function vp(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function yp(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function xp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var i={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?i:xp(e.parentNode,t,i)}}function bp(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function Ep(e){var t=e.lockOffset,n=e.width,i=e.height,r=t,s=t,o="px";if("string"==typeof t){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);y()(null!==a,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),r=parseFloat(t),s=parseFloat(t),o=a[1]}return y()(isFinite(r)&&isFinite(s),"lockOffset value should be a finite. Given %s",t),"%"===o&&(r=r*n/100,s=s*i/100),{x:r,y:s}}function wp(e){var t=e.height,n=e.width,i=e.lockOffset,r=Array.isArray(i)?i:[i,i];y()(2===r.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",i);var s=Hc(r,2),o=s[0],a=s[1];return[Ep({height:t,lockOffset:o,width:n}),Ep({height:t,lockOffset:a,width:n})]}function Cp(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:Cp(e.parentNode):null}function Sp(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:dp(t.gridColumnGap),y:dp(t.gridRowGap)}:{x:0,y:0}}var Ap="BUTTON",Dp="INPUT",_p="OPTION",kp="TEXTAREA",Tp="SELECT";function Fp(e){var t,n="input, textarea, select, canvas, [contenteditable]",i=e.querySelectorAll(n),r=e.cloneNode(!0);return(t=r.querySelectorAll(n),function(e){if(Array.isArray(e))return Kc(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||$c(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.")}()).forEach((function(e,t){"file"!==e.type&&(e.value=i[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),"CANVAS"===e.tagName&&i[t].width>0&&i[t].height>0&&e.getContext("2d").drawImage(i[t],0,0)})),r}function Ip(e){return null!=e.sortableHandle}var Np=function(){function e(t,n){Jc(this,e),this.container=t,this.onScrollCallback=n}return Zc(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,i=e.minTranslate,r=e.maxTranslate,s=e.width,o=e.height,a={x:0,y:0},u={x:1,y:1},l=this.container,c=l.scrollTop,p=l.scrollLeft,h=l.scrollHeight,d=l.scrollWidth,f=0===c,m=h-c-l.clientHeight==0,g=0===p,v=d-p-l.clientWidth==0;n.y>=r.y-o/2&&!m?(a.y=1,u.y=10*Math.abs((r.y-o/2-n.y)/o)):n.x>=r.x-s/2&&!v?(a.x=1,u.x=10*Math.abs((r.x-s/2-n.x)/s)):n.y<=i.y+o/2&&!f?(a.y=-1,u.y=10*Math.abs((n.y-o/2-i.y)/o)):n.x<=i.x+s/2&&!g&&(a.x=-1,u.x=10*Math.abs((n.x-s/2-i.x)/s)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===a.x&&0===a.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:u.x*a.x,top:u.y*a.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),Pp={axis:o().oneOf(["x","y","xy"]),contentWindow:o().any,disableAutoscroll:o().bool,distance:o().number,getContainer:o().func,getHelperDimensions:o().func,helperClass:o().string,helperContainer:o().oneOfType([o().func,"undefined"==typeof HTMLElement?o().any:o().instanceOf(HTMLElement)]),hideSortableGhost:o().bool,keyboardSortingTransitionDuration:o().number,lockAxis:o().string,lockOffset:o().oneOfType([o().number,o().string,o().arrayOf(o().oneOfType([o().number,o().string]))]),lockToContainerEdges:o().bool,onSortEnd:o().func,onSortMove:o().func,onSortOver:o().func,onSortStart:o().func,pressDelay:o().number,pressThreshold:o().number,keyCodes:o().shape({lift:o().arrayOf(o().number),drop:o().arrayOf(o().number),cancel:o().arrayOf(o().number),up:o().arrayOf(o().number),down:o().arrayOf(o().number)}),shouldCancelStart:o().func,transitionDuration:o().number,updateBeforeSortStart:o().func,useDragHandle:o().bool,useWindowAsScrollContainer:o().bool},Op={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},Rp={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:Op,shouldCancelStart:function(e){return-1!==[Dp,kp,Tp,_p,Ap].indexOf(e.target.tagName)||!!pp(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},Mp=Object.keys(Pp);function Lp(e){y()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function Bp(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var jp=(0,i.createContext)({manager:{}}),Vp={index:o().number.isRequired,collection:o().oneOfType([o().number,o().string]),disabled:o().bool},zp=Object.keys(Vp),qp=n(6667),Up={};Up.styleTagTransform=Ae(),Up.setAttributes=Ee(),Up.insert=xe().bind(null,"head"),Up.domAPI=ve(),Up.insertStyleElement=Ce(),me()(qp.Z,Up);const Wp=qp.Z&&qp.Z.locals?qp.Z.locals:void 0;class Kp extends i.PureComponent{render(){return r().createElement("div",{className:Wp["resize-handle"]})}}var $p=n(9262),Hp={};Hp.styleTagTransform=Ae(),Hp.setAttributes=Ee(),Hp.insert=xe().bind(null,"head"),Hp.domAPI=ve(),Hp.insertStyleElement=Ce(),me()($p.Z,Hp);const Gp=$p.Z&&$p.Z.locals?$p.Z.locals:void 0;class Jp extends i.PureComponent{static displayName="DeleteStageComponent";static propTypes={index:o().number.isRequired,runStage:o().func.isRequired,stageDeleted:o().func.isRequired,setIsModified:o().func.isRequired};onStageDeleted=()=>{this.props.stageDeleted(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index,!0)};render(){return r().createElement("div",{className:pe()(Gp["delete-stage"])},r().createElement("button",{"data-test-id":"delete-stage",type:"button",title:"Delete Stage",className:"btn btn-default btn-xs",onClick:this.onStageDeleted},r().createElement("i",{className:"fa fa-trash-o","aria-hidden":!0})))}}const Xp=Jp;var Zp=n(2884),Yp={};Yp.styleTagTransform=Ae(),Yp.setAttributes=Ee(),Yp.insert=xe().bind(null,"head"),Yp.domAPI=ve(),Yp.insertStyleElement=Ce(),me()(Zp.Z,Yp);const Qp=Zp.Z&&Zp.Z.locals?Zp.Z.locals:void 0;class eh extends i.PureComponent{static displayName="AddAfterStageComponent";static propTypes={index:o().number.isRequired,stageAddedAfter:o().func.isRequired};onStageAddedAfter=()=>{this.props.stageAddedAfter(this.props.index)};render(){return r().createElement("div",{className:pe()(Qp["add-after-stage"]),"data-tip":"Add stage below","data-place":"top","data-for":"add-after-stage"},r().createElement("button",{"data-test-id":"add-after-stage",type:"button",title:"Add After Stage",className:"btn btn-default btn-xs",onClick:this.onStageAddedAfter},"+"),r().createElement(Lr.Tooltip,{id:"add-after-stage"}))}}const th=eh;var nh=n(2347),ih={};ih.styleTagTransform=Ae(),ih.setAttributes=Ee(),ih.insert=xe().bind(null,"head"),ih.domAPI=ve(),ih.insertStyleElement=Ce(),me()(nh.Z,ih);const rh=nh.Z&&nh.Z.locals?nh.Z.locals:void 0;class sh extends i.PureComponent{static displayName="ToggleStageComponent";static propTypes={isEnabled:o().bool.isRequired,index:o().number.isRequired,runStage:o().func.isRequired,stageToggled:o().func.isRequired,setIsModified:o().func.isRequired};onStageToggled=()=>{this.props.stageToggled(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index,!0)};render(){const e=this.props.isEnabled?"Exclude stage from pipeline":"Include stage in pipeline";return r().createElement("div",{className:rh["toggle-stage"],"data-for":"toggle-stage","data-tip":e,"data-place":"top"},r().createElement(he.Toggle,{id:"toggle-stage-button",checked:this.props.isEnabled,onChange:this.onStageToggled,className:rh["toggle-stage-button"],"aria-label":e,size:"small"}),r().createElement(Lr.Tooltip,{id:"toggle-stage"}))}}const oh=sh;var ah=n(5884),uh={};uh.styleTagTransform=Ae(),uh.setAttributes=Ee(),uh.insert=xe().bind(null,"head"),uh.domAPI=ve(),uh.insertStyleElement=Ce(),me()(ah.Z,uh);const lh=ah.Z&&ah.Z.locals?ah.Z.locals:void 0;class ch extends i.PureComponent{static displayName="StageGrabberComponent";render(){return r().createElement("div",{className:lh["stage-grabber"]},r().createElement("i",{className:"fa fa-bars fa-rotate-90","aria-hidden":!0}))}}const ph=ch;var hh=n(1103),dh={};dh.styleTagTransform=Ae(),dh.setAttributes=Ee(),dh.insert=xe().bind(null,"head"),dh.domAPI=ve(),dh.insertStyleElement=Ce(),me()(hh.Z,dh);const fh=hh.Z&&hh.Z.locals?hh.Z.locals:void 0;class mh extends i.PureComponent{static displayName="StageCollapserComponent";static propTypes={isExpanded:o().bool.isRequired,index:o().number.isRequired,stageCollapseToggled:o().func.isRequired,setIsModified:o().func.isRequired};onStageCollapseToggled=()=>{this.props.stageCollapseToggled(this.props.index),this.props.setIsModified(!0)};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return r().createElement("div",{className:pe()(fh["stage-collapser"])},r().createElement("button",{type:"button",title:t,onClick:this.onStageCollapseToggled,className:"btn btn-default btn-xs"},r().createElement("i",{className:e,"aria-hidden":!0})))}}const gh=mh;var vh=n(8726),yh=function(e){var t=e.onMouseDown;return r().createElement("span",{className:"Select-arrow",onMouseDown:t})};yh.propTypes={onMouseDown:o().func};var xh=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],bh=function(e){for(var t=0;t<xh.length;t++)e=e.replace(xh[t].letters,xh[t].base);return e},Eh=function(e){return null!=e&&""!==e},wh=function(e,t,n,i){return i.ignoreAccents&&(t=bh(t)),i.ignoreCase&&(t=t.toLowerCase()),i.trimFilter&&(t=t.replace(/^\s+|\s+$/g,"")),n&&(n=n.map((function(e){return e[i.valueKey]}))),e.filter((function(e){if(n&&n.indexOf(e[i.valueKey])>-1)return!1;if(i.filterOption)return i.filterOption.call(void 0,e,t);if(!t)return!0;var r=e[i.valueKey],s=e[i.labelKey],o=Eh(r),a=Eh(s);if(!o&&!a)return!1;var u=o?String(r):null,l=a?String(s):null;return i.ignoreAccents&&(u&&"label"!==i.matchProp&&(u=bh(u)),l&&"value"!==i.matchProp&&(l=bh(l))),i.ignoreCase&&(u&&"label"!==i.matchProp&&(u=u.toLowerCase()),l&&"value"!==i.matchProp&&(l=l.toLowerCase())),"start"===i.matchPos?u&&"label"!==i.matchProp&&u.substr(0,t.length)===t||l&&"value"!==i.matchProp&&l.substr(0,t.length)===t:u&&"label"!==i.matchProp&&u.indexOf(t)>=0||l&&"value"!==i.matchProp&&l.indexOf(t)>=0}))},Ch=function(e){var t=e.focusedOption,n=e.focusOption,i=e.inputValue,s=e.instancePrefix,o=e.onFocus,a=e.onOptionRef,u=e.onSelect,l=e.optionClassName,c=e.optionComponent,p=e.optionGroupComponent,h=e.optionRenderer,d=e.options,f=e.removeValue,m=e.selectValue,g=e.valueArray,v=e.valueKey,y=p,x=c,b=h;return function e(c){return c.map((function(c,p){if(function(e){return e&&Array.isArray(e.options)}(c)){var h=pe()({"Select-option-group":!0});return r().createElement(y,{className:h,key:"option-group-"+p,label:b(c),option:c,optionIndex:p},e(c.options))}var d=g&&g.indexOf(c)>-1,E=c===t,w=pe()(l,{"Select-option":!0,"is-selected":d,"is-focused":E,"is-disabled":c.disabled});return r().createElement(x,{className:w,focusOption:n,inputValue:i,instancePrefix:s,isDisabled:c.disabled,isFocused:E,isSelected:d,key:"option-"+p+"-"+c[v],onFocus:o,onSelect:u,option:c,optionIndex:p,ref:function(e){a(e,E)},removeValue:f,selectValue:m},b(c,p))}))}(d)};Ch.propTypes={focusOption:o().func,focusedOption:o().object,inputValue:o().string,instancePrefix:o().string,onFocus:o().func,onOptionRef:o().func,onSelect:o().func,optionClassName:o().string,optionComponent:o().func,optionRenderer:o().func,options:o().array,removeValue:o().func,selectValue:o().func,valueArray:o().array,valueKey:o().string};var Sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ah=(function(){function e(e){this.value=e}function t(t){var n,i;function r(n,i){try{var o=t[n](i),a=o.value;a instanceof e?Promise.resolve(a.value).then((function(e){r("next",e)}),(function(e){r("throw",e)})):s(o.done?"return":"normal",o.value)}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?r(n.key,n.arg):i=null}this._invoke=function(e,t){return new Promise((function(s,o){var a={key:e,arg:t,resolve:s,reject:o,next:null};i?i=i.next=a:(n=i=a,r(e,t))}))},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),Dh=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},kh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Th=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Fh=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},Ih=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Nh=function(e){function t(){return Ah(this,t),Ih(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Th(t,e),Dh(t,[{key:"render",value:function(){return this.props.children}}]),t}(r().Component);Nh.propTypes={children:o().node};var Ph=function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},Oh=function(e){function t(e){Ah(this,t);var n=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return Th(t,e),Dh(t,[{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,i=e.optionIndex,s=pe()(this.props.className,t.className);return t.disabled?r().createElement("div",{className:s,onMouseDown:Ph,onClick:Ph},this.props.children):r().createElement("div",{className:s,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+i,title:t.title},this.props.children)}}]),t}(r().Component);Oh.propTypes={children:o().node,className:o().string,instancePrefix:o().string.isRequired,isDisabled:o().bool,isFocused:o().bool,isSelected:o().bool,onFocus:o().func,onSelect:o().func,onUnfocus:o().func,option:o().object.isRequired,optionIndex:o().number};var Rh=function(e){function t(e){Ah(this,t);var n=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Th(t,e),Dh(t,[{key:"blockEvent",value:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"render",value:function(){var e=this.props.option,t=pe()(this.props.className,e.className);return e.disabled?r().createElement("div",{className:t,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):r().createElement("div",{className:t,style:e.style,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,title:e.title},r().createElement("div",{className:"Select-option-group-label"},this.props.label),this.props.children)}}]),t}(r().Component);Rh.propTypes={children:o().any,className:o().string,label:o().node,option:o().object.isRequired};var Mh=function(e){function t(e){Ah(this,t);var n=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Th(t,e),Dh(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return r().createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){var e="Select-value-label";return this.props.onClick||this.props.value.href?r().createElement("a",{className:e,href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):r().createElement("span",{className:e,role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return r().createElement("div",{className:pe()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(r().Component);function Lh(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}Mh.propTypes={children:o().node,disabled:o().bool,id:o().string,onClick:o().func,onRemove:o().func,value:o().object.isRequired};var Bh=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},jh=o().oneOfType([o().string,o().node]),Vh=(o().oneOfType([o().string,o().number]),1),zh=function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},qh=function(e){function t(e){Ah(this,t);var n=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","getOptionLabel","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleTouchEnd","handleTouchEndClearValue","handleTouchMove","handleTouchOutside","handleTouchStart","handleValueClick","onOptionRef","removeValue","selectValue"].forEach((function(e){return n[e]=n[e].bind(n)})),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return Th(t,e),Dh(t,[{key:"componentWillMount",value:function(){this._flatOptions=this.flattenOptions(this.props.options),this._instancePrefix="react-select-"+(this.props.instanceId||++Vh)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:zh(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&(this._flatOptions=this.flattenOptions(e.options));var t=this.getValueArray(e.value,e);!e.isOpen&&this.props.isOpen?this.closeMenu():e.isOpen&&!this.props.isOpen&&this.setState({isOpen:!0}),e.required?this.setState({required:zh(t[0],e.multi)}):this.props.required&&this.setState({required:!1}),this.state.inputValue&&this.props.value!==e.value&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=(0,np.findDOMNode)(this.focused),i=(0,np.findDOMNode)(this.menu),r=i.scrollTop,s=r+i.offsetHeight,o=n.offsetTop,a=o+n.offsetHeight;(r>o||s<a)&&(i.scrollTop=n.offsetTop),this.hasScrolledToOption=!0}else this.state.isOpen||(this.hasScrolledToOption=!1);if(this._scrollToFocusedOptionOnUpdate&&this.focused&&this.menu){this._scrollToFocusedOptionOnUpdate=!1;var u=(0,np.findDOMNode)(this.focused),l=(0,np.findDOMNode)(this.menu),c=u.getBoundingClientRect(),p=l.getBoundingClientRect();c.bottom>p.bottom?l.scrollTop=u.offsetTop+u.clientHeight-l.offsetHeight:c.top<p.top&&(l.scrollTop=u.offsetTop)}if(this.props.scrollMenuIntoView&&this.menuContainer){var h=this.menuContainer.getBoundingClientRect();window.innerHeight<h.bottom+this.props.menuBuffer&&window.scrollBy(0,h.bottom+this.props.menuBuffer-window.innerHeight)}if(e.disabled!==this.props.disabled&&(this.setState({isFocused:!1}),this.closeMenu()),t.isOpen!==this.state.isOpen){this.toggleTouchOutsideEvent(this.state.isOpen);var d=this.state.isOpen?this.props.onOpen:this.props.onClose;d&&d()}}},{key:"componentWillUnmount",value:function(){this.toggleTouchOutsideEvent(!1)}},{key:"toggleTouchOutsideEvent",value:function(e){e?!document.addEventListener&&document.attachEvent?document.attachEvent("ontouchstart",this.handleTouchOutside):document.addEventListener("touchstart",this.handleTouchOutside):!document.removeEventListener&&document.detachEvent?document.detachEvent("ontouchstart",this.handleTouchOutside):document.removeEventListener("touchstart",this.handleTouchOutside)}},{key:"handleTouchOutside",value:function(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.closeMenu()}},{key:"focus",value:function(){this.input&&this.input.focus()}},{key:"blurInput",value:function(){this.input&&this.input.blur()}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchEndClearValue",value:function(e){this.dragging||this.clearValue(e)}},{key:"handleMouseDown",value:function(e){if(!(this.props.disabled||"mousedown"===e.type&&0!==e.button))if("INPUT"!==e.target.tagName){if(e.preventDefault(),!this.props.searchable)return this.focus(),this.setState({isOpen:!this.state.isOpen});if(this.state.isFocused){this.focus();var t=this.input,n=!0;"function"==typeof t.getInput&&(t=t.getInput()),t.value="",this._focusAfterClear&&(n=!1,this._focusAfterClear=!1),this.setState({isOpen:n,isPseudoFocused:!1,focusedOption:null})}else this._openAfterFocus=this.props.openOnClick,this.focus(),this.setState({focusedOption:null})}else this.state.isFocused?this.state.isOpen||this.setState({isOpen:!0,isPseudoFocused:!1}):(this._openAfterFocus=this.props.openOnClick,this.focus())}},{key:"handleMouseDownOnArrow",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(this.state.isOpen?(e.stopPropagation(),e.preventDefault(),this.closeMenu()):this.setState({isOpen:!0}))}},{key:"handleMouseDownOnMenu",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this._openAfterFocus=!0,this.focus())}},{key:"closeMenu",value:function(){this.props.onCloseResetsInput?this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}),this.hasScrolledToOption=!1}},{key:"handleInputFocus",value:function(e){if(!this.props.disabled){var t=this.state.isOpen||this._openAfterFocus||this.props.openOnFocus;t=!this._focusAfterClear&&t,this.props.onFocus&&this.props.onFocus(e),this.setState({isFocused:!0,isOpen:!!t}),this._focusAfterClear=!1,this._openAfterFocus=!1}}},{key:"handleInputBlur",value:function(e){if(!this.menu||this.menu!==document.activeElement&&!this.menu.contains(document.activeElement)){this.props.onBlur&&this.props.onBlur(e);var t={isFocused:!1,isOpen:!1,isPseudoFocused:!1};this.props.onBlurResetsInput&&(t.inputValue=this.handleInputValueChange("")),this.setState(t)}else this.focus()}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.state.inputValue!==e.target.value&&(t=this.handleInputValueChange(t)),this.setState({inputValue:t,isOpen:!0,isPseudoFocused:!1})}},{key:"setInputValue",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":Sh(t))&&(e=""+t)}this.setState({inputValue:e})}},{key:"handleInputValueChange",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":Sh(t))&&(e=""+t)}return e}},{key:"handleKeyDown",value:function(e){if(!(this.props.disabled||"function"==typeof this.props.onInputKeyDown&&(this.props.onInputKeyDown(e),e.defaultPrevented)))switch(e.keyCode){case 8:!this.state.inputValue&&this.props.backspaceRemoves&&(e.preventDefault(),this.popValue());break;case 9:if(e.shiftKey||!this.state.isOpen||!this.props.tabSelectsValue)break;e.preventDefault(),this.selectFocusedOption();break;case 13:e.preventDefault(),e.stopPropagation(),this.state.isOpen?this.selectFocusedOption():this.focusNextOption();break;case 27:e.preventDefault(),this.state.isOpen?(this.closeMenu(),e.stopPropagation()):this.props.clearable&&this.props.escapeClearsValue&&(this.clearValue(e),e.stopPropagation());break;case 32:if(this.props.searchable)break;if(e.preventDefault(),!this.state.isOpen){this.focusNextOption();break}e.stopPropagation(),this.selectFocusedOption();break;case 38:e.preventDefault(),this.focusPreviousOption();break;case 40:e.preventDefault(),this.focusNextOption();break;case 33:e.preventDefault(),this.focusPageUpOption();break;case 34:e.preventDefault(),this.focusPageDownOption();break;case 35:if(e.shiftKey)break;e.preventDefault(),this.focusEndOption();break;case 36:if(e.shiftKey)break;e.preventDefault(),this.focusStartOption();break;case 46:e.preventDefault(),!this.state.inputValue&&this.props.deleteRemoves&&this.popValue()}}},{key:"handleValueClick",value:function(e,t){this.props.onValueClick&&this.props.onValueClick(e,t)}},{key:"handleMenuScroll",value:function(e){if(this.props.onMenuScrollToBottom){var t=e.target;t.scrollHeight>t.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i="object"===(void 0===n?"undefined":Sh(n))?n:this.props;if(i.multi){if("string"==typeof e&&(e=e.split(i.delimiter)),!Array.isArray(e)){if(null==e)return[];e=[e]}return e.map((function(e){return t.expandValue(e,i)})).filter((function(e){return e}))}var r=this.expandValue(e,i);return r?[r]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":Sh(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var i=t.labelKey,r=t.renderInvalidValues,s=t.valueKey,o=this._flatOptions;if(o){for(var a=0;a<o.length;a++)if(String(o[a][s])===String(e))return o[a];var u;if(r)return this._invalidOptions=this._invalidOptions||{},this._invalidOptions[e]=this._invalidOptions[e]||(_h(u={invalid:!0},i,e),_h(u,s,e),u),this._invalidOptions[e]}}},{key:"setValue",value:function(e){var t=this;if(this.props.autoBlur&&this.blurInput(),this.props.required){var n=zh(e,this.props.multi);this.setState({required:n})}this.props.simpleValue&&e&&(e=this.props.multi?e.map((function(e){return e[t.props.valueKey]})).join(this.props.delimiter):e[this.props.valueKey]),this.props.onChange&&this.props.onChange(e)}},{key:"selectValue",value:function(e){var t=this;this.props.closeOnSelect&&(this.hasScrolledToOption=!1);var n=this.props.onSelectResetsInput?"":this.state.inputValue;this.props.multi?this.setState({focusedIndex:null,inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect},(function(){t.getValueArray(t.props.value).some((function(n){return n[t.props.valueKey]===e[t.props.valueKey]}))?t.removeValue(e):t.addValue(e)})):this.setState({inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect,isPseudoFocused:this.state.isFocused},(function(){t.setValue(e)}))}},{key:"addValue",value:function(e){var t=this.getValueArray(this.props.value),n=this._visibleOptions.filter((function(e){return!e.disabled})),i=n.indexOf(e);this.setValue(t.concat(e)),n.length-1===i?this.focusOption(n[i-1]):n.length>i&&this.focusOption(n[i+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter((function(n){return n[t.props.valueKey]!==e[t.props.valueKey]}))),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1},this.focus),this._focusAfterClear=!0)}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map((function(e,t){return{option:e,index:t}})).filter((function(e){return!e.option.disabled}));if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen){var n={focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null),isOpen:!0};return this.props.onSelectResetsInput&&(n.inputValue=""),void this.setState(n)}if(t.length){for(var i=-1,r=0;r<t.length;r++)if(this._focusedOption===t[r].option){i=r;break}if("next"===e&&-1!==i)i=(i+1)%t.length;else if("previous"===e)i>0?i-=1:i=t.length-1;else if("start"===e)i=0;else if("end"===e)i=t.length-1;else if("page_up"===e){var s=i-this.props.pageSize;i=s<0?0:s}else if("page_down"===e){var o=i+this.props.pageSize;i=o>t.length-1?t.length-1:o}-1===i&&(i=0),this.setState({focusedIndex:t[i].index,focusedOption:t[i].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return r().createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},r().createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,i=this.props.valueRenderer||this.getOptionLabel,s=this.props.valueComponent;if(!e.length){var o=function(e,t,n){var i=e.inputValue,r=e.isPseudoFocused,s=e.isFocused,o=t.onSelectResetsInput;return!i||!o&&!n&&!r&&!s}(this.state,this.props,t);return o?r().createElement("div",{className:"Select-placeholder"},this.props.placeholder):null}var a,u,l,c,p,h,d=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map((function(e,t){return r().createElement(s,{disabled:n.props.disabled||!1===e.clearableValue,id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,key:"value-"+t+"-"+e[n.props.valueKey],onClick:d,onRemove:n.removeValue,placeholder:n.props.placeholder,value:e},i(e,t),r().createElement("span",{className:"Select-aria-only"}," "))})):(a=this.state,u=this.props,l=a.inputValue,c=a.isPseudoFocused,p=a.isFocused,h=u.onSelectResetsInput,l&&(h||!p&&c||p&&!c)?void 0:(t&&(d=null),r().createElement(s,{disabled:this.props.disabled,id:this._instancePrefix+"-value-item",instancePrefix:this._instancePrefix,onClick:d,placeholder:this.props.placeholder,value:e[0]},i(e[0]))))}},{key:"renderInput",value:function(e,t){var n,i=this,s=pe()("Select-input",this.props.inputProps.className),o=this.state.isOpen,a=pe()((_h(n={},this._instancePrefix+"-list",o),_h(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),u=this.state.inputValue;!u||this.props.onSelectResetsInput||this.state.isFocused||(u="");var l=kh({},this.props.inputProps,{"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-expanded":""+o,"aria-haspopup":""+o,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-owns":a,className:s,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",required:this.state.required,tabIndex:this.props.tabIndex,value:u});if(this.props.inputRenderer)return this.props.inputRenderer(l);if(this.props.disabled||!this.props.searchable){var c=Fh(this.props.inputProps,[]),p=pe()(_h({},this._instancePrefix+"-list",o));return r().createElement("div",kh({},c,{"aria-expanded":o,"aria-owns":p,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-disabled":""+this.props.disabled,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],className:s,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",style:{border:0,width:1,display:"inline-block"},tabIndex:this.props.tabIndex||0}))}return this.props.autosize?r().createElement(vh.Z,kh({id:this.props.id},l,{minWidth:"5"})):r().createElement("div",{className:s,key:"input-wrap"},r().createElement("input",kh({id:this.props.id},l)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.multi?this.props.clearAllText:this.props.clearValueText,n=this.props.clearRenderer();return r().createElement("span",{"aria-label":t,className:"Select-clear-zone",onMouseDown:this.clearValue,onTouchEnd:this.handleTouchEndClearValue,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,title:t},n)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?r().createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterFlatOptions",value:function(e){var t=this.state.inputValue,n=this._flatOptions;return this.props.filterOptions?("function"==typeof this.props.filterOptions?this.props.filterOptions:wh)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,trimFilter:this.props.trimFilter,valueKey:this.props.valueKey}):n}},{key:"flattenOptions",value:function(e,t){if(!e)return[];for(var n,i=[],r=0;r<e.length;r++){var s=Lh(e[r]);t&&(s.group=t),(n=s)&&Array.isArray(n.options)?(i=i.concat(this.flattenOptions(s.options,s)),s.options=[]):i.push(s)}return i}},{key:"unflattenOptions",value:function(e){var t=[],n=void 0,i=void 0;return e.forEach((function(e){for(e.isInTree=!1,n=e.group;n;)n.isInTree&&(n.options=[],n.isInTree=!1),n=n.group})),e.forEach((function(e){for(n=(i=e).group;n;)i.isInTree||(n.options.push(i),i.isInTree=!0),n=(i=n).group;i.isInTree||(t.push(i),i.isInTree=!0)})),e.forEach((function(e){delete e.isInTree})),t}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onOptionRef:this.onOptionRef,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionGroupComponent:this.props.optionGroupComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,removeValue:this.removeValue,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?r().createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map((function(e){return Bh(e[t.props.valueKey])})).join(this.props.delimiter);return r().createElement("input",{disabled:this.props.disabled,name:this.props.name,ref:function(e){return t.value=e},type:"hidden",value:n})}return e.map((function(e,n){return r().createElement("input",{disabled:t.props.disabled,key:"hidden."+n,name:t.props.name,ref:"value"+n,type:"hidden",value:Bh(e[t.props.valueKey])})}))}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,i=this.state.focusedOption||e;if(i&&!i.disabled){var r=-1;if(t.some((function(e,t){var s=e[n]===i[n];return s&&(r=t),s})),-1!==r)return r}for(var s=0;s<t.length;s++)if(!t[s].disabled)return s;return null}},{key:"renderOuter",value:function(e,t,n){var i=this,s=this.props.dropdownComponent,o=this.renderMenu(e,t,n);return o?r().createElement(s,null,r().createElement("div",{ref:function(e){return i.menuContainer=e},className:"Select-menu-outer",style:this.props.menuContainerStyle},r().createElement("div",{className:"Select-menu",id:this._instancePrefix+"-list",onMouseDown:this.handleMouseDownOnMenu,onScroll:this.handleMenuScroll,ref:function(e){return i.menu=e},role:"listbox",style:this.props.menuStyle,tabIndex:-1},o))):null}},{key:"render",value:function(){var e=this,t=this.getValueArray(this.props.value);this._visibleOptions=this.filterFlatOptions(this.props.multi&&this.props.removeSelected?t:null);var n=this.unflattenOptions(this._visibleOptions),i="boolean"==typeof this.props.isOpen?this.props.isOpen:this.state.isOpen;this.props.multi&&!n.length&&t.length&&!this.state.inputValue&&(i=!1);var s,o=this.getFocusableOptionIndex(t[0]);s=this._focusedOption=null!==o?this._visibleOptions[o]:null;var a=pe()("Select",this.props.className,{"has-value":t.length,"is-clearable":this.props.clearable,"is-disabled":this.props.disabled,"is-focused":this.state.isFocused,"is-loading":this.props.isLoading,"is-open":i,"is-pseudo-focused":this.state.isPseudoFocused,"is-searchable":this.props.searchable,"Select--multi":this.props.multi,"Select--rtl":this.props.rtl,"Select--single":!this.props.multi}),u=null;return this.props.multi&&!this.props.disabled&&t.length&&!this.state.inputValue&&this.state.isFocused&&this.props.backspaceRemoves&&(u=r().createElement("span",{id:this._instancePrefix+"-backspace-remove-message",className:"Select-aria-only","aria-live":"assertive"},this.props.backspaceToRemoveMessage.replace("{label}",t[t.length-1][this.props.labelKey]))),r().createElement("div",{ref:function(t){return e.wrapper=t},className:a,style:this.props.wrapperStyle},this.renderHiddenField(t),r().createElement("div",{ref:function(t){return e.control=t},className:"Select-control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleTouchEnd,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,style:this.props.style},r().createElement("span",{className:"Select-multi-value-wrapper",id:this._instancePrefix+"-value"},this.renderValue(t,i),this.renderInput(t,o)),u,this.renderLoading(),this.renderClear(),this.renderArrow()),i?this.renderOuter(n,t,s):null)}}]),t}(r().Component);qh.propTypes={"aria-describedby":o().string,"aria-label":o().string,"aria-labelledby":o().string,arrowRenderer:o().func,autoBlur:o().bool,autoFocus:o().bool,autofocus:o().bool,autosize:o().bool,backspaceRemoves:o().bool,backspaceToRemoveMessage:o().string,className:o().string,clearAllText:jh,clearRenderer:o().func,clearValueText:jh,clearable:o().bool,closeOnSelect:o().bool,deleteRemoves:o().bool,delimiter:o().string,disabled:o().bool,dropdownComponent:o().func,escapeClearsValue:o().bool,filterOption:o().func,filterOptions:o().any,id:o().string,ignoreAccents:o().bool,ignoreCase:o().bool,inputProps:o().object,inputRenderer:o().func,instanceId:o().string,isLoading:o().bool,isOpen:o().bool,joinValues:o().bool,labelKey:o().string,matchPos:o().string,matchProp:o().string,menuBuffer:o().number,menuContainerStyle:o().object,menuRenderer:o().func,menuStyle:o().object,multi:o().bool,name:o().string,noResultsText:jh,onBlur:o().func,onBlurResetsInput:o().bool,onChange:o().func,onClose:o().func,onCloseResetsInput:o().bool,onFocus:o().func,onInputChange:o().func,onInputKeyDown:o().func,onMenuScrollToBottom:o().func,onOpen:o().func,onSelectResetsInput:o().bool,onValueClick:o().func,openOnClick:o().bool,openOnFocus:o().bool,optionClassName:o().string,optionComponent:o().func,optionGroupComponent:o().func,optionRenderer:o().func,options:o().array,pageSize:o().number,placeholder:jh,removeSelected:o().bool,renderInvalidValues:o().bool,required:o().bool,resetValue:o().any,rtl:o().bool,scrollMenuIntoView:o().bool,searchable:o().bool,simpleValue:o().bool,style:o().object,tabIndex:o().string,tabSelectsValue:o().bool,trimFilter:o().bool,value:o().any,valueComponent:o().func,valueKey:o().string,valueRenderer:o().func,wrapperStyle:o().object},qh.defaultProps={arrowRenderer:yh,autosize:!0,backspaceRemoves:!0,backspaceToRemoveMessage:"Press backspace to remove {label}",clearable:!0,clearAllText:"Clear all",clearRenderer:function(){return r().createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},clearValueText:"Clear value",closeOnSelect:!0,deleteRemoves:!0,delimiter:",",disabled:!1,dropdownComponent:Nh,escapeClearsValue:!0,filterOptions:wh,ignoreAccents:!0,ignoreCase:!0,inputProps:{},isLoading:!1,joinValues:!1,labelKey:"label",matchPos:"any",matchProp:"any",menuBuffer:0,menuRenderer:Ch,multi:!1,noResultsText:"No results found",onBlurResetsInput:!0,onCloseResetsInput:!0,onSelectResetsInput:!0,openOnClick:!0,optionComponent:Oh,optionGroupComponent:Rh,pageSize:5,placeholder:"Select...",removeSelected:!0,required:!1,rtl:!1,scrollMenuIntoView:!0,searchable:!0,simpleValue:!1,tabSelectsValue:!0,trimFilter:!0,valueComponent:Mh,valueKey:"value"};var Uh={autoload:o().bool.isRequired,cache:o().any,children:o().func.isRequired,ignoreAccents:o().bool,ignoreCase:o().bool,loadOptions:o().func.isRequired,loadingPlaceholder:o().oneOfType([o().string,o().node]),multi:o().bool,noResultsText:o().oneOfType([o().string,o().node]),onChange:o().func,onInputChange:o().func,options:o().array.isRequired,placeholder:o().oneOfType([o().string,o().node]),searchPromptText:o().oneOfType([o().string,o().node]),value:o().any},Wh={},Kh={autoload:!0,cache:Wh,children:function(e){return r().createElement(qh,e)},ignoreAccents:!0,ignoreCase:!0,loadingPlaceholder:"Loading...",options:[],searchPromptText:"Type to search"},$h=function(e){function t(e,n){Ah(this,t);var i=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i._cache=e.cache===Wh?{}:e.cache,i.state={inputValue:"",isLoading:!1,options:e.options},i.onInputChange=i.onInputChange.bind(i),i}return Th(t,e),Dh(t,[{key:"componentDidMount",value:function(){this.props.autoload&&this.loadOptions("")}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&this.setState({options:e.options})}},{key:"componentWillUnmount",value:function(){this._callback=null}},{key:"loadOptions",value:function(e){var t=this,n=this.props.loadOptions,i=this._cache;if(i&&Object.prototype.hasOwnProperty.call(i,e))return this._callback=null,void this.setState({isLoading:!1,options:i[e]});var r=function n(r,s){var o=s&&s.options||[];i&&(i[e]=o),n===t._callback&&(t._callback=null,t.setState({isLoading:!1,options:o}))};this._callback=r;var s=n(e,r);s&&s.then((function(e){return r(0,e)}),(function(e){return r()})),this._callback&&!this.state.isLoading&&this.setState({isLoading:!0})}},{key:"onInputChange",value:function(e){var t=this.props,n=t.ignoreAccents,i=t.ignoreCase,r=t.onInputChange,s=e;if(r){var o=r(s);null!=o&&"object"!==(void 0===o?"undefined":Sh(o))&&(s=""+o)}var a=s;return n&&(a=bh(a)),i&&(a=a.toLowerCase()),this.setState({inputValue:s}),this.loadOptions(a),s}},{key:"noResultsText",value:function(){var e=this.props,t=e.loadingPlaceholder,n=e.noResultsText,i=e.searchPromptText,r=this.state,s=r.inputValue;return r.isLoading?t:s&&n?n:i}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,i=t.loadingPlaceholder,r=t.placeholder,s=this.state,o=s.isLoading,a=s.options,u={noResultsText:this.noResultsText(),placeholder:o?i:r,options:o&&i?[]:a,ref:function(t){return e.select=t}};return n(kh({},this.props,u,{isLoading:o,onInputChange:this.onInputChange}))}}]),t}(i.Component);$h.propTypes=Uh,$h.defaultProps=Kh;var Hh=function(e){function t(e,n){Ah(this,t);var i=Ih(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.filterOptions=i.filterOptions.bind(i),i.menuRenderer=i.menuRenderer.bind(i),i.onInputKeyDown=i.onInputKeyDown.bind(i),i.onInputChange=i.onInputChange.bind(i),i.onOptionSelect=i.onOptionSelect.bind(i),i}return Th(t,e),Dh(t,[{key:"createNewOption",value:function(){var e=this.props,t=e.isValidNewOption,n=e.newOptionCreator,i=e.onNewOptionClick,r=e.options,s=void 0===r?[]:r;if(t({label:this.inputValue})){var o=n({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey});this.isOptionUnique({option:o,options:s})&&(i?i(o):(s.unshift(o),this.select.selectValue(o)))}}},{key:"filterOptions",value:function(){var e=this.props,t=e.filterOptions,n=e.isValidNewOption,i=e.promptTextCreator,r=(arguments.length<=2?void 0:arguments[2])||[],s=t.apply(void 0,arguments)||[];if(n({label:this.inputValue})){var o=this.props.newOptionCreator,a=o({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey}),u=this.isOptionUnique({option:a,options:r.concat(s)});if(u){var l=i(this.inputValue);this._createPlaceholderOption=o({label:l,labelKey:this.labelKey,valueKey:this.valueKey}),s.unshift(this._createPlaceholderOption)}}return s}},{key:"isOptionUnique",value:function(e){var t=e.option,n=e.options,i=this.props.isOptionUnique;return n=n||this.select.filterFlatOptions(),i({labelKey:this.labelKey,option:t,options:n,valueKey:this.valueKey})}},{key:"menuRenderer",value:function(e){return(0,this.props.menuRenderer)(kh({},e,{onSelect:this.onOptionSelect,selectValue:this.onOptionSelect}))}},{key:"onInputChange",value:function(e){var t=this.props.onInputChange;return this.inputValue=e,t&&(this.inputValue=t(e)),this.inputValue}},{key:"onInputKeyDown",value:function(e){var t=this.props,n=t.shouldKeyDownEventCreateNewOption,i=t.onInputKeyDown,r=this.select.getFocusedOption();r&&r===this._createPlaceholderOption&&n({keyCode:e.keyCode})?(this.createNewOption(),e.preventDefault()):i&&i(e)}},{key:"onOptionSelect",value:function(e){e===this._createPlaceholderOption?this.createNewOption():this.select.selectValue(e)}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.ref,i=Fh(t,["ref"]),r=this.props.children;return r||(r=Gh),r(kh({},i,{allowCreate:!0,filterOptions:this.filterOptions,menuRenderer:this.menuRenderer,onInputChange:this.onInputChange,onInputKeyDown:this.onInputKeyDown,ref:function(t){e.select=t,t&&(e.labelKey=t.props.labelKey,e.valueKey=t.props.valueKey),n&&n(t)}}))}}]),t}(r().Component),Gh=function(e){return r().createElement(qh,e)},Jh=function(e){var t=e.option,n=e.options,i=e.labelKey,r=e.valueKey;return!n||!n.length||0===n.filter((function(e){return e[i]===t[i]||e[r]===t[r]})).length},Xh=function(e){return!!e.label},Zh=function(e){var t=e.label,n=e.labelKey,i={};return i[e.valueKey]=t,i[n]=t,i.className="Select-create-option-placeholder",i},Yh=function(e){return'Create option "'+e+'"'},Qh=function(e){switch(e.keyCode){case 9:case 13:case 188:return!0;default:return!1}};Hh.isOptionUnique=Jh,Hh.isValidNewOption=Xh,Hh.newOptionCreator=Zh,Hh.promptTextCreator=Yh,Hh.shouldKeyDownEventCreateNewOption=Qh,Hh.defaultProps={filterOptions:wh,isOptionUnique:Jh,isValidNewOption:Xh,menuRenderer:Ch,newOptionCreator:Zh,promptTextCreator:Yh,shouldKeyDownEventCreateNewOption:Qh},Hh.propTypes={children:o().func,filterOptions:o().any,isOptionUnique:o().func,isValidNewOption:o().func,menuRenderer:o().any,newOptionCreator:o().func,onInputChange:o().func,onInputKeyDown:o().func,onNewOptionClick:o().func,options:o().array,promptTextCreator:o().func,ref:o().func,shouldKeyDownEventCreateNewOption:o().func};var ed=function(e){function t(){return Ah(this,t),Ih(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Th(t,e),Dh(t,[{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this;return r().createElement($h,this.props,(function(t){var n=t.ref,i=Fh(t,["ref"]),s=n;return r().createElement(Hh,i,(function(t){var n=t.ref,i=Fh(t,["ref"]),r=n;return e.props.children(kh({},i,{ref:function(t){r(t),s(t),e.select=t}}))}))}))}}]),t}(r().Component);ed.propTypes={children:o().func.isRequired},ed.defaultProps={children:function(e){return r().createElement(qh,e)}},qh.Async=$h,qh.AsyncCreatable=ed,qh.Creatable=Hh,qh.Value=Mh,qh.Option=Oh;const td=qh;var nd=n(173),id={};id.styleTagTransform=Ae(),id.setAttributes=Ee(),id.insert=xe().bind(null,"head"),id.domAPI=ve(),id.insertStyleElement=Ce(),me()(nd.Z,id);const rd=nd.Z&&nd.Z.locals?nd.Z.locals:void 0;class sd extends i.Component{static propTypes={option:o().object.isRequired,className:o().string,children:o().node};render(){const{option:e}=this.props;return r().createElement("div",{"data-tip":e.description,"data-place":"right","data-for":`select-option-${e.name}`},r().createElement(Oh,d({},this.props,{className:rd.option+" "+this.props.className}),this.props.children,rn(e.env)&&r().createElement(he.AtlasLogoMark,{size:12,className:rd.optionIcon})),r().createElement(Lr.Tooltip,{className:rd.tooltip,id:`select-option-${e.name}`}))}}const od=sd;var ad=n(6125),ud={};ud.styleTagTransform=Ae(),ud.setAttributes=Ee(),ud.insert=xe().bind(null,"head"),ud.domAPI=ve(),ud.insertStyleElement=Ce(),me()(ad.Z,ud);const ld=ad.Z&&ad.Z.locals?ad.Z.locals:void 0;class cd extends i.PureComponent{static displayName="StageOperatorSelectComponent";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,stageOperator:o().string,index:o().number.isRequired,isEnabled:o().bool.isRequired,isCommenting:o().bool.isRequired,stageOperatorSelected:o().func.isRequired,serverVersion:o().string.isRequired,setIsModified:o().func.isRequired};onStageOperatorSelected=e=>{this.props.stageOperatorSelected(this.props.index,e,this.props.isCommenting,this.props.env),this.props.setIsModified(!0)};render(){const e=(e=>{let{serverVersion:t,env:n,isTimeSeries:i,sourceName:r}=e;const s=i?Ot.TIME_SERIES:r?Ot.VIEW:Ot.COLLECTION;return Ot.STAGE_OPERATORS.filter(sn).filter((e=>function(e,t){const n=nn().coerce(t);return nn().gte(n,e?.version)}(e,t))).filter((e=>function(e,t){return e?.namespaces?.includes(t)}(e,s))).filter((e=>rn(e.env)||function(e,t){return e?.env?.includes(t)}(e,n))).map((e=>({...e})))})({serverVersion:this.props.serverVersion,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName});return r().createElement("div",{className:ld["stage-operator-select"]},r().createElement(td,{optionComponent:od,simpleValue:!0,searchable:!0,openOnClick:!0,openOnFocus:!0,clearable:!1,disabled:!this.props.isEnabled,className:ld["stage-operator-select-control"],options:e,value:this.props.stageOperator,onChange:this.onStageOperatorSelected}))}}const pd=cd;var hd=n(2891),dd={};dd.styleTagTransform=Ae(),dd.setAttributes=Ee(),dd.insert=xe().bind(null,"head"),dd.domAPI=ve(),dd.insertStyleElement=Ce(),me()(hd.Z,dd);const fd=hd.Z&&hd.Z.locals?hd.Z.locals:void 0,md={$out:"The $out operator will cause the pipeline to persist the results to the specified location (collection, S3, or Atlas). If the collection exists it will be replaced.",$merge:"The $merge operator will cause the pipeline to persist the results to the specified location."},gd=Object.keys(md);function vd(e){let{stageOperator:t}=e;return gd.includes(t)?r().createElement(he.Tooltip,{trigger:e=>{let{children:t,...n}=e;return r().createElement("span",d({},n,{className:fd["tooltip-icon"]}),t,r().createElement(he.Icon,{glyph:"InfoWithCircle"}))}},r().createElement(he.Body,null,md[t])):null}vd.propTypes={stageOperator:o().string.isRequired};class yd extends i.PureComponent{static displayName="StageEditorToolbar";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,error:o().string,isExpanded:o().bool.isRequired,isEnabled:o().bool.isRequired,stageOperator:o().string,index:o().number.isRequired,serverVersion:o().string.isRequired,stageOperatorSelected:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,setIsModified:o().func.isRequired,isCommenting:o().bool.isRequired,runStage:o().func.isRequired,isAutoPreviewing:o().bool};render(){return r().createElement("div",{className:pe()(fd["stage-editor-toolbar"],{[fd["stage-editor-toolbar-errored"]]:this.props.error})},r().createElement(ph,null),r().createElement(gh,{isExpanded:this.props.isExpanded,index:this.props.index,setIsModified:this.props.setIsModified,stageCollapseToggled:this.props.stageCollapseToggled}),r().createElement(pd,{env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stageOperator:this.props.stageOperator,index:this.props.index,isEnabled:this.props.isEnabled,isCommenting:this.props.isCommenting,stageOperatorSelected:this.props.stageOperatorSelected,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion}),r().createElement(oh,{index:this.props.index,isEnabled:this.props.isEnabled,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageToggled:this.props.stageToggled}),r().createElement("div",{className:fd["stage-editor-toolbar-right"]},!this.props.isAutoPreviewing&&r().createElement(vd,{stageOperator:this.props.stageOperator}),r().createElement(Xp,{index:this.props.index,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageDeleted:this.props.stageDeleted}),r().createElement(th,{index:this.props.index,stageAddedAfter:this.props.stageAddedAfter})))}}const xd=yd;var bd=n(8915),Ed={};Ed.styleTagTransform=Ae(),Ed.setAttributes=Ee(),Ed.insert=xe().bind(null,"head"),Ed.domAPI=ve(),Ed.insertStyleElement=Ce(),me()(bd.Z,Ed);const wd=bd.Z&&bd.Z.locals?bd.Z.locals:void 0;class Cd extends i.Component{static displayName="StageEditorComponent";static propTypes={stage:o().string,stageOperator:o().string,error:o().string,syntaxError:o().string,runStage:o().func.isRequired,index:o().number.isRequired,serverVersion:o().string.isRequired,fields:o().array.isRequired,stageChanged:o().func.isRequired,isValid:o().bool.isRequired,setIsModified:o().func.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};static defaultProps={fields:[],projections:[]};constructor(e){super(e),this.completer=new Ot.StageAutoCompleter(this.props.serverVersion,he.EditorTextCompleter,this.getFieldsAndProjections(),this.props.stageOperator)}shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.index!==this.props.index||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||e.isValid!==this.props.isValid}componentDidUpdate(e){this.completer.update(this.getFieldsAndProjections(),this.props.stageOperator),this.completer.version=this.props.serverVersion,this.props.stageOperator!==e.stageOperator&&this.editor&&this.editor.focus()}onStageChange=e=>{if(null===this.props.stageOperator&&e&&"["===e.charAt(0))return this.props.newPipelineFromPaste(e),void this.props.runStage(0);this.props.stageChanged(e,this.props.index)};getFieldsAndProjections(){const{fields:e,projections:t,index:n}=this.props,i=t.filter((e=>e.index<n));return[].concat.call([],e,i)}renderError(){if(this.props.error)return r().createElement("div",{"data-test-id":"stage-editor-error-message",className:wd["stage-editor-errormsg"],title:this.props.error},this.props.error)}renderSyntaxError(){if(!this.props.isValid&&this.props.syntaxError)return r().createElement("div",{className:wd["stage-editor-syntax-error"],title:this.props.syntaxError},this.props.syntaxError)}render(){return r().createElement("div",{className:wd["stage-editor-container"]},r().createElement("div",{className:wd["stage-editor"]},r().createElement(he.Editor,{text:this.props.stage,onChangeText:this.onStageChange,variant:he.EditorVariant.Shell,className:wd["stage-editor-ace-editor"],name:`aggregations-stage-editor-${this.props.index}`,options:{minLines:5},completer:this.completer,onLoad:e=>{this.editor=e}})),this.renderSyntaxError(),this.renderError())}}const Sd=Cd;var Ad=n(7130),Dd={};Dd.styleTagTransform=Ae(),Dd.setAttributes=Ee(),Dd.insert=xe().bind(null,"head"),Dd.domAPI=ve(),Dd.insertStyleElement=Ce(),me()(Ad.Z,Dd);const _d=Ad.Z&&Ad.Z.locals?Ad.Z.locals:void 0;class kd extends i.PureComponent{static displayName="LoadingOverlay";static propTypes={text:o().string.isRequired};render(){return r().createElement("div",{className:_d["loading-overlay"]},r().createElement("div",{className:_d["loading-overlay-box"]},r().createElement("i",{className:"fa fa-circle-o-notch fa-spin","aria-hidden":!0}),r().createElement("div",{className:_d["loading-overlay-box-text"]},this.props.text)))}}const Td=kd;var Fd=n(9877),Id={};Id.styleTagTransform=Ae(),Id.setAttributes=Ee(),Id.insert=xe().bind(null,"head"),Id.domAPI=ve(),Id.insertStyleElement=Ce(),me()(Fd.Z,Id);const Nd=Fd.Z&&Fd.Z.locals?Fd.Z.locals:void 0,{track:Pd}=Ke("COMPASS-AGGREGATIONS-UI");class Od extends i.Component{static displayName="StagePreview";static propTypes={runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,documents:o().array.isRequired,error:o().string,isValid:o().bool.isRequired,isEnabled:o().bool.isRequired,isLoading:o().bool.isRequired,isComplete:o().bool.isRequired,isMissingAtlasOnlyStageSupport:o().bool,openLink:o().func.isRequired,index:o().number.isRequired,stageOperator:o().string,stage:o().string};onGotoMergeResults=()=>{this.props.gotoMergeResults(this.props.index)};onGotoOutResults=()=>{const e=Bt()(this.props.stage).replace(/['"]+/g,"");this.props.gotoOutResults(e)};onSaveDocuments=()=>{this.props.runOutStage(this.props.index)};onAtlasSignupCtaClicked=()=>{Pd("Atlas Link Clicked",{screen:"agg_builder"}),this.props.openLink("https://www.mongodb.com/cloud/atlas/lp/search-1?utm_campaign=atlas_search&utm_source=compass&utm_medium=product&utm_content=v1")};renderMergeSection(){return this.props.isComplete?this.props.error?r().createElement("div",{className:Nd["stage-preview-out"]}):r().createElement("div",{className:Nd["stage-preview-out"]},r().createElement("div",{className:Nd["stage-preview-out-text"]},"Documents persisted to collection specified by $merge."),r().createElement(he.Link,{"data-test-id":"go-to-merge-collection",as:"button",className:Nd["stage-preview-out-link"],onClick:this.onGotoMergeResults},"Go to collection.")):r().createElement("div",{className:Nd["stage-preview-out"]},r().createElement("div",{className:Nd["stage-preview-out-text"]},"The $merge operator will cause the pipeline to persist the results to the specified location."))}renderOutSection(){return this.props.isComplete?this.props.error?r().createElement("div",{className:Nd["stage-preview-out"]}):r().createElement(he.Body,{className:Nd["stage-preview-out"]},r().createElement("div",{className:Nd["stage-preview-out-text"]},"Documents persisted to collection: ",Bt()(this.props.stage),"."),r().createElement(he.Link,{"data-test-id":"go-to-out-collection",as:"button",className:Nd["stage-preview-out-link"],onClick:this.onGotoOutResults},"Go to collection.")):r().createElement(he.Body,{className:Nd["stage-preview-out"]},r().createElement("div",{className:Nd["stage-preview-out-text"]},"The $out operator will cause the pipeline to persist the results to the specified location (collection, S3, or Atlas). If the collection exists it will be replaced."))}renderAtlasOnlyStagePreviewSection(){return r().createElement("div",{className:Nd["stage-preview-missing-search-support"]},r().createElement(he.AtlasLogoMark,{size:30,className:Nd["stage-preview-missing-search-support-icon"]}),r().createElement("div",{"data-test-id":"stage-preview-missing-search-support",className:Nd["stage-preview-missing-search-support-text"]},"This stage is only available with MongoDB Atlas. Create a free cluster or connect to an Atlas cluster to build search indexes and use ",this.props.stageOperator," aggregation stage to run fast, relevant search queries."),r().createElement(de.TextButton,{text:"Create Free Cluster",className:"btn btn-xs btn-primary",clickHandler:this.onAtlasSignupCtaClicked}))}renderPreview(){if(this.props.isMissingAtlasOnlyStageSupport)return this.renderAtlasOnlyStagePreviewSection();if(this.props.isValid&&this.props.isEnabled){if(this.props.stageOperator===Nn)return this.renderOutSection();if(this.props.stageOperator===Pn)return this.renderMergeSection();if(this.props.documents.length>0){const e=this.props.documents.map(((e,t)=>r().createElement("div",{key:t,className:Nd["stage-preview-document-card-container"]},r().createElement("div",{className:Nd["stage-preview-document-card"]},r().createElement(ml.Document,{doc:e,editable:!1})))));return r().createElement("div",{className:Nd["stage-preview-documents"]},e)}}return this.props.isLoading?void 0:r().createElement("div",{className:Nd["stage-preview-empty"]},r().createElement("div",null,r().createElement("svg",{width:"44",height:"60",viewBox:"0 0 44 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r().createElement("path",{d:"M21.9297 38.2988C23.4783 35.1247 27.7679 30.0989 32.5375 35.3879"}),r().createElement("path",{d:"M1 10.7831V51.3133L9.61538 59M1 10.7831L35.4615 1L43 5.19277M1 10.7831L10.1538 15.6747M9.61538 59L43 45.7229C39.9487 34.0763 38 22.5957 43 5.19277M9.61538 59C5.5 34.9362 7.46154 20.3333 10.1538 15.6747M43 5.19277L10.1538 15.6747"}),r().createElement("path",{d:"M19.7174 26.7113C19.7734 27.324 19.6719 27.8684 19.4884 28.2491C19.2999 28.6402 19.0726 28.7786 18.9038 28.7941C18.7349 28.8095 18.4862 28.7146 18.2299 28.3642C17.9804 28.0232 17.7818 27.5063 17.7257 26.8935C17.6696 26.2808 17.7711 25.7364 17.9546 25.3557C18.1432 24.9646 18.3704 24.8262 18.5393 24.8107C18.7082 24.7953 18.9568 24.8902 19.2132 25.2406C19.4627 25.5816 19.6613 26.0985 19.7174 26.7113Z",fill:"#89979B"}),r().createElement("path",{d:"M32.481 23.5351C32.5371 24.1479 32.4356 24.6923 32.2521 25.0729C32.0636 25.464 31.8363 25.6025 31.6674 25.6179C31.4985 25.6334 31.2499 25.5385 30.9935 25.1881C30.744 24.847 30.5454 24.3301 30.4894 23.7174C30.4333 23.1046 30.5348 22.5602 30.7183 22.1796C30.9068 21.7885 31.1341 21.65 31.303 21.6346C31.4719 21.6191 31.7205 21.714 31.9769 22.0644C32.2264 22.4055 32.425 22.9224 32.481 23.5351Z",fill:"#89979B"}))),r().createElement("div",null,r().createElement("i",{"data-test-id":"stage-preview-empty"},"No Preview Documents")))}renderLoading(){if(this.props.isLoading)return this.props.stageOperator===Nn?r().createElement(Td,{text:"Persisting Documents..."}):r().createElement(Td,{text:"Loading Preview Documents..."})}render(){return r().createElement("div",{className:Nd["stage-preview"]},this.renderLoading(),this.renderPreview())}}const Rd=Od;var Md=n(462),Ld={};Ld.styleTagTransform=Ae(),Ld.setAttributes=Ee(),Ld.insert=xe().bind(null,"head"),Ld.domAPI=ve(),Ld.insertStyleElement=Ce(),me()(Md.Z,Ld);const Bd=Md.Z&&Md.Z.locals?Md.Z.locals:void 0,jd=/s3:/,Vd=/atlas:/;class zd extends i.PureComponent{static displayName="StagePreviewToolbar";static propTypes={error:o().string,isEnabled:o().bool.isRequired,isValid:o().bool.isRequired,stageOperator:o().string,stageValue:o().any,count:o().number.isRequired,openLink:o().func.isRequired};getWord(){return 1===this.props.count?"document":"documents"}getOutText(){try{const e=Bt()(this.props.stageValue);return e.match(jd)?"Documents will be saved to S3.":e.match(Vd)?"Documents will be saved to Atlas cluster.":`Documents will be saved to the collection: ${e}`}catch(e){return"Unable to parse the destination for the out stage."}}getText(){if(this.props.isEnabled){if(this.props.stageOperator){if(this.props.stageOperator===Nn&&this.props.isValid)return this.getOutText();const e=st[this.props.stageOperator];let t=null;return t=e?r().createElement(he.Link,{as:"button",className:Bd["stage-preview-toolbar-link"],onClick:this.props.openLink.bind(this,e.link)},this.props.stageOperator):r().createElement("span",{className:Bd["stage-preview-toolbar-link-invalid"]},this.props.stageOperator),r().createElement("div",null,r().createElement("span",null,"Output after ",t," stage"),this.renderInfoSprinkle(e),r().createElement("span",{"data-test-id":"stage-preview-toolbar-tooltip"},"(Sample of ",this.props.count," ",this.getWord(),")"))}return"A sample of the aggregated results from this stage will be shown below"}return"Stage is disabled. Results not passed in the pipeline."}renderInfoSprinkle(e){if(this.props.stageOperator)return e?r().createElement("span",{"data-tip":e.tooltip,"data-for":"stage-tooltip","data-place":"top","data-html":"true"},r().createElement(Lr.InfoSprinkle,{onClickHandler:this.props.openLink,helpLink:e.link}),r().createElement(Lr.Tooltip,{id:"stage-tooltip"})):r().createElement("span",null," ")}render(){return r().createElement("div",{className:pe()(Bd["stage-preview-toolbar"],{[Bd["stage-preview-toolbar-errored"]]:this.props.error})},this.getText())}}const qd=zd;var Ud=n(7295),Wd={};Wd.styleTagTransform=Ae(),Wd.setAttributes=Ee(),Wd.insert=xe().bind(null,"head"),Wd.domAPI=ve(),Wd.insertStyleElement=Ce(),me()(Ud.Z,Wd);const Kd=Ud.Z&&Ud.Z.locals?Ud.Z.locals:void 0,$d=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Jc(this,n);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return F(h(h(t=Qc(this,(e=ep(n)).call.apply(e,[this].concat(s))))),"wrappedInstance",(0,i.createRef)()),t}return tp(n,t),Zc(n,[{key:"componentDidMount",value:function(){(0,np.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(e,d({ref:t},this.props))}}]),n}(i.Component),F(t,"displayName",mp("sortableHandle",e)),n}((e=>r().createElement(xd,e))),Hd={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class Gd extends i.Component{static displayName="StageComponent";static propTypes={env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,stage:o().string.isRequired,stageOperator:o().string,error:o().string,syntaxError:o().string,isValid:o().bool.isRequired,isEnabled:o().bool.isRequired,isExpanded:o().bool.isRequired,isLoading:o().bool.isRequired,isComplete:o().bool.isRequired,isMissingAtlasOnlyStageSupport:o().bool,previewDocuments:o().array.isRequired,index:o().number.isRequired,isCommenting:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,runStage:o().func.isRequired,runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,serverVersion:o().string.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,openLink:o().func.isRequired,fields:o().array.isRequired,setIsModified:o().func.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.isValid!==this.props.isValid||e.isEnabled!==this.props.isEnabled||e.isExpanded!==this.props.isExpanded||e.isLoading!==this.props.isLoading||e.isComplete!==this.props.isComplete||e.isMissingAtlasOnlyStageSupport!==this.props.isMissingAtlasOnlyStageSupport||e.index!==this.props.index||e.isCommenting!==this.props.isCommenting||e.isAutoPreviewing!==this.props.isAutoPreviewing||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||"$out"===this.props.stageOperator&&e.stage!==this.props.stage}getOpacity(){return this.props.isEnabled?1:.6}renderEditor(){return r().createElement(r().Fragment,null,r().createElement($d,{env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,isExpanded:this.props.isExpanded,isEnabled:this.props.isEnabled,stageOperator:this.props.stageOperator,index:this.props.index,stageOperatorSelected:this.props.stageOperatorSelected,stageCollapseToggled:this.props.stageCollapseToggled,stageToggled:this.props.stageToggled,runStage:this.props.runStage,isCommenting:this.props.isCommenting,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion,isAutoPreviewing:this.props.isAutoPreviewing}),this.props.isExpanded&&r().createElement(Sd,{stage:this.props.stage,stageOperator:this.props.stageOperator,error:this.props.error,syntaxError:this.props.syntaxError,isValid:this.props.isValid,runStage:this.props.runStage,index:this.props.index,serverVersion:this.props.serverVersion,setIsModified:this.props.setIsModified,isAutoPreviewing:this.props.isAutoPreviewing,fields:this.props.fields,stageChanged:this.props.stageChanged,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste}))}renderResizableEditor(){const{isAutoPreviewing:e}=this.props,t=this.renderEditor();return e?r().createElement(Wc,{className:Kd["stage-editor"],defaultSize:{width:"388px",height:"auto"},minWidth:"260px",maxWidth:"92%",enable:Hd,ref:e=>{this.resizableRef=e},handleWrapperClass:Kd["stage-resize-handle-wrapper"],handleComponent:{right:r().createElement(Kp,null)}},t):r().createElement("div",{className:Kd["stage-editor-no-preview"]},t)}renderPreview(){return r().createElement("div",{className:Kd["stage-preview-container"]},r().createElement(qd,{isEnabled:this.props.isEnabled,isValid:this.props.isValid,stageOperator:this.props.stageOperator,stageValue:this.props.stage,count:this.props.previewDocuments.length,openLink:this.props.openLink}),this.props.isExpanded&&r().createElement(Rd,{documents:this.props.previewDocuments,isValid:this.props.isValid,isEnabled:this.props.isEnabled,isLoading:this.props.isLoading,isComplete:this.props.isComplete,isMissingAtlasOnlyStageSupport:this.props.isMissingAtlasOnlyStageSupport,error:this.props.error,stageOperator:this.props.stageOperator,stage:this.props.stage,index:this.props.index,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,openLink:this.props.openLink}))}render(){const e=this.getOpacity();return r().createElement("div",{"data-test-id":"stage-container","data-stage-index":this.props.index,className:pe()(Kd["stage-container"],{[Kd["stage-container-is-first"]]:0===this.props.index})},r().createElement("div",{className:pe()(Kd.stage,{[Kd["stage-errored"]]:this.props.error}),style:{opacity:e}},this.renderResizableEditor(),this.props.isAutoPreviewing&&this.renderPreview()))}}const Jd=Gd;var Xd=n(1849),Zd={};Zd.styleTagTransform=Ae(),Zd.setAttributes=Ee(),Zd.insert=xe().bind(null,"head"),Zd.domAPI=ve(),Zd.insertStyleElement=Ce(),me()(Xd.Z,Zd);const Yd=Xd.Z&&Xd.Z.locals?Xd.Z.locals:void 0;class Qd extends i.PureComponent{static displayName="InputCollapserComponent";static propTypes={isExpanded:o().bool.isRequired,toggleInputDocumentsCollapsed:o().func.isRequired};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return r().createElement("div",{className:pe()(Yd["input-collapser"])},r().createElement("button",{type:"button",title:t,onClick:this.props.toggleInputDocumentsCollapsed,className:"btn btn-default btn-xs"},r().createElement("i",{className:e,"aria-hidden":!0})))}}const ef=Qd;var tf=n(9865),nf={};nf.styleTagTransform=Ae(),nf.setAttributes=Ee(),nf.insert=xe().bind(null,"head"),nf.domAPI=ve(),nf.insertStyleElement=Ce(),me()(tf.Z,nf);const rf=tf.Z&&tf.Z.locals?tf.Z.locals:void 0;class sf extends i.PureComponent{static displayName="InputDocumentsCountComponent";static propTypes={count:o().oneOfType([o().number,o().string]).isRequired};render(){const e=pe()({fa:!0,"fa-database":!0,[rf["input-documents-count-db"]]:!0});return r().createElement("div",{className:pe()(rf["input-documents-count"])},r().createElement("i",{className:e,"aria-hidden":!0}),r().createElement("div",{className:pe()(rf["input-documents-count-label"])},this.props.count," Documents in the Collection"))}}const of=sf;var af=n(8910),uf={};uf.styleTagTransform=Ae(),uf.setAttributes=Ee(),uf.insert=xe().bind(null,"head"),uf.domAPI=ve(),uf.insertStyleElement=Ce(),me()(af.Z,uf);const lf=af.Z&&af.Z.locals?af.Z.locals:void 0;class cf extends i.PureComponent{static displayName="InputRefreshComponent";static propTypes={refreshInputDocuments:o().func.isRequired};render(){return r().createElement("div",{className:lf["input-refresh"]},r().createElement("button",{type:"button",title:"Refresh Documents",onClick:this.props.refreshInputDocuments,className:"btn btn-default btn-xs"},r().createElement("i",{className:"fa fa-repeat","aria-hidden":!0})))}}const pf=cf;var hf=n(8608),df={};df.styleTagTransform=Ae(),df.setAttributes=Ee(),df.insert=xe().bind(null,"head"),df.domAPI=ve(),df.insertStyleElement=Ce(),me()(hf.Z,df);const ff=hf.Z&&hf.Z.locals?hf.Z.locals:void 0;class mf extends i.PureComponent{static displayName="InputBuilderToolbar";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){return r().createElement("div",{className:pe()(ff["input-builder-toolbar"])},r().createElement(ef,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,isExpanded:this.props.isExpanded}),r().createElement(of,{count:this.props.count}),r().createElement(pf,{refreshInputDocuments:this.props.refreshInputDocuments}))}}const gf=mf;var vf=n(4145),yf={};yf.styleTagTransform=Ae(),yf.setAttributes=Ee(),yf.insert=xe().bind(null,"head"),yf.domAPI=ve(),yf.insertStyleElement=Ce(),me()(vf.Z,yf);const xf=vf.Z&&vf.Z.locals?vf.Z.locals:void 0,bf=()=>r().createElement("div",{className:pe()(xf["input-preview-toolbar"])},r().createElement("div",{className:pe()(xf["input-preview-toolbar-text"])},"Preview of Documents in the Collection"));bf.displayName="InputPreviewToolbar";const Ef=bf;var wf=n(6102),Cf={};Cf.styleTagTransform=Ae(),Cf.setAttributes=Ee(),Cf.insert=xe().bind(null,"head"),Cf.domAPI=ve(),Cf.insertStyleElement=Ce(),me()(wf.Z,Cf);const Sf=wf.Z&&wf.Z.locals?wf.Z.locals:void 0;class Af extends i.PureComponent{static displayName="InputToolbarComponent";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){return r().createElement("div",{className:Sf["input-toolbar"]},r().createElement(gf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),r().createElement(Ef,null))}}const Df=Af;var _f=n(8056),kf={};kf.styleTagTransform=Ae(),kf.setAttributes=Ee(),kf.insert=xe().bind(null,"head"),kf.domAPI=ve(),kf.insertStyleElement=Ce(),me()(_f.Z,kf);const Tf=_f.Z&&_f.Z.locals?_f.Z.locals:void 0;class Ff extends i.PureComponent{static displayName="InputBuilderComponent";render(){return r().createElement("div",{className:Tf["input-builder"]},"Select an operator to construct expressions used in the aggregation pipeline stages. ",r().createElement(he.Link,{href:"https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/"},"Learn more"))}}const If=Ff;var Nf=n(969),Pf={};Pf.styleTagTransform=Ae(),Pf.setAttributes=Ee(),Pf.insert=xe().bind(null,"head"),Pf.domAPI=ve(),Pf.insertStyleElement=Ce(),me()(Nf.Z,Pf);const Of=Nf.Z&&Nf.Z.locals?Nf.Z.locals:void 0;class Rf extends i.Component{static displayName="InputPreview";static propTypes={documents:o().array.isRequired,isLoading:o().bool.isRequired};render(){const e=(this.props.documents||[]).map(((e,t)=>r().createElement("div",{key:t,className:Of["input-preview-document-card-container"]},r().createElement("div",{className:Of["input-preview-document-card"]},r().createElement(ml.Document,{doc:e,editable:!1})))));return r().createElement("div",{className:Of["input-preview"]},this.props.isLoading?r().createElement(Td,{text:"Sampling Documents..."}):null,r().createElement("div",{className:Of["input-preview-documents"]},e))}}const Mf=Rf;var Lf=n(3279),Bf={};Bf.styleTagTransform=Ae(),Bf.setAttributes=Ee(),Bf.insert=xe().bind(null,"head"),Bf.domAPI=ve(),Bf.insertStyleElement=Ce(),me()(Lf.Z,Bf);const jf=Lf.Z&&Lf.Z.locals?Lf.Z.locals:void 0,Vf={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class zf extends i.PureComponent{static displayName="InputWorkspace";static propTypes={documents:o().array.isRequired,isLoading:o().bool.isRequired};render(){return r().createElement("div",{className:jf["input-workspace"]},r().createElement(Wc,{defaultSize:{width:"388px",height:"auto"},minWidth:"220px",maxWidth:"92%",enable:Vf,ref:e=>{this.resizableRef=e},handleWrapperClass:jf["stage-resize-handle-wrapper"],handleComponent:{right:r().createElement(Kp,null)}},r().createElement(If,null)),r().createElement(Mf,{documents:this.props.documents,isLoading:this.props.isLoading}))}}const qf=zf;var Uf=n(6546),Wf={};Wf.styleTagTransform=Ae(),Wf.setAttributes=Ee(),Wf.insert=xe().bind(null,"head"),Wf.domAPI=ve(),Wf.insertStyleElement=Ce(),me()(Uf.Z,Wf);const Kf=Uf.Z&&Uf.Z.locals?Uf.Z.locals:void 0;class $f extends i.PureComponent{static displayName="InputComponent";static propTypes={toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,documents:o().array.isRequired,isLoading:o().bool.isRequired,isExpanded:o().bool.isRequired,count:o().oneOfType([o().number,o().string]).isRequired};render(){const e=this.props.isExpanded?r().createElement(qf,{documents:this.props.documents,isLoading:this.props.isLoading}):null;return r().createElement("div",{className:Kf.input},r().createElement(Df,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),e)}}const Hf=$f;var Gf=n(9867),Jf={};Jf.styleTagTransform=Ae(),Jf.setAttributes=Ee(),Jf.insert=xe().bind(null,"head"),Jf.domAPI=ve(),Jf.insertStyleElement=Ce(),me()(Gf.Z,Jf);const Xf=Gf.Z&&Gf.Z.locals?Gf.Z.locals:void 0;class Zf extends i.PureComponent{static displayName="AddStageComponent";static propTypes={stageAdded:o().func.isRequired};render(){return r().createElement("div",{className:Xf["add-stage-container"]},r().createElement("div",{className:Xf["add-stage"]},r().createElement(de.TextButton,{dataTestId:"add-stage",text:"Add Stage",className:"btn btn-xs btn-default",clickHandler:this.props.stageAdded})))}}const Yf=Zf;var Qf=n(1266),em={};em.styleTagTransform=Ae(),em.setAttributes=Ee(),em.insert=xe().bind(null,"head"),em.domAPI=ve(),em.insertStyleElement=Ce(),me()(Qf.Z,em);const tm=Qf.Z&&Qf.Z.locals?Qf.Z.locals:void 0,nm=e=>r().createElement(he.Badge,{className:tm["modify-source-banner"],variant:he.BadgeVariant.Blue},'Modifying pipeline backing "',e.editViewName,'"');nm.propTypes={editViewName:o().string.isRequired};const im=nm;var rm=n(310),sm={};sm.styleTagTransform=Ae(),sm.setAttributes=Ee(),sm.insert=xe().bind(null,"head"),sm.domAPI=ve(),sm.insertStyleElement=Ce(),me()(rm.Z,sm);const om=rm.Z&&rm.Z.locals?rm.Z.locals:void 0,am=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Jc(this,n);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return F(h(h(t=Qc(this,(e=ep(n)).call.apply(e,[this].concat(s))))),"wrappedInstance",(0,i.createRef)()),t}return tp(n,t),Zc(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,i=e.index,r=(0,np.findDOMNode)(this);r.sortableInfo={collection:t,disabled:n,index:i,manager:this.context.manager},this.node=r,this.ref={node:r},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(e,d({ref:t},sp(this.props,zp)))}}]),n}(i.Component),F(t,"displayName",mp("sortableElement",e)),F(t,"contextType",jp),F(t,"propTypes",Vp),F(t,"defaultProps",{collection:0}),n}((e=>{let{idx:t,...n}=e;return r().createElement(Jd,d({index:t},n))})),um=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;Jc(this,n),F(h(h(t=Qc(this,ep(n).call(this,e)))),"state",{}),F(h(h(t)),"handleStart",(function(e){var n=t.props,i=n.distance,r=n.shouldCancelStart;if(2!==e.button&&!r(e)){t.touched=!0,t.position=vp(e);var s=pp(e.target,(function(e){return null!=e.sortableInfo}));if(s&&s.sortableInfo&&t.nodeIsChild(s)&&!t.state.sorting){var o=t.props.useDragHandle,a=s.sortableInfo,u=a.index,l=a.collection;if(a.disabled)return;if(o&&!pp(e.target,Ip))return;t.manager.active={collection:l,index:u},yp(e)||"A"!==e.target.tagName||e.preventDefault(),i||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),F(h(h(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),F(h(h(t)),"handleMove",(function(e){var n=t.props,i=n.distance,r=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var s=vp(e),o={x:t.position.x-s.x,y:t.position.y-s.y},a=Math.abs(o.x)+Math.abs(o.y);t.delta=o,i||r&&!(a>=r)?i&&a>=i&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),F(h(h(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),F(h(h(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),F(h(h(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),i=function(){if(n){var i=function(){var n=h.sortableInfo.index,i=fp(h),r=Sp(t.container),l=t.scrollContainer.getBoundingClientRect(),m=o({index:n,node:h,collection:d});if(t.node=h,t.margin=i,t.gridGap=r,t.width=m.width,t.height=m.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=l,t.index=n,t.newIndex=n,t.axis={x:s.indexOf("x")>=0,y:s.indexOf("y")>=0},t.offsetEdge=xp(h,t.container),t.initialOffset=vp(f?Gc({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(Fp(h)),up(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-i.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-i.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),u&&(t.sortableGhost=h,up(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var g=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,v=g.top,y=g.left,x=g.width,b=v+g.height,E=y+x;t.axis.x&&(t.minTranslate.x=y-t.boundingClientRect.left,t.maxTranslate.x=E-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=v-t.boundingClientRect.top,t.maxTranslate.y=b-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:l.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:l.left+l.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:l.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:l.top+l.height)-t.boundingClientRect.top-t.height/2);a&&a.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(op.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),op.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),c&&c({node:h,index:n,collection:d,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},r=t.props,s=r.axis,o=r.getHelperDimensions,a=r.helperClass,u=r.hideSortableGhost,l=r.updateBeforeSortStart,c=r.onSortStart,p=r.useWindowAsScrollContainer,h=n.node,d=n.collection,f=t.manager.isKeySorting,m=function(){if("function"==typeof l){t._awaitingUpdateBeforeSortStart=!0;var n=Bp((function(){var t=h.sortableInfo.index;return Promise.resolve(l({collection:d,index:t,node:h,isKeySorting:f},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return m&&m.then?m.then(i):i()}}();return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),F(h(h(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),F(h(h(t)),"handleSortEnd",(function(e){var n=t.props,i=n.hideSortableGhost,r=n.onSortEnd,s=t.manager,o=s.active.collection,a=s.isKeySorting,u=t.manager.getOrderedRefs();t.listenerNode&&(a?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(op.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),op.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),i&&t.sortableGhost&&up(t.sortableGhost,{opacity:"",visibility:""});for(var l=0,c=u.length;l<c;l++){var p=u[l],h=p.node;p.edgeOffset=null,p.boundingClientRect=null,lp(h,null),cp(h,null),p.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof r&&r({collection:o,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:a,nodes:u},e),t.touched=!1})),F(h(h(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var i=Gc({},t.translate),r=0,s=0;return t.axis.x&&(i.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),r=t.translate.x-i.x),t.axis.y&&(i.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),s=t.translate.y-i.y),t.translate=i,lp(t.helper,t.translate),t.scrollContainer.scrollLeft+=r,void(t.scrollContainer.scrollTop+=s)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),F(h(h(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),F(h(h(t)),"handleKeyDown",(function(e){var n=e.keyCode,i=t.props,r=i.shouldCancelStart,s=i.keyCodes,o=Gc({},Op,void 0===s?{}:s);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||o.lift.includes(n)&&!r(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),o.lift.includes(n)&&!t.manager.active?t.keyLift(e):o.drop.includes(n)&&t.manager.active?t.keyDrop(e):o.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):o.up.includes(n)?t.keyMove(-1):o.down.includes(n)&&t.keyMove(1))})),F(h(h(t)),"keyLift",(function(e){var n=e.target,i=pp(n,(function(e){return null!=e.sortableInfo})).sortableInfo,r=i.index,s=i.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:r,collection:s},t.handlePress(e)})),F(h(h(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),i=n[n.length-1].node.sortableInfo.index,r=t.newIndex+e,s=t.newIndex;if(!(r<0||r>i)){t.prevIndex=s,t.newIndex=r;var o=bp(t.newIndex,t.prevIndex,t.index),a=n.find((function(e){return e.node.sortableInfo.index===o})),u=a.node,l=t.containerScrollDelta,c=a.boundingClientRect||gp(u,l),p=a.translate||{x:0,y:0},h=c.top+p.y-l.top,d=c.left+p.x-l.left,f=s<r,m=f&&t.axis.x?u.offsetWidth-t.width:0,g=f&&t.axis.y?u.offsetHeight-t.height:0;t.handleSortMove({pageX:d+m,pageY:h+g,ignoreTransition:0===e})}})),F(h(h(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),F(h(h(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),F(h(h(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,i=e.target,r=pp(i,(function(e){return null!=e.sortableInfo}));return r&&r.sortableInfo&&!r.sortableInfo.disabled&&(n?Ip(i):i.sortableInfo)}));var r=new ip;return Lp(e),t.manager=r,t.wrappedInstance=(0,i.createRef)(),t.sortableContextValue={manager:r},t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return tp(n,t),Zc(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var i=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof i?i():i,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:Cp(e.container)||e.container,e.autoScroller=new Np(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return op[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return op[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,i=t.lockOffset,r=t.lockToContainerEdges,s=t.transitionDuration,o=t.keyboardSortingTransitionDuration,a=void 0===o?s:o,u=this.manager.isKeySorting,l=e.ignoreTransition,c=vp(e),p={x:c.x-this.initialOffset.x,y:c.y-this.initialOffset.y};if(p.y-=window.pageYOffset-this.initialWindowScroll.top,p.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=p,r){var h=Hc(wp({height:this.height,lockOffset:i,width:this.width}),2),d=h[0],f=h[1],m={x:this.width/2-d.x,y:this.height/2-d.y},g={x:this.width/2-f.x,y:this.height/2-f.y};p.x=hp(this.minTranslate.x+m.x,this.maxTranslate.x-g.x,p.x),p.y=hp(this.minTranslate.y+m.y,this.maxTranslate.y-g.y,p.y)}"x"===n?p.y=0:"y"===n&&(p.x=0),u&&a&&!l&&cp(this.helper,a),lp(this.helper,p)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,i=e.onSortOver,r=this.containerScrollDelta,s=this.windowScrollDelta,o=this.manager.getOrderedRefs(),a=this.offsetEdge.left+this.translate.x+r.left,u=this.offsetEdge.top+this.translate.y+r.top,l=this.manager.isKeySorting,c=this.newIndex;this.newIndex=null;for(var p=0,h=o.length;p<h;p++){var d=o[p].node,f=d.sortableInfo.index,m=d.offsetWidth,g=d.offsetHeight,v={height:this.height>g?g/2:this.height/2,width:this.width>m?m/2:this.width/2},y=l&&f>this.index&&f<=c,x=l&&f<this.index&&f>=c,b={x:0,y:0},E=o[p].edgeOffset;E||(E=xp(d,this.container),o[p].edgeOffset=E,l&&(o[p].boundingClientRect=gp(d,r)));var w=p<o.length-1&&o[p+1],C=p>0&&o[p-1];w&&!w.edgeOffset&&(w.edgeOffset=xp(w.node,this.container),l&&(w.boundingClientRect=gp(w.node,r))),f!==this.index?(t&&cp(d,t),this.axis.x?this.axis.y?x||f<this.index&&(a+s.left-v.width<=E.left&&u+s.top<=E.top+v.height||u+s.top+v.height<=E.top)?(b.x=this.width+this.marginOffset.x,E.left+b.x>this.containerBoundingRect.width-v.width&&w&&(b.x=w.edgeOffset.left-E.left,b.y=w.edgeOffset.top-E.top),null===this.newIndex&&(this.newIndex=f)):(y||f>this.index&&(a+s.left+v.width>=E.left&&u+s.top+v.height>=E.top||u+s.top+v.height>=E.top+g))&&(b.x=-(this.width+this.marginOffset.x),E.left+b.x<this.containerBoundingRect.left+v.width&&C&&(b.x=C.edgeOffset.left-E.left,b.y=C.edgeOffset.top-E.top),this.newIndex=f):y||f>this.index&&a+s.left+v.width>=E.left?(b.x=-(this.width+this.marginOffset.x),this.newIndex=f):(x||f<this.index&&a+s.left<=E.left+v.width)&&(b.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(y||f>this.index&&u+s.top+v.height>=E.top?(b.y=-(this.height+this.marginOffset.y),this.newIndex=f):(x||f<this.index&&u+s.top<=E.top+v.height)&&(b.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),lp(d,b),o[p].translate=b):n&&(this.sortableGhost=d,up(d,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),l&&(this.newIndex=c);var S=l?this.prevIndex:c;i&&this.newIndex!==S&&i({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:S,isKeySorting:l,nodes:o,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return y()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?(0,np.findDOMNode)(this):e(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=r.withRef?this.wrappedInstance:null;return(0,i.createElement)(jp.Provider,{value:this.sortableContextValue},(0,i.createElement)(e,d({ref:t},sp(this.props,Mp))))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(i.Component),F(t,"displayName",mp("sortableList",e)),F(t,"defaultProps",Rp),F(t,"propTypes",Pp),n}((e=>{let{children:t}=e;return r().createElement("div",null,t)}));class lm extends i.PureComponent{static displayName="PipelineWorkspace";static propTypes={editViewName:o().string,env:o().string.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,pipeline:o().array.isRequired,toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,stageAdded:o().func.isRequired,setIsModified:o().func.isRequired,openLink:o().func.isRequired,isCommenting:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,inputDocuments:o().object.isRequired,runStage:o().func.isRequired,runOutStage:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,serverVersion:o().string.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,fields:o().array.isRequired,isOverviewOn:o().bool.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired};onStageMoved=e=>{let{oldIndex:t,newIndex:n}=e;t!==n&&(this.props.stageMoved(t,n),this.props.runStage(0,!0))};renderModifyingViewSourceBanner(){if(this.props.editViewName)return r().createElement(im,{editViewName:this.props.editViewName})}renderStage=(e,t)=>r().createElement(am,{key:e.id,idx:t,index:t,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stage:e.stage,stageOperator:e.stageOperator,error:e.error,syntaxError:e.syntaxError,isValid:e.isValid,isEnabled:e.isEnabled,isLoading:e.isLoading,isComplete:e.isComplete,isMissingAtlasOnlyStageSupport:e.isMissingAtlasOnlyStageSupport,isExpanded:e.isExpanded,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,previewDocuments:e.previewDocuments,runStage:this.props.runStage,openLink:this.props.openLink,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,setIsModified:this.props.setIsModified,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste});renderStageList=()=>r().createElement(um,{axis:"y",lockAxis:"y",onSortEnd:this.onStageMoved,useDragHandle:!0,transitionDuration:0,helperContainer:()=>this.stageListContainerRef??document.body,helperClass:"dragging",distance:10},this.props.pipeline.map(((e,t)=>this.renderStage(e,t))));render(){const e=this.props.inputDocuments;return r().createElement("div",{"data-testid":"pipeline-builder-workspace",className:om["pipeline-workspace-container-container"],ref:e=>{this.stageListContainerRef=e}},r().createElement("div",{className:om["pipeline-workspace-container"]},r().createElement("div",{className:om["pipeline-workspace"]},this.renderModifyingViewSourceBanner(),r().createElement(Hf,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,documents:e.documents,isLoading:e.isLoading,isExpanded:e.isExpanded,openLink:this.props.openLink,count:e.count,isOverviewOn:this.props.isOverviewOn}),this.renderStageList(),r().createElement(Yf,{stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified}))))}}const cm=lm,pm=(0,he.css)({ol:{padding:0},marginLeft:he.spacing[3]+he.spacing[1],marginRight:he.spacing[4]+he.spacing[1]}),hm=e=>{let{documents:t,view:n}=e;const s=(0,i.useMemo)((()=>({docs:t.map((e=>new Xl(e))),isEditable:!1,copyToClipboard(e){const t=e.toEJSON();navigator.clipboard.writeText(t)}})),[t]);if(0===t.length)return null;const o="document"===n?ml.DocumentListView:ml.DocumentJsonView;return r().createElement("div",{className:pm},r().createElement(o,s))},dm=(0,he.css)({display:"flex",gap:he.spacing[3],justifyContent:"center",alignItems:"center",flexDirection:"column"}),fm=(0,he.css)({color:he.uiColors.green.dark2,fontWeight:"normal"}),mm=(0,he.css)({fontWeight:"normal"}),gm=()=>r().createElement("div",{className:dm,"data-testid":"pipeline-empty-results"},r().createElement("svg",{className:"document-list-zero-state-graphic",xmlns:"http://www.w3.org/2000/svg",width:"38",height:"48",viewBox:"0 0 38 48"},r().createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",transform:"translate(1 1)"},r().createElement("polyline",{stroke:"#116149",points:"30 .002 30 6.002 36 6.002"}),r().createElement("polyline",{stroke:"#116149",points:"30 26.002 30 32.002 36 32.002"}),r().createElement("line",{y1:".002",y2:"2.002",stroke:"#116149"}),r().createElement("line",{y1:"12.002",y2:"14.002",stroke:"#116149"}),r().createElement("polyline",{stroke:"#116149",points:"0 6.002 0 8.002 2 8.002"}),r().createElement("line",{y1:"18.002",y2:"20.002",stroke:"#116149"}),r().createElement("line",{y1:"24.002",y2:"26.002",stroke:"#116149"}),r().createElement("line",{y1:"30.002",y2:"32.002",stroke:"#116149"}),r().createElement("polyline",{stroke:"#116149",points:"0 36.002 0 38.002 2 38.002"}),r().createElement("line",{x1:"6",x2:"8",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"12",x2:"14",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"18",x2:"20",y1:"8.002",y2:"8.002",stroke:"#116149"}),r().createElement("line",{x1:"6",x2:"8",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("line",{x1:"12",x2:"14",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("line",{x1:"18",x2:"20",y1:"38.002",y2:"38.002",stroke:"#116149"}),r().createElement("polygon",{stroke:"#16CC62",points:"36 20.002 20 20.002 20 .002 30 .002 36 6.002"}),r().createElement("polygon",{stroke:"#16CC62",points:"36 46.002 20 46.002 20 26.002 30 26.002 36 32.002"}))),r().createElement(he.H2,{className:fm},"No results"),r().createElement(he.Subtitle,{className:mm},"Try to modify your pipeline to get results")),vm=(0,he.css)({backgroundColor:"transparent",border:"none",display:"inline",height:he.spacing[4]+he.spacing[1],":focus":{outline:`${he.spacing[1]}px auto ${he.uiColors.focus}`}}),ym={onCount:()=>async(e,t)=>{const{pipeline:n,namespace:i,maxTimeMS:r,dataService:{dataService:s},collationString:{value:o}}=t();if(s)try{const t=new AbortController,a=t.signal;e({type:vi.CountStarted,abortController:t});const u=on(n),l={maxTimeMS:r??it,collation:o??void 0},[{count:c}]=await ui({dataService:s,signal:a,namespace:i,pipeline:[...u,{$count:"count"}],options:l});e({type:vi.CountFinished,count:Number(c)})}catch(t){e({type:vi.CountFailed})}}},xm=Y((e=>{let{countDocuments:{loading:t,count:n}}=e;return{loading:t,count:n}}),ym)((e=>{let{loading:t,count:n,onCount:i}=e;const s="pipeline-pagination-count";return t?r().createElement("div",{"data-testid":s},r().createElement(he.SpinLoader,null)):void 0!==n?r().createElement("div",{"data-testid":s},r().createElement(he.Body,null,"of ",n)):r().createElement("div",{"data-testid":s},r().createElement(he.Tooltip,{trigger:e=>{let{children:t,...n}=e;return r().createElement(he.Link,d({},n,{"aria-label":"count results",as:"button","data-testid":"pipeline-pagination-count-action",hideExternalIcon:!0,className:vm,onClick:()=>i()}),t,"count results")}},r().createElement(he.Body,null,"\n In order to have the final count of documents we need to run the\n aggregation again. This will be the equivalent of adding a\n $count as the last stage of the pipeline.\n ")))})),bm=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[2]}),Em=(0,he.css)({display:"flex",gap:he.spacing[1],alignItems:"center"}),wm=Y((e=>{let{aggregation:{documents:t,isLast:n,page:i,limit:r,loading:s,error:o},countDocuments:{count:a}}=e;const u=(e=>{let{limit:t,page:n}=e;return(n-1)*t+1})({limit:r,page:i}),l=(e=>{let{limit:t,page:n,documentCount:i}=e;return(n-1)*t+(i||t)})({limit:r,page:i,documentCount:t.length});return{showingFrom:u,showingTo:l,isCountDisabled:Boolean(o),isPrevDisabled:i<=1||s||Boolean(o),isNextDisabled:n||s||Boolean(o)||a===l}}),{onPrev:()=>async(e,t)=>{const{aggregation:{page:n}}=t();if(!(n<=1))return e(gi(n-1))},onNext:()=>async(e,t)=>{const{aggregation:{isLast:n,page:i}}=t();if(!n)return e(gi(i+1))}})((e=>{let{showingFrom:t,showingTo:n,isCountDisabled:i,isPrevDisabled:s,isNextDisabled:o,onPrev:a,onNext:u}=e;return r().createElement("div",{className:bm,"data-testid":"pipeline-pagination"},!i&&r().createElement("div",{className:Em},r().createElement(he.Body,{"data-testid":"pipeline-pagination-desc"},"Showing ",t," – ",n),r().createElement(xm,null)),r().createElement("div",null,r().createElement(he.IconButton,{"data-testid":"pipeline-pagination-prev-action","aria-label":"Previous page",disabled:s,onClick:()=>a()},r().createElement(he.Icon,{glyph:"ChevronLeft"})),r().createElement(he.IconButton,{"data-testid":"pipeline-pagination-next-action","aria-label":"Next page",disabled:o,onClick:()=>u()},r().createElement(he.Icon,{glyph:"ChevronRight"}))))}));function Cm(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}var Sm={};Cm(Sm,"SSRProvider",(()=>_m)),Cm(Sm,"useSSRSafeId",(()=>Tm)),Cm(Sm,"useIsSSR",(()=>Fm));const Am={prefix:String(Math.round(1e10*Math.random())),current:0},Dm=r().createContext(Am);function _m(e){let t=(0,i.useContext)(Dm),n=(0,i.useMemo)((()=>({prefix:t===Am?"":`${t.prefix}-${++t.current}`,current:0})),[t]);return r().createElement(Dm.Provider,{value:n},e.children)}let km=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Tm(e){let t=(0,i.useContext)(Dm);return t!==Am||km||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),(0,i.useMemo)((()=>e||`react-aria${t.prefix}-${++t.current}`),[e])}function Fm(){let e=(0,i.useContext)(Dm)!==Am,[t,n]=(0,i.useState)(e);return"undefined"!=typeof window&&e&&(0,i.useLayoutEffect)((()=>{n(!1)}),[]),t}function Im(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Im(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Nm(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Im(e))&&(i&&(i+=" "),i+=t);return i}function Pm(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}function Om(e,t,n){let[r,s]=(0,i.useState)(e||t),o=(0,i.useRef)(void 0!==e),a=o.current,u=void 0!==e,l=(0,i.useRef)(r);a!==u&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}.`),o.current=u;let c=(0,i.useCallback)(((e,...t)=>{let i=(e,...t)=>{n&&(Object.is(l.current,e)||n(e,...t)),u||(l.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s(((n,...r)=>{let s=e(u?l.current:n,...r);return i(s,...t),u?n:s}))):(u||s(e),i(e,...t))}),[u,n]);return u?l.current=e:e=r,[e,c]}Pm({},"useControlledState",(()=>Om));var Rm={};function Mm(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function Lm(e,t,n,i){let r=(e-(isNaN(t)?0:t))%i,s=2*Math.abs(r)>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r;isNaN(t)?!isNaN(n)&&s>n&&(s=Math.floor(n/i)*i):s<t?s=t:!isNaN(n)&&s>n&&(s=t+Math.floor((n-t)/i)*i);let o=i.toString(),a=o.indexOf("."),u=a>=0?o.length-a:0;if(u>0){let e=Math.pow(10,u);s=Math.round(s*e)/e}return s}function Bm(e,t,n=10){const i=Math.pow(n,t);return Math.round(e*i)/i}function jm(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}Pm(Rm,"clamp",(()=>Mm)),Pm(Rm,"snapValueToStep",(()=>Lm)),Pm(Rm,"toFixedNumber",(()=>Bm));var Vm={};jm(Vm,"useId",(()=>Um)),jm(Vm,"mergeIds",(()=>Wm)),jm(Vm,"useSlotId",(()=>Km)),jm({},"useLayoutEffect",(()=>zm));const zm="undefined"!=typeof window?r().useLayoutEffect:()=>{};let qm=new Map;function Um(e){let[t,n]=(0,i.useState)(e),r=(0,i.useRef)(null),s=Tm(t),o=(0,i.useCallback)((e=>{r.current=e}),[]);return qm.set(s,o),zm((()=>{let e=s;return()=>{qm.delete(e)}}),[s]),(0,i.useEffect)((()=>{let e=r.current;e&&(r.current=null,n(e))})),s}function Wm(e,t){if(e===t)return e;let n=qm.get(e);if(n)return n(t),t;let i=qm.get(t);return i?(i(e),e):t}function Km(e=[]){let t=Um(),[n,r]=Rg(t),s=(0,i.useCallback)((()=>{r((function*(){yield t,yield document.getElementById(t)?t:null}))}),[t,r]);return zm(s,[t,s,...e]),n}function $m(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Hm(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let i=e[n];for(let e in i){let n=t[e],r=i[e];"function"==typeof n&&"function"==typeof r&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=$m(n,r):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof n||"string"!=typeof r?"id"===e&&n&&r?t.id=Wm(n,r):t[e]=void 0!==r?r:n:t[e]=Nm(n,r)}}return t}function Gm(...e){return t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}jm({},"chain",(()=>$m)),jm({},"mergeProps",(()=>Hm)),jm({},"mergeRefs",(()=>Gm)),jm({},"filterDOMProps",(()=>Ym));const Jm=new Set(["id"]),Xm=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Zm=/^(data-.*)$/;function Ym(e,t={}){let{labelable:n,propNames:i}=t,r={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Jm.has(t)||n&&Xm.has(t)||(null==i?void 0:i.has(t))||Zm.test(t))&&(r[t]=e[t]);return r}function Qm(e){if(function(){if(null==eg){eg=!1;try{document.createElement("div").focus({get preventScroll(){return eg=!0,!0}})}catch(e){}}return eg}())e.focus({preventScroll:!0});else{let t=function(e){for(var t=e.parentNode,n=[],i=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==i;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return i instanceof HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:i}of e)t.scrollTop=n,t.scrollLeft=i}(t)}}jm({},"focusWithoutScrolling",(()=>Qm));let eg=null;function tg(e,t,n="horizontal"){let i=e.getBoundingClientRect();return t?"horizontal"===n?i.right:i.bottom:"horizontal"===n?i.left:i.top}jm({},"getOffset",(()=>tg));var ng={};jm(ng,"clamp",(()=>Mm)),jm(ng,"snapValueToStep",(()=>Lm)),jm({},"runAfterTransition",(()=>og));let ig=new Map,rg=new Set;function sg(){if("undefined"==typeof window)return;let e=t=>{let n=ig.get(t.target);if(n&&(n.delete(t.propertyName),0===n.size&&(t.target.removeEventListener("transitioncancel",e),ig.delete(t.target)),0===ig.size)){for(let e of rg)e();rg.clear()}};document.body.addEventListener("transitionrun",(t=>{let n=ig.get(t.target);n||(n=new Set,ig.set(t.target,n),t.target.addEventListener("transitioncancel",e)),n.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function og(e){requestAnimationFrame((()=>{0===ig.size?e():rg.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?sg():document.addEventListener("DOMContentLoaded",sg)),jm({},"useDrag1D",(()=>ug));const ag=[];function ug(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:n,orientation:r,onHover:s,onDrag:o,onPositionChange:a,onIncrement:u,onDecrement:l,onIncrementToMax:c,onDecrementToMin:p,onCollapseToggle:h}=e,d=e=>{let i=tg(t.current,n,r),s=(e=>"horizontal"===r?e.clientX:e.clientY)(e);return n?i-s:s-i},f=(0,i.useRef)(!1),m=(0,i.useRef)(0),g=(0,i.useRef)({onPositionChange:a,onDrag:o});g.current.onDrag=o,g.current.onPositionChange=a;let v=e=>{e.preventDefault();let t=d(e);f.current||(f.current=!0,g.current.onDrag&&g.current.onDrag(!0),g.current.onPositionChange&&g.current.onPositionChange(t)),m.current!==t&&(m.current=t,a&&a(t))},y=e=>{const t=e.target;f.current=!1;let n=d(e);g.current.onDrag&&g.current.onDrag(!1),g.current.onPositionChange&&g.current.onPositionChange(n),ag.splice(ag.indexOf(t),1),window.removeEventListener("mouseup",y,!1),window.removeEventListener("mousemove",v,!1)};return{onMouseDown:e=>{const t=e.currentTarget;ag.some((e=>t.contains(e)))||(ag.push(t),window.addEventListener("mousemove",v,!1),window.addEventListener("mouseup",y,!1))},onMouseEnter:()=>{s&&s(!0)},onMouseOut:()=>{s&&s(!1)},onKeyDown:e=>{switch(e.key){case"Left":case"ArrowLeft":"horizontal"===r&&(e.preventDefault(),l&&!n?l():u&&n&&u());break;case"Up":case"ArrowUp":"vertical"===r&&(e.preventDefault(),l&&!n?l():u&&n&&u());break;case"Right":case"ArrowRight":"horizontal"===r&&(e.preventDefault(),u&&!n?u():l&&n&&l());break;case"Down":case"ArrowDown":"vertical"===r&&(e.preventDefault(),u&&!n?u():l&&n&&l());break;case"Home":e.preventDefault(),p&&p();break;case"End":e.preventDefault(),c&&c();break;case"Enter":e.preventDefault(),h&&h()}}}}function lg(){let e=(0,i.useRef)(new Map),t=(0,i.useCallback)(((t,n,i,r)=>{let s=(null==r?void 0:r.once)?(...t)=>{e.current.delete(i),i(...t)}:i;e.current.set(i,{type:n,eventTarget:t,fn:s,options:r}),t.addEventListener(n,i,r)}),[]),n=(0,i.useCallback)(((t,n,i,r)=>{var s;let o=(null===(s=e.current.get(i))||void 0===s?void 0:s.fn)||i;t.removeEventListener(n,o,r),e.current.delete(i)}),[]),r=(0,i.useCallback)((()=>{e.current.forEach(((e,t)=>{n(e.eventTarget,e.type,t,e.options)}))}),[n]);return(0,i.useEffect)((()=>r),[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function cg(e,t){let{id:n,"aria-label":i,"aria-labelledby":r}=e;if(n=Um(n),r&&i){let e=new Set([...r.trim().split(/\s+/),n]);r=[...e].join(" ")}else r&&(r=r.trim().split(/\s+/).join(" "));return i||r||!t||(i=t),{id:n,"aria-label":i,"aria-labelledby":r}}function pg(e){const t=(0,i.useRef)();return zm((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)}),[e]),t}function hg(e,t){const n=(0,i.useRef)(!0);(0,i.useEffect)((()=>{n.current?n.current=!1:e()}),t)}function dg(e){const{ref:t,onResize:n}=e;(0,i.useEffect)((()=>{let e=null==t?void 0:t.current;if(e){if(void 0===window.ResizeObserver)return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)};{const t=new window.ResizeObserver((e=>{e.length&&n()}));return t.observe(e),()=>{e&&t.unobserve(e)}}}}),[n,t])}function fg(e,t){zm((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}}),[e,t])}function mg(e){for(;e&&!gg(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function gg(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}jm({},"useGlobalListeners",(()=>lg)),jm({},"useLabels",(()=>cg)),jm({},"useObjectRef",(()=>pg)),jm({},"useUpdateEffect",(()=>hg)),jm({},"useResizeObserver",(()=>dg)),jm({},"useSyncRef",(()=>fg)),jm({},"getScrollParent",(()=>mg)),jm({},"useViewportSize",(()=>yg));let vg="undefined"!=typeof window&&window.visualViewport;function yg(){let[e,t]=(0,i.useState)((()=>xg()));return(0,i.useEffect)((()=>{let e=()=>{t((e=>{let t=xg();return t.width===e.width&&t.height===e.height?e:t}))};return vg?vg.addEventListener("resize",e):window.addEventListener("resize",e),()=>{vg?vg.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),e}function xg(){return{width:(null==vg?void 0:vg.width)||window.innerWidth,height:(null==vg?void 0:vg.height)||window.innerHeight}}jm({},"useDescription",(()=>wg));let bg=0;const Eg=new Map;function wg(e){let[t,n]=(0,i.useState)(null);return zm((()=>{if(!e)return;let t=Eg.get(e);if(t)n(t.element.id);else{let i="react-aria-description-"+bg++;n(i);let r=document.createElement("div");r.id=i,r.style.display="none",r.textContent=e,document.body.appendChild(r),t={refCount:0,element:r},Eg.set(e,t)}return t.refCount++,()=>{0==--t.refCount&&(t.element.remove(),Eg.delete(e))}}),[e]),{"aria-describedby":e?t:void 0}}var Cg={};function Sg(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Ag(e){return"undefined"!=typeof window&&null!=window.navigator&&e.test((window.navigator.userAgentData||window.navigator).platform)}function Dg(){return Ag(/^Mac/i)}function _g(){return Ag(/^iPhone/i)}function kg(){return Ag(/^iPad/i)||Dg()&&navigator.maxTouchPoints>1}function Tg(){return _g()||kg()}function Fg(){return Dg()||Tg()}function Ig(){return Sg(/AppleWebKit/i)&&!Ng()}function Ng(){return Sg(/Chrome/i)}function Pg(){return Sg(/Android/i)}function Og(e,t,n,r){let s=(0,i.useRef)(n);s.current=n;let o=null==n;(0,i.useEffect)((()=>{if(o)return;let n=e.current,i=e=>s.current.call(this,e);return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}}),[e,t,r,o])}function Rg(e){let[t,n]=(0,i.useState)(e),r=(0,i.useRef)(t),s=(0,i.useRef)(null);r.current=t;let o=(0,i.useRef)(null);o.current=()=>{let e=s.current.next();e.done?s.current=null:t===e.value?o.current():n(e.value)},zm((()=>{s.current&&o.current()}));let a=(0,i.useCallback)((e=>{s.current=e(r.current),o.current()}),[s,o]);return[t,a]}function Mg(e,t){let n=Lg(e,t,"left"),i=Lg(e,t,"top"),r=t.offsetWidth,s=t.offsetHeight,o=e.scrollLeft,a=e.scrollTop,u=o+e.offsetWidth,l=a+e.offsetHeight;n<=o?o=n:n+r>u&&(o+=n+r-u),i<=a?a=i:i+s>l&&(a+=i+s-l),e.scrollLeft=o,e.scrollTop=a}function Lg(e,t,n){const i="left"===n?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[i],t.offsetParent!==e);){if(t.offsetParent.contains(e)){r-=e[i];break}t=t.offsetParent}return r}jm(Cg,"isMac",(()=>Dg)),jm(Cg,"isIPhone",(()=>_g)),jm(Cg,"isIPad",(()=>kg)),jm(Cg,"isIOS",(()=>Tg)),jm(Cg,"isAppleDevice",(()=>Fg)),jm(Cg,"isWebKit",(()=>Ig)),jm(Cg,"isChrome",(()=>Ng)),jm(Cg,"isAndroid",(()=>Pg)),jm({},"useEvent",(()=>Og)),jm({},"useValueEffect",(()=>Rg)),jm({},"scrollIntoView",(()=>Mg));const Bg=(0,he.css)({display:"flex",alignItems:"center",gap:he.spacing[2],flex:"none"}),jg=e=>{let{value:t,onChange:n}=e;const i=Um(),s=Um();return r().createElement("div",{className:Bg,"data-testid":"pipeline-results-view-controls"},r().createElement(he.Overline,{as:"label",id:i,htmlFor:s,"aria-label":"Show documents as"},"View"),r().createElement(he.SegmentedControl,{id:s,"aria-labelledby":i,size:"small",value:t,onChange:n},r().createElement(he.SegmentedControlOption,{"aria-label":"Document list",value:"document"},r().createElement(he.Icon,{size:"small",glyph:"Menu"})),r().createElement(he.SegmentedControlOption,{"aria-label":"JSON list",value:"json"},r().createElement(he.Icon,{size:"small",glyph:"CurlyBraces"}))))},Vg=(0,he.css)({display:"flex",gap:he.spacing[2],justifyContent:"flex-end",alignItems:"center"}),zg=e=>{let{onChangeResultsView:t,resultsView:n}=e;return r().createElement("div",{"data-testid":"pipeline-results-header"},r().createElement("div",{className:Vg},r().createElement(wm,null),r().createElement(jg,{value:n,onChange:t})))},qg=(0,he.css)({overflow:"hidden",display:"grid",gridTemplateRows:"min-content 1fr",gridTemplateColumns:"1fr",marginBottom:he.spacing[3]}),Ug=(0,he.css)({paddingLeft:he.spacing[3]+he.spacing[1],paddingRight:he.spacing[5]+he.spacing[1]}),Wg=(0,he.css)({height:"100%",overflowY:"auto","&:not(:first-child)":{height:`calc(100% - ${he.spacing[3]}px)`,marginTop:he.spacing[3]}}),Kg=(0,he.css)({display:"flex",alignItems:"flex-start",paddingLeft:he.spacing[3]+he.spacing[1],paddingRight:he.spacing[5]+he.spacing[1]}),$g=(0,he.css)({width:"100%",height:"100%",paddingTop:2*he.spacing[6],justifyContent:"center"}),Hg=e=>{let{children:t,center:n}=e;return r().createElement("div",{className:(0,he.cx)(Kg,n&&$g)},t)},Gg=(0,he.css)({display:"flex",flexDirection:"column",alignItems:"center",gap:he.spacing[2],maxWidth:8*he.spacing[6],marginTop:he.spacing[2],marginBottom:he.spacing[2]}),Jg=(0,he.css)({color:he.uiColors.green.dark2,textAlign:"center"}),Xg=e=>{let{namespace:t,onClick:n}=e;return r().createElement("div",{className:Gg},r().createElement(he.Subtitle,{className:Jg},"Results persisted",t?` in ${t} namespace`:""),t&&r().createElement(he.Button,{"data-testid":"pipeline-results-go-to-collection",variant:"primaryOutline",onClick:n},"Go to collection"))},Zg=Y((e=>{let{pipeline:t,namespace:n,aggregation:{documents:i,loading:r,error:s}}=e;const o=t.filter((e=>!$t(e))),a=o[o.length-1];return{documents:i,isLoading:r,error:s,isError:Boolean(s),isEmpty:0===i.length,isMergeOrOutPipeline:["$merge","$out"].includes(a?.stageOperator),mergeOrOutDestination:Ht(n,a)}}),{onCancel:fi,onRetry:()=>(e,t)=>{const{aggregation:{page:n}}=t();return e(gi(n))},onOutClick:e=>(0,Gt.globalAppRegistryEmit)("aggregations-open-result-namespace",e)})((e=>{let{documents:t,isLoading:n,error:s,isError:o,isEmpty:a,isMergeOrOutPipeline:u,mergeOrOutDestination:l,onOutClick:c,onRetry:p,onCancel:h}=e;const[d,f]=(0,i.useState)("document");let m=null;return m=o&&s?r().createElement(Hg,null,r().createElement(he.ErrorSummary,{"data-testid":"pipeline-results-error",errors:s,onAction:p,actionText:"Retry"})):n?r().createElement(Hg,{center:!0},r().createElement(he.CancelLoader,{"data-testid":"pipeline-results-loader",progressText:u?"Persisting documents"+(l?` to ${l} namespace`:""):"Running aggregation",cancelText:"Stop",onCancel:h})):u?r().createElement(Hg,{center:!0},r().createElement(Xg,{namespace:l,onClick:()=>{l&&c?.(l)}})):a?r().createElement(Hg,{center:!0},r().createElement(gm,null)):r().createElement(hm,{documents:t,view:d}),r().createElement("div",{"data-testid":"pipeline-results-workspace",className:qg},!u&&r().createElement("div",{className:Ug},r().createElement(zg,{resultsView:d,onChangeResultsView:f})),r().createElement("div",{className:Wg},m))}));class Yg extends i.PureComponent{static displayName="PipelineComponent";static propTypes={env:o().string.isRequired,isAtlasDeployed:o().bool.isRequired,openPipelineById:o().func.isRequired,savedPipelinesListToggle:o().func.isRequired,getSavedPipelines:o().func.isRequired,toggleComments:o().func.isRequired,toggleSample:o().func.isRequired,toggleAutoPreview:o().func.isRequired,restorePipelineModalToggle:o().func.isRequired,restorePipelineFrom:o().func.isRequired,restorePipeline:o().object.isRequired,deletePipeline:o().func.isRequired,pipeline:o().array.isRequired,serverVersion:o().string.isRequired,stageAdded:o().func.isRequired,stageAddedAfter:o().func.isRequired,stageChanged:o().func.isRequired,stageCollapseToggled:o().func.isRequired,stageDeleted:o().func.isRequired,stageMoved:o().func.isRequired,stageOperatorSelected:o().func.isRequired,stageToggled:o().func.isRequired,savedPipeline:o().object.isRequired,saveCurrentPipeline:o().func.isRequired,newPipeline:o().func.isRequired,newPipelineFromText:o().func.isRequired,closeImport:o().func.isRequired,clonePipeline:o().func.isRequired,changeText:o().func.isRequired,createNew:o().func.isRequired,confirmNew:o().func.isRequired,runStage:o().func.isRequired,importPipelineText:o().string.isRequired,exportToLanguage:o().func.isRequired,fields:o().array.isRequired,nameChanged:o().func.isRequired,isModified:o().bool.isRequired,isCommenting:o().bool.isRequired,isSampling:o().bool.isRequired,isAutoPreviewing:o().bool.isRequired,isImportPipelineOpen:o().bool.isRequired,isImportConfirmationNeeded:o().bool.isRequired,setIsModified:o().func.isRequired,gotoOutResults:o().func.isRequired,gotoMergeResults:o().func.isRequired,name:o().string,dismissViewError:o().func.isRequired,editViewName:o().string,updateView:o().func.isRequired,updateViewError:o().string,importPipelineError:o().string,collationString:o().object,collationStringChanged:o().func.isRequired,openLink:o().func.isRequired,isOverviewOn:o().bool.isRequired,toggleOverview:o().func.isRequired,settings:o().object.isRequired,toggleSettingsIsExpanded:o().func.isRequired,toggleSettingsIsCommentMode:o().func.isRequired,setSettingsSampleSize:o().func.isRequired,setSettingsMaxTimeMS:o().func.isRequired,setSettingsLimit:o().func.isRequired,limit:o().number.isRequired,largeLimit:o().number.isRequired,maxTimeMS:o().number,applySettings:o().func.isRequired,isFullscreenOn:o().bool.isRequired,toggleFullscreen:o().func.isRequired,savingPipelineNameChanged:o().func.isRequired,savingPipelineApply:o().func.isRequired,savingPipelineCancel:o().func.isRequired,savingPipelineOpen:o().func.isRequired,savingPipeline:o().object.isRequired,projections:o().array.isRequired,projectionsChanged:o().func.isRequired,newPipelineFromPaste:o().func.isRequired,openCreateView:o().func.isRequired,isNewPipelineConfirm:o().bool.isRequired,setIsNewPipelineConfirm:o().func.isRequired,inputDocuments:o().object.isRequired,workspace:o().string.isRequired,runOutStage:o().func.isRequired,isTimeSeries:o().bool.isRequired,isReadonly:o().bool.isRequired,sourceName:o().string,toggleInputDocumentsCollapsed:o().func.isRequired,refreshInputDocuments:o().func.isRequired,showExportButton:o().bool.isRequired,showRunButton:o().bool.isRequired,showExplainButton:o().bool.isRequired};static defaultProps={projections:[],maxTimeMS:it,limit:10,largeLimit:rt};renderModifyingViewSourceError(){if(this.props.updateViewError)return r().createElement("div",{className:Pt["pipeline-error-banner-container"]},r().createElement(he.Banner,{variant:"danger",dismissible:!0,onClose:this.props.dismissViewError},this.props.updateViewError))}renderRestoreModal(){return this.props.restorePipeline.isModalVisible?r().createElement(dt,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,openPipelineById:this.props.openPipelineById,restorePipeline:this.props.restorePipeline}):null}renderSavePipeline(){if(!this.props.isAtlasDeployed)return r().createElement(nt,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,savedPipelinesListToggle:this.props.savedPipelinesListToggle,savedPipeline:this.props.savedPipeline})}renderPipelineToolbar(){return r().createElement(fl,{showRunButton:this.props.showRunButton,showExportButton:this.props.showExportButton,showExplainButton:this.props.showExplainButton})}renderPipelineWorkspace(){return"results"===this.props.workspace?r().createElement(Zg,null):r().createElement(cm,{editViewName:this.props.editViewName,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,pipeline:this.props.pipeline,toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified,openLink:this.props.openLink,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,inputDocuments:this.props.inputDocuments,runStage:this.props.runStage,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste})}render(){const e=r().createElement(yt,{isOpen:this.props.isImportPipelineOpen,closeImport:this.props.closeImport,changeText:this.props.changeText,createNew:this.props.createNew,error:this.props.importPipelineError,text:this.props.importPipelineText}),t=r().createElement(Ct,{isConfirmationNeeded:this.props.isImportConfirmationNeeded,closeImport:this.props.closeImport,isAutoPreviewing:this.props.isAutoPreviewing,runStage:this.props.runStage,confirmNew:this.props.confirmNew}),n=r().createElement(Ft,{isNewPipelineConfirm:this.props.isNewPipelineConfirm,setIsNewPipelineConfirm:this.props.setIsNewPipelineConfirm,newPipeline:this.props.newPipeline}),i=r().createElement(At,{name:this.props.savingPipeline.name,isOpen:this.props.savingPipeline.isOpen,isSaveAs:this.props.savingPipeline.isSaveAs,saveCurrentPipeline:this.props.saveCurrentPipeline,savingPipelineNameChanged:this.props.savingPipelineNameChanged,savingPipelineApply:this.props.savingPipelineApply,savingPipelineCancel:this.props.savingPipelineCancel,savingPipelineOpen:this.props.savingPipelineOpen,clonePipeline:this.props.clonePipeline});return r().createElement("div",{className:pe()(Pt.pipeline,!!this.props.isFullscreenOn&&Pt["pipeline-fullscreen"])},this.renderPipelineToolbar(),this.renderModifyingViewSourceError(),this.renderPipelineWorkspace(),this.renderSavePipeline(),r().createElement(wc,null),r().createElement(ct,{isAtlasDeployed:this.props.isAtlasDeployed,isExpanded:this.props.settings.isExpanded,toggleSettingsIsExpanded:this.props.toggleSettingsIsExpanded,toggleSettingsIsCommentMode:this.props.toggleSettingsIsCommentMode,setSettingsSampleSize:this.props.setSettingsSampleSize,setSettingsMaxTimeMS:this.props.setSettingsMaxTimeMS,setSettingsLimit:this.props.setSettingsLimit,isCommenting:this.props.isCommenting,toggleComments:this.props.toggleComments,limit:this.props.limit,largeLimit:this.props.largeLimit,maxTimeMS:this.props.maxTimeMS,applySettings:this.props.applySettings,runStage:this.props.runStage,settings:this.props.settings}),this.renderRestoreModal(),e,t,i,n)}}const Qg=Yg;var ev=n(8817),tv={};tv.styleTagTransform=Ae(),tv.setAttributes=Ee(),tv.insert=xe().bind(null,"head"),tv.domAPI=ve(),tv.insertStyleElement=Ce(),me()(ev.Z,tv);const nv=ev.Z&&ev.Z.locals?ev.Z.locals:void 0;class iv extends i.Component{static displayName="AggregationsComponent";render(){return r().createElement("div",{className:nv.aggregations},r().createElement(Qg,this.props))}}const rv=Y((e=>({fields:e.fields,inputDocuments:e.inputDocuments,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,serverVersion:e.serverVersion,pipeline:e.pipeline,savedPipeline:e.savedPipeline,restorePipeline:e.restorePipeline,name:e.name,collationString:e.collationString,isModified:e.isModified,isCommenting:e.comments,isSampling:e.sample,isAtlasDeployed:e.isAtlasDeployed,isAutoPreviewing:e.autoPreview,isImportPipelineOpen:e.importPipeline.isOpen,isImportConfirmationNeeded:e.importPipeline.isConfirmationNeeded,importPipelineText:e.importPipeline.text,importPipelineError:e.importPipeline.syntaxError,settings:e.settings,isOverviewOn:e.isOverviewOn,limit:e.limit,largeLimit:e.largeLimit,maxTimeMS:e.maxTimeMS,isFullscreenOn:e.isFullscreenOn,savingPipeline:e.savingPipeline,projections:e.projections,editViewName:e.editViewName,isNewPipelineConfirm:e.isNewPipelineConfirm,setIsNewPipelineConfirm:e.setIsNewPipelineConfirm,updateViewError:e.updateViewError,workspace:e.workspace})),{namespaceChanged:Pa,nameChanged:e=>({type:Va,name:e}),collationStringChanged:Ir,toggleInputDocumentsCollapsed:()=>({type:Da}),refreshInputDocuments:Ia,toggleOverview:()=>({type:nu}),toggleComments:()=>({type:Ga}),toggleSample:()=>({type:Xa}),toggleAutoPreview:vn,deletePipeline:e=>async(t,n)=>{const i=new lr;await i.delete(e),t(br()),t(Uu()),t((0,Gt.globalAppRegistryEmit)("agg-pipeline-deleted",{name:n().name}))},runStage:ti,runOutStage:e=>(t,n)=>{const i=n(),{dataService:r}=i.dataService;r&&(((e,t,n,i,r)=>{n(Wn(r));const s=Kn(i(),r);Qn(s,e,t,n,i,r)})(r,i.namespace,t,n,e),t((0,Gt.globalAppRegistryEmit)("agg-pipeline-out-executed",{id:i.id})))},gotoOutResults:e=>(t,n)=>{const i=n(),r=`${Vt()(i.namespace).database}.${e.replace(/"/g,"")}`;i.outResultsFn?i.outResultsFn(r):t((0,Gt.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},gotoMergeResults:e=>(t,n)=>{const i=n(),r=((e,t)=>{const n=Kt(t).$merge;if(en()(n))return`${e}.${n}`;const i=n.into;return en()(i)?`${e}.${i}`:`${i.db||e}.${i.coll}`})(Vt()(i.namespace).database,i.pipeline[e]);i.outResultsFn?i.outResultsFn(r):t((0,Gt.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},stageAdded:qn,stageAddedAfter:e=>(t,n)=>{const{pipeline:i}=n();yn("Aggregation Edited",{num_stages:i.length,stage_action:"stage_added",stage_name:null}),t({type:En,index:e})},stageChanged:(e,t)=>n=>{n({type:wn,index:t,stage:e}),n(pn()),n(fn(!0)),n(ti(t))},stageCollapseToggled:e=>({type:Cn,index:e}),stageDeleted:e=>(t,n)=>{const{pipeline:i}=n();yn("Aggregation Edited",{num_stages:i.length,stage_action:"stage_removed",stage_name:i[e].stageOperator}),t({type:Sn,index:e})},stageMoved:(e,t)=>(n,i)=>{if(e===t)return;const{pipeline:r}=i();yn("Aggregation Edited",{num_stages:r.length,stage_action:"stage_reordered",stage_name:r[e].stageOperator}),n({type:An,fromIndex:e,toIndex:t})},stageOperatorSelected:(e,t,n,i)=>(r,s)=>{const{pipeline:o}=s();o[e].stageOperator!==t&&(yn("Aggregation Edited",{num_stages:o.length,stage_action:"stage_renamed",stage_name:t}),r({type:Dn,index:e,stageOperator:t,isCommenting:n,env:i}))},stageToggled:e=>({type:_n,index:e}),toggleSettingsIsExpanded:hu,toggleSettingsIsCommentMode:()=>({type:ou}),setSettingsSampleSize:e=>({type:au,value:e}),setSettingsMaxTimeMS:e=>({type:uu,value:e}),setSettingsLimit:e=>({type:lu,value:e}),exportToLanguage:Kr,savedPipelinesListToggle:vr,saveCurrentPipeline:Er,savedPipelineAdd:yr,getSavedPipelines:xr,restorePipelineModalToggle:e=>({type:Qa,index:e}),restorePipelineFrom:e=>({type:eu,objectID:e}),restoreSavedPipeline:Wu,newPipeline:()=>({type:Mu}),newPipelineFromText:ca,closeImport:()=>({type:ra}),clonePipeline:()=>({type:Lu}),changeText:e=>({type:sa,text:e}),createNew:()=>({type:oa}),confirmNew:()=>({type:aa}),openLink:Pr,openPipelineById:e=>async t=>{const n=or().join(nr(),`${e}.json`);try{const e=await rr().promises.readFile(n,"utf8");t(Ku(JSON.parse(e)))}catch(e){Nu(e)}},applySettings:e=>(t,n)=>{t((e=>({type:cu,settings:e}))(e)),t((0,Gt.globalAppRegistryEmit)("compass:aggregations:settings-applied",{settings:n().settings}))},setIsModified:fn,limitChanged:e=>({type:za,limit:e}),largeLimitChanged:e=>({type:qa,largeLimit:e}),maxTimeMSChanged:Mr,toggleFullscreen:()=>({type:du}),savingPipelineNameChanged:e=>({type:mu,name:e}),savingPipelineApply:()=>({type:gu}),savingPipelineCancel:()=>({type:vu}),savingPipelineOpen:bu,projectionsChanged:pn,newPipelineFromPaste:e=>t=>{t((e=>({type:Bu,text:e}))(e)),t((0,Gt.globalAppRegistryEmit)("compass:aggregations:pipeline-imported"))},updateView:Ni,openCreateView:$u,setIsNewPipelineConfirm:Au,dismissViewError:Ii})(iv),sv=rv;function ov(e){return function(t){var n=t.dispatch,i=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,i,e):t(r)}}}}var av=ov();av.withExtraArgument=ov;const uv=av,lv=e=>{e.dispatch(Ia())},cv=(e,t)=>{e.dispatch({type:Wa,isAtlasDeployed:t})},pv=(e,t,n)=>{e.dispatch(ya(t,n))},hv=(e,t)=>{Vt()(t).collection&&(e.dispatch(Pa(t)),lv(e))},dv=(e,t)=>{e.dispatch((e=>({type:Eu,outResultsFn:e}))(t))},fv=(e,t)=>{e.dispatch((e=>({type:Ba,version:e}))(t))},mv=(e,t)=>{e.dispatch((e=>({type:xa,fields:e}))(t))},gv=(e,t)=>{e.dispatch((e=>({type:Tu.IndexesFetched,indexes:e}))(t.map((e=>e.getAttributes({props:!0},!0)))))},vv=(e,t)=>{e.dispatch((0,Gt.localAppRegistryActivated)(t))},yv=(e,t)=>{e.dispatch((0,Gt.globalAppRegistryActivated)(t))},xv=(e,t,n,i,r)=>{var s,o,a,u;e.dispatch((s=t,o=n,a=i,u=r,e=>{e(((e,t,n,i)=>({type:ju,name:e,pipeline:t,isReadonly:n,sourceName:i}))(s,o,a,u)),e(ti(0,!0))}))},bv=(e,t)=>{e.dispatch((e=>({type:Oa,env:e}))(t))},Ev=(e,t)=>{e.dispatch((e=>({type:Ma,isTimeSeries:e}))(t))},wv=(e,t)=>{e.dispatch((e=>({type:$a,isReadonly:e}))(t))},Cv=(e,t)=>{e.dispatch((e=>({type:wa,sourceName:e}))(t))},Sv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=B(qu,q(uv));if(e.localAppRegistry){const n=e.localAppRegistry;vv(t,n),n.on("refresh-data",(()=>{lv(t)})),n.on("fields-changed",(e=>{mv(t,e.aceFields)})),n.on("indexes-changed",(e=>{gv(t,e)}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;yv(t,n),n.on("refresh-data",(()=>{lv(t)})),n.on("import-finished",(e=>{let{ns:n}=e;const{namespace:i}=t.getState();n===i&&lv(t)})),n.on("compass:deployment-awareness:topology-changed",(e=>{bv(t,e.env)}))}if(e.dataProvider&&pv(t,e.dataProvider.error,e.dataProvider.dataProvider),null!==e.isAtlasDeployed&&void 0!==e.isAtlasDeployed&&cv(t,e.isAtlasDeployed),e.namespace&&hv(t,e.namespace),e.serverVersion&&fv(t,e.serverVersion),e.fields&&mv(t,e.fields),e.outResultsFn&&dv(t,e.outResultsFn),e.editViewName&&xv(t,e.editViewName,e.sourcePipeline,e.isReadonly,e.sourceName),e.env)bv(t,e.env);else if(n.g&&n.g.hadronApp&&n.g.hadronApp.appRegistry){const e=n.g.hadronApp.appRegistry.getStore("DeploymentAwareness.Store");e&&bv(t,e.state.env)}return e.isTimeSeries&&Ev(t,e.isTimeSeries),e.isReadonly&&wv(t,e.isReadonly),e.sourceName&&Cv(t,e.sourceName),e.aggregation&&Ku(e.aggregation)(t.dispatch),e.isDataLake&&t.dispatch(ku(e.isDataLake)),t};class Av extends i.Component{static displayName="AggregationsPlugin";static propTypes={store:o().object.isRequired,showExportButton:o().bool,showRunButton:o().bool,showExplainButton:o().bool};static defaultProps={showExportButton:!1,showRunButton:!1,showExplainButton:!1};render(){return r().createElement(p,{store:this.props.store},r().createElement(sv,{showExportButton:this.props.showExportButton,showRunButton:this.props.showRunButton,showExplainButton:this.props.showExplainButton}))}}const Dv=Av,_v="aggregations/create-view/source/SET",kv="aggregations/create-view/pipeline/SET",Tv=[],Fv="aggregations/create-view/is-running/TOGGLE_IS_RUNNING",Iv=!1,Nv=e=>({type:Fv,isRunning:e}),Pv="aggregations/create-view/is-visible/TOGGLE_IS_VISIBLE",Ov=!1,Rv=e=>({type:Pv,isVisible:e}),Mv="aggregations/create-view/is-duplicating/TOGGLE_IS_DUPLICATING",Lv=!1,Bv="aggregations/create-view/name/CHANGE_NAME",jv=e=>({type:Bv,name:e}),Vv="aggregations/create-view/error",zv=`${Vv}/HANDLE_ERROR`,qv=`${Vv}/CLEAR_ERROR`,Uv=null,Wv="aggregations/create-view/reset",{track:Kv,debug:$v}=We("COMPASS-AGGREGATIONS-UI"),Hv=n(4935),Gv="aggregations/create-view/OPEN",Jv={isRunning:Iv,isVisible:Ov,isDuplicating:Lv,name:"",error:Uv,source:"",pipeline:Tv},Xv=j({appRegistry:Jt(),isRunning:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Iv,t=arguments.length>1?arguments[1]:void 0;return t.type===Fv?t.isRunning:e},isDuplicating:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lv,t=arguments.length>1?arguments[1]:void 0;return t.type===Mv?t.isDuplicating:e},isVisible:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ov,t=arguments.length>1?arguments[1]:void 0;return t.type===Pv?t.isVisible:e},name:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===Bv?t.name:e},error:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uv,t=arguments.length>1?arguments[1]:void 0;return t.type===zv?t.error:t.type===qv?null:e},source:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t.type===_v?t.source:e},pipeline:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tv,t=arguments.length>1?arguments[1]:void 0;return t.type===kv?t.pipeline:e},dataService:va}),Zv=(e,t)=>{if(t.type===Wv)return{...e,...Jv};if(t.type===Gv){const n={...e,...Jv,isVisible:!0,isDuplicating:t.duplicate,source:t.source,pipeline:t.pipeline};return $v("handling open",{newState:n}),n}return Xv(e,t)},Yv=(e,t)=>(e(Nv(!1)),e({type:zv,error:t})),Qv=(e,t,n)=>({type:Gv,source:e,pipeline:t,duplicate:n}),ey=()=>(e,t)=>{$v("creating view!");const n=t(),i=n.dataService.dataService,r=n.name,s=n.source,{database:o}=Hv(n.source),a=n.pipeline,u={};e({type:qv});try{e(Nv(!0)),$v("calling data-service.createView",r,s,a,u),i.createView(r,s,a,u,(t=>{if(t)return $v("error creating view",t),Yv(e,t);$v("View created!"),Kv("Aggregation Saved As View",{num_stages:a.length}),e((0,Gt.globalAppRegistryEmit)("compass:aggregations:create-view",{numStages:a.length})),e((0,Gt.globalAppRegistryEmit)("aggregations-open-result-namespace",`${o}.${r}`)),e({type:Wv})}))}catch(t){return $v("Unexpected error creating view",t),Yv(e,t)}};class ty extends i.PureComponent{static displayName="CreateViewModalComponent";static propTypes={createView:o().func.isRequired,isVisible:o().bool.isRequired,toggleIsVisible:o().func.isRequired,name:o().string,changeViewName:o().func.isRequired,isDuplicating:o().bool.isRequired,source:o().string.isRequired,pipeline:o().array.isRequired,isRunning:o().bool.isRequired,error:o().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1,isDuplicating:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return r().createElement(he.ConfirmationModal,{title:this.props.isDuplicating?"Duplicate View":"Create a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Create",trackingId:"create_view_modal"},r().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},r().createElement(Lr.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?r().createElement(Lr.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?r().createElement(Lr.ModalStatusMessage,{icon:"spinner",message:"Create in Progress",type:"in-progress"}):null))}}const ny=Y((e=>({isRunning:e.isRunning,isVisible:e.isVisible,isDuplicating:e.isDuplicating,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:ey,changeViewName:jv,toggleIsVisible:Rv})(ty);class iy extends i.Component{static displayName="CreateViewPlugin";static propTypes={store:o().object.isRequired};render(){return r().createElement(p,{store:this.props.store},r().createElement(ny,null))}}const ry=iy;class sy extends i.PureComponent{static displayName="DuplicateViewModalComponent";static propTypes={createView:o().func.isRequired,isVisible:o().bool.isRequired,toggleIsVisible:o().func.isRequired,name:o().string,changeViewName:o().func.isRequired,source:o().string.isRequired,pipeline:o().array.isRequired,isRunning:o().bool.isRequired,error:o().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return r().createElement(he.ConfirmationModal,{title:"Duplicate a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Duplicate",trackingId:"duplicate_view_modal"},r().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},r().createElement(Lr.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?r().createElement(Lr.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?r().createElement(Lr.ModalStatusMessage,{icon:"spinner",message:"Duplicate in Progress",type:"in-progress"}):null))}}const oy=Y((e=>({isRunning:e.isRunning,isVisible:e.isVisible,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:ey,changeViewName:jv,toggleIsVisible:Rv})(sy),ay=B(Zv,q(uv));ay.onActivated=e=>{ay.dispatch((0,Gt.globalAppRegistryActivated)(e)),e.on("data-service-connected",((e,t)=>{ay.dispatch(ya(e,t))})),e.on("open-create-view",(e=>{ay.dispatch(Qv(e.source,e.pipeline,e.duplicate))}))};const uy=ay;class ly extends i.Component{static displayName="DuplicateViewPlugin";render(){return r().createElement(p,{store:uy},r().createElement(oy,null))}}const cy=ly,py=n(1227)("mongodb-aggregations:stores:create-view"),hy=(e,t,n)=>{e.dispatch(ya(t,n))},dy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=B(Zv,q(uv));if(e.localAppRegistry){const n=e.localAppRegistry;t.dispatch((0,Gt.localAppRegistryActivated)(n)),n.on("open-create-view",(e=>{py("open-create-view",e.source,e.pipeline),t.dispatch(Qv(e.source,e.pipeline,!1))}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;t.dispatch((0,Gt.globalAppRegistryActivated)(n))}return e.dataProvider&&hy(t,e.dataProvider.error,e.dataProvider.dataProvider),t},fy=JSON.parse('{"name":"@mongodb-js/compass-aggregations","productName":"Aggregations plugin","version":"8.27.0","apiVersion":"3.0.0","description":"Compass Aggregation Pipeline Builder","main":"dist/index.js","compass:main":"src/index.js","exports":{"browser":"./dist/browser.js","require":"./dist/index.js"},"compass:exports":{".":"./src/index.js"},"scripts":{"prepublishOnly":"npm run compile && compass-scripts check-exports-exist","compile":"npm run webpack -- --mode production","prewebpack":"rimraf ./dist","webpack":"webpack-compass","start":"npm run webpack serve -- --mode development","analyze":"npm run webpack -- --mode production --analyze","typecheck":"tsc --noEmit","depcheck":"depcheck","eslint":"eslint","lint":"npm run eslint .","check":"npm run typecheck && npm run lint && npm run depcheck","check-ci":"npm run check","test":"mocha","test-electron":"xvfb-maybe electron-mocha --no-sandbox","test-cov":"nyc -x \\"**/*.spec.*\\" --reporter=lcov --reporter=text --reporter=html npm run test","test-watch":"npm run test -- --watch","test-ci":"npm run test-cov","test-ci-electron":"npm run test-electron"},"license":"SSPL","peerDependencies":{"@mongodb-js/compass-components":"^0.17.0","@mongodb-js/compass-crud":"^12.27.0","@mongodb-js/compass-export-to-language":"^7.26.0","@mongodb-js/compass-field-store":"^7.26.0","async":"^3.2.0","bson":"*","electron":"^13.5.1","hadron-react-buttons":"^5.9.0","hadron-react-components":"^5.17.0","mongodb-ace-autocompleter":"*","mongodb-data-service":"^21.24.0","mongodb-query-parser":"^2.4.6","prop-types":"^15.7.2","react":"^16.14.0","react-bootstrap":"^0.32.4","react-dom":"^16.14.0"},"devDependencies":{"@mongodb-js/compass-components":"^0.17.0","@mongodb-js/compass-crud":"^12.27.0","@mongodb-js/compass-export-to-language":"^7.26.0","@mongodb-js/compass-field-store":"^7.26.0","@mongodb-js/eslint-config-compass":"^0.11.0","@mongodb-js/mocha-config-compass":"^0.12.0","@mongodb-js/prettier-config-compass":"^0.6.0","@mongodb-js/tsconfig-compass":"^0.7.0","@mongodb-js/webpack-config-compass":"^0.11.0","@react-aria/utils":"^3.13.1","@testing-library/react":"^12.1.4","@testing-library/user-event":"^13.5.0","@types/decomment":"^0.9.2","@types/lodash.debounce":"^4.0.7","@types/lodash.isempty":"^4.4.6","@types/semver":"^7.3.9","async":"^3.2.0","chai":"^4.3.6","classnames":"^2.2.6","debug":"4.3.0","depcheck":"^1.4.1","electron":"^13.5.1","enzyme":"^3.11.0","eslint":"^7.25.0","hadron-app":"^4.26.0","hadron-app-registry":"^8.14.0","hadron-document":"^7.13.0","hadron-react-buttons":"^5.9.0","hadron-react-components":"^5.17.0","mocha":"^8.4.0","mongodb-ace-autocompleter":"^1.1.1","mongodb-connection-model":"^21.19.0","mongodb-data-service":"^21.24.0","mongodb-query-parser":"^2.4.6","mongodb-reflux-store":"^0.0.1","nyc":"^15.1.0","prop-types":"^15.7.2","react":"^16.14.0","react-dom":"^16.14.0","react-sortable-hoc":"^2.0.0","reflux":"^0.4.1","reflux-state-mixin":"github:mongodb-js/reflux-state-mixin","rimraf":"^3.0.0","sinon":"^9.2.3","xvfb-maybe":"^0.2.1"},"dependencies":{"@mongodb-js/compass-logging":"^0.14.0","@mongodb-js/explain-plan-helper":"^0.11.0","@mongodb-js/mongodb-redux-common":"^1.14.0","acorn-loose":"^8.0.2","astring":"^1.7.0","bson":"*","decomment":"^0.9.2","is-electron-renderer":"^2.0.1","lodash.debounce":"^4.0.8","lodash.isempty":"^4.4.0","lodash.isstring":"^4.0.1","mongodb":"^4.6.0","mongodb-ns":"^2.4.0","re-resizable":"^6.9.0","react-bootstrap":"^0.32.4","react-redux":"^5.0.6","react-select-plus":"^1.2.0","redux":"^4.1.2","redux-thunk":"^2.3.0","semver":"^5.7.1"},"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"repository":{"type":"git","url":"https://github.com/mongodb-js/compass.git"},"gitHead":"9f5498524c3e50d351f6f36fb015ff14163a39cf"}'),my={name:"Aggregations",component:Dv,order:2,configureStore:Sv,configureActions:()=>{},storeName:"Aggregations.Store",actionName:"Aggregations.Actions"},gy={name:"Create View",component:ry,configureStore:dy,storeName:"Aggregations.CreateViewStore",configureActions:()=>{},actionName:"Aggregations.Actions"},vy={name:"Duplicate View",component:cy},yy=e=>{e.registerRole("Collection.Tab",my),e.registerRole("Collection.ScopedModal",gy),e.registerRole("Global.Modal",vy),e.registerStore("Aggregations.DuplicateViewStore",uy)},xy=e=>{e.deregisterRole("Collection.Tab",my),e.deregisterRole("Collection.ScopedModal",gy),e.deregisterRole("Global.Modal",vy),e.deregisterStore("Aggregations.DuplicateViewStore")},by=Dv},5709:(e,t,n)=>{"use strict";const i=n(4283);let r=!1;try{r="string"!=typeof n(5840)}catch(e){}!function(){if(!r)return console.warn("Unsupported environment for hadron-ipc"),{};const t=n(i?3798:3909);e.exports=t,i?e.exports.ipcRenderer=t:e.exports.ipcMain=t}()},3013:(e,t)=>{"use strict";t._=e=>`hadron-ipc-${e}-response`},3909:(e,t,n)=>{"use strict";const i=n(3013)._,r=n(4749),s=n(4772),o=n(9320),a=n(5840),u=a.BrowserWindow,l=a.ipcMain,c=n(2069)("hadron-ipc:main");(t=l).respondTo=(e,n)=>{if(s(e))return r(e,((e,n)=>{t.respondTo(n,e)})),t;const a=i(e),p=`${a}-error`;return l.on(e,(function(t){const i=u.fromWebContents(t.sender);if(!i)return;const r=n=>{if(c(`responding with result for ${e}`,n),i.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(a,n)},s=n=>{if(c(`responding with error for ${e}`,n),i.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(p,n)};for(var l=arguments.length,h=new Array(l>1?l-1:0),d=1;d<l;d++)h[d-1]=arguments[d];c(`calling ${e} handler with args`,h);const f=n(i,...h);o(f)?f.then(r).catch(s):f instanceof Error?s(f):r(f)})),t},t.broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];u.getAllWindows().forEach((t=>{t.webContents&&t.webContents.send(e,...n)}))},t.broadcastFocused=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];u.getAllWindows().forEach((t=>{t.webContents&&t.isFocused()&&t.webContents.send(e,...n)}))},t.remove=(e,t)=>{l.removeListener(e,t)},e.exports=t},3798:(e,t,n)=>{"use strict";const i=n(3013)._,r=n(5840).ipcRenderer,s=n(2069)("hadron-ipc:renderer");function o(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];e(`calling ${t} with args`,s);const a=i(t),u=`${a}-error`;return new Promise((function(n,i){r.on(a,(function(i,s){e(`got response for ${t} from main`,s),r.removeAllListeners(a),r.removeAllListeners(u),n(s)})),r.on(u,(function(n,s){e(`error for ${t} from main`,s),r.removeAllListeners(a),r.removeAllListeners(u),i(s)})),r.send(t,...s)}))}(t=r).callQuiet=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o((()=>{}),e,...n)},t.call=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return o(s,e,...n)},e.exports=t},9500:(e,t,n)=>{e.exports=n(3546)},3546:(e,t,n)=>{const{isPlainObject:i,isArray:r,isString:s,isNumber:o,hasIn:a,keys:u,without:l,toNumber:c,toString:p}=n(6635),{ObjectId:h,MinKey:d,MaxKey:f,Long:m,Double:g,Int32:v,Decimal128:y,Binary:x,BSONRegExp:b,Code:E,BSONSymbol:w,Timestamp:C,Map:S}=n(345),A="Long",D="Int64",_="_bsontype",k=/\[object (\w+)\]/,T=2147483647,F=-2147483648,I=Math.pow(2,63)-1,N=-I,P=/^-?\d+$/,O=["Long","Int32","Double","Decimal128"],R={Array:e=>r(e)?e:i(e)?[]:[e],Binary:e=>{const t=ArrayBuffer.isView(e)?Buffer.from(e):Buffer.from(p(e),"utf8");return new x(t,x.SUBTYPE_DEFAULT)},Boolean:e=>{if(s(e)){if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1;throw new Error(`'${e}' is not a valid boolean string`)}return!!e},Code:e=>new E(""+e,{}),Date:e=>new Date(e),Decimal128:e=>(a(e,_)&&O.includes(e._bsontype)&&(e=e._bsontype===A?e.toString():e.valueOf()),y.fromString(""+e)),Double:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Double value`);if(s(e)&&e.endsWith("."))throw new Error("Please enter at least one digit after the decimal");const t=c(e);return new g(t)},Int32:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int32 value`);const t=c(e);if(t>=F&&t<=T)return new v(t);throw new Error(`Value ${t} is outside the valid Int32 range`)},Int64:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int64 value`);const t=c(e);if(t>=N&&t<=I)return e.value||"number"==typeof e?m.fromNumber(t):"object"==typeof e?m.fromString(e.toString()):m.fromString(e);throw new Error(`Value ${e.toString()} is outside the valid Int64 range`)},MaxKey:()=>new f,MinKey:()=>new d,Null:()=>null,Object:e=>i(e)?e:{},ObjectId:e=>s(e)&&""!==e?h.createFromHexString(e):new h,BSONRegExp:e=>new b(""+e),String:p,BSONSymbol:e=>new w(""+e),Timestamp:e=>{const t=c(e);return C.fromNumber(t)},Undefined:()=>{}},M=u(R),L=new class{test(e){if(P.test(e)){var t=c(e);return t>=F&&t<=T}return!1}},B=new class{test(e){return!!P.test(e)&&Number.isSafeInteger(c(e))}};e.exports=new class{cast(e,t){var n=R[t],i=e;return n&&(i=n(e)),"[object Object]"===i?"":i}type(e){return a(e,_)?e._bsontype===A?D:"ObjectID"===e._bsontype?"ObjectId":"Symbol"===e._bsontype?"BSONSymbol":e._bsontype:o(e)?(t=p(e),L.test(t)?"Int32":B.test(t)?D:"Double"):i(e)?"Object":r(e)?"Array":Object.prototype.toString.call(e).replace(k,"$1");var t}castableTypes(){return!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?M:l(M,"Decimal128")}}},4767:(e,t,n)=>{"use strict";n(7526),n(3354),n(5870),n(930),n(574),n(4116),n(3267),n(4614),n(9852),n(4306),n(6077),n(1072),n(183);const i=Symbol("kDepth"),r=Symbol("kSBENodes");function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const i=t(e,n),r=i||{};return e.inputStage&&(r.inputStage=s(e.inputStage,t,e)),e.innerStage&&(r.innerStage=s(e.innerStage,t,e)),e.outerStage&&(r.outerStage=s(e.outerStage,t,e)),e.thenStage&&(r.thenStage=s(e.thenStage,t,e)),e.elseStage&&(r.elseStage=s(e.elseStage,t,e)),e.inputStages&&(r.inputStages=e.inputStages.map((n=>s(n,t,e)))),e.shards&&(r.shards=e.shards.map((t=>s(t,e)))),e.executionStages&&(r.executionStages=e.executionStages.map((n=>s(n,t,e)))),i}function o(e){return s(e,(t=>e===t?{...e}:void 0))}function a(e,t){const n=new Map;s(e,(e=>{e.planNodeId&&(n.set(e.planNodeId,e),e[r]=[])})),s(t,((e,t)=>{e[i]=t?t[i]+1:0,e.planNodeId&&n.get(e.planNodeId)[r].push(e)}));for(const e of n.values())e[r].sort(((e,t)=>e[i]-t[i]));return s(e,(e=>{const t=e[r],n=t[0]||{};return{...o(n),...o(e),executionTimeMillisEstimate:n.executionTimeMillis||n.executionTimeMillisEstimate,docsExamined:t.filter((e=>"seek"===e.stage||"scan"===e.stage)).map((e=>e.numReads||0)).reduce(((e,t)=>e+t),0),keysExamined:t.filter((e=>"ixseek"===e.stage||"ixscan"===e.stage)).map((e=>e.numReads||0)).reduce(((e,t)=>e+t),0)}}))}function u(e){return function(e){return!!e.stages}(e)||l(e)}function l(e){return!!e.shards}function c(e){const{mongosPlannerVersion:t}=e.queryPlanner??{};return!isNaN(t)}function p(e){return Object.keys(e).find((e=>e.match(/^\$.*cursor/i)))}function h(e){if(!e.stages||0===e.stages.length)return e;const t=e.stages.map((e=>{if(!function(e){return!!p(e)}(e))return e;const t=p(e);return e[t]=f(e[t]),e}));return e.stages=t,e}function d(e){return f(e)}function f(e){if(e.queryPlanner&&e.queryPlanner.winningPlan&&e.queryPlanner.winningPlan.queryPlan){e.queryPlanner.plannerVersion=1;const t=e.queryPlanner.winningPlan.queryPlan;e.queryPlanner.winningPlan=t,e.executionStats.executionStages=a(t,e.executionStats.executionStages)}return e}e.exports=function(e){return(e=JSON.parse(JSON.stringify(e))).explainVersion&&e.explainVersion<2?e:(delete e.explainVersion,e=u(e)?l(e)?function(e){if(!e.shards)return e;const t={};for(const n in e.shards)e.shards[n].stages?t[n]=h(e.shards[n]):t[n]=d(e.shards[n]);return e.shards=t,e}(e):h(e):c(e)?function(e){const t=e.queryPlanner,n=e.executionStats;return t.winningPlan.shards?(t.winningPlan.shards.forEach(((e,i)=>{const r=e.winningPlan.queryPlan;if(r){const e=a(r,n.executionStages.shards[i].executionStages);t.winningPlan.shards[i].winningPlan=r,n.executionStages.shards[i].executionStages=e}})),e.queryPlanner=t,e.executionStats=n,e):e}(e):d(e),JSON.parse(JSON.stringify(e)))},e.exports.getStageCursorKey=p,e.exports.isAggregationExplain=u,e.exports.isShardedAggregationExplain=l,e.exports.isShardedFindExplain=c},2563:e=>{const t="@mongodb-js/mongodb-redux-common/app-registry",n=`${t}/LOCAL_APP_REGISTRY_ACTIVATED`,i=`${t}/GLOBAL_APP_REGISTRY_ACTIVATED`,r={localAppRegistry:null,globalAppRegistry:null},s=function(e,t){if(e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];e.emit(t,...i)}};e.exports=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;return t.type===n?{...e,localAppRegistry:t.appRegistry}:t.type===i?{...e,globalAppRegistry:t.appRegistry}:e},e.exports.LOCAL_APP_REGISTRY_ACTIVATED=n,e.exports.GLOBAL_APP_REGISTRY_ACTIVATED=i,e.exports.INITIAL_STATE=r,e.exports.localAppRegistryActivated=e=>({type:n,appRegistry:e}),e.exports.globalAppRegistryActivated=e=>({type:i,appRegistry:e}),e.exports.localAppRegistryEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return(t,i)=>{s(i().appRegistry.localAppRegistry,e,...n)}},e.exports.globalAppRegistryEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return(t,i)=>{s(i().appRegistry.globalAppRegistry,e,...n)}}},9388:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var s={},o=[],a=0;a<e.length;a++){var u=e[a],l=i.base?u[0]+i.base:u[0],c=s[l]||0,p="".concat(l," ").concat(c);s[l]=c+1;var h=n(p),d={css:u[1],media:u[2],sourceMap:u[3]};-1!==h?(t[h].references++,t[h].updater(d)):t.push({identifier:p,updater:r(d,i),references:1}),o.push(p)}return o}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=i(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var u=i(e,r),l=0;l<s.length;l++){var c=n(s[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}s=u}}},1914:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},370:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},6566:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},6053:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i=n.css,r=n.media,s=n.sourceMap;r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},6682:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2779:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&e.push(o)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},3819:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},1176:(e,t,n)=>{var i=n(5052);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},9540:(e,t,n)=>{var i=n(905),r=n(4237),s=n(3231),o=function(e){return function(t,n,o){var a,u=i(t),l=r(u.length),c=s(o,l);if(e&&n!=n){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},7079:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},1589:(e,t,n)=>{var i=n(1601),r=n(7079),s=n(95)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),s))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},1250:(e,t,n)=>{"use strict";var i=n(1176),r=n(3819);e.exports=function(){for(var e,t=i(this),n=r(t.delete),s=!0,o=0,a=arguments.length;o<a;o++)e=n.call(t,arguments[o]),s=s&&e;return!!s}},7081:(e,t,n)=>{var i=n(816),r=n(4826),s=n(7933),o=n(1787);e.exports=function(e,t){for(var n=r(t),a=o.f,u=s.f,l=0;l<n.length;l++){var c=n[l];i(e,c)||a(e,c,u(t,c))}}},5762:(e,t,n)=>{var i=n(7400),r=n(1787),s=n(5358);e.exports=i?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},5358:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7400:(e,t,n)=>{var i=n(4229);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:(e,t,n)=>{var i=n(9859),r=n(5052),s=i.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},598:(e,t,n)=>{var i=n(1333);e.exports=i("navigator","userAgent")||""},6358:(e,t,n)=>{var i,r,s=n(9859),o=n(598),a=s.process,u=s.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c?r=(i=c.split("."))[0]<4?1:i[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},3837:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:(e,t,n)=>{var i=n(9859),r=n(7933).f,s=n(5762),o=n(7487),a=n(2079),u=n(7081),l=n(6541);e.exports=function(e,t){var n,c,p,h,d,f=e.target,m=e.global,g=e.stat;if(n=m?i:g?i[f]||a(f,{}):(i[f]||{}).prototype)for(c in t){if(h=t[c],p=e.noTargetGet?(d=r(n,c))&&d.value:n[c],!l(m?c:f+(g?".":"#")+c,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;u(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),o(n,c,h,e)}}},4229:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7636:(e,t,n)=>{var i=n(3819);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},1333:(e,t,n)=>{var i=n(9859),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e]):i[e]&&i[e][t]}},8830:(e,t,n)=>{var i=n(1589),r=n(5495),s=n(95)("iterator");e.exports=function(e){if(null!=e)return e[s]||e["@@iterator"]||r[i(e)]}},8403:(e,t,n)=>{var i=n(1176),r=n(8830);e.exports=function(e,t){var n=arguments.length<2?r(e):t;if("function"!=typeof n)throw TypeError(String(e)+" is not iterable");return i(n.call(e))}},9585:e=>{e.exports=function(e){return Map.prototype.entries.call(e)}},9859:(e,t,n)=>{var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},816:(e,t,n)=>{var i=n(2991),r={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return r.call(i(e),t)}},5977:e=>{e.exports={}},4394:(e,t,n)=>{var i=n(7400),r=n(4229),s=n(2635);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},9337:(e,t,n)=>{var i=n(4229),r=n(7079),s="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?s.call(e,""):Object(e)}:Object},8511:(e,t,n)=>{var i=n(5353),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},6407:(e,t,n)=>{var i,r,s,o=n(8694),a=n(9859),u=n(5052),l=n(5762),c=n(816),p=n(5353),h=n(4399),d=n(5977),f="Object already initialized",m=a.WeakMap;if(o||p.state){var g=p.state||(p.state=new m),v=g.get,y=g.has,x=g.set;i=function(e,t){if(y.call(g,e))throw new TypeError(f);return t.facade=e,x.call(g,e,t),t},r=function(e){return v.call(g,e)||{}},s=function(e){return y.call(g,e)}}else{var b=h("state");d[b]=!0,i=function(e,t){if(c(e,b))throw new TypeError(f);return t.facade=e,l(e,b,t),t},r=function(e){return c(e,b)?e[b]:{}},s=function(e){return c(e,b)}}e.exports={set:i,get:r,has:s,enforce:function(e){return s(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},1943:(e,t,n)=>{var i=n(95),r=n(5495),s=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[s]===e)}},6541:(e,t,n)=>{var i=n(4229),r=/#|\.prototype\./,s=function(e,t){var n=a[o(e)];return n==l||n!=u&&("function"==typeof t?i(t):!!t)},o=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5052:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},4231:e=>{e.exports=!1},9395:(e,t,n)=>{var i=n(1333),r=n(6969);e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return"function"==typeof t&&Object(e)instanceof t}},9003:(e,t,n)=>{var i=n(1176),r=n(1943),s=n(4237),o=n(7636),a=n(8403),u=n(8830),l=n(7281),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var p,h,d,f,m,g,v,y=n&&n.that,x=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),w=o(t,y,1+x+E),C=function(e){return p&&l(p,"normal",e),new c(!0,e)},S=function(e){return x?(i(e),E?w(e[0],e[1],C):w(e[0],e[1])):E?w(e,C):w(e)};if(b)p=e;else{if("function"!=typeof(h=u(e)))throw TypeError("Target is not iterable");if(r(h)){for(d=0,f=s(e.length);f>d;d++)if((m=S(e[d]))&&m instanceof c)return m;return new c(!1)}p=a(e,h)}for(g=p.next;!(v=g.call(p)).done;){try{m=S(v.value)}catch(e){l(p,"throw",e)}if("object"==typeof m&&m&&m instanceof c)return m}return new c(!1)}},7281:(e,t,n)=>{var i=n(1176);e.exports=function(e,t,n){var r,s;i(e);try{if(void 0===(r=e.return)){if("throw"===t)throw n;return n}r=r.call(e)}catch(e){s=!0,r=e}if("throw"===t)throw n;if(s)throw r;return i(r),n}},5495:e=>{e.exports={}},3839:(e,t,n)=>{var i=n(6358),r=n(4229);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8694:(e,t,n)=>{var i=n(9859),r=n(8511),s=i.WeakMap;e.exports="function"==typeof s&&/native code/.test(r(s))},1787:(e,t,n)=>{var i=n(7400),r=n(4394),s=n(1176),o=n(9310),a=Object.defineProperty;t.f=i?a:function(e,t,n){if(s(e),t=o(t),s(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7933:(e,t,n)=>{var i=n(7400),r=n(9195),s=n(5358),o=n(905),a=n(9310),u=n(816),l=n(4394),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=o(e),t=a(t),l)try{return c(e,t)}catch(e){}if(u(e,t))return s(!r.f.call(e,t),e[t])}},8151:(e,t,n)=>{var i=n(140),r=n(3837).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},894:(e,t)=>{t.f=Object.getOwnPropertySymbols},140:(e,t,n)=>{var i=n(816),r=n(905),s=n(9540).indexOf,o=n(5977);e.exports=function(e,t){var n,a=r(e),u=0,l=[];for(n in a)!i(o,n)&&i(a,n)&&l.push(n);for(;t.length>u;)i(a,n=t[u++])&&(~s(l,n)||l.push(n));return l}},9195:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},2914:(e,t,n)=>{var i=n(5052);e.exports=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},4826:(e,t,n)=>{var i=n(1333),r=n(8151),s=n(894),o=n(1176);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=s.f;return n?t.concat(n(e)):t}},7487:(e,t,n)=>{var i=n(9859),r=n(5762),s=n(816),o=n(2079),a=n(8511),u=n(6407),l=u.get,c=u.enforce,p=String(String).split("String");(e.exports=function(e,t,n,a){var u,l=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||r(n,"name",t),(u=c(n)).source||(u.source=p.join("string"==typeof t?t:""))),e!==i?(l?!d&&e[t]&&(h=!0):delete e[t],h?e[t]=n:r(e,t,n)):h?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},8885:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},9989:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2079:(e,t,n)=>{var i=n(9859);e.exports=function(e,t){try{Object.defineProperty(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}},4399:(e,t,n)=>{var i=n(3036),r=n(1441),s=i("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},5353:(e,t,n)=>{var i=n(9859),r=n(2079),s="__core-js_shared__",o=i[s]||r(s,{});e.exports=o},3036:(e,t,n)=>{var i=n(4231),r=n(5353);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},7942:(e,t,n)=>{var i=n(1176),r=n(3819),s=n(95)("species");e.exports=function(e,t){var n,o=i(e).constructor;return void 0===o||null==(n=i(o)[s])?t:r(n)}},966:(e,t,n)=>{var i=n(6051),r=n(3326),s=n(8885),o=function(e){return function(t,n){var o,a,u=r(s(t)),l=i(n),c=u.length;return l<0||l>=c?e?"":void 0:(o=u.charCodeAt(l))<55296||o>56319||l+1===c||(a=u.charCodeAt(l+1))<56320||a>57343?e?u.charAt(l):o:e?u.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3231:(e,t,n)=>{var i=n(6051),r=Math.max,s=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):s(n,t)}},905:(e,t,n)=>{var i=n(9337),r=n(8885);e.exports=function(e){return i(r(e))}},6051:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},4237:(e,t,n)=>{var i=n(6051),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},2991:(e,t,n)=>{var i=n(8885);e.exports=function(e){return Object(i(e))}},2066:(e,t,n)=>{var i=n(5052),r=n(9395),s=n(2914),o=n(95)("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var n,a=e[o];if(void 0!==a){if(void 0===t&&(t="default"),n=a.call(e,t),!i(n)||r(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},9310:(e,t,n)=>{var i=n(2066),r=n(9395);e.exports=function(e){var t=i(e,"string");return r(t)?t:String(t)}},1601:(e,t,n)=>{var i={};i[n(95)("toStringTag")]="z",e.exports="[object z]"===String(i)},3326:(e,t,n)=>{var i=n(9395);e.exports=function(e){if(i(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},1441:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},6969:(e,t,n)=>{var i=n(3839);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},95:(e,t,n)=>{var i=n(9859),r=n(3036),s=n(816),o=n(1441),a=n(3839),u=n(6969),l=r("wks"),c=i.Symbol,p=u?c:c&&c.withoutSetter||o;e.exports=function(e){return s(l,e)&&(a||"string"==typeof l[e])||(a&&s(c,e)?l[e]=c[e]:l[e]=p("Symbol."+e)),l[e]}},7526:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1250);i({target:"Map",proto:!0,real:!0,forced:r},{deleteAll:function(){return s.apply(this,arguments)}})},3354:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{every:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(e,n,r){if(!i(n,e,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},5870:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{filter:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){i(n,e,t)&&h.call(r,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},574:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{findKey:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},930:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{find:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4116:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(9585),a=n(9989),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{includes:function(e){return u(o(s(this)),(function(t,n,i){if(a(n,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},3267:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(9585),a=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{keyOf:function(e){return a(o(s(this)),(function(t,n,i){if(n===e)return i(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4614:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{mapKeys:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){h.call(r,i(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},9852:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1333),o=n(1176),a=n(3819),u=n(7636),l=n(7942),c=n(9585),p=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{mapValues:function(e){var t=o(this),n=c(t),i=u(e,arguments.length>1?arguments[1]:void 0,3),r=new(l(t,s("Map"))),h=a(r.set);return p(n,(function(e,n){h.call(r,e,i(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r}})},4306:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819),a=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{merge:function(e){for(var t=s(this),n=o(t.set),i=arguments.length,r=0;r<i;)a(arguments[r++],n,{that:t,AS_ENTRIES:!0});return t}})},6077:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{reduce:function(e){var t=s(this),n=a(t),i=arguments.length<2,r=i?void 0:arguments[1];if(o(e),u(n,(function(n,s){i?(i=!1,r=s):r=e(r,s,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i)throw TypeError("Reduce of empty map with no initial value");return r}})},1072:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(7636),a=n(9585),u=n(9003);i({target:"Map",proto:!0,real:!0,forced:r},{some:function(e){var t=s(this),n=a(t),i=o(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n,r){if(i(n,e,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},183:(e,t,n)=>{"use strict";var i=n(3103),r=n(4231),s=n(1176),o=n(3819);i({target:"Map",proto:!0,real:!0,forced:r},{update:function(e,t){var n=s(this),i=arguments.length;o(t);var r=n.has(e);if(!r&&i<3)throw TypeError("Updating absent value");var a=r?n.get(e):o(i>2?arguments[2]:void 0)(e,n);return n.set(e,t(a,e,n)),n}})},8423:(e,t,n)=>{"use strict";var i=n(3103),r=n(966).charAt;i({target:"String",proto:!0,forced:n(4229)((function(){return"𠮷"!=="𠮷".at(0)}))},{at:function(e){return r(this,e)}})},9867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-stage-module-add-stage-container__L3KcT {\n margin: 0px;\n padding-bottom: 15px;\n position: relative;\n}\n.add-stage-module-add-stage-container__L3KcT:after {\n position: absolute;\n left: 6px;\n top: 2px;\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: 5px solid #dee0e3;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 {\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n position: relative;\n margin: 0px 20px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n width: 370px;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 button {\n margin: 10px 0px 10px 0px;\n}\n",""]),r.locals={"add-stage-container":"add-stage-module-add-stage-container__L3KcT","add-stage":"add-stage-module-add-stage__3hDT6"};const s=r},8817:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".aggregations-module-aggregations__12xcN {\n display: flex;\n align-items: flex-start;\n background-color: #f5f6f7;\n position: relative;\n width: 100%;\n z-index: 0;\n height: 100%;\n}\n",""]),r.locals={aggregations:"aggregations-module-aggregations__12xcN"};const s=r},8608:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-toolbar-module-input-builder-toolbar__1H2sc {\n width: 350px;\n margin: 0px 15px 0px 18px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: relative;\n height: 30px;\n align-items: center;\n}\n",""]),r.locals={"input-builder-toolbar":"input-builder-toolbar-module-input-builder-toolbar__1H2sc"};const s=r},8056:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-module-input-builder__KDDTC {\n flex-grow: 1;\n position: relative;\n margin: 15px 18px 15px 18px;\n padding: 10px 0px 10px 0px;\n min-height: 54px;\n text-align: center;\n}\n",""]),r.locals={"input-builder":"input-builder-module-input-builder__KDDTC"};const s=r},1849:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-collapser-module-input-collapser__2CIHy {\n position: relative;\n}\n.input-collapser-module-input-collapser__2CIHy button {\n width: 30px;\n}\n",""]),r.locals={"input-collapser":"input-collapser-module-input-collapser__2CIHy"};const s=r},9865:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-documents-count-module-input-documents-count__2sCxl {\n height: 30px;\n display: flex;\n align-items: center;\n flex-grow: 4;\n}\n.input-documents-count-module-input-documents-count-db__2xqQF {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n}\n.input-documents-count-module-input-documents-count-label__Q3Y3L {\n font-size: 12px;\n padding-left: 5px;\n color: #494747;\n}\n",""]),r.locals={"input-documents-count":"input-documents-count-module-input-documents-count__2sCxl","input-documents-count-db":"input-documents-count-module-input-documents-count-db__2xqQF","input-documents-count-label":"input-documents-count-module-input-documents-count-label__Q3Y3L"};const s=r},4145:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-toolbar-module-input-preview-toolbar__34ttN {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n border-left: 1px solid #dee0e3;\n}\n.input-preview-toolbar-module-input-preview-toolbar-text__3gBhM {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n",""]),r.locals={"input-preview-toolbar":"input-preview-toolbar-module-input-preview-toolbar__34ttN","input-preview-toolbar-text":"input-preview-toolbar-module-input-preview-toolbar-text__3gBhM"};const s=r},969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-module-input-preview__2di5A {\n display: flex;\n align-items: center;\n overflow: auto;\n flex-grow: 1;\n width: 100%;\n position: relative;\n}\n.input-preview-module-input-preview-documents__1878X {\n display: flex;\n align-items: flex-start;\n overflow-x: scroll;\n margin: 8px;\n padding: 8px;\n}\n.input-preview-module-input-preview-document-card-container__3ko-A {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n overflow: scroll;\n min-height: 150px;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n}\n.input-preview-module-input-preview-document-card-container__3ko-A:not(:first-child) {\n margin-left: 16px;\n}\n.input-preview-module-input-preview-document-card__ZvCA5 {\n flex-basis: 150px;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: auto;\n padding: 0;\n}\n.input-preview-module-input-preview-document-card__ZvCA5::-webkit-scrollbar {\n display: none;\n}\n.input-preview-module-input-preview__2di5A::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"input-preview":"input-preview-module-input-preview__2di5A","input-preview-documents":"input-preview-module-input-preview-documents__1878X","input-preview-document-card-container":"input-preview-module-input-preview-document-card-container__3ko-A","input-preview-document-card":"input-preview-module-input-preview-document-card__ZvCA5"};const s=r},8910:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-refresh-module-input-refresh__1jTIT {\n flex-grow: 0;\n}\n",""]),r.locals={"input-refresh":"input-refresh-module-input-refresh__1jTIT"};const s=r},6102:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-toolbar-module-input-toolbar__32jT7 {\n border-bottom: 1px solid #dee0e3;\n display: flex;\n align-items: center;\n position: relative;\n height: 40px;\n width: 100%;\n}\n",""]),r.locals={"input-toolbar":"input-toolbar-module-input-toolbar__32jT7"};const s=r},3279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-workspace-module-input-workspace__1ivct {\n display: flex;\n align-items: center;\n}\n",""]),r.locals={"input-workspace":"input-workspace-module-input-workspace__1ivct"};const s=r},6546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-module-input__2mTmO {\n position: relative;\n margin: 18px;\n margin-left: 20px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n}\n",""]),r.locals={input:"input-module-input__2mTmO"};const s=r},7130:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".loading-overlay-module-loading-overlay__3jA58 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.08);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR {\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 300px;\n height: 50px;\n background-color: #FFFFFF;\n}\n.loading-overlay-module-loading-overlay-box-text__1RHOh {\n font-size: 16px;\n margin-left: 5px;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR i {\n font-size: 20px;\n color: #168B46;\n}\n",""]),r.locals={"loading-overlay":"loading-overlay-module-loading-overlay__3jA58","loading-overlay-box":"loading-overlay-module-loading-overlay-box__1EYpR","loading-overlay-box-text":"loading-overlay-module-loading-overlay-box-text__1RHOh"};const s=r},1266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".modify-source-banner-module-modify-source-banner__zkRAk {\n text-align: center;\n margin: 5px auto;\n margin-top: 20px;\n z-index: 500;\n}\n",""]),r.locals={"modify-source-banner":"modify-source-banner-module-modify-source-banner__zkRAk"};const s=r},310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.pipeline-builder-workspace-module-pipeline-workspace__2aYaj {\n display: flex;\n flex-direction: column;\n overflow-y: scroll;\n width: 100%;\n flex-grow: 1;\n}\n.pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu {\n flex-grow: 1;\n width: 100%;\n position: relative;\n overflow-y: scroll;\n}\n",""]),r.locals={"pipeline-workspace-container":"pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec","pipeline-workspace":"pipeline-builder-workspace-module-pipeline-workspace__2aYaj","pipeline-workspace-container-container":"pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu"};const s=r},9430:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.collation-toolbar-module-collation-toolbar__31baA {\n display: flex;\n width: 100%;\n flex-shrink: 0;\n align-items: center;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU {\n width: 100%;\n height: 30px;\n position: relative;\n display: flex;\n border-radius: 14px;\n border: 1px #bfbfbe solid;\n background: #fff;\n overflow: hidden;\n padding: 4px;\n margin-right: 5px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-toolbar-input-label__2z_dD {\n background: #bfbfbe;\n color: #fff;\n white-space: nowrap;\n border-radius: 14px;\n padding: 2px 8px 2px 4px;\n margin-right: 5px;\n text-transform: uppercase;\n font-weight: bold;\n font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 11px;\n flex-grow: 0;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-toolbar-input-label__2z_dD i {\n margin-right: 3px;\n margin-left: 0px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-has-error__1DJu7 {\n background: #ef4c4c;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU input {\n border: 0;\n width: 100%;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU input:focus {\n outline-width: 0;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs {\n display: flex;\n min-width: 170px;\n}\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs input[type=number]::-webkit-inner-spin-button,\n.collation-toolbar-module-toolbar-input-wrapper__nLxwU .collation-toolbar-module-max-time-ms__2yHVs input[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.collation-toolbar-module-has-focus__3yMBL {\n border-color: #43b1e5;\n}\n',""]),r.locals={"collation-toolbar":"collation-toolbar-module-collation-toolbar__31baA","toolbar-input-wrapper":"collation-toolbar-module-toolbar-input-wrapper__nLxwU","toolbar-input-label":"collation-toolbar-module-toolbar-input-label__2z_dD","has-error":"collation-toolbar-module-has-error__1DJu7","max-time-ms":"collation-toolbar-module-max-time-ms__2yHVs","has-focus":"collation-toolbar-module-has-focus__3yMBL"};const s=r},1570:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3 {\n padding: 0px;\n}\n",""]),r.locals={"confirm-import-pipeline-note":"confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3"};const s=r},3777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL {\n padding: 0px;\n}\n",""]),r.locals={"confirm-new-pipeline-note":"confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL"};const s=r},5287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".import-pipeline-module-import-pipeline-note__vDPrD {\n color: steelblue;\n background-color: #B0E0E6;\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 10px;\n}\n.import-pipeline-module-import-pipeline-editor__2L-TC {\n flex-shrink: 0;\n position: relative;\n padding: 10px 0px 10px 0px;\n overflow: scroll;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n min-height: 180px;\n max-height: 300px;\n}\n.import-pipeline-module-import-pipeline-error__92RZw {\n flex-shrink: 0;\n position: relative;\n margin: 10px 0px;\n padding: 10px;\n border-radius: 3px;\n overflow: auto;\n background: #ff473a;\n max-height: 100px;\n color: #f5f6f7;\n font-size: x-small;\n font-weight: bold;\n}\n",""]),r.locals={"import-pipeline-note":"import-pipeline-module-import-pipeline-note__vDPrD","import-pipeline-editor":"import-pipeline-module-import-pipeline-editor__2L-TC","import-pipeline-error":"import-pipeline-module-import-pipeline-error__92RZw"};const s=r},4686:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-module-pipeline__1nWUF {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n position: relative;\n}\n.pipeline-module-pipeline-collation-toolbar-container__2S68M {\n padding: 6px 10px 6px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);\n}\n.pipeline-module-pipeline-error-banner-container__19QTd {\n margin-left: 20px;\n margin-right: 36px;\n}\n.pipeline-module-pipeline-fullscreen__2QlA5 {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n}\n",""]),r.locals={pipeline:"pipeline-module-pipeline__1nWUF","pipeline-collation-toolbar-container":"pipeline-module-pipeline-collation-toolbar-container__2S68M","pipeline-error-banner-container":"pipeline-module-pipeline-error-banner-container__19QTd","pipeline-fullscreen":"pipeline-module-pipeline-fullscreen__2QlA5"};const s=r},6667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".resize-handle-module-resize-handle__1rugm {\n position: absolute;\n background: #dee0e3;\n width: 1.1px;\n height: 100%;\n}\n",""]),r.locals={"resize-handle":"resize-handle-module-resize-handle__1rugm"};const s=r},1101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-pipeline-button-module-delete-pipeline__Ch_2o {\n margin: 0px 10px 0px 0px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"delete-pipeline":"delete-pipeline-button-module-delete-pipeline__Ch_2o"};const s=r},3981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".restore-pipeline-button-module-restore-pipeline__NGnMs {\n margin-right: 2px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"restore-pipeline":"restore-pipeline-button-module-restore-pipeline__NGnMs"};const s=r},2099:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-card-module-save-pipeline-card__2EPNA {\n border: 1px solid #dee0e3;\n box-shadow: 0 0 3px #dee0e3;\n margin: 10px;\n display: flex;\n align-items: center;\n background: #fff;\n}\n.save-pipeline-card-module-save-pipeline-card__2EPNA:hover button {\n visibility: visible;\n}\n.save-pipeline-card-module-save-pipeline-card-title__272aN {\n font-size: 12px;\n padding: 8px;\n line-height: 20px;\n font-weight: bold;\n flex-grow: 5;\n color: #494747;\n overflow-wrap: break-word;\n overflow: auto;\n}\n",""]),r.locals={"save-pipeline-card":"save-pipeline-card-module-save-pipeline-card__2EPNA","save-pipeline-card-title":"save-pipeline-card-module-save-pipeline-card-title__272aN"};const s=r},9593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-module-save-pipeline__1r5sb {\n border-right: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 400px;\n height: 100%;\n top: 0;\n left: -401px;\n transition: left 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.save-pipeline-module-save-pipeline-is-visible__3bNUE {\n left: 0px;\n transition: left 0.2s ease-in-out;\n}\n.save-pipeline-module-save-pipeline-header__1G3Ck {\n height: 34px;\n display: flex;\n padding: 10px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs {\n overflow-y: scroll;\n}\n.save-pipeline-module-save-pipeline-close__2mTMD {\n cursor: pointer;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"save-pipeline":"save-pipeline-module-save-pipeline__1r5sb","save-pipeline-is-visible":"save-pipeline-module-save-pipeline-is-visible__3bNUE","save-pipeline-header":"save-pipeline-module-save-pipeline-header__1G3Ck","save-pipeline-cards":"save-pipeline-module-save-pipeline-cards__2__gs","save-pipeline-close":"save-pipeline-module-save-pipeline-close__2mTMD"};const s=r},6252:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.settings-module-container__3sWua {\n border-left: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 580px;\n height: 100%;\n top: 0;\n right: 0px;\n transition: right 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.settings-module-header__1rot3 {\n height: 32px;\n display: flex;\n padding: 5px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.settings-module-header-title__xCvBM {\n color: #424242;\n font-size: 12px;\n font-weight: bold;\n flex-grow: 2;\n}\n.settings-module-header-btn-group__1NySd {\n display: inline-block;\n}\n.settings-module-header-btn-group__1NySd button {\n margin-right: 5px;\n}\n.settings-module-header-btn-group__1NySd:last-child {\n margin-right: 0px;\n}\n.settings-module-input-group__3OjXF {\n margin: 8px;\n padding: 8px 16px;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n}\n.settings-module-input-control__3kNAF {\n min-width: 90px;\n}\n.settings-module-input-control__3kNAF input {\n border-radius: 3px;\n border-color: #BFBFBE;\n border-style: solid;\n border-width: 1px;\n padding: 1px;\n text-align: right;\n float: right;\n}\n.settings-module-input-control__3kNAF input[type="text"],\n.settings-module-input-control__3kNAF input[type="number"] {\n width: 70px;\n color: #464C4F;\n}\n.settings-module-input-control__3kNAF input[type="text"]::placeholder,\n.settings-module-input-control__3kNAF input[type="number"]::placeholder {\n font-size: 13px;\n color: #AAAAAA;\n}\n.settings-module-input-meta__2H8QK {\n flex-grow: 1;\n}\n.settings-module-input-meta__2H8QK p {\n margin-top: 8px;\n}\n',""]),r.locals={container:"settings-module-container__3sWua",header:"settings-module-header__1rot3","header-title":"settings-module-header-title__xCvBM","header-btn-group":"settings-module-header-btn-group__1NySd","input-group":"settings-module-input-group__3OjXF","input-control":"settings-module-input-control__3kNAF","input-meta":"settings-module-input-meta__2H8QK"};const s=r},2884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-after-stage-module-add-after-stage__1xZf9 {\n display: flex;\n justify-content: flex-end;\n}\n.add-after-stage-module-add-after-stage__1xZf9 button {\n width: 30px;\n margin-right: 6px;\n}\n",""]),r.locals={"add-after-stage":"add-after-stage-module-add-after-stage__1xZf9"};const s=r},9262:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-stage-module-delete-stage__3PyCJ {\n margin-right: 6px;\n}\n.delete-stage-module-delete-stage__3PyCJ button {\n width: 30px;\n}\n",""]),r.locals={"delete-stage":"delete-stage-module-delete-stage__3PyCJ"};const s=r},173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".select-option-with-tooltip-module-tooltip__3SVxp {\n max-width: 340px !important;\n}\n.select-option-with-tooltip-module-option__K2UZL {\n display: flex;\n align-items: center;\n}\n.select-option-with-tooltip-module-optionIcon__os9Dz {\n margin-left: auto;\n}\n",""]),r.locals={tooltip:"select-option-with-tooltip-module-tooltip__3SVxp",option:"select-option-with-tooltip-module-option__K2UZL",optionIcon:"select-option-with-tooltip-module-optionIcon__os9Dz"};const s=r},1103:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-collapser-module-stage-collapser__3xs2F {\n position: relative;\n}\n.stage-collapser-module-stage-collapser__3xs2F button {\n width: 30px;\n}\n",""]),r.locals={"stage-collapser":"stage-collapser-module-stage-collapser__3xs2F"};const s=r},2891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK {\n width: 100%;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n padding: 10px 0;\n padding-right: 10px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: 30px;\n cursor: move;\n cursor: grab;\n}\n.dragging .stage-editor-toolbar-module-stage-editor-toolbar__2cwCK {\n pointer-events: auto;\n cursor: grabbing;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk {\n display: flex;\n justify-content: flex-end;\n flex-grow: 4;\n align-items: center;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE {\n background: #FCEBE2;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle:before {\n content: "\\f05a";\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK .stage-editor-toolbar-module-tooltip-icon__3szXX {\n margin-top: 6px;\n margin-right: 6px;\n}\n',""]),r.locals={"stage-editor-toolbar":"stage-editor-toolbar-module-stage-editor-toolbar__2cwCK","stage-editor-toolbar-right":"stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk","stage-editor-toolbar-errored":"stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE","tooltip-icon":"stage-editor-toolbar-module-tooltip-icon__3szXX"};const s=r},5884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-grabber-module-stage-grabber__1-8cr {\n color: #dee0e3;\n margin: 3px 2px 0px 4px;\n position: relative;\n}\n",""]),r.locals={"stage-grabber":"stage-grabber-module-stage-grabber__1-8cr"};const s=r},6125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-operator-select-module-stage-operator-select__1eiQN {\n position: relative;\n width: 120px;\n height: 22px;\n margin: 0px 0px 0px 5px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK {\n position: relative;\n font-size: 12px !important;\n cursor: pointer;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-control {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-placeholder {\n line-height: 25px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-input {\n height: 18px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow-zone {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow {\n margin-top: 8px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-value {\n line-height: 22px !important;\n font-weight: bold;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu {\n height: 200px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu-outer {\n z-index: 2000 !important;\n}\n",""]),r.locals={"stage-operator-select":"stage-operator-select-module-stage-operator-select__1eiQN","stage-operator-select-control":"stage-operator-select-module-stage-operator-select-control__LjhSK"};const s=r},2347:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".toggle-stage-module-toggle-stage__2JZ-6 {\n margin: 0px 0px 0px 5px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.toggle-stage-module-toggle-stage-button__1ILJ7 {\n height: 22px;\n width: 40px;\n}\n",""]),r.locals={"toggle-stage":"toggle-stage-module-toggle-stage__2JZ-6","toggle-stage-button":"toggle-stage-module-toggle-stage-button__1ILJ7"};const s=r},8915:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-editor-module-stage-editor-container__1XwN_ {\n position: relative;\n padding: 6px 8px;\n text-align: center;\n}\n.stage-editor-module-stage-editor__3F-oQ {\n flex-shrink: 0;\n margin: 0;\n padding: 10px 0px 10px 0px;\n overflow: hidden;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n width: 100%;\n min-height: 180px;\n}\n.stage-editor-module-stage-editor-errormsg__3Le7I {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FCEBE2;\n border: 1px solid #F9D3C5;\n min-height: 20px;\n word-break: break-all;\n color: #8F221B;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-syntax-error__3qEJX {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FEF7E3;\n border: 1px solid #FEF2C8;\n min-height: 20px;\n word-break: break-all;\n color: #86681D;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-ace-editor__eRQyZ {\n min-height: 160px;\n}\n",""]),r.locals={"stage-editor-container":"stage-editor-module-stage-editor-container__1XwN_","stage-editor":"stage-editor-module-stage-editor__3F-oQ","stage-editor-errormsg":"stage-editor-module-stage-editor-errormsg__3Le7I","stage-editor-syntax-error":"stage-editor-module-stage-editor-syntax-error__3qEJX","stage-editor-ace-editor":"stage-editor-module-stage-editor-ace-editor__eRQyZ"};const s=r},462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-preview-toolbar-module-stage-preview-toolbar__2o0am {\n width: 100%;\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 30px;\n padding: 10px 0;\n padding-left: 25px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO {\n background: #FCEBE2;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle:before {\n content: "\\f05a";\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am #stage-tooltip {\n width: 300px;\n white-space: pre-wrap;\n}\n',""]),r.locals={"stage-preview-toolbar":"stage-preview-toolbar-module-stage-preview-toolbar__2o0am","stage-preview-toolbar-link":"stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc","stage-preview-toolbar-errored":"stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO"};const s=r},9877:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-preview-module-stage-preview__37FlK {\n width: 100%;\n display: flex;\n align-items: stretch;\n overflow: auto;\n position: relative;\n flex-grow: 1;\n}\n.stage-preview-module-stage-preview-empty__9L3fd {\n padding-left: 15px;\n margin: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n fill: none;\n stroke: #89979B;\n text-align: center;\n}\n.stage-preview-module-stage-preview-missing-search-support__18Jmm {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 10px;\n margin: auto;\n}\n.stage-preview-module-stage-preview-missing-search-support-text__1XKhH {\n text-align: center;\n margin-top: 10px;\n margin-bottom: 20px;\n max-width: 400px;\n}\n.stage-preview-module-stage-preview-out__2kjVI {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n padding-top: 32px;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 8px;\n}\n.stage-preview-module-stage-preview-out-text__FwDzO {\n padding: 0px 15px 2px 15px;\n text-align: center;\n}\n.stage-preview-module-stage-preview-out-button__bnXRJ {\n margin-top: 3px;\n}\n.stage-preview-module-stage-preview-out-link__1uCqW {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-module-stage-preview-documents__uF1qq {\n display: flex;\n align-items: stretch;\n overflow-x: scroll;\n margin: 8px;\n padding: 8px;\n}\n.stage-preview-module-stage-preview-document-card-container__sxM1s {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n overflow: scroll;\n min-height: 150px;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n}\n.stage-preview-module-stage-preview-document-card-container__sxM1s:not(:first-child) {\n margin-left: 16px;\n}\n.stage-preview-module-stage-preview-document-card__21xbY {\n flex-basis: 150px;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: auto;\n padding: 0;\n}\n.stage-preview-module-stage-preview-document-card__21xbY::-webkit-scrollbar {\n display: none;\n}\n.stage-preview-module-stage-preview__37FlK::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"stage-preview":"stage-preview-module-stage-preview__37FlK","stage-preview-empty":"stage-preview-module-stage-preview-empty__9L3fd","stage-preview-missing-search-support":"stage-preview-module-stage-preview-missing-search-support__18Jmm","stage-preview-missing-search-support-text":"stage-preview-module-stage-preview-missing-search-support-text__1XKhH","stage-preview-out":"stage-preview-module-stage-preview-out__2kjVI","stage-preview-out-text":"stage-preview-module-stage-preview-out-text__FwDzO","stage-preview-out-button":"stage-preview-module-stage-preview-out-button__bnXRJ","stage-preview-out-link":"stage-preview-module-stage-preview-out-link__1uCqW","stage-preview-documents":"stage-preview-module-stage-preview-documents__uF1qq","stage-preview-document-card-container":"stage-preview-module-stage-preview-document-card-container__sxM1s","stage-preview-document-card":"stage-preview-module-stage-preview-document-card__21xbY"};const s=r},7295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-module-stage-container__ZDTxh {\n margin: 0px 10px 0px;\n padding-bottom: 15px;\n border-left: 2px solid #dee0e3;\n position: relative;\n}\n.stage-module-stage-container__ZDTxh:before {\n position: absolute;\n left: -3px;\n top: 10px;\n content: '';\n width: 4px;\n height: 16px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh:after {\n position: absolute;\n left: -7px;\n top: 12px;\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid #dee0e3;\n}\n.stage-module-stage-container-is-first__C7RFF:before {\n position: absolute;\n left: -3px;\n top: 0px;\n content: '';\n width: 4px;\n height: 26px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage__1YPPq {\n position: relative;\n margin: 0px 8px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n display: flex;\n flex-direction: row;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage-errored__mbJmP {\n border-color: #CF4A22;\n}\n.stage-module-stage-editor-container__1LvRF {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: auto;\n}\n.stage-module-stage-preview-container__2xO44 {\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n overflow: auto;\n}\n.stage-module-stage-resize-handle-wrapper__1UhOK:hover div div,\n.stage-module-stage-resize-handle-wrapper__1UhOK:active div div {\n background-color: #bfbfbe;\n}\n.stage-module-stage-workspace__9LrbT {\n display: flex;\n align-items: stretch;\n border-radius: 0 0 4px 4px;\n}\n.stage-module-stage-editor-no-preview__34-OX {\n width: 100%;\n}\n",""]),r.locals={"stage-container":"stage-module-stage-container__ZDTxh","stage-container-is-first":"stage-module-stage-container-is-first__C7RFF",stage:"stage-module-stage__1YPPq","stage-errored":"stage-module-stage-errored__mbJmP","stage-editor-container":"stage-module-stage-editor-container__1LvRF","stage-preview-container":"stage-module-stage-preview-container__2xO44","stage-resize-handle-wrapper":"stage-module-stage-resize-handle-wrapper__1UhOK","stage-workspace":"stage-module-stage-workspace__9LrbT","stage-editor-no-preview":"stage-module-stage-editor-no-preview__34-OX"};const s=r},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,i,r,s=e[1]||"",o=e[3];if(!o)return s;if(t&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),u=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[s].concat(u).concat([a]).join("\n")}return[s].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(i)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(r[o]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);i&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},7386:(e,t,n)=>{"use strict";const i=n(8653),r=n(1515);function s(e,t){return i(e,t,{parse:!0})}s.text=function(e,t){return i(e,t,{parse:!1,html:!1})},s.html=function(e,t){return i(e,t,{parse:!1,html:!0})},s.getEOL=function(e){if("string"!=typeof e)throw new TypeError("Invalid parameter 'text' specified.");return r.getEOL(e)},e.exports=s},8653:(e,t,n)=>{"use strict";const i=n(1515);e.exports=function(e,t,n){if("string"!=typeof e)throw new TypeError("Input code/text/html must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("Parameter 'options' must be an object.");const r=e.length,s=t&&t.safe,o=t&&t.space,a=t&&t.trim,u=t&&t.tolerant,l=i.getEOL(e);let c,p=0,h="",d=!0,f="",m=[];if(!r)return e;if(n.parse?(c=i.isHtml(e),c||(m=i.parseRegEx(e,u))):c=n.html,t&&t.ignore){let n=t.ignore;if(n instanceof RegExp?n=[n]:n instanceof Array?(n=n.filter((e=>e instanceof RegExp)),n.length||(n=null)):n=null,n){for(let t=0;t<n.length;t++){const i=n[t];let r;do{r=i.exec(e),r&&m.push({start:r.index,end:r.index+r[0].length-1})}while(r&&i.global)}m=m.sort(((e,t)=>e.start-t.start))}}do{if(!c&&"/"===e[p]&&p<r-1&&(!p||"\\"!==e[p-1])){if("/"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf(l,p+2);if(t<0)break;d?(f="",o?p=t-1:(p=t+l.length-1,v())):p=t-1;continue}if("*"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf("*/",p+2),n=s&&p<r-2&&"!"===e[p+2];if(n&&(h+=t>=0?e.substr(p,t-p+2):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+2);if(p=t+1,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}}if(c&&"<"===e[p]&&p<r-3&&"!--"===e.substr(p+1,3)){if(g()){f&&(h+=f,f=""),h+="<";continue}const t=e.indexOf("--\x3e",p+4),n=s&&"[if"===e.substr(p+4,3);if(n&&(h+=t>=0?e.substr(p,t-p+3):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+3);if(p=t+2,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}const t=e[p],n=" "===t||"\t"===t;if("\r"===t||"\n"===t?e.indexOf(l,p)===p&&(d=!0):n||(d=!1,h+=f,f=""),d&&n?f+=t:h+=t,!(c||"'"!==t&&'"'!==t&&"`"!==t||p&&"\\"===e[p-1])){if(g())continue;let n=p;do{if(n=e.indexOf(t,n+1),n>0){let t=n;for(;"\\"===e[--t];);if((n-t)%2)break}}while(n>0);if(n<0)break;h+=e.substr(p+1,n-p),p=n}}while(++p<r);function g(){if(m.length)return i.indexInRegEx(p,m)}function v(){if(a){let t,n,i;do{for(t=p+1,n=e.indexOf(l,t),i=t;(" "===e[i]||"\t"===e[i])&&++i<n;);i===n&&(p=n+l.length-1)}while(i===n)}}return h}},1515:(e,t,n)=>{"use strict";const i=n(671),r=n(9801);e.exports={getEOL:function(e){let t=0,n=0,i=0;for(;t<e.length&&(t=e.indexOf("\n",t),-1!=t);)t>0&&"\r"===e[t-1]?i++:n++,t++;return n===i?r.EOL:n>i?"\n":"\r\n"},getSpaces:function(e){return" ".repeat(e)},parseRegEx:function(e,t){const n=[];return i.tokenize(e,{loc:!0,range:!0,tolerant:!!t},(e=>{"RegularExpression"===e.type&&n.push({start:e.range[0]+1,end:e.range[1]-1})})),n},indexInRegEx:function(e,t){let n,i=0,r=t.length-1;for(;i<=r;){n=Math.round((i+r)/2);const s=t[n];if(e>=s.start){if(e<=s.end)return!0;i=n+1}else r=n-1}return!1},isHtml:function(e){let t,n=0;do{if(t=e[n]," "!==t&&"\t"!==t&&"\r"!==t&&"\n"!==t)return"<"===t}while(++n<e.length)}}},671:function(e){var t;t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),s=n(8),o=n(15);function a(e,t,n){var o=null,a=function(e,t){n&&n(e,t),o&&o.visit(e,t)},u="function"==typeof n?a:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((o=new i.CommentHandler).attach=c,t.comment=!0,u=a)}var p,h=!1;t&&"string"==typeof t.sourceType&&(h="module"===t.sourceType),p=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,u):new s.Parser(e,t,u);var d=h?p.parseModule():p.parseScript();return l&&o&&(d.comments=o.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}t.parse=a,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",a(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",a(e,i,n)},t.tokenize=function(e,t,n){var i,r=new o.Tokenizer(e,t);i=[];try{for(;;){var s=r.getNextToken();if(!s)break;n&&(s=n(s)),i.push(s)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var s=this.leading[r];t.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=e.start.offset;)t=s.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=e.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),u=n(7),l=n(8),c=n(13),p=n(14);function h(e){var t;switch(e.type){case a.JSXSyntax.JSXIdentifier:t=e.name;break;case a.JSXSyntax.JSXNamespacedName:var n=e;t=h(n.namespace)+":"+h(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=e;t=h(i.object)+"."+h(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var d=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!p.XHTMLEntities[u]||(t=p.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:a=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),a=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new o.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===a.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var s=this.finalize(n,new o.JSXElement(r,[],null));e.children.push(s)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===a.JSXSyntax.JSXClosingElement){e.closing=i;var u=h(e.opening.name);if(u!==h(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(t.length>0))break;s=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(s),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.JSXClosingElement=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXElement=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXExpressionContainer=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXIdentifier=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXMemberExpression=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXAttribute=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXNamespacedName=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXOpeningElement=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXSpreadAttribute=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXText=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.ArrayExpression=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayPattern=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.AssignmentExpression=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentPattern=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AsyncArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncFunctionDeclaration=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AwaitExpression=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.BinaryExpression=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BlockStatement=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BreakStatement=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.CallExpression=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CatchClause=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.ClassBody=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassDeclaration=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ComputedMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ConditionalExpression=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ContinueStatement=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement};t.Directive=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.DoWhileStatement=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement};t.ExportAllDeclaration=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportDefaultDeclaration=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportNamedDeclaration=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportSpecifier=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExpressionStatement=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ForInStatement=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForOfStatement=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForStatement=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.FunctionDeclaration=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.Identifier=function(e){this.type=i.Syntax.Identifier,this.name=e};t.IfStatement=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.ImportDeclaration=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDefaultSpecifier=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportNamespaceSpecifier=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportSpecifier=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.LabeledStatement=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.Literal=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.MetaProperty=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MethodDefinition=function(e,t,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=s};t.Module=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.NewExpression=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.ObjectExpression=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectPattern=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.Property=function(e,t,n,r,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=s,this.shorthand=o};t.RegexLiteral=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RestElement=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.ReturnStatement=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.Script=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.SequenceExpression=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SpreadElement=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.StaticMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.Super=function(){this.type=i.Syntax.Super};t.SwitchCase=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchStatement=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.TaggedTemplateExpression=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TemplateElement=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateLiteral=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.ThisExpression=function(){this.type=i.Syntax.ThisExpression};t.ThrowStatement=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.TryStatement=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.UnaryExpression=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UpdateExpression=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.VariableDeclaration=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclarator=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.WhileStatement=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WithStatement=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.YieldExpression=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),u=n(2),l=n(13),c="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,u=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,u,s)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,u=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,u,s)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||s.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?s.Messages.UnexpectedEOS:3===e.type?s.Messages.UnexpectedIdentifier:6===e.type?s.Messages.UnexpectedNumber:8===e.type?s.Messages.UnexpectedString:10===e.type?s.Messages.UnexpectedTemplate:s.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=s.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=s.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,u=e.start-a+1;return this.errorHandler.createError(r,o,u,i)}return r=this.lastMarker.index,o=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(r,o,u,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,s.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(3===i.type){var h=i.value;this.nextToken(),u=this.match("["),r=(p=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(h))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var d=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!p&&"get"===i.value&&d)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!p&&"set"===i.value&&d)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&d)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!p)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===i.type)if(h=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(h,f))}else c=!0,a=h;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,a,l,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:for(e.type=u.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new o.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);var a=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new o.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new o.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),a=this.match("(")?this.parseArguments():[];e=new o.NewExpression(s,a),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new o.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new o.StaticMemberExpression(e,r))}else if(this.match("(")){var s=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=s?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new o.CallExpression(e,a)),s&&this.match("=>")){for(var u=0;u<a.length;++u)this.reinterpretExpressionAsPattern(a[u]);e={type:c,params:a,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new o.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(e,l))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new o.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new o.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new o.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new o.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new o.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new o.UpdateExpression(a,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new o.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new o.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(s.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new o.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[s,n.value,a],l=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=l[l.length-1];){a=u.pop();var c=u.pop();l.pop(),s=u.pop(),r.pop();var p=this.startNode(r[r.length-1]);u.push(this.finalize(p,new o.BinaryExpression(c,s,a)))}u.push(this.nextToken().value),l.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=u.length-1;t=u[h];for(var d=r.pop();h>1;){var f=r.pop(),m=d&&d.lineStart;p=this.startNode(f,m),c=u[h-1],t=this.finalize(p,new o.BinaryExpression(c,u[h-2],t)),h-=2,d=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case u.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof o.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case u.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(o=n[r]).type===u.Syntax.AssignmentPattern?o.right.type===u.Syntax.YieldExpression&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=u.Syntax.Identifier,o.right.name="yield",delete o.right.argument,delete o.right.delegate):i&&o.type===u.Syntax.Identifier&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,o),n[r]=o;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var o;(o=n[r]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===s.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,a=this.reinterpretAsCoverFormalsList(e);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var h=this.context.allowYield,d=this.context.await;this.context.allowYield=!0,this.context.await=r;var f=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),e=r?this.finalize(f,new o.AsyncArrowFunctionExpression(a.params,m,v)):this.finalize(f,new o.ArrowFunctionExpression(a.params,m,v)),this.context.strict=l,this.context.allowStrictDirective=p,this.context.allowYield=h,this.context.await=d}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var x=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(x,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var l=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),a=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(l,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),a=!0,i=l)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,a=null,l=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===h.length&&this.matchKeyword("in")){var d=h[0];d.init&&(d.id.type===u.Syntax.ArrayPattern||d.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(p=this.context.allowIn,this.context.allowIn=!1,h=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=p,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(h,f)))):(i=this.finalize(i,new o.Identifier(f)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(p=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,l=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new o.ForStatement(i,r,a,n)):l?this.finalize(c,new o.ForInStatement(e,t,n)):this.finalize(c,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,s.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(l,s.Messages.GeneratorInLegacyContext),a=c}else a=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var a="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,a)&&this.tolerateError(s.Messages.DuplicateBinding,t[r].value),i[a]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new o.CatchClause(n,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(s.Messages.NoCatchOrFinally),this.finalize(e,new o.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new o.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=s,this.finalize(e,new o.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=s.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(s.Messages.DefaultRestParameter),this.match(")")||this.throwError(s.Messages.ParameterAfterRestParameter),this.finalize(t,new o.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof o.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var a=null,u=null;if(!e||!this.match("(")){var l=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,i=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,i=s.Messages.StrictReservedWord)}var c=this.context.await,p=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var h=this.parseFormalParameters(u),d=h.params,f=h.stricted;u=h.firstRestricted,h.message&&(i=h.message);var m=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&f&&this.tolerateUnexpectedToken(f,i),this.context.strict=m,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=p,n?this.finalize(t,new o.AsyncFunctionDeclaration(a,d,v)):this.finalize(t,new o.FunctionDeclaration(a,d,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,a=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;a=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=s.Messages.StrictReservedWord)}var p=this.parseFormalParameters(r),h=p.params,d=p.stricted;r=p.firstRestricted,p.message&&(n=p.message);var f=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&d&&this.tolerateUnexpectedToken(d,n),this.context.strict=f,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,t?this.finalize(e,new o.AsyncFunctionExpression(a,h,g)):this.finalize(e,new o.FunctionExpression(a,h,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===u.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new o.Directive(n,i):new o.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,s.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(p=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,s.Messages.ConstructorIsAsync))}var d=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&d?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&d&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===t.type&&"*"===t.value&&d&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0),!i&&r&&this.match("(")&&(i="init",a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,s.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!l||a&&a.generator)&&this.throwUnexpectedToken(t,s.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,s.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,a,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var a=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,a,u))}return e},e}();t.Parser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,s=this.constructError(r,n);return s.index=e,s.lineNumber=t,s.description=i,s},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function a(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(s)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},s={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(s)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+o(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=a(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,o="";!this.eof();){var a=this.source[this.index++];if(a===t){t="";break}if("\\"===a)if((a=this.source[this.index++])&&r.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(a);null===u&&this.throwUnexpectedToken(),o+=u}break;case"x":var l=this.scanHexEscape(a);null===l&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),o+=l;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"8":case"9":o+=a,this.tolerateUnexpectedToken();break;default:if(a&&r.Character.isOctalDigit(a.charCodeAt(0))){var c=this.octalToDecimal(a);n=c.octal||n,o+=String.fromCharCode(c.code)}else o+=a}else{if(r.Character.isLineTerminator(a.charCodeAt(0)))break;o+=a}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],o=!1,a=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){a=1,o=!0,t=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else if("\\"===u)if(u=this.source[this.index++],r.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,c=this.scanHexEscape(u);null!==c?e+=c:(this.index=l,e+=u)}break;case"x":var p=this.scanHexEscape(u);null===p&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),e+=p;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===u?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral):e+=u}else r.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=u}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:e,head:i,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):""})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(n)}catch(e){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var u={type:s.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var l=a.pattern,c=a.flags;u.regex={pattern:l,flags:c}}this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=a}])},e.exports=t()},161:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,i,s,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,s||e,o),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,o=new Array(s);r<s;r++)o[r]=i[r].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,r,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,s),!0;case 6:return c.fn.call(c.context,t,i,r,s,o),!0}for(l=1,u=new Array(p-1);l<p;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),p){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,i);break;case 4:c[l].fn.call(c[l].context,t,i,r);break;default:if(!u)for(h=1,u=new Array(p-1);h<p;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,i,r){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||r&&!a.once||i&&a.context!==i||o(this,s);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||i&&a[u].context!==i)&&l.push(a[u]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},6238:e=>{function t(e,t,n,i){var r=function(e){return null==e||"number"==typeof e||"boolean"==typeof e}(i)?i:n(i),s=t.get(r);return void 0===s&&(s=e.call(this,i),t.set(r,s)),s}function n(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return void 0===s&&(s=e.apply(this,i),t.set(r,s)),s}function i(e,t,n,i,r){return n.bind(t,e,i,r)}function r(e,r){return i(e,this,1===e.length?t:n,r.cache.create(),r.serializer)}function s(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(e){return e in this.cache},o.prototype.get=function(e){return this.cache[e]},o.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new o}};e.exports=function(e,t){var n=t&&t.cache?t.cache:a,i=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:i})},e.exports.strategies={variadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return i(e,this,t,n.cache.create(),n.serializer)}}},3463:(e,t,n)=>{"use strict";var i=n(3887),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(e){return i.isMemo(e)?o:a[e.$$typeof]||r}a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[i.Memo]=o;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(f){var r=d(n);r&&r!==f&&e(t,r,i)}var o=c(n);p&&(o=o.concat(p(n)));for(var a=u(t),m=u(n),g=0;g<o.length;++g){var v=o[g];if(!(s[v]||i&&i[v]||m&&m[v]||a&&a[v])){var y=h(n,v);try{l(t,v,y)}catch(e){}}}}return t}},3459:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case c:case p:case s:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case u:return e;default:return t}}case r:return t}}}function w(e){return E(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=a,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return w(e)||E(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===s},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===a},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=E},3887:(e,t,n)=>{"use strict";e.exports=n(3459)},7677:e=>{"use strict";e.exports=function(e,t,n,i,r,s,o,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,s,o,a],c=0;(u=new Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},4283:e=>{e.exports="undefined"==typeof process||!process||!!process.type&&"renderer"===process.type},9320:e=>{function t(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=t,e.exports.default=t},594:(e,t,n)=>{var i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),p=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,s,o,a,u,l=0,c=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function x(e){return l=e,a=setTimeout(E,t),c?y(e):o}function b(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=s}function E(){var e=f();if(b(e))return w(e);a=setTimeout(E,function(e){var n=t-(e-u);return p?d(n,s-(e-l)):n}(e))}function w(e){return a=void 0,v&&i?y(e):(i=r=void 0,o)}function C(){var e=f(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===a)return x(u);if(p)return a=setTimeout(E,t),y(u)}return void 0===a&&(a=setTimeout(E,t)),o}return t=g(t)||0,m(n)&&(c=!!n.leading,s=(p="maxWait"in n)?h(g(n.maxWait)||0,t):s,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=u=r=a=void 0},C.flush=function(){return void 0===a?o:w(f())},C}},4749:e=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/,i=Object.prototype,r=i.hasOwnProperty,s=i.toString,o=i.propertyIsEnumerable;function a(e,i){return!!(i=null==i?t:i)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<i}var u=Array.isArray;function l(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}(e.length)&&!function(e){var t=c(e)?s.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){return l(e)?function(e,t){var n=u(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&l(e)}(e)&&r.call(e,"callee")&&(!o.call(e,"callee")||"[object Arguments]"==s.call(e))}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,c=!!i;for(var p in e)!t&&!r.call(e,p)||c&&("length"==p||a(p,i))||n.push(p);return n}(e,!0):function(e){if(!c(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}(e),n=[];for(var s in e)("constructor"!=s||!t&&r.call(e,s))&&n.push(s);return n}(e)}function h(e){return e}e.exports=function(e,t){return null==e?e:function(e,t,n){for(var i=-1,r=Object(e),s=n(e),o=s.length;o--;){var a=s[++i];if(!1===t(r[a],a,r))break}return e}(e,"function"==typeof t?t:h,p)}},4537:e=>{var t=Array.isArray;e.exports=t},6160:(e,t,n)=>{e=n.nmd(e);var i,r,s,o="[object Map]",a="[object Promise]",u="[object Set]",l="[object WeakMap]",c="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,f=h||d||Function("return this")(),m=t&&!t.nodeType&&t,g=m&&e&&!e.nodeType&&e,v=g&&g.exports===m,y=Function.prototype,x=Object.prototype,b=f["__core-js_shared__"],E=(i=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",w=y.toString,C=x.hasOwnProperty,S=x.toString,A=RegExp("^"+w.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=v?f.Buffer:void 0,_=x.propertyIsEnumerable,k=D?D.isBuffer:void 0,T=(r=Object.keys,s=Object,function(e){return r(s(e))}),F=z(f,"DataView"),I=z(f,"Map"),N=z(f,"Promise"),P=z(f,"Set"),O=z(f,"WeakMap"),R=!_.call({valueOf:1},"valueOf"),M=U(F),L=U(I),B=U(N),j=U(P),V=U(O);function z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||function(e){return!!E&&E in e}(e))return!1;var t=H(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?A:p;return t.test(U(e))}(n)?n:void 0}var q=function(e){return S.call(e)};function U(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(F&&q(new F(new ArrayBuffer(1)))!=c||I&&q(new I)!=o||N&&q(N.resolve())!=a||P&&q(new P)!=u||O&&q(new O)!=l)&&(q=function(e){var t=S.call(e),n="[object Object]"==t?e.constructor:void 0,i=n?U(n):void 0;if(i)switch(i){case M:return c;case L:return o;case B:return a;case j:return u;case V:return l}return t});var W=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!H(e)}var $=k||function(){return!1};function H(e){var t=G(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(K(e)&&(W(e)||"string"==typeof e||"function"==typeof e.splice||$(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}(e)&&C.call(e,"callee")&&(!_.call(e,"callee")||"[object Arguments]"==S.call(e))}(e)))return!e.length;var t=q(e);if(t==o||t==u)return!e.size;if(R||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}(e))return!T(e).length;for(var n in e)if(C.call(e,n))return!1;return!0}},3958:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",r=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",l="[object Error]",c="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",E=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[o]=C[x]=C[a]=C[b]=C[u]=C[l]=C[c]=C[p]=C[h]=C[d]=C[m]=C[g]=C[v]=C[y]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,D=S||A||Function("return this")(),_=t&&!t.nodeType&&t,k=_&&e&&!e.nodeType&&e,T=k&&k.exports===_,F=T&&S.process,I=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),N=I&&I.isTypedArray;function P(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function O(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var M,L,B,j=Array.prototype,V=Function.prototype,z=Object.prototype,q=D["__core-js_shared__"],U=V.toString,W=z.hasOwnProperty,K=(M=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",$=z.toString,H=RegExp("^"+U.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=T?D.Buffer:void 0,J=D.Symbol,X=D.Uint8Array,Z=z.propertyIsEnumerable,Y=j.splice,Q=J?J.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=G?G.isBuffer:void 0,ne=(L=Object.keys,B=Object,function(e){return L(B(e))}),ie=ke(D,"DataView"),re=ke(D,"Map"),se=ke(D,"Promise"),oe=ke(D,"Set"),ae=ke(D,"WeakMap"),ue=ke(Object,"create"),le=Ne(ie),ce=Ne(re),pe=Ne(se),he=Ne(oe),de=Ne(ae),fe=J?J.prototype:void 0,me=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ve(e);this.size=t.size}function Ee(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=W.call(e,Q),n=e[Q];try{e[Q]=void 0;var i=!0}catch(e){}var r=$.call(e);return i&&(t?e[Q]=n:delete e[Q]),r}(e):function(e){return $.call(e)}(e)}function Ce(e){return Ve(e)&&we(e)==s}function Se(e,t,n,i,r){return e===t||(null==e||null==t||!Ve(e)&&!Ve(t)?e!=e&&t!=t:function(e,t,n,i,r,c){var f=Re(e),y=Re(t),E=f?o:Fe(e),w=y?o:Fe(t),C=(E=E==s?d:E)==d,S=(w=w==s?d:w)==d,A=E==w;if(A&&Me(e)){if(!Me(t))return!1;f=!0,C=!1}if(A&&!C)return c||(c=new be),f||ze(e)?Ae(e,t,n,i,r,c):function(e,t,n,i,r,s,o){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case a:case u:case h:return Pe(+e,+t);case l:return e.name==t.name&&e.message==t.message;case m:case v:return e==t+"";case p:var c=O;case g:var d=1&i;if(c||(c=R),e.size!=t.size&&!d)return!1;var f=o.get(e);if(f)return f==t;i|=2,o.set(e,t);var y=Ae(c(e),c(t),i,r,s,o);return o.delete(e),y;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,E,n,i,r,c);if(!(1&n)){var D=C&&W.call(e,"__wrapped__"),_=S&&W.call(t,"__wrapped__");if(D||_){var k=D?e.value():e,T=_?t.value():t;return c||(c=new be),r(k,T,n,i,c)}}return!!A&&(c||(c=new be),function(e,t,n,i,r,s){var o=1&n,a=De(e),u=a.length;if(u!=De(t).length&&!o)return!1;for(var l=u;l--;){var c=a[l];if(!(o?c in t:W.call(t,c)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var h=!0;s.set(e,t),s.set(t,e);for(var d=o;++l<u;){var f=e[c=a[l]],m=t[c];if(i)var g=o?i(m,f,c,t,e,s):i(f,m,c,e,t,s);if(!(void 0===g?f===m||r(f,m,n,i,s):g)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,r,c))}(e,t,n,i,Se,r))}function Ae(e,t,n,i,r,s){var o=1&n,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var c=-1,p=!0,h=2&n?new xe:void 0;for(s.set(e,t),s.set(t,e);++c<a;){var d=e[c],f=t[c];if(i)var m=o?i(f,d,c,t,e,s):i(d,f,c,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!P(t,(function(e,t){if(o=t,!h.has(o)&&(d===e||r(d,e,n,i,s)))return h.push(t);var o}))){p=!1;break}}else if(d!==f&&!r(d,f,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function De(e){return function(e,t,n){var i=t(e);return Re(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,qe,Te)}function _e(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!je(e)||function(e){return!!K&&K in e}(e))&&(Le(e)?H:E).test(Ne(e))}(n)?n:void 0}ge.prototype.clear=function(){this.__data__=ue?ue(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(ue){var n=t[e];return n===i?void 0:n}return W.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return ue?void 0!==t[e]:W.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ue&&void 0===t?i:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=Ee(t,e);return!(n<0||(n==t.length-1?t.pop():Y.call(t,n,1),--this.size,0))},ve.prototype.get=function(e){var t=this.__data__,n=Ee(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return Ee(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,i=Ee(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(re||ve),string:new ge}},ye.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return _e(this,e).get(e)},ye.prototype.has=function(e){return _e(this,e).has(e)},ye.prototype.set=function(e,t){var n=_e(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,i),this},xe.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ve,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var i=n.__data__;if(!re||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var i=-1,r=null==t?0:t.length,s=0,o=[];++i<r;){var a=t[i];u=a,Z.call(e,u)&&(o[s++]=a)}var u;return o}(ee(e)))}:function(){return[]},Fe=we;function Ie(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Ne(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pe(e,t){return e===t||e!=e&&t!=t}(ie&&Fe(new ie(new ArrayBuffer(1)))!=b||re&&Fe(new re)!=p||se&&Fe(se.resolve())!=f||oe&&Fe(new oe)!=g||ae&&Fe(new ae)!=y)&&(Fe=function(e){var t=we(e),n=t==d?e.constructor:void 0,i=n?Ne(n):"";if(i)switch(i){case le:return b;case ce:return p;case pe:return f;case he:return g;case de:return y}return t});var Oe=Ce(function(){return arguments}())?Ce:function(e){return Ve(e)&&W.call(e,"callee")&&!Z.call(e,"callee")},Re=Array.isArray,Me=te||function(){return!1};function Le(e){if(!je(e))return!1;var t=we(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var ze=N?function(e){return function(t){return e(t)}}(N):function(e){return Ve(e)&&Be(e.length)&&!!C[we(e)]};function qe(e){return function(e){return null!=e&&Be(e.length)&&!Le(e)}(e)?function(e,t){var n=Re(e),i=!n&&Oe(e),r=!n&&!i&&Me(e),s=!n&&!i&&!r&&ze(e),o=n||i||r||s,a=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],u=a.length;for(var l in e)!t&&!W.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ie(l,u))||a.push(l);return a}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||z)}(e))return ne(e);var t=[];for(var n in Object(e))W.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e,t){return Se(e,t)}},4772:e=>{var t,n,i=Function.prototype,r=Object.prototype,s=i.toString,o=r.hasOwnProperty,a=s.call(Object),u=r.toString,l=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=u.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var n=o.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==a}},6496:e=>{var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},6635:function(e,t,n){var i;e=n.nmd(e),function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,p=9007199254740991,h=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",x="[object Error]",b="[object Function]",E="[object GeneratorFunction]",w="[object Map]",C="[object Number]",S="[object Object]",A="[object Promise]",D="[object RegExp]",_="[object Set]",k="[object String]",T="[object Symbol]",F="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",V="[object Uint16Array]",z="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,H=RegExp(K.source),G=RegExp($.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,be=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+Se+"]",De="["+Ee+"]",_e="\\d+",ke="["+we+"]",Te="[^\\ud800-\\udfff"+Se+_e+"\\u2700-\\u27bf"+we+Ce+"]",Fe="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+Ce+"]",Re="(?:"+ke+"|"+Te+")",Me="(?:"+Oe+"|"+Te+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",je="(?:"+De+"|"+Fe+")?",Ve="[\\ufe0e\\ufe0f]?",ze=Ve+je+"(?:\\u200d(?:"+[Ie,Ne,Pe].join("|")+")"+Ve+je+")*",qe="(?:"+["[\\u2700-\\u27bf]",Ne,Pe].join("|")+")"+ze,Ue="(?:"+[Ie+De+"?",De,Ne,Pe,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(De,"g"),$e=RegExp(Fe+"(?="+Fe+")|"+Ue+ze,"g"),He=RegExp([Oe+"?"+ke+"+"+Le+"(?="+[Ae,Oe,"$"].join("|")+")",Me+"+"+Be+"(?="+[Ae,Oe+Re,"$"].join("|")+")",Oe+"?"+Re+"+"+Le,Oe+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_e,qe].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ze=-1,Ye={};Ye[P]=Ye[O]=Ye[R]=Ye[M]=Ye[L]=Ye[B]=Ye[j]=Ye[V]=Ye[z]=!0,Ye[m]=Ye[g]=Ye[I]=Ye[v]=Ye[N]=Ye[y]=Ye[x]=Ye[b]=Ye[w]=Ye[C]=Ye[S]=Ye[D]=Ye[_]=Ye[k]=Ye[F]=!1;var Qe={};Qe[m]=Qe[g]=Qe[I]=Qe[N]=Qe[v]=Qe[y]=Qe[P]=Qe[O]=Qe[R]=Qe[M]=Qe[L]=Qe[w]=Qe[C]=Qe[S]=Qe[D]=Qe[_]=Qe[k]=Qe[T]=Qe[B]=Qe[j]=Qe[V]=Qe[z]=!0,Qe[x]=Qe[b]=Qe[F]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,st=it||rt||Function("return this")(),ot=t&&!t.nodeType&&t,at=ot&&e&&!e.nodeType&&e,ut=at&&at.exports===ot,lt=ut&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),pt=ct&&ct.isArrayBuffer,ht=ct&&ct.isDate,dt=ct&&ct.isMap,ft=ct&&ct.isRegExp,mt=ct&&ct.isSet,gt=ct&&ct.isTypedArray;function vt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r<s;){var o=e[r];t(i,o,n(o),e)}return i}function xt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function wt(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}function Ct(e,t){return!(null==e||!e.length)&&Pt(e,t,0)>-1}function St(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function At(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Dt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function _t(e,t,n,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function kt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Tt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Ft=Lt("length");function It(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Nt(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function Pt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Nt(e,Rt,n)}function Ot(e,t,n,i){for(var r=n-1,s=e.length;++r<s;)if(i(e[r],t))return r;return-1}function Rt(e){return e!=e}function Mt(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:h}function Lt(e){return function(t){return null==t?r:t[e]}}function Bt(e){return function(t){return null==e?r:e[t]}}function jt(e,t,n,i,r){return r(e,(function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)})),n}function Vt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function zt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function qt(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ut(e){return function(t){return e(t)}}function Wt(e,t){return At(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function $t(e,t){for(var n=-1,i=e.length;++n<i&&Pt(t,e[n],0)>-1;);return n}function Ht(e,t){for(var n=e.length;n--&&Pt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Jt=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xt=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Zt(e){return"\\"+et[e]}function Yt(e){return Ge.test(e)}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[r++]=n)}return s}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function sn(e){return Yt(e)?function(e){for(var t=$e.lastIndex=0;$e.test(e);)++t;return t}(e):Ft(e)}function on(e){return Yt(e)?function(e){return e.match($e)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var un=Bt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,i=(t=null==t?st:ln.defaults(st.Object(),t,ln.pick(st,Xe))).Array,re=t.Date,Ee=t.Error,we=t.Function,Ce=t.Math,Se=t.Object,Ae=t.RegExp,De=t.String,_e=t.TypeError,ke=i.prototype,Te=we.prototype,Fe=Se.prototype,Ie=t["__core-js_shared__"],Ne=Te.toString,Pe=Fe.hasOwnProperty,Oe=0,Re=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Me=Fe.toString,Le=Ne.call(Se),Be=st._,je=Ae("^"+Ne.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=ut?t.Buffer:r,ze=t.Symbol,qe=t.Uint8Array,Ue=Ve?Ve.allocUnsafe:r,$e=en(Se.getPrototypeOf,Se),Ge=Se.create,et=Fe.propertyIsEnumerable,it=ke.splice,rt=ze?ze.isConcatSpreadable:r,ot=ze?ze.iterator:r,at=ze?ze.toStringTag:r,lt=function(){try{var e=ls(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==st.clearTimeout&&t.clearTimeout,Ft=re&&re.now!==st.Date.now&&re.now,Bt=t.setTimeout!==st.setTimeout&&t.setTimeout,cn=Ce.ceil,pn=Ce.floor,hn=Se.getOwnPropertySymbols,dn=Ve?Ve.isBuffer:r,fn=t.isFinite,mn=ke.join,gn=en(Se.keys,Se),vn=Ce.max,yn=Ce.min,xn=re.now,bn=t.parseInt,En=Ce.random,wn=ke.reverse,Cn=ls(t,"DataView"),Sn=ls(t,"Map"),An=ls(t,"Promise"),Dn=ls(t,"Set"),_n=ls(t,"WeakMap"),kn=ls(Se,"create"),Tn=_n&&new _n,Fn={},In=Bs(Cn),Nn=Bs(Sn),Pn=Bs(An),On=Bs(Dn),Rn=Bs(_n),Mn=ze?ze.prototype:r,Ln=Mn?Mn.valueOf:r,Bn=Mn?Mn.toString:r;function jn(e){if(na(e)&&!Ko(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return js(e)}return new qn(e)}var Vn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Jn(e,t){var n=Ko(e),i=!n&&Wo(e),r=!n&&!i&&Jo(e),s=!n&&!i&&!r&&ca(e),o=n||i||r||s,a=o?zt(e.length,De):[],u=a.length;for(var l in e)!t&&!Pe.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||gs(l,u))||a.push(l);return a}function Xn(e){var t=e.length;return t?e[$i(0,t-1)]:r}function Zn(e,t){return Ps(_r(e),oi(t,0,e.length))}function Yn(e){return Ps(_r(e))}function Qn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Pe.call(e,t)&&zo(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if(zo(e[n][0],t))return n;return-1}function ni(e,t,n,i){return pi(e,(function(e,r,s){t(i,e,n(e),s)})),i}function ii(e,t){return e&&kr(t,Na(t),e)}function ri(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function si(e,t){for(var n=-1,s=t.length,o=i(s),a=null==e;++n<s;)o[n]=a?r:_a(e,t[n]);return o}function oi(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,s,o){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!ta(e))return e;var p=Ko(e);if(p){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return _r(e,a)}else{var h=hs(e),d=h==b||h==E;if(Jo(e))return Er(e,u);if(h==S||h==m||d&&!s){if(a=l||d?{}:fs(e),!u)return l?function(e,t){return kr(e,ps(e),t)}(e,function(e,t){return e&&kr(t,Pa(t),e)}(a,e)):function(e,t){return kr(e,cs(e),t)}(e,ii(a,e))}else{if(!Qe[h])return s?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case I:return wr(e);case v:case y:return new r(+e);case N:return function(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case O:case R:case M:case L:case B:case j:case V:case z:return Cr(e,n);case w:return new r;case C:case k:return new r(e);case D:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new r;case T:return i=e,Ln?Se(Ln.call(i)):{}}}(e,h,u)}}o||(o=new Gn);var f=o.get(e);if(f)return f;o.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,o))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,o))}));var g=p?r:(c?l?ns:ts:l?Pa:Na)(e);return xt(g||e,(function(i,r){g&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,o))})),a}function ui(e,t,n){var i=n.length;if(null==e)return!i;for(e=Se(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new _e(s);return Ts((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,s=Ct,o=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=At(t,Ut(n))),i?(s=St,o=!1):t.length>=200&&(s=Kt,o=!1,t=new Hn(t));e:for(;++r<a;){var c=e[r],p=null==n?c:n(c);if(c=i||0!==c?c:0,o&&p==p){for(var h=l;h--;)if(t[h]===p)continue e;u.push(c)}else s(t,p,i)||u.push(c)}return u}jn.templateSettings={escape:J,evaluate:X,interpolate:Z,variable:"",imports:{_:jn}},jn.prototype=zn.prototype,jn.prototype.constructor=jn,qn.prototype=Vn(zn.prototype),qn.prototype.constructor=qn,Un.prototype=Vn(zn.prototype),Un.prototype.constructor=Un,Wn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===o?r:n}return Pe.call(t,e)?t[e]:r},Wn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==r:Pe.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===r?o:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},Kn.prototype.has=function(e){return ti(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Kn),string:new Wn}},$n.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return as(this,e).get(e)},$n.prototype.has=function(e){return as(this,e).has(e)},$n.prototype.set=function(e,t){var n=as(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,o),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var i=n.__data__;if(!Sn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(i)}return n.set(e,t),this.size=n.size,this};var pi=Ir(xi),hi=Ir(bi,!0);function di(e,t){var n=!0;return pi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function fi(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(u===r?a==a&&!la(a):n(a,u)))var u=a,l=o}return l}function mi(e,t){var n=[];return pi(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function gi(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=ms),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?gi(a,t-1,n,i,r):Dt(r,a):i||(r[r.length]=a)}return r}var vi=Nr(),yi=Nr(!0);function xi(e,t){return e&&vi(e,t,Na)}function bi(e,t){return e&&yi(e,t,Na)}function Ei(e,t){return wt(t,(function(t){return Yo(e[t])}))}function wi(e,t){for(var n=0,i=(t=vr(t,e)).length;null!=e&&n<i;)e=e[Ls(t[n++])];return n&&n==i?e:r}function Ci(e,t,n){var i=t(e);return Ko(e)?i:Dt(i,n(e))}function Si(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Se(e)?function(e){var t=Pe.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var s=Me.call(e);return i&&(t?e[at]=n:delete e[at]),s}(e):function(e){return Me.call(e)}(e)}function Ai(e,t){return e>t}function Di(e,t){return null!=e&&Pe.call(e,t)}function _i(e,t){return null!=e&&t in Se(e)}function ki(e,t,n){for(var s=n?St:Ct,o=e[0].length,a=e.length,u=a,l=i(a),c=1/0,p=[];u--;){var h=e[u];u&&t&&(h=At(h,Ut(t))),c=yn(h.length,c),l[u]=!n&&(t||o>=120&&h.length>=120)?new Hn(u&&h):r}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&p.length<c;){var m=h[d],g=t?t(m):m;if(m=n||0!==m?m:0,!(f?Kt(f,g):s(p,g,n))){for(u=a;--u;){var v=l[u];if(!(v?Kt(v,g):s(e[u],g,n)))continue e}f&&f.push(g),p.push(m)}}return p}function Ti(e,t,n){var i=null==(e=As(e,t=vr(t,e)))?e:e[Ls(Xs(t))];return null==i?r:vt(i,e,n)}function Fi(e){return na(e)&&Si(e)==m}function Ii(e,t,n,i,s){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Ko(e),u=Ko(t),l=a?g:hs(e),c=u?g:hs(t),p=(l=l==m?S:l)==S,h=(c=c==m?S:c)==S,d=l==c;if(d&&Jo(e)){if(!Jo(t))return!1;a=!0,p=!1}if(d&&!p)return o||(o=new Gn),a||ca(e)?Qr(e,t,n,i,s,o):function(e,t,n,i,r,s,o){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!s(new qe(e),new qe(t)));case v:case y:case C:return zo(+e,+t);case x:return e.name==t.name&&e.message==t.message;case D:case k:return e==t+"";case w:var a=Qt;case _:var u=1&i;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;i|=2,o.set(e,t);var c=Qr(a(e),a(t),i,r,s,o);return o.delete(e),c;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,l,n,i,s,o);if(!(1&n)){var f=p&&Pe.call(e,"__wrapped__"),b=h&&Pe.call(t,"__wrapped__");if(f||b){var E=f?e.value():e,A=b?t.value():t;return o||(o=new Gn),s(E,A,n,i,o)}}return!!d&&(o||(o=new Gn),function(e,t,n,i,s,o){var a=1&n,u=ts(e),l=u.length;if(l!=ts(t).length&&!a)return!1;for(var c=l;c--;){var p=u[c];if(!(a?p in t:Pe.call(t,p)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<l;){var g=e[p=u[c]],v=t[p];if(i)var y=a?i(v,g,p,t,e,o):i(g,v,p,e,t,o);if(!(y===r?g===v||s(g,v,n,i,o):y)){f=!1;break}m||(m="constructor"==p)}if(f&&!m){var x=e.constructor,b=t.constructor;x==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,i,s,o))}(e,t,n,i,Ii,s))}function Ni(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Se(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var l=(u=n[s])[0],c=e[l],p=u[1];if(a&&u[2]){if(c===r&&!(l in e))return!1}else{var h=new Gn;if(i)var d=i(c,p,l,e,t,h);if(!(d===r?Ii(p,c,3,i,h):d))return!1}}return!0}function Pi(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Yo(e)?je:me).test(Bs(e));var t}function Oi(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ko(e)?ji(e[0],e[1]):Bi(e):du(e)}function Ri(e){if(!Es(e))return gn(e);var t=[];for(var n in Se(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Mi(e,t){return e<t}function Li(e,t){var n=-1,r=Ho(e)?i(e.length):[];return pi(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Bi(e){var t=us(e);return 1==t.length&&t[0][2]?Cs(t[0][0],t[0][1]):function(n){return n===e||Ni(n,e,t)}}function ji(e,t){return ys(e)&&ws(t)?Cs(Ls(e),t):function(n){var i=_a(n,e);return i===r&&i===t?ka(n,e):Ii(t,i,3)}}function Vi(e,t,n,i,s){e!==t&&vi(t,(function(o,a){if(s||(s=new Gn),ta(o))!function(e,t,n,i,s,o,a){var u=_s(e,n),l=_s(t,n),c=a.get(l);if(c)Qn(e,n,c);else{var p=o?o(u,l,n+"",e,t,a):r,h=p===r;if(h){var d=Ko(l),f=!d&&Jo(l),m=!d&&!f&&ca(l);p=l,d||f||m?Ko(u)?p=u:Go(u)?p=_r(u):f?(h=!1,p=Er(l,!0)):m?(h=!1,p=Cr(l,!0)):p=[]:sa(l)||Wo(l)?(p=u,Wo(u)?p=ya(u):ta(u)&&!Yo(u)||(p=fs(l))):h=!1}h&&(a.set(l,p),s(p,l,i,o,a),a.delete(l)),Qn(e,n,p)}}(e,t,a,n,Vi,i,s);else{var u=i?i(_s(e,a),o,a+"",e,t,s):r;u===r&&(u=o),Qn(e,a,u)}}),Pa)}function zi(e,t){var n=e.length;if(n)return gs(t+=t<0?n:0,n)?e[t]:r}function qi(e,t,n){t=t.length?At(t,(function(e){return Ko(e)?function(t){return wi(t,1===e.length?e[0]:e)}:e})):[ru];var i=-1;t=At(t,Ut(os()));var r=Li(e,(function(e,n,r){var s=At(t,(function(t){return t(e)}));return{criteria:s,index:++i,value:e}}));return function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var u=Sr(r[i],s[i]);if(u)return i>=a?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function Ui(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=wi(e,o);n(a,o)&&Zi(s,vr(o,e),a)}return s}function Wi(e,t,n,i){var r=i?Ot:Pt,s=-1,o=t.length,a=e;for(e===t&&(t=_r(t)),n&&(a=At(e,Ut(n)));++s<o;)for(var u=0,l=t[s],c=n?n(l):l;(u=r(a,c,u,i))>-1;)a!==e&&it.call(a,u,1),it.call(e,u,1);return e}function Ki(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;gs(r)?it.call(e,r,1):lr(e,r)}}return e}function $i(e,t){return e+pn(En()*(t-e+1))}function Hi(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pn(t/2))&&(e+=e)}while(t);return n}function Gi(e,t){return Fs(Ss(e,t,ru),e+"")}function Ji(e){return Xn(za(e))}function Xi(e,t){var n=za(e);return Ps(n,oi(t,0,n.length))}function Zi(e,t,n,i){if(!ta(e))return e;for(var s=-1,o=(t=vr(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var l=Ls(t[s]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var p=u[l];(c=i?i(p,l,u):r)===r&&(c=ta(p)?p:gs(t[s+1])?[]:{})}ei(u,l,c),u=u[l]}return e}var Yi=Tn?function(e,t){return Tn.set(e,t),e}:ru,Qi=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ru;function er(e){return Ps(za(e))}function tr(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r<s;)o[r]=e[r+t];return o}function nr(e,t){var n;return pi(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=e[s];null!==o&&!la(o)&&(n?o<=t:o<t)?i=s+1:r=s}return r}return rr(e,t,ru,n)}function rr(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===r;s<o;){var p=pn((s+o)/2),h=n(e[p]),d=h!==r,f=null===h,m=h==h,g=la(h);if(a)var v=i||m;else v=c?m&&(i||d):u?m&&d&&(i||!f):l?m&&d&&!f&&(i||!g):!f&&!g&&(i?h<=t:h<t);v?s=p+1:o=p}return yn(o,4294967294)}function sr(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n],a=t?t(o):o;if(!n||!zo(a,u)){var u=a;s[r++]=0===o?0:o}}return s}function or(e){return"number"==typeof e?e:la(e)?h:+e}function ar(e){if("string"==typeof e)return e;if(Ko(e))return At(e,ar)+"";if(la(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=Ct,s=e.length,o=!0,a=[],u=a;if(n)o=!1,r=St;else if(s>=200){var l=t?null:Hr(e);if(l)return nn(l);o=!1,r=Kt,u=new Hn}else u=t?[]:a;e:for(;++i<s;){var c=e[i],p=t?t(c):c;if(c=n||0!==c?c:0,o&&p==p){for(var h=u.length;h--;)if(u[h]===p)continue e;t&&u.push(p),a.push(c)}else r(u,p,n)||(u!==a&&u.push(p),a.push(c))}return a}function lr(e,t){return null==(e=As(e,t=vr(t,e)))||delete e[Ls(Xs(t))]}function cr(e,t,n,i){return Zi(e,t,n(wi(e,t)),i)}function pr(e,t,n,i){for(var r=e.length,s=i?r:-1;(i?s--:++s<r)&&t(e[s],s,e););return n?tr(e,i?0:s,i?s+1:r):tr(e,i?s+1:0,i?r:s)}function hr(e,t){var n=e;return n instanceof Un&&(n=n.value()),_t(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function dr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=e[s],u=-1;++u<r;)u!=s&&(o[s]=ci(o[s]||a,e[u],t,n));return ur(gi(o,1),t,n)}function fr(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var u=i<o?t[i]:r;n(a,e[i],u)}return a}function mr(e){return Go(e)?e:[]}function gr(e){return"function"==typeof e?e:ru}function vr(e,t){return Ko(e)?e:ys(e,t)?[e]:Ms(xa(e))}var yr=Gi;function xr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var br=ct||function(e){return st.clearTimeout(e)};function Er(e,t){if(t)return e.slice();var n=e.length,i=Ue?Ue(n):new e.constructor(n);return e.copy(i),i}function wr(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Cr(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Sr(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=la(e),a=t!==r,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!o&&e>t||o&&a&&l&&!u&&!c||i&&a&&l||!n&&l||!s)return 1;if(!i&&!o&&!c&&e<t||c&&n&&s&&!i&&!o||u&&n&&s||!a&&s||!l)return-1}return 0}function Ar(e,t,n,r){for(var s=-1,o=e.length,a=n.length,u=-1,l=t.length,c=vn(o-a,0),p=i(l+c),h=!r;++u<l;)p[u]=t[u];for(;++s<a;)(h||s<o)&&(p[n[s]]=e[s]);for(;c--;)p[u++]=e[s++];return p}function Dr(e,t,n,r){for(var s=-1,o=e.length,a=-1,u=n.length,l=-1,c=t.length,p=vn(o-u,0),h=i(p+c),d=!r;++s<p;)h[s]=e[s];for(var f=s;++l<c;)h[f+l]=t[l];for(;++a<u;)(d||s<o)&&(h[f+n[a]]=e[s++]);return h}function _r(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function kr(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],l=i?i(n[u],e[u],u,n,e):r;l===r&&(l=e[u]),s?ri(n,u,l):ei(n,u,l)}return n}function Tr(e,t){return function(n,i){var r=Ko(n)?yt:ni,s=t?t():{};return r(n,e,os(i,2),s)}}function Fr(e){return Gi((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&vs(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Se(t);++i<s;){var u=n[i];u&&e(t,u,i,o)}return t}))}function Ir(e,t){return function(n,i){if(null==n)return n;if(!Ho(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=Se(n);(t?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Nr(e){return function(t,n,i){for(var r=-1,s=Se(t),o=i(t),a=o.length;a--;){var u=o[e?a:++r];if(!1===n(s[u],u,s))break}return t}}function Pr(e){return function(t){var n=Yt(t=xa(t))?on(t):r,i=n?n[0]:t.charAt(0),s=n?xr(n,1).join(""):t.slice(1);return i[e]()+s}}function Or(e){return function(t){return _t(Ya(Wa(t).replace(We,"")),e,"")}}function Rr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Vn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Mr(e){return function(t,n,i){var s=Se(t);if(!Ho(t)){var o=os(n,3);t=Na(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function Lr(e){return es((function(t){var n=t.length,i=n,o=qn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new _e(s);if(o&&!u&&"wrapper"==rs(a))var u=new qn([],!0)}for(i=u?i:n;++i<n;){var l=rs(a=t[i]),c="wrapper"==l?is(a):r;u=c&&xs(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[rs(c[0])].apply(u,c[3]):1==a.length&&xs(a)?u[l]():u.thru(a)}return function(){var e=arguments,i=e[0];if(u&&1==e.length&&Ko(i))return u.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Br(e,t,n,s,o,a,u,c,p,h){var d=t&l,f=1&t,m=2&t,g=24&t,v=512&t,y=m?r:Rr(e);return function r(){for(var l=arguments.length,x=i(l),b=l;b--;)x[b]=arguments[b];if(g)var E=ss(r),w=Gt(x,E);if(s&&(x=Ar(x,s,o,g)),a&&(x=Dr(x,a,u,g)),l-=w,g&&l<h){var C=tn(x,E);return Kr(e,t,Br,r.placeholder,n,x,C,c,p,h-l)}var S=f?n:this,A=m?S[e]:e;return l=x.length,c?x=Ds(x,c):v&&l>1&&x.reverse(),d&&p<l&&(x.length=p),this&&this!==st&&this instanceof r&&(A=y||Rr(A)),A.apply(S,x)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return xi(e,(function(e,r,s){t(i,n(e),r,s)})),i}(n,e,t(i),{})}}function Vr(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=or(n),i=or(i)),s=e(n,i)}return s}}function zr(e){return es((function(t){return t=At(t,Ut(os())),Gi((function(n){var i=this;return e(t,(function(e){return vt(e,i,n)}))}))}))}function qr(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?Hi(t,e):t;var i=Hi(t,cn(e/sn(t)));return Yt(t)?xr(on(i),0,e).join(""):i.slice(0,e)}function Ur(e){return function(t,n,s){return s&&"number"!=typeof s&&vs(t,n,s)&&(n=s=r),t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n,r){for(var s=-1,o=vn(cn((t-e)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=e,e+=n;return a}(t,n,s=s===r?t<n?1:-1:fa(s),e)}}function Wr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Kr(e,t,n,i,s,o,a,l,c,p){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,s,h?o:r,h?a:r,h?r:o,h?r:a,l,c,p],f=n.apply(r,d);return xs(e)&&ks(f,d),f.placeholder=i,Is(f,e,t)}function $r(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:yn(ma(n),292))&&fn(e)){var i=(xa(e)+"e").split("e");return+((i=(xa(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Hr=Dn&&1/nn(new Dn([,-0]))[1]==c?function(e){return new Dn(e)}:lu;function Gr(e){return function(t){var n=hs(t);return n==w?Qt(t):n==_?rn(t):function(e,t){return At(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jr(e,t,n,o,c,p,h,d){var f=2&t;if(!f&&"function"!=typeof e)throw new _e(s);var m=o?o.length:0;if(m||(t&=-97,o=c=r),h=h===r?h:vn(ma(h),0),d=d===r?d:ma(d),m-=c?c.length:0,64&t){var g=o,v=c;o=c=r}var y=f?r:is(e),x=[e,t,n,o,c,g,v,p,h,d];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,s=r<131,o=i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ar(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Dr(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),i&l&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(x,y),e=x[0],t=x[1],n=x[2],o=x[3],c=x[4],!(d=x[9]=x[9]===r?f?0:e.length:vn(x[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var s=Rr(e);return function o(){for(var a=arguments.length,u=i(a),l=a,c=ss(o);l--;)u[l]=arguments[l];var p=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=p.length)<n?Kr(e,t,Br,o.placeholder,r,u,p,r,r,n-a):vt(this&&this!==st&&this instanceof o?s:e,this,u)}}(e,t,d):t!=u&&33!=t||c.length?Br.apply(r,x):function(e,t,n,r){var s=1&t,o=Rr(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=r.length,p=i(c+u),h=this&&this!==st&&this instanceof t?o:e;++l<c;)p[l]=r[l];for(;u--;)p[l++]=arguments[++a];return vt(h,s?n:this,p)}}(e,t,n,o);else var b=function(e,t,n){var i=1&t,r=Rr(e);return function t(){return(this&&this!==st&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Is((y?Yi:ks)(b,x),e,t)}function Xr(e,t,n,i){return e===r||zo(e,Fe[n])&&!Pe.call(i,n)?t:e}function Zr(e,t,n,i,s,o){return ta(e)&&ta(t)&&(o.set(t,e),Vi(e,t,r,Zr,o),o.delete(t)),e}function Yr(e){return sa(e)?r:e}function Qr(e,t,n,i,s,o){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=o.get(e),p=o.get(t);if(c&&p)return c==t&&p==e;var h=-1,d=!0,f=2&n?new Hn:r;for(o.set(e,t),o.set(t,e);++h<u;){var m=e[h],g=t[h];if(i)var v=a?i(g,m,h,t,e,o):i(m,g,h,e,t,o);if(v!==r){if(v)continue;d=!1;break}if(f){if(!Tt(t,(function(e,t){if(!Kt(f,t)&&(m===e||s(m,e,n,i,o)))return f.push(t)}))){d=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function es(e){return Fs(Ss(e,r,Ks),e+"")}function ts(e){return Ci(e,Na,cs)}function ns(e){return Ci(e,Pa,ps)}var is=Tn?function(e){return Tn.get(e)}:lu;function rs(e){for(var t=e.name+"",n=Fn[t],i=Pe.call(Fn,t)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==e)return r.name}return t}function ss(e){return(Pe.call(jn,"placeholder")?jn:e).placeholder}function os(){var e=jn.iteratee||su;return e=e===su?Oi:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function us(e){for(var t=Na(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ws(r)]}return t}function ls(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Pi(n)?n:r}var cs=hn?function(e){return null==e?[]:(e=Se(e),wt(hn(e),(function(t){return et.call(e,t)})))}:gu,ps=hn?function(e){for(var t=[];e;)Dt(t,cs(e)),e=$e(e);return t}:gu,hs=Si;function ds(e,t,n){for(var i=-1,r=(t=vr(t,e)).length,s=!1;++i<r;){var o=Ls(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&ea(r)&&gs(o,r)&&(Ko(e)||Wo(e))}function fs(e){return"function"!=typeof e.constructor||Es(e)?{}:Vn($e(e))}function ms(e){return Ko(e)||Wo(e)||!!(rt&&e&&e[rt])}function gs(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Ho(n)&&gs(t,n.length):"string"==i&&t in n)&&zo(n[t],e)}function ys(e,t){if(Ko(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||Q.test(e)||!Y.test(e)||null!=t&&e in Se(t)}function xs(e){var t=rs(e),n=jn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=is(n);return!!i&&e===i[0]}(Cn&&hs(new Cn(new ArrayBuffer(1)))!=N||Sn&&hs(new Sn)!=w||An&&hs(An.resolve())!=A||Dn&&hs(new Dn)!=_||_n&&hs(new _n)!=F)&&(hs=function(e){var t=Si(e),n=t==S?e.constructor:r,i=n?Bs(n):"";if(i)switch(i){case In:return N;case Nn:return w;case Pn:return A;case On:return _;case Rn:return F}return t});var bs=Ie?Yo:vu;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function ws(e){return e==e&&!ta(e)}function Cs(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Se(n))}}function Ss(e,t,n){return t=vn(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=vn(r.length-t,0),a=i(o);++s<o;)a[s]=r[t+s];s=-1;for(var u=i(t+1);++s<t;)u[s]=r[s];return u[t]=n(a),vt(e,this,u)}}function As(e,t){return t.length<2?e:wi(e,tr(t,0,-1))}function Ds(e,t){for(var n=e.length,i=yn(t.length,n),s=_r(e);i--;){var o=t[i];e[i]=gs(o,n)?s[o]:r}return e}function _s(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ks=Ns(Yi),Ts=Bt||function(e,t){return st.setTimeout(e,t)},Fs=Ns(Qi);function Is(e,t,n){var i=t+"";return Fs(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return xt(f,(function(n){var i="_."+n[0];t&n[1]&&!Ct(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(i),n)))}function Ns(e){var t=0,n=0;return function(){var i=xn(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ps(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=$i(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Os,Rs,Ms=(Os=Ro((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Rs.size&&Rs.clear(),e})),Rs=Os.cache,Os);function Ls(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bs(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function js(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=_r(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vs=Gi((function(e,t){return Go(e)?ci(e,gi(t,1,Go,!0)):[]})),zs=Gi((function(e,t){var n=Xs(t);return Go(n)&&(n=r),Go(e)?ci(e,gi(t,1,Go,!0),os(n,2)):[]})),qs=Gi((function(e,t){var n=Xs(t);return Go(n)&&(n=r),Go(e)?ci(e,gi(t,1,Go,!0),r,n):[]}));function Us(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Nt(e,os(t,3),r)}function Ws(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=ma(n),s=n<0?vn(i+s,0):yn(s,i-1)),Nt(e,os(t,3),s,!0)}function Ks(e){return null!=e&&e.length?gi(e,1):[]}function $s(e){return e&&e.length?e[0]:r}var Hs=Gi((function(e){var t=At(e,mr);return t.length&&t[0]===e[0]?ki(t):[]})),Gs=Gi((function(e){var t=Xs(e),n=At(e,mr);return t===Xs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?ki(n,os(t,2)):[]})),Js=Gi((function(e){var t=Xs(e),n=At(e,mr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?ki(n,r,t):[]}));function Xs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Zs=Gi(Ys);function Ys(e,t){return e&&e.length&&t&&t.length?Wi(e,t):e}var Qs=es((function(e,t){var n=null==e?0:e.length,i=si(e,t);return Ki(e,At(t,(function(e){return gs(e,n)?+e:e})).sort(Sr)),i}));function eo(e){return null==e?e:wn.call(e)}var to=Gi((function(e){return ur(gi(e,1,Go,!0))})),no=Gi((function(e){var t=Xs(e);return Go(t)&&(t=r),ur(gi(e,1,Go,!0),os(t,2))})),io=Gi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,ur(gi(e,1,Go,!0),r,t)}));function ro(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Go(e))return t=vn(e.length,t),!0})),zt(t,(function(t){return At(e,Lt(t))}))}function so(e,t){if(!e||!e.length)return[];var n=ro(e);return null==t?n:At(n,(function(e){return vt(t,r,e)}))}var oo=Gi((function(e,t){return Go(e)?ci(e,t):[]})),ao=Gi((function(e){return dr(wt(e,Go))})),uo=Gi((function(e){var t=Xs(e);return Go(t)&&(t=r),dr(wt(e,Go),os(t,2))})),lo=Gi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,dr(wt(e,Go),r,t)})),co=Gi(ro),po=Gi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,so(e,n)}));function ho(e){var t=jn(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var mo=es((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return si(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&gs(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:fo,args:[s],thisArg:r}),new qn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),go=Tr((function(e,t,n){Pe.call(e,n)?++e[n]:ri(e,n,1)})),vo=Mr(Us),yo=Mr(Ws);function xo(e,t){return(Ko(e)?xt:pi)(e,os(t,3))}function bo(e,t){return(Ko(e)?bt:hi)(e,os(t,3))}var Eo=Tr((function(e,t,n){Pe.call(e,n)?e[n].push(t):ri(e,n,[t])})),wo=Gi((function(e,t,n){var r=-1,s="function"==typeof t,o=Ho(e)?i(e.length):[];return pi(e,(function(e){o[++r]=s?vt(t,e,n):Ti(e,t,n)})),o})),Co=Tr((function(e,t,n){ri(e,n,t)}));function So(e,t){return(Ko(e)?At:Li)(e,os(t,3))}var Ao=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Do=Gi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vs(e,t[0],t[1])?t=[]:n>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),qi(e,gi(t,1),[])})),_o=Ft||function(){return st.Date.now()};function ko(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Jr(e,l,r,r,r,r,t)}function To(e,t){var n;if("function"!=typeof t)throw new _e(s);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Fo=Gi((function(e,t,n){var i=1;if(n.length){var r=tn(n,ss(Fo));i|=u}return Jr(e,i,t,n,r)})),Io=Gi((function(e,t,n){var i=3;if(n.length){var r=tn(n,ss(Io));i|=u}return Jr(t,i,e,n,r)}));function No(e,t,n){var i,o,a,u,l,c,p=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new _e(s);function m(t){var n=i,s=o;return i=o=r,p=t,u=e.apply(s,n)}function g(e){return p=e,l=Ts(y,t),h?m(e):u}function v(e){var n=e-c;return c===r||n>=t||n<0||d&&e-p>=a}function y(){var e=_o();if(v(e))return x(e);l=Ts(y,function(e){var n=t-(e-c);return d?yn(n,a-(e-p)):n}(e))}function x(e){return l=r,f&&i?m(e):(i=o=r,u)}function b(){var e=_o(),n=v(e);if(i=arguments,o=this,c=e,n){if(l===r)return g(c);if(d)return br(l),l=Ts(y,t),m(c)}return l===r&&(l=Ts(y,t)),u}return t=va(t)||0,ta(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(va(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){l!==r&&br(l),p=0,i=c=o=l=r},b.flush=function(){return l===r?u:x(_o())},b}var Po=Gi((function(e,t){return li(e,1,t)})),Oo=Gi((function(e,t,n){return li(e,va(t)||0,n)}));function Ro(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Ro.Cache||$n),n}function Mo(e){if("function"!=typeof e)throw new _e(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ro.Cache=$n;var Lo=yr((function(e,t){var n=(t=1==t.length&&Ko(t[0])?At(t[0],Ut(os())):At(gi(t,1),Ut(os()))).length;return Gi((function(i){for(var r=-1,s=yn(i.length,n);++r<s;)i[r]=t[r].call(this,i[r]);return vt(e,this,i)}))})),Bo=Gi((function(e,t){var n=tn(t,ss(Bo));return Jr(e,u,r,t,n)})),jo=Gi((function(e,t){var n=tn(t,ss(jo));return Jr(e,64,r,t,n)})),Vo=es((function(e,t){return Jr(e,256,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var qo=Wr(Ai),Uo=Wr((function(e,t){return e>=t})),Wo=Fi(function(){return arguments}())?Fi:function(e){return na(e)&&Pe.call(e,"callee")&&!et.call(e,"callee")},Ko=i.isArray,$o=pt?Ut(pt):function(e){return na(e)&&Si(e)==I};function Ho(e){return null!=e&&ea(e.length)&&!Yo(e)}function Go(e){return na(e)&&Ho(e)}var Jo=dn||vu,Xo=ht?Ut(ht):function(e){return na(e)&&Si(e)==y};function Zo(e){if(!na(e))return!1;var t=Si(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function Yo(e){if(!ta(e))return!1;var t=Si(e);return t==b||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qo(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=dt?Ut(dt):function(e){return na(e)&&hs(e)==w};function ra(e){return"number"==typeof e||na(e)&&Si(e)==C}function sa(e){if(!na(e)||Si(e)!=S)return!1;var t=$e(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==Le}var oa=ft?Ut(ft):function(e){return na(e)&&Si(e)==D},aa=mt?Ut(mt):function(e){return na(e)&&hs(e)==_};function ua(e){return"string"==typeof e||!Ko(e)&&na(e)&&Si(e)==k}function la(e){return"symbol"==typeof e||na(e)&&Si(e)==T}var ca=gt?Ut(gt):function(e){return na(e)&&ea(e.length)&&!!Ye[Si(e)]},pa=Wr(Mi),ha=Wr((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Ho(e))return ua(e)?on(e):_r(e);if(ot&&e[ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ot]());var t=hs(e);return(t==w?Qt:t==_?nn:za)(e)}function fa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?oi(ma(e),0,d):0}function va(e){if("number"==typeof e)return e;if(la(e))return h;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=fe.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?h:+e}function ya(e){return kr(e,Pa(e))}function xa(e){return null==e?"":ar(e)}var ba=Fr((function(e,t){if(Es(t)||Ho(t))kr(t,Na(t),e);else for(var n in t)Pe.call(t,n)&&ei(e,n,t[n])})),Ea=Fr((function(e,t){kr(t,Pa(t),e)})),wa=Fr((function(e,t,n,i){kr(t,Pa(t),e,i)})),Ca=Fr((function(e,t,n,i){kr(t,Na(t),e,i)})),Sa=es(si),Aa=Gi((function(e,t){e=Se(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&vs(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Pa(o),u=-1,l=a.length;++u<l;){var c=a[u],p=e[c];(p===r||zo(p,Fe[c])&&!Pe.call(e,c))&&(e[c]=o[c])}return e})),Da=Gi((function(e){return e.push(r,Zr),vt(Ra,r,e)}));function _a(e,t,n){var i=null==e?r:wi(e,t);return i===r?n:i}function ka(e,t){return null!=e&&ds(e,t,_i)}var Ta=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=n}),tu(ru)),Fa=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),os),Ia=Gi(Ti);function Na(e){return Ho(e)?Jn(e):Ri(e)}function Pa(e){return Ho(e)?Jn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var i in e)("constructor"!=i||!t&&Pe.call(e,i))&&n.push(i);return n}(e)}var Oa=Fr((function(e,t,n){Vi(e,t,n)})),Ra=Fr((function(e,t,n,i){Vi(e,t,n,i)})),Ma=es((function(e,t){var n={};if(null==e)return n;var i=!1;t=At(t,(function(t){return t=vr(t,e),i||(i=t.length>1),t})),kr(e,ns(e),n),i&&(n=ai(n,7,Yr));for(var r=t.length;r--;)lr(n,t[r]);return n})),La=es((function(e,t){return null==e?{}:function(e,t){return Ui(e,t,(function(t,n){return ka(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=At(ns(e),(function(e){return[e]}));return t=os(t),Ui(e,n,(function(e,n){return t(e,n[0])}))}var ja=Gr(Na),Va=Gr(Pa);function za(e){return null==e?[]:Wt(e,Na(e))}var qa=Or((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Za(xa(e).toLowerCase())}function Wa(e){return(e=xa(e))&&e.replace(ye,Jt).replace(Ke,"")}var Ka=Or((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$a=Or((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ha=Pr("toLowerCase"),Ga=Or((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ja=Or((function(e,t,n){return e+(n?" ":"")+Za(t)})),Xa=Or((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Za=Pr("toUpperCase");function Ya(e,t,n){return e=xa(e),(t=n?r:t)===r?function(e){return Je.test(e)}(e)?function(e){return e.match(He)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qa=Gi((function(e,t){try{return vt(e,r,t)}catch(e){return Zo(e)?e:new Ee(e)}})),eu=es((function(e,t){return xt(t,(function(t){t=Ls(t),ri(e,t,Fo(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Lr(),iu=Lr(!0);function ru(e){return e}function su(e){return Oi("function"==typeof e?e:ai(e,1))}var ou=Gi((function(e,t){return function(n){return Ti(n,e,t)}})),au=Gi((function(e,t){return function(n){return Ti(e,n,t)}}));function uu(e,t,n){var i=Na(t),r=Ei(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Ei(t,Na(t)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Yo(e);return xt(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=_r(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Dt([this.value()],arguments))})})),e}function lu(){}var cu=zr(At),pu=zr(Et),hu=zr(Tt);function du(e){return ys(e)?Lt(Ls(e)):function(e){return function(t){return wi(t,e)}}(e)}var fu=Ur(),mu=Ur(!0);function gu(){return[]}function vu(){return!1}var yu,xu=Vr((function(e,t){return e+t}),0),bu=$r("ceil"),Eu=Vr((function(e,t){return e/t}),1),wu=$r("floor"),Cu=Vr((function(e,t){return e*t}),1),Su=$r("round"),Au=Vr((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new _e(s);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=ko,jn.assign=ba,jn.assignIn=Ea,jn.assignInWith=wa,jn.assignWith=Ca,jn.at=Sa,jn.before=To,jn.bind=Fo,jn.bindAll=eu,jn.bindKey=Io,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ko(e)?e:[e]},jn.chain=ho,jn.chunk=function(e,t,n){t=(n?vs(e,t,n):t===r)?1:vn(ma(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,u=i(cn(s/t));o<s;)u[a++]=tr(e,o,o+=t);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Ko(n)?_r(n):[n],gi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=os();return e=t?At(e,(function(e){if("function"!=typeof e[1])throw new _e(s);return[n(e[0]),e[1]]})):[],Gi((function(n){for(var i=-1;++i<t;){var r=e[i];if(vt(r[0],this,n))return vt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ui(n,e,t)}}(ai(e,1))},jn.constant=tu,jn.countBy=go,jn.create=function(e,t){var n=Vn(e);return null==t?n:ii(n,t)},jn.curry=function e(t,n,i){var s=Jr(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.curryRight=function e(t,n,i){var s=Jr(t,16,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.debounce=No,jn.defaults=Aa,jn.defaultsDeep=Da,jn.defer=Po,jn.delay=Oo,jn.difference=Vs,jn.differenceBy=zs,jn.differenceWith=qs,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0):[]},jn.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&vs(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=ma(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:ma(i))<0&&(i+=s),i=n>i?0:ga(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Ko(e)?wt:mi)(e,os(t,3))},jn.flatMap=function(e,t){return gi(So(e,t),1)},jn.flatMapDeep=function(e,t){return gi(So(e,t),c)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),gi(So(e,t),n)},jn.flatten=Ks,jn.flattenDeep=function(e){return null!=e&&e.length?gi(e,c):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?gi(e,t=t===r?1:ma(t)):[]},jn.flip=function(e){return Jr(e,512)},jn.flow=nu,jn.flowRight=iu,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:Ei(e,Na(e))},jn.functionsIn=function(e){return null==e?[]:Ei(e,Pa(e))},jn.groupBy=Eo,jn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},jn.intersection=Hs,jn.intersectionBy=Gs,jn.intersectionWith=Js,jn.invert=Ta,jn.invertBy=Fa,jn.invokeMap=wo,jn.iteratee=su,jn.keyBy=Co,jn.keys=Na,jn.keysIn=Pa,jn.map=So,jn.mapKeys=function(e,t){var n={};return t=os(t,3),xi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=os(t,3),xi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},jn.matches=function(e){return Bi(ai(e,1))},jn.matchesProperty=function(e,t){return ji(e,ai(t,1))},jn.memoize=Ro,jn.merge=Oa,jn.mergeWith=Ra,jn.method=ou,jn.methodOf=au,jn.mixin=uu,jn.negate=Mo,jn.nthArg=function(e){return e=ma(e),Gi((function(t){return zi(t,e)}))},jn.omit=Ma,jn.omitBy=function(e,t){return Ba(e,Mo(os(t)))},jn.once=function(e){return To(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Ko(t)||(t=null==t?[]:[t]),Ko(n=i?r:n)||(n=null==n?[]:[n]),qi(e,t,n))},jn.over=cu,jn.overArgs=Lo,jn.overEvery=pu,jn.overSome=hu,jn.partial=Bo,jn.partialRight=jo,jn.partition=Ao,jn.pick=La,jn.pickBy=Ba,jn.property=du,jn.propertyOf=function(e){return function(t){return null==e?r:wi(e,t)}},jn.pull=Zs,jn.pullAll=Ys,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,os(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,r,n):e},jn.pullAt=Qs,jn.range=fu,jn.rangeRight=mu,jn.rearg=Vo,jn.reject=function(e,t){return(Ko(e)?wt:mi)(e,Mo(os(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=os(t,3);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Ki(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new _e(s);return Gi(e,t=t===r?t:ma(t))},jn.reverse=eo,jn.sampleSize=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),(Ko(e)?Zn:Xi)(e,t)},jn.set=function(e,t,n){return null==e?e:Zi(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Zi(e,t,n,i)},jn.shuffle=function(e){return(Ko(e)?Yn:er)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&vs(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),tr(e,t,n)):[]},jn.sortBy=Do,jn.sortedUniq=function(e){return e&&e.length?sr(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?sr(e,os(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&vs(e,t,n)&&(t=n=r),(n=n===r?d:n>>>0)?(e=xa(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=ar(t))&&Yt(e)?xr(on(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new _e(s);return t=null==t?0:vn(ma(t),0),Gi((function(n){var i=n[t],r=xr(n,0,t);return i&&Dt(r,i),vt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?pr(e,os(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new _e(s);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),No(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=fo,jn.toArray=da,jn.toPairs=ja,jn.toPairsIn=Va,jn.toPath=function(e){return Ko(e)?At(e,Ls):la(e)?[e]:_r(Ms(xa(e)))},jn.toPlainObject=ya,jn.transform=function(e,t,n){var i=Ko(e),r=i||Jo(e)||ca(e);if(t=os(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:ta(e)&&Yo(s)?Vn($e(e)):{}}return(r?xt:xi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return ko(e,1)},jn.union=to,jn.unionBy=no,jn.unionWith=io,jn.uniq=function(e){return e&&e.length?ur(e):[]},jn.uniqBy=function(e,t){return e&&e.length?ur(e,os(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},jn.unset=function(e,t){return null==e||lr(e,t)},jn.unzip=ro,jn.unzipWith=so,jn.update=function(e,t,n){return null==e?e:cr(e,t,gr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,gr(n),i)},jn.values=za,jn.valuesIn=function(e){return null==e?[]:Wt(e,Pa(e))},jn.without=oo,jn.words=Ya,jn.wrap=function(e,t){return Bo(gr(t),e)},jn.xor=ao,jn.xorBy=uo,jn.xorWith=lo,jn.zip=co,jn.zipObject=function(e,t){return fr(e||[],t||[],ei)},jn.zipObjectDeep=function(e,t){return fr(e||[],t||[],Zi)},jn.zipWith=po,jn.entries=ja,jn.entriesIn=Va,jn.extend=Ea,jn.extendWith=wa,uu(jn,jn),jn.add=xu,jn.attempt=Qa,jn.camelCase=qa,jn.capitalize=Ua,jn.ceil=bu,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=va(n))==n?n:0),t!==r&&(t=(t=va(t))==t?t:0),oi(va(e),t,n)},jn.clone=function(e){return ai(e,4)},jn.cloneDeep=function(e){return ai(e,5)},jn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||ui(e,t,Na(t))},jn.deburr=Wa,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Eu,jn.endsWith=function(e,t,n){e=xa(e),t=ar(t);var i=e.length,s=n=n===r?i:oi(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},jn.eq=zo,jn.escape=function(e){return(e=xa(e))&&G.test(e)?e.replace($,Xt):e},jn.escapeRegExp=function(e){return(e=xa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Ko(e)?Et:di;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.find=vo,jn.findIndex=Us,jn.findKey=function(e,t){return It(e,os(t,3),xi)},jn.findLast=yo,jn.findLastIndex=Ws,jn.findLastKey=function(e,t){return It(e,os(t,3),bi)},jn.floor=wu,jn.forEach=xo,jn.forEachRight=bo,jn.forIn=function(e,t){return null==e?e:vi(e,os(t,3),Pa)},jn.forInRight=function(e,t){return null==e?e:yi(e,os(t,3),Pa)},jn.forOwn=function(e,t){return e&&xi(e,os(t,3))},jn.forOwnRight=function(e,t){return e&&bi(e,os(t,3))},jn.get=_a,jn.gt=qo,jn.gte=Uo,jn.has=function(e,t){return null!=e&&ds(e,t,Di)},jn.hasIn=ka,jn.head=$s,jn.identity=ru,jn.includes=function(e,t,n,i){e=Ho(e)?e:za(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=vn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Pt(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Pt(e,t,r)},jn.inRange=function(e,t,n){return t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=va(e),t,n)},jn.invoke=Ia,jn.isArguments=Wo,jn.isArray=Ko,jn.isArrayBuffer=$o,jn.isArrayLike=Ho,jn.isArrayLikeObject=Go,jn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Si(e)==v},jn.isBuffer=Jo,jn.isDate=Xo,jn.isElement=function(e){return na(e)&&1===e.nodeType&&!sa(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&(Ko(e)||"string"==typeof e||"function"==typeof e.splice||Jo(e)||ca(e)||Wo(e)))return!e.length;var t=hs(e);if(t==w||t==_)return!e.size;if(Es(e))return!Ri(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Ii(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ii(e,t,r,n):!!i},jn.isError=Zo,jn.isFinite=function(e){return"number"==typeof e&&fn(e)},jn.isFunction=Yo,jn.isInteger=Qo,jn.isLength=ea,jn.isMap=ia,jn.isMatch=function(e,t){return e===t||Ni(e,t,us(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ni(e,t,us(t),n)},jn.isNaN=function(e){return ra(e)&&e!=+e},jn.isNative=function(e){if(bs(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pi(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=ra,jn.isObject=ta,jn.isObjectLike=na,jn.isPlainObject=sa,jn.isRegExp=oa,jn.isSafeInteger=function(e){return Qo(e)&&e>=-9007199254740991&&e<=p},jn.isSet=aa,jn.isString=ua,jn.isSymbol=la,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return na(e)&&hs(e)==F},jn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Si(e)},jn.join=function(e,t){return null==e?"":mn.call(e,t)},jn.kebabCase=Ka,jn.last=Xs,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=ma(n))<0?vn(i+s,0):yn(s,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Nt(e,Rt,s,!0)},jn.lowerCase=$a,jn.lowerFirst=Ha,jn.lt=pa,jn.lte=ha,jn.max=function(e){return e&&e.length?fi(e,ru,Ai):r},jn.maxBy=function(e,t){return e&&e.length?fi(e,os(t,2),Ai):r},jn.mean=function(e){return Mt(e,ru)},jn.meanBy=function(e,t){return Mt(e,os(t,2))},jn.min=function(e){return e&&e.length?fi(e,ru,Mi):r},jn.minBy=function(e,t){return e&&e.length?fi(e,os(t,2),Mi):r},jn.stubArray=gu,jn.stubFalse=vu,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=Cu,jn.nth=function(e,t){return e&&e.length?zi(e,ma(t)):r},jn.noConflict=function(){return st._===this&&(st._=Be),this},jn.noop=lu,jn.now=_o,jn.pad=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return qr(pn(r),n)+e+qr(cn(r),n)},jn.padEnd=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?e+qr(t-i,n):e},jn.padStart=function(e,t,n){e=xa(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?qr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(xa(e).replace(ie,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vs(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=fa(e),t===r?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=En();return yn(e+s*(t-e+tt("1e-"+((s+"").length-1))),t)}return $i(e,t)},jn.reduce=function(e,t,n){var i=Ko(e)?_t:jt,r=arguments.length<3;return i(e,os(t,4),n,r,pi)},jn.reduceRight=function(e,t,n){var i=Ko(e)?kt:jt,r=arguments.length<3;return i(e,os(t,4),n,r,hi)},jn.repeat=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),Hi(xa(e),t)},jn.replace=function(){var e=arguments,t=xa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,s=(t=vr(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Ls(t[i])];o===r&&(i=s,o=n),e=Yo(o)?o.call(e):o}return e},jn.round=Su,jn.runInContext=e,jn.sample=function(e){return(Ko(e)?Xn:Ji)(e)},jn.size=function(e){if(null==e)return 0;if(Ho(e))return ua(e)?sn(e):e.length;var t=hs(e);return t==w||t==_?e.size:Ri(e).length},jn.snakeCase=Ga,jn.some=function(e,t,n){var i=Ko(e)?Tt:nr;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.sortedIndex=function(e,t){return ir(e,t)},jn.sortedIndexBy=function(e,t,n){return rr(e,t,os(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&zo(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return ir(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return rr(e,t,os(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if(zo(e[n],t))return n}return-1},jn.startCase=Ja,jn.startsWith=function(e,t,n){return e=xa(e),n=null==n?0:oi(ma(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},jn.subtract=Au,jn.sum=function(e){return e&&e.length?Vt(e,ru):0},jn.sumBy=function(e,t){return e&&e.length?Vt(e,os(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&vs(e,t,n)&&(t=r),e=xa(e),t=wa({},t,i,Xr);var s,o,a=wa({},t.imports,i.imports,Xr),u=Na(a),l=Wt(a,u),c=0,p=t.interpolate||xe,h="__p += '",d=Ae((t.escape||xe).source+"|"+p.source+"|"+(p===Z?pe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),f="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ze+"]")+"\n";e.replace(d,(function(t,n,i,r,a,u){return i||(i=r),h+=e.slice(c,u).replace(be,Zt),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),h+="';\n";var m=Pe.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(U,"$1").replace(W,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa((function(){return we(u,f+"return "+h).apply(r,l)}));if(g.source=h,Zo(g))throw g;return g},jn.times=function(e,t){if((e=ma(e))<1||e>p)return[];var n=d,i=yn(e,d);t=os(t),e-=d;for(var r=zt(i,t);++n<e;)t(n);return r},jn.toFinite=fa,jn.toInteger=ma,jn.toLength=ga,jn.toLower=function(e){return xa(e).toLowerCase()},jn.toNumber=va,jn.toSafeInteger=function(e){return e?oi(ma(e),-9007199254740991,p):0===e?e:0},jn.toString=xa,jn.toUpper=function(e){return xa(e).toUpperCase()},jn.trim=function(e,t,n){if((e=xa(e))&&(n||t===r))return qt(e);if(!e||!(t=ar(t)))return e;var i=on(e),s=on(t);return xr(i,$t(i,s),Ht(i,s)+1).join("")},jn.trimEnd=function(e,t,n){if((e=xa(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=on(e);return xr(i,0,Ht(i,on(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=xa(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=on(e);return xr(i,$t(i,on(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var s="separator"in t?t.separator:s;n="length"in t?ma(t.length):n,i="omission"in t?ar(t.omission):i}var o=(e=xa(e)).length;if(Yt(e)){var a=on(e);o=a.length}if(n>=o)return e;var u=n-sn(i);if(u<1)return i;var l=a?xr(a,0,u).join(""):e.slice(0,u);if(s===r)return l+i;if(a&&(u+=l.length-u),oa(s)){if(e.slice(u).search(s)){var c,p=l;for(s.global||(s=Ae(s.source,xa(he.exec(s))+"g")),s.lastIndex=0;c=s.exec(p);)var h=c.index;l=l.slice(0,h===r?u:h)}}else if(e.indexOf(ar(s),u)!=u){var d=l.lastIndexOf(s);d>-1&&(l=l.slice(0,d))}return l+i},jn.unescape=function(e){return(e=xa(e))&&H.test(e)?e.replace(K,un):e},jn.uniqueId=function(e){var t=++Oe;return xa(e)+t},jn.upperCase=Xa,jn.upperFirst=Za,jn.each=xo,jn.eachRight=bo,jn.first=$s,uu(jn,(yu={},xi(jn,(function(e,t){Pe.call(jn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jn.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),xt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:vn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,d),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:os(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),xt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Gi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ti(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Mo(os(e)))},Un.prototype.slice=function(e,t){e=ma(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ma(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(d)},xi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=jn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Un,l=a[0],c=u||Ko(t),p=function(e){var t=s.apply(jn,Dt([e],a));return i&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,f=o&&!h,m=u&&!d;if(!o&&c){t=m?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:fo,args:[p],thisArg:r}),new qn(g,h)}return f&&m?e.apply(this,a):(g=this.thru(p),f?i?g.value()[0]:g.value():g)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ke[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Ko(r)?r:[],e)}return this[n]((function(n){return t.apply(Ko(n)?n:[],e)}))}})),xi(Un.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Pe.call(Fn,i)||(Fn[i]=[]),Fn[i].push({name:t,func:n})}})),Fn[Br(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=_r(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_r(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_r(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ko(e),i=t<0,r=n?e.length:0,s=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=yn(t,e+o);break;case"takeRight":e=vn(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=s.start,a=s.end,u=a-o,l=i?a:o-1,c=this.__iteratees__,p=c.length,h=0,d=yn(u,this.__takeCount__);if(!n||!i&&r==u&&d==u)return hr(e,this.__actions__);var f=[];e:for(;u--&&h<d;){for(var m=-1,g=e[l+=t];++m<p;){var v=c[m],y=v.iteratee,x=v.type,b=y(g);if(2==x)g=b;else if(!b){if(1==x)continue e;break e}}f[h++]=g}return f},jn.prototype.at=mo,jn.prototype.chain=function(){return ho(this)},jn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var i=js(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},jn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:fo,args:[eo],thisArg:r}),new qn(t,this.__chain__)}return this.thru(eo)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return hr(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,ot&&(jn.prototype[ot]=function(){return this}),jn}();st._=ln,(i=function(){return ln}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},7866:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MongoLogManager=t.MongoLogWriter=t.mongoLogId=void 0;const r=n(345),s=n(7702),o=n(2048),a=i(n(5315)),u=n(6162),l=n(1764),c=n(1568);function p(e){return{__value:e}}t.mongoLogId=p;class h extends u.Writable{constructor(e,t,n,i){super({objectMode:!0}),this.mongoLogId=p,this._logId=e,this._logFilePath=t,this._target=n,this._now=null!=i?i:()=>new Date}get logId(){return this._logId}get logFilePath(){return this._logFilePath}get target(){return this._target}_write(e,t,i){var s;const o=function(e){var t;return"string"!=typeof e.s?new TypeError("Cannot log messages without a severity field"):"string"!=typeof e.c?new TypeError("Cannot log messages without a component field"):"number"!=typeof(null===(t=e.id)||void 0===t?void 0:t.__value)?new TypeError("Cannot log messages without an id field"):"string"!=typeof e.ctx?new TypeError("Cannot log messages without a context field"):"string"!=typeof e.msg?new TypeError("Cannot log messages without a message field"):null}(e);if(o)return void i(o);const a={t:null!==(s=e.t)&&void 0!==s?s:this._now(),s:e.s,c:e.c,id:e.id.__value,ctx:e.ctx,msg:e.msg};e.attr&&("[object Error]"===Object.prototype.toString.call(e.attr)?a.attr={stack:e.attr.stack,name:e.attr.name,message:e.attr.message,code:e.attr.code,...e.attr}:a.attr=e.attr),this.emit("log",a);try{r.EJSON.stringify(a.attr)}catch(e){try{const e=n(9672),t=e.deserialize(e.serialize(a.attr));r.EJSON.stringify(t),a.attr=t}catch(e){try{const e=JSON.parse(JSON.stringify(a.attr));r.EJSON.stringify(e),a.attr=e}catch(e){a.attr={_inspected:(0,l.inspect)(a.attr)}}}}this._target.write(r.EJSON.stringify(a,{relaxed:!0})+"\n",i)}_final(e){this._target.end(e)}async flush(){await new Promise((e=>this._target.write("",e)))}info(e,t,n,i,r){const s={s:"I",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}warn(e,t,n,i,r){const s={s:"W",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}error(e,t,n,i,r){const s={s:"E",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}fatal(e,t,n,i,r){const s={s:"F",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}bindComponent(e){return{unbound:this,component:e,write:(t,n)=>this.write({c:e,...t},n),info:this.info.bind(this,e),warn:this.warn.bind(this,e),error:this.error.bind(this,e),fatal:this.fatal.bind(this,e)}}}t.MongoLogWriter=h,t.MongoLogManager=class{constructor(e){this._options=e}async cleanupOldLogfiles(){var e,t;const n=this._options.directory;let i;try{i=await o.promises.opendir(n)}catch(e){return}for await(const s of i){if(!s.isFile())continue;const{id:i}=null!==(t=null===(e=s.name.match(/^(?<id>[a-f0-9]{24})_log(\.gz)?$/i))||void 0===e?void 0:e.groups)&&void 0!==t?t:{};if(i&&new r.ObjectId(i).generationTime<Date.now()/1e3-86400*this._options.retentionDays){const e=a.default.join(n,s.name);try{await o.promises.unlink(e)}catch(t){this._options.onerror(t,e)}}}}async createLogWriter(){const e=(new r.ObjectId).toString(),t=!!this._options.gzip,n=a.default.join(this._options.directory,`${e}_log${t?".gz":""}`);let i,l,p;try{l=(0,o.createWriteStream)(n,{mode:384}),i=l,await(0,s.once)(l,"ready"),t?(l=(0,c.createGzip)({flush:c.constants.Z_SYNC_FLUSH,level:c.constants.Z_MAX_LEVEL}),l.pipe(i)):l.on("finish",(()=>l.emit("log-finish")))}catch(t){this._options.onwarn(t,n),l=new u.Writable({write(e,t,n){n()}}),i=l,p=new h(e,null,l)}return p||(p=new h(e,n,l)),i.on("finish",(()=>null==p?void 0:p.emit("log-finish"))),p}}},4935:e=>{function t(e){if(!(this instanceof t))return new t(e);this.ns=e,this.dotIndex=e.indexOf("."),-1===this.dotIndex?(this.database=e,this.collection=""):(this.database=e.slice(0,this.dotIndex),this.collection=e.slice(this.dotIndex+1)),this.system=/^(?:system|enxcol_)\./.test(this.collection),this.oplog=/local\.oplog\.(\$main|rs)/.test(e),this.command="$cmd"===this.collection||0===this.collection.indexOf("$cmd.sys"),this.special=this.oplog||this.command||this.system||"config"===this.database,this.specialish=this.special||["local","admin"].indexOf(this.database)>-1,this.normal=this.oplog||-1===this.ns.indexOf("$"),this.validDatabaseName=new RegExp('^[^\\\\/". ]*$').test(this.database)&&this.database.length<=t.MAX_DATABASE_NAME_LENGTH,this.validCollectionName=this.collection.length>0&&(this.oplog||/^[^\0\$]*$/.test(this.collection)),this.databaseHash=7,this.ns.split("").every(function(e,t){return"."!==e&&(this.databaseHash+=11*this.ns.charCodeAt(t),this.databaseHash*=3,!0)}.bind(this))}t.prototype.database="",t.prototype.databaseHash=0,t.prototype.collection="",t.prototype.command=!1,t.prototype.special=!1,t.prototype.system=!1,t.prototype.oplog=!1,t.prototype.normal=!1,t.prototype.specialish=!1,["Command","Special","System","Oplog","Normal","Conf"].forEach((function(e){t.prototype["is"+e]=function(){return this[e.toLowerCase()]}})),t.prototype.toString=function(){return this.ns},t.MAX_DATABASE_NAME_LENGTH=128,e.exports=t;var n=t;e.exports.sort=function(e){return e.sort((function(e,t){return n(e).specialish&&n(t).specialish?0:n(e).specialish&&!n(t).specialish?1:!n(e).specialish&&n(t).specialish?-1:e>t?1:-1})),e}},1378:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8726:(e,t,n)=>{"use strict";var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(9497),o=u(s),a=u(n(23));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||d()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return h&&e?o.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=i({},this.props.style);t.display||(t.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,o.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),o.default.createElement("input",i({},r,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(s.Component);f.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},8559:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=(n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n?Symbol.for("react.fragment"):60107),r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,u=(n&&Symbol.for("react.async_mode"),n?Symbol.for("react.concurrent_mode"):60111),l=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116,f=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===r||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===h||e.$$typeof===o||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===f)}},3920:(e,t,n)=>{"use strict";e.exports=n(8559)},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6625:(e,t)=>{var n;t=e.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,r=t.re=[],s=t.src=[],o=0,a=o++;s[a]="0|[1-9]\\d*";var u=o++;s[u]="[0-9]+";var l=o++;s[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var c=o++;s[c]="("+s[a]+")\\.("+s[a]+")\\.("+s[a]+")";var p=o++;s[p]="("+s[u]+")\\.("+s[u]+")\\.("+s[u]+")";var h=o++;s[h]="(?:"+s[a]+"|"+s[l]+")";var d=o++;s[d]="(?:"+s[u]+"|"+s[l]+")";var f=o++;s[f]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=o++;s[m]="(?:-?("+s[d]+"(?:\\."+s[d]+")*))";var g=o++;s[g]="[0-9A-Za-z-]+";var v=o++;s[v]="(?:\\+("+s[g]+"(?:\\."+s[g]+")*))";var y=o++,x="v?"+s[c]+s[f]+"?"+s[v]+"?";s[y]="^"+x+"$";var b="[v=\\s]*"+s[p]+s[m]+"?"+s[v]+"?",E=o++;s[E]="^"+b+"$";var w=o++;s[w]="((?:<|>)?=?)";var C=o++;s[C]=s[u]+"|x|X|\\*";var S=o++;s[S]=s[a]+"|x|X|\\*";var A=o++;s[A]="[v=\\s]*("+s[S]+")(?:\\.("+s[S]+")(?:\\.("+s[S]+")(?:"+s[f]+")?"+s[v]+"?)?)?";var D=o++;s[D]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var _=o++;s[_]="^"+s[w]+"\\s*"+s[A]+"$";var k=o++;s[k]="^"+s[w]+"\\s*"+s[D]+"$";var T=o++;s[T]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var F=o++;s[F]="(?:~>?)";var I=o++;s[I]="(\\s*)"+s[F]+"\\s+",r[I]=new RegExp(s[I],"g");var N=o++;s[N]="^"+s[F]+s[A]+"$";var P=o++;s[P]="^"+s[F]+s[D]+"$";var O=o++;s[O]="(?:\\^)";var R=o++;s[R]="(\\s*)"+s[O]+"\\s+",r[R]=new RegExp(s[R],"g");var M=o++;s[M]="^"+s[O]+s[A]+"$";var L=o++;s[L]="^"+s[O]+s[D]+"$";var B=o++;s[B]="^"+s[w]+"\\s*("+b+")$|^$";var j=o++;s[j]="^"+s[w]+"\\s*("+x+")$|^$";var V=o++;s[V]="(\\s*)"+s[w]+"\\s*("+b+"|"+s[A]+")",r[V]=new RegExp(s[V],"g");var z=o++;s[z]="^\\s*("+s[A]+")\\s+-\\s+("+s[A]+")\\s*$";var q=o++;s[q]="^\\s*("+s[D]+")\\s+-\\s+("+s[D]+")\\s*$";var U=o++;s[U]="(<|>)?=?\\s*\\*";for(var W=0;W<35;W++)n(W,s[W]),r[W]||(r[W]=new RegExp(s[W]));function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?r[E]:r[y]).test(e))return null;try{return new $(e,t)}catch(e){return null}}function $(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?r[E]:r[y]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}t.parse=K,t.valid=function(e,t){var n=K(e,t);return n?n.version:null},t.clean=function(e,t){var n=K(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=$,$.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},$.prototype.toString=function(){return this.version},$.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof $||(e=new $(e,this.options)),this.compareMain(e)||this.comparePre(e)},$.prototype.compareMain=function(e){return e instanceof $||(e=new $(e,this.options)),G(this.major,e.major)||G(this.minor,e.minor)||G(this.patch,e.patch)},$.prototype.comparePre=function(e){if(e instanceof $||(e=new $(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var i=this.prerelease[t],r=e.prerelease[t];if(n("prerelease compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return G(i,r)}while(++t)},$.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,i){"string"==typeof n&&(i=n,n=void 0);try{return new $(e,n).inc(t,i).version}catch(e){return null}},t.diff=function(e,t){if(Y(e,t))return null;var n=K(e),i=K(t),r="";if(n.prerelease.length||i.prerelease.length){r="pre";var s="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==i[o])return r+o;return s},t.compareIdentifiers=G;var H=/^[0-9]+$/;function G(e,t){var n=H.test(e),i=H.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1}function J(e,t,n){return new $(e,n).compare(new $(t,n))}function X(e,t,n){return J(e,t,n)>0}function Z(e,t,n){return J(e,t,n)<0}function Y(e,t,n){return 0===J(e,t,n)}function Q(e,t,n){return 0!==J(e,t,n)}function ee(e,t,n){return J(e,t,n)>=0}function te(e,t,n){return J(e,t,n)<=0}function ne(e,t,n,i){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Y(e,n,i);case"!=":return Q(e,n,i);case">":return X(e,n,i);case">=":return ee(e,n,i);case"<":return Z(e,n,i);case"<=":return te(e,n,i);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===re?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new $(e,t).major},t.minor=function(e,t){return new $(e,t).minor},t.patch=function(e,t){return new $(e,t).patch},t.compare=J,t.compareLoose=function(e,t){return J(e,t,!0)},t.rcompare=function(e,t,n){return J(t,e,n)},t.sort=function(e,n){return e.sort((function(e,i){return t.compare(e,i,n)}))},t.rsort=function(e,n){return e.sort((function(e,i){return t.rcompare(e,i,n)}))},t.gt=X,t.lt=Z,t.eq=Y,t.neq=Q,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=ie;var re={};function se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,i,r,s,o,a,u,l,c,p,h){return((t=oe(n)?"":oe(i)?">="+n+".0.0":oe(r)?">="+n+"."+i+".0":">="+t)+" "+(a=oe(u)?"":oe(l)?"<"+(+u+1)+".0.0":oe(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+a)).trim()}function ue(e,t,i){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!i.includePrerelease){for(r=0;r<e.length;r++)if(n(e[r].semver),e[r].semver!==re&&e[r].semver.prerelease.length>0){var s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}function le(e,t,n){try{t=new se(t,n)}catch(e){return!1}return t.test(e)}function ce(e,t,n,i){var r,s,o,a,u;switch(e=new $(e,i),t=new se(t,i),n){case">":r=X,s=te,o=Z,a=">",u=">=";break;case"<":r=Z,s=ee,o=X,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,i))return!1;for(var l=0;l<t.set.length;++l){var c=t.set[l],p=null,h=null;if(c.forEach((function(e){e.semver===re&&(e=new ie(">=0.0.0")),p=p||e,h=h||e,r(e.semver,p.semver,i)?p=e:o(e.semver,h.semver,i)&&(h=e)})),p.operator===a||p.operator===u)return!1;if((!h.operator||h.operator===a)&&s(e,h.semver))return!1;if(h.operator===u&&o(e,h.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?r[B]:r[j],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=re},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===re||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),le(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),le(e.semver,n,t);var i=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||r||s&&o||a||u},t.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var i=t?r[q]:r[z];e=e.replace(i,ae),n("hyphen replace",e),e=e.replace(r[V],"$1$2$3"),n("comparator trim",e,r[V]),e=(e=(e=e.replace(r[I],"$1~")).replace(r[R],"$1^")).split(/\s+/).join(" ");var s=t?r[B]:r[j],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var i=t.loose?r[L]:r[M];return e.replace(i,(function(t,i,r,s,o){var a;return n("caret",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a="0"===i?">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":">="+i+"."+r+".0 <"+(+i+1)+".0.0":o?(n("replaceCaret pr",o),a="0"===i?"0"===r?">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+"-"+o+" <"+(+i+1)+".0.0"):(n("no pr"),a="0"===i?"0"===r?">="+i+"."+r+"."+s+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+" <"+(+i+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var i=t.loose?r[P]:r[N];return e.replace(i,(function(t,i,r,s,o){var a;return n("tilde",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a=">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":o?(n("replaceTilde pr",o),a=">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0"):a=">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var i=t.loose?r[k]:r[_];return e.replace(i,(function(t,i,r,s,o,a){n("xRange",e,t,i,r,s,o,a);var u=oe(r),l=u||oe(s),c=l||oe(o);return"="===i&&c&&(i=""),u?t=">"===i||"<"===i?"<0.0.0":"*":i&&c?(l&&(s=0),o=0,">"===i?(i=">=",l?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===i&&(i="<",l?r=+r+1:s=+s+1),t=i+r+"."+s+"."+o):l?t=">="+r+".0.0 <"+(+r+1)+".0.0":c&&(t=">="+r+"."+s+".0 <"+r+"."+(+s+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(r[U],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(s)}))),o.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t<this.set.length;t++)if(ue(this.set[t],e,this.options))return!0;return!1},t.satisfies=le,t.maxSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&-1!==r.compare(e)||(r=new $(i=e,n)))})),i},t.minSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&1!==r.compare(e)||(r=new $(i=e,n)))})),i},t.minVersion=function(e,t){e=new se(e,t);var n=new $("0.0.0");if(e.test(n))return n;if(n=new $("0.0.0-0"),e.test(n))return n;n=null;for(var i=0;i<e.set.length;++i)e.set[i].forEach((function(e){var t=new $(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!X(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return ce(e,t,"<",n)},t.gtr=function(e,t,n){return ce(e,t,">",n)},t.outside=ce,t.prerelease=function(e,t){var n=K(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(r[T]);return null==t?null:K(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},4880:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8957:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2156)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2156:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(4880),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},2069:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7471)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7471:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},345:e=>{"use strict";e.exports=require("bson")},5840:e=>{"use strict";e.exports=require("electron")},7702:e=>{"use strict";e.exports=require("events")},2048:e=>{"use strict";e.exports=require("fs")},9801:e=>{"use strict";e.exports=require("os")},5315:e=>{"use strict";e.exports=require("path")},23:e=>{"use strict";e.exports=require("prop-types")},9497:e=>{"use strict";e.exports=require("react")},6162:e=>{"use strict";e.exports=require("stream")},1764:e=>{"use strict";e.exports=require("util")},9672:e=>{"use strict";e.exports=require("v8")},1568:e=>{"use strict";e.exports=require("zlib")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}},o=!0;try{e[i].call(s.exports,s,s.exports,n),o=!1}finally{o&&delete t[i]}return s.loaded=!0,s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(3168)})()}));
|