@chillicream/nitro-embedded 31.0.2 → 31.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/assets/{context-providers.4ac3c363.Ft2IhfCy.js → context-providers.b77dd5d8.DnGzVvXJ.js} +3 -3
  2. package/assets/{editor.worker.4ac3c363.CqPoWJS8.js → editor.worker.b77dd5d8.C0IIxtwH.js} +1 -1
  3. package/assets/{graphql-engine-scheduler.4ac3c363.PzH1tV6k.js → graphql-engine-scheduler.b77dd5d8.B1RXbWAw.js} +1 -1
  4. package/assets/{graphql-indexer-scheduler.4ac3c363.BDH5nBJB.js → graphql-indexer-scheduler.b77dd5d8.C87eltaF.js} +1 -1
  5. package/assets/{graphql.worker.4ac3c363.D-xCIFcX.js → graphql.worker.b77dd5d8.CWVFy7o0.js} +1 -1
  6. package/assets/{index.4ac3c363.DNxaChYo.js → index.b77dd5d8.Cg4I12I8.js} +1 -1
  7. package/assets/{json.worker.4ac3c363.CJUMUcV6.js → json.worker.b77dd5d8.DZEULY4m.js} +1 -1
  8. package/assets/{jsonMode.4ac3c363.D6c9Ns8T.js → jsonMode.b77dd5d8.BrLH2lOw.js} +1 -1
  9. package/assets/{main.4ac3c363.DsVnrN0N.js → main.b77dd5d8.CHhf8xgD.js} +8 -8
  10. package/assets/{monaco.4ac3c363.Bhhq6wMC.js → monaco.b77dd5d8.B2HNXd5G.js} +2 -2
  11. package/assets/{monaco.4ac3c363.BYBkppiw.css → monaco.b77dd5d8.BIK2XPY0.css} +1 -1
  12. package/assets/{monaco.4ac3c363.DpEfEIWO.css → monaco.b77dd5d8.DswWXrKx.css} +1 -1
  13. package/assets/{session-scheduler.4ac3c363.PThkcMQP.js → session-scheduler.b77dd5d8.H9hh1gOM.js} +1 -1
  14. package/assets/{yaml.4ac3c363.BGc24uN4.js → yaml.b77dd5d8.CiG9qhDA.js} +1 -1
  15. package/assets/{yaml.worker.4ac3c363.4bkJTgWN.js → yaml.worker.b77dd5d8.BVSUE8bO.js} +1 -1
  16. package/index.html +4 -4
  17. package/package.json +1 -1
  18. package/service-worker.js +1 -1
  19. /package/assets/{FiraCode-Medium.4ac3c363.-YTCSZkP.woff2 → FiraCode-Medium.b77dd5d8.-YTCSZkP.woff2} +0 -0
  20. /package/assets/{codicon.4ac3c363.Hscy-R9e.ttf → codicon.b77dd5d8.Hscy-R9e.ttf} +0 -0
  21. /package/assets/{context-providers.4ac3c363.3HkX5s82.css → context-providers.b77dd5d8.3HkX5s82.css} +0 -0
  22. /package/assets/{main.4ac3c363.BdMtxJz7.css → main.b77dd5d8.BdMtxJz7.css} +0 -0
  23. /package/assets/{monaco.4ac3c363.DSps3ct-.js → monaco.b77dd5d8.BX--odEo.js} +0 -0
  24. /package/assets/{monaco.4ac3c363.DA_BGZx0.js → monaco.b77dd5d8.D8gAt9bt.js} +0 -0
  25. /package/assets/{monaco.4ac3c363.BE99pCNN.js → monaco.b77dd5d8.Drs7RHvp.js} +0 -0
  26. /package/assets/{monaco.4ac3c363.p9ufgaT6.js → monaco.b77dd5d8.DuZrSKpE.js} +0 -0
  27. /package/assets/{monaco.4ac3c363.C_VRvP-V.js → monaco.b77dd5d8.wf5zjNun.js} +0 -0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./context-providers.4ac3c363.Ft2IhfCy.js","./monaco.4ac3c363.Bhhq6wMC.js","./monaco.4ac3c363.BYBkppiw.css","./context-providers.4ac3c363.3HkX5s82.css"])))=>i.map(i=>d[i]);
2
- import{p as process$1,B as Buffer$1,l as languages,a as Buffer,U as Uri,e as editor,_ as __vitePreload}from"./monaco.4ac3c363.Bhhq6wMC.js";function _mergeNamespaces(on,In){for(var Rn=0;Rn<In.length;Rn++){const Mn=In[Rn];if(typeof Mn!="string"&&!Array.isArray(Mn)){for(const Ln in Mn)if(Ln!=="default"&&!(Ln in on)){const Hn=Object.getOwnPropertyDescriptor(Mn,Ln);Hn&&Object.defineProperty(on,Ln,Hn.get?Hn:{enumerable:!0,get:()=>Mn[Ln]})}}}return Object.freeze(Object.defineProperty(on,Symbol.toStringTag,{value:"Module"}))}(function(){const In=document.createElement("link").relList;if(In&&In.supports&&In.supports("modulepreload"))return;for(const Ln of document.querySelectorAll('link[rel="modulepreload"]'))Mn(Ln);new MutationObserver(Ln=>{for(const Hn of Ln)if(Hn.type==="childList")for(const jn of Hn.addedNodes)jn.tagName==="LINK"&&jn.rel==="modulepreload"&&Mn(jn)}).observe(document,{childList:!0,subtree:!0});function Rn(Ln){const Hn={};return Ln.integrity&&(Hn.integrity=Ln.integrity),Ln.referrerPolicy&&(Hn.referrerPolicy=Ln.referrerPolicy),Ln.crossOrigin==="use-credentials"?Hn.credentials="include":Ln.crossOrigin==="anonymous"?Hn.credentials="omit":Hn.credentials="same-origin",Hn}function Mn(Ln){if(Ln.ep)return;Ln.ep=!0;const Hn=Rn(Ln);fetch(Ln.href,Hn)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(on){return on&&on.__esModule&&Object.prototype.hasOwnProperty.call(on,"default")?on.default:on}function getAugmentedNamespace(on){if(Object.prototype.hasOwnProperty.call(on,"__esModule"))return on;var In=on.default;if(typeof In=="function"){var Rn=function Mn(){var Ln=!1;try{Ln=this instanceof Mn}catch{}return Ln?Reflect.construct(In,arguments,this.constructor):In.apply(this,arguments)};Rn.prototype=In.prototype}else Rn={};return Object.defineProperty(Rn,"__esModule",{value:!0}),Object.keys(on).forEach(function(Mn){var Ln=Object.getOwnPropertyDescriptor(on,Mn);Object.defineProperty(Rn,Mn,Ln.get?Ln:{enumerable:!0,get:function(){return on[Mn]}})}),Rn}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./context-providers.b77dd5d8.DnGzVvXJ.js","./monaco.b77dd5d8.B2HNXd5G.js","./monaco.b77dd5d8.BIK2XPY0.css","./context-providers.b77dd5d8.3HkX5s82.css"])))=>i.map(i=>d[i]);
2
+ import{p as process$1,B as Buffer$1,l as languages,a as Buffer,U as Uri,e as editor,_ as __vitePreload}from"./monaco.b77dd5d8.B2HNXd5G.js";function _mergeNamespaces(on,In){for(var Rn=0;Rn<In.length;Rn++){const Mn=In[Rn];if(typeof Mn!="string"&&!Array.isArray(Mn)){for(const Ln in Mn)if(Ln!=="default"&&!(Ln in on)){const Hn=Object.getOwnPropertyDescriptor(Mn,Ln);Hn&&Object.defineProperty(on,Ln,Hn.get?Hn:{enumerable:!0,get:()=>Mn[Ln]})}}}return Object.freeze(Object.defineProperty(on,Symbol.toStringTag,{value:"Module"}))}(function(){const In=document.createElement("link").relList;if(In&&In.supports&&In.supports("modulepreload"))return;for(const Ln of document.querySelectorAll('link[rel="modulepreload"]'))Mn(Ln);new MutationObserver(Ln=>{for(const Hn of Ln)if(Hn.type==="childList")for(const jn of Hn.addedNodes)jn.tagName==="LINK"&&jn.rel==="modulepreload"&&Mn(jn)}).observe(document,{childList:!0,subtree:!0});function Rn(Ln){const Hn={};return Ln.integrity&&(Hn.integrity=Ln.integrity),Ln.referrerPolicy&&(Hn.referrerPolicy=Ln.referrerPolicy),Ln.crossOrigin==="use-credentials"?Hn.credentials="include":Ln.crossOrigin==="anonymous"?Hn.credentials="omit":Hn.credentials="same-origin",Hn}function Mn(Ln){if(Ln.ep)return;Ln.ep=!0;const Hn=Rn(Ln);fetch(Ln.href,Hn)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(on){return on&&on.__esModule&&Object.prototype.hasOwnProperty.call(on,"default")?on.default:on}function getAugmentedNamespace(on){if(Object.prototype.hasOwnProperty.call(on,"__esModule"))return on;var In=on.default;if(typeof In=="function"){var Rn=function Mn(){var Ln=!1;try{Ln=this instanceof Mn}catch{}return Ln?Reflect.construct(In,arguments,this.constructor):In.apply(this,arguments)};Rn.prototype=In.prototype}else Rn={};return Object.defineProperty(Rn,"__esModule",{value:!0}),Object.keys(on).forEach(function(Mn){var Ln=Object.getOwnPropertyDescriptor(on,Mn);Object.defineProperty(Rn,Mn,Ln.get?Ln:{enumerable:!0,get:function(){return on[Mn]}})}),Rn}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
5
5
  *
@@ -4233,7 +4233,7 @@ export default theme;`}function coefficientToPercentage(on){return typeof on=="n
4233
4233
  0px 3px 4px 0px ${THEME_COLORS.base.shadow},
4234
4234
  0px 1px 8px 0px ${THEME_COLORS.base.shadow}`}),paperWidthLg:({theme:on})=>({flexBasis:"90%",width:"90%",height:"90%",maxWidth:on.spacing(1140),minHeight:on.spacing(300),maxHeight:on.spacing(980)}),paperWidthMd:({theme:on})=>({flexBasis:"90%",width:"90%",height:"90%",maxWidth:on.spacing(600),minHeight:on.spacing(300),maxHeight:on.spacing(500)}),paperWidthSm:({theme:on})=>({width:"initial",height:"initial",maxWidth:on.spacing(450),minHeight:on.spacing(100),maxHeight:on.spacing(400)})}},MuiDialogActions:{styleOverrides:{root:({theme:on})=>({display:"flex",flex:`0 0 ${on.spacing(60)}`,flexDirection:"row",alignItems:"center",overflow:"hidden",padding:on.spacing(0,20)})}},MuiDialogContent:{styleOverrides:{root:({theme:on})=>({flex:"1 1 auto",flexDirection:"column",overflow:"hidden",padding:on.spacing(0,20),fontWeight:"normal",color:THEME_COLORS.base.subtitle,"&.no-padding":{padding:0},"& > p":{margin:on.spacing(6,0,18)}})}},MuiDialogTitle:{styleOverrides:{root:({theme:on})=>({display:"flex",flex:"1 1 auto",flexDirection:"row",padding:0,fontSize:on.typography.h3.fontSize,fontWeight:500,color:THEME_COLORS.base.heading})}},MuiDivider:{styleOverrides:{root:({theme:on})=>({borderBottomWidth:on.spacing(1),borderColor:THEME_COLORS.base.separator})}},MuiFab:{defaultProps:{size:"small"}},MuiFilledInput:{defaultProps:{margin:"dense"}},MuiFormControl:{defaultProps:{margin:"dense"},styleOverrides:{root:({theme:on})=>({display:"flex",flexDirection:"column",gap:on.spacing(4),margin:0,"& > .MuiFormLabel-root":{fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,fontWeight:500,color:THEME_COLORS.components.labelText}})}},MuiFormHelperText:{defaultProps:{margin:"dense"},styleOverrides:{root:{margin:"0 !important",color:THEME_COLORS.components.helperText,"&.Mui-disabled":{color:THEME_COLORS.components.helperText}}}},MuiFormControlLabel:{styleOverrides:{root:({theme:on})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:on.spacing(16),margin:0}),label:({theme:on})=>({fontWeight:on.typography.fontWeightMedium,color:THEME_COLORS.components.labelText,"&.Mui-disabled":{color:THEME_COLORS.components.labelText}})}},MuiFormLabel:{styleOverrides:{root:({theme:on})=>({display:"flex",alignItems:"center",gap:on.spacing(8),margin:"0 !important","&.Mui-focused":{color:on.palette.text.primary}})}},MuiGrid:{styleOverrides:{root:{margin:0}}},MuiIconButton:{defaultProps:{color:"secondary",disableRipple:!0,size:"small"},styleOverrides:{root:({theme:on})=>({borderRadius:on.spacing(4),padding:0,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease","&.spin > .icon":{animation:`${FULL_ROTATION} 1.2s 0.3s linear infinite`}}),colorSecondary:({theme:on})=>({border:`${on.spacing(1)} solid
4235
4235
  ${THEME_COLORS.components.buttonIconBorder}`,color:THEME_COLORS.components.buttonIconText,backgroundColor:THEME_COLORS.components.buttonIcon,"&.active":{borderColor:THEME_COLORS.components.toggleButtonActive,color:THEME_COLORS.components.toggleButtonActiveText,backgroundColor:THEME_COLORS.components.toggleButtonActive,"& > .icon":{fill:THEME_COLORS.components.toggleButtonActiveText},"&:hover, &:focus, &.menu-open":{borderColor:THEME_COLORS.components.toggleButton,color:THEME_COLORS.components.toggleButtonText,backgroundColor:THEME_COLORS.components.toggleButton,"& > .icon":{fill:THEME_COLORS.components.toggleButtonText}}},"&:disabled":{pointerEvents:"none",cursor:"default",opacity:.5,"&:hover":{backgroundColor:"initial"}},"&:hover, &:focus, &.menu-open":{borderColor:THEME_COLORS.components.buttonIconHoverBorder,color:THEME_COLORS.components.buttonIconHoverText,backgroundColor:THEME_COLORS.components.buttonIconHover,"& > .icon":{fill:THEME_COLORS.components.buttonIconHoverText}},"& > .icon":{fill:THEME_COLORS.components.buttonIconText}}),colorInherit:({theme:on})=>({border:`${on.spacing(1)} solid
4236
- ${THEME_COLORS.components.buttonIconBorder}`,color:THEME_COLORS.components.buttonIconText,backgroundColor:THEME_COLORS.components.buttonIcon,"&:disabled":{pointerEvents:"none",cursor:"default",opacity:.5,"&:hover":{backgroundColor:"initial"}},"& > .icon":{fill:THEME_COLORS.components.buttonIconText}}),sizeSmall:({theme:on})=>({width:on.spacing(30),height:on.spacing(30)})}},MuiInputAdornment:{styleOverrides:{root:({theme:on})=>({flexShrink:0,justifyContent:"center",margin:0,"&.MuiInputAdornment-sizeSmall":{minWidth:on.spacing(28),minHeight:on.spacing(28),"&.MuiInputAdornment-positionStart":{marginRight:on.spacing(-6)}}})}},MuiInputBase:{defaultProps:{margin:"dense"},styleOverrides:{root:({theme:on})=>({borderRadius:on.spacing(4),height:on.spacing(30),fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,backgroundColor:THEME_COLORS.components.field,color:THEME_COLORS.components.fieldText,transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease","&.MuiInputBase-multiline":{height:"auto"},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:THEME_COLORS.components.fieldDisabled,color:THEME_COLORS.components.fieldDisabledText,"& .MuiInputBase-input::placeholder":{color:THEME_COLORS.components.fieldDisabledPlaceholder}},"&.Mui-focused, &:hover":{backgroundColor:THEME_COLORS.components.fieldHover,color:THEME_COLORS.components.fieldHoverText,"& .MuiInputBase-input::placeholder":{color:THEME_COLORS.components.fieldHoverPlaceholder}},"&.Mui-error":{color:THEME_COLORS.states.failure}}),adornedStart:{"& .icon":{fill:THEME_COLORS.components.fieldText},"&:Mui-disabled .icon":{fill:THEME_COLORS.components.fieldDisabled},"&.Mui-error .icon":{fill:THEME_COLORS.states.failure}},adornedEnd:{"& .icon":{fill:THEME_COLORS.components.fieldText},"&:Mui-disabled .icon":{fill:THEME_COLORS.components.fieldDisabled},"&.Mui-error .icon":{fill:THEME_COLORS.states.failure}},input:({theme:on})=>({height:on.spacing(16),padding:on.spacing(6,8),"&::placeholder":{opacity:1,color:THEME_COLORS.components.fieldPlaceholder,transition:"color 0.2s ease"},"&:autofill":{transitionProperty:"background-color, color",transitionDelay:"86400s"}})}},MuiInputLabel:{defaultProps:{margin:"dense",shrink:!0},styleOverrides:{root:({theme:on})=>({position:"relative",transform:"none",fontSize:on.typography.body1.fontSize,fontWeight:on.typography.fontWeightMedium,color:THEME_COLORS.components.labelText,"&.Mui-focused":{color:THEME_COLORS.components.labelText},"&.Mui-error":{color:THEME_COLORS.states.failure}})}},MuiLinearProgress:{styleOverrides:{root:({theme:on})=>({height:on.spacing(2),"&.impact > .MuiLinearProgress-barColorPrimary":{backgroundColor:THEME_COLORS.chart.impact},"&.impact.MuiLinearProgress-colorPrimary":{backgroundColor:THEME_COLORS.chart.impactBackground}}),barColorPrimary:{backgroundColor:THEME_COLORS.base.spinner},colorPrimary:{backgroundColor:THEME_COLORS.base.separator}}},MuiLink:{styleOverrides:{root:({theme:on})=>({textDecoration:"underline",whiteSpace:"nowrap","& > .icon":{flex:`0 0 ${on.spacing(14)}`,width:on.spacing(14),height:on.spacing(14)},"&:hover":{textDecoration:"none"},"&.MuiTypography-root":{display:"inline-flex",gap:on.spacing(4),alignItems:"center",cursor:"pointer",color:THEME_COLORS.components.linkText+" !important",textDecorationColor:THEME_COLORS.components.linkText+" !important","& > .icon.link":{fill:THEME_COLORS.components.linkText}},"&.MuiTypography-root:hover":{color:THEME_COLORS.components.linkHoverText+" !important",textDecorationColor:THEME_COLORS.components.linkHoverText+" !important","& > .icon.link":{fill:THEME_COLORS.components.linkHoverText}}}),button:{"&.MuiTypography-root, .MuiPaper-root &.MuiTypography-root":{cursor:"pointer",color:THEME_COLORS.components.linkText,textDecorationColor:THEME_COLORS.components.linkText,"& > .icon.link":{fill:THEME_COLORS.components.linkText}},"&.MuiTypography-root:hover":{color:THEME_COLORS.components.linkHoverText,textDecorationColor:THEME_COLORS.components.linkHoverText,"& > .icon.link":{fill:THEME_COLORS.components.linkHoverText}}}}},MuiList:{defaultProps:{dense:!0},styleOverrides:{root:({theme:on})=>({overflow:"visible",padding:on.spacing(0,8),"& .MuiList-root":{padding:on.spacing(0)}})}},MuiListSubheader:{defaultProps:{disableSticky:!0},styleOverrides:{root:({theme:on})=>({padding:on.spacing(4,12),fontSize:on.typography.body2.fontSize,fontWeight:600,lineHeight:on.typography.body2.lineHeight,color:THEME_COLORS.base.textAlt,backgroundColor:"unset"})}},MuiListItemButton:{styleOverrides:{root:({theme:on})=>({display:"flex",alignItems:"center",gap:on.spacing(8),borderRadius:on.spacing(4),height:on.spacing(32),padding:on.spacing(3,12),overflow:"visible",fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,backgroundColor:THEME_COLORS.base.tab,"&:hover":{backgroundColor:THEME_COLORS.base.tabHover,"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabHoverText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabHoverText}},"&.Mui-selected":{position:"relative",backgroundColor:THEME_COLORS.base.tabActiveHover,"&:hover":{backgroundColor:THEME_COLORS.base.tabActiveHover,"&::before":{backgroundColor:THEME_COLORS.base.tabActiveHoverBorder},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabActiveHoverText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabActiveHoverText}},"&::before":{position:"absolute",top:on.spacing(2),bottom:on.spacing(2),left:on.spacing(-8),width:on.spacing(4),pointerEvents:"none",content:'""',borderRadius:on.spacing(2),backgroundColor:THEME_COLORS.base.tabActiveBorder},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabActiveText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabActiveText}},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabText}})}},MuiListItemIcon:{styleOverrides:{root:({theme:on})=>({"&.MuiListItemIcon-root":{display:"flex",alignItems:"center",justifyContent:"center",minWidth:on.spacing(16)}})}},MuiListItemText:{styleOverrides:{root:({theme:on})=>({"&.child-selected > .MuiListItemText-primary":{fontWeight:500},"& .MuiListItemText-primary":{display:"flex",flex:"1 1 auto",flexDirection:"row",alignItems:"center",gap:on.spacing(7),fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight}})}},MuiListItemSecondaryAction:{styleOverrides:{root:({theme:on})=>({"& .MuiTypography-body2":{fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight}})}},MuiMenu:{defaultProps:{MenuListProps:{disablePadding:!0},transitionDuration:0,slotProps:{paper:{elevation:1}}},styleOverrides:{root:{pointerEvents:"none"},list:({theme:on})=>({minWidth:on.spacing(180),padding:on.spacing(4)}),paper:({theme:on})=>({padding:0,pointerEvents:"auto",color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`})}},MuiMenuItem:{defaultProps:{disableRipple:!0,disableTouchRipple:!0},styleOverrides:{root:({theme:on})=>({height:on.spacing(24),minHeight:"auto",boxSizing:"content-box",borderRadius:on.spacing(4),padding:on.spacing(3,12),fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight,color:THEME_COLORS.components.menuItemText,backgroundColor:THEME_COLORS.components.menuItem,"&:hover, &:focus":{backgroundColor:THEME_COLORS.components.menuItemHover},"&.Mui-focusVisible":{color:THEME_COLORS.components.menuItemHoverText,backgroundColor:THEME_COLORS.components.menuItemHover},"&.Mui-selected, &.Mui-selected:hover":{color:THEME_COLORS.components.menuItemHoverText,backgroundColor:THEME_COLORS.components.menuItemHover},"+.MuiDivider-root":{marginTop:on.spacing(4),marginBottom:on.spacing(4),borderBottomWidth:on.spacing(1),borderColor:THEME_COLORS.components.menuSeparator},"& .MuiListItemSecondaryAction-root":{right:on.spacing(12)},"& > .MuiListItemIcon-root":{marginRight:on.spacing(6),minWidth:on.spacing(16)}})}},MuiMultiSectionDigitalClockSection:{styleOverrides:{root:({theme:on})=>({fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight,padding:on.spacing(4)}),item:({theme:on})=>({margin:"0 !important",width:"initial",height:on.spacing(24),padding:on.spacing(3,12),"&:not(.Mui-selected):hover, &:not(.Mui-selected):focus":{backgroundColor:THEME_COLORS.components.menuItemHover,color:THEME_COLORS.components.menuItemHoverText},"&.Mui-selected":{backgroundColor:THEME_COLORS.components.buttonPrimary,color:THEME_COLORS.components.buttonPrimaryText},"&.Mui-selected:hover, &.Mui-selected:focus":{backgroundColor:THEME_COLORS.components.buttonPrimaryHover,color:THEME_COLORS.components.buttonPrimaryHoverText}})}},MuiOutlinedInput:{defaultProps:{margin:"dense"},styleOverrides:{root:({theme:on})=>({"&.Mui-disabled .MuiOutlinedInput-notchedOutline, &.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:THEME_COLORS.components.fieldDisabledBorder},"&.Mui-focused .MuiOutlinedInput-notchedOutline, &:hover .MuiOutlinedInput-notchedOutline":{borderWidth:on.spacing(1),borderColor:THEME_COLORS.components.fieldHoverBorder},"&.Mui-error .MuiOutlinedInput-notchedOutline, &.Mui-error:hover .MuiOutlinedInput-notchedOutline, &.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:THEME_COLORS.states.failure}}),input:({theme:on})=>({height:on.spacing(16),padding:on.spacing(6,8)}),multiline:({theme:on})=>({padding:on.spacing(6,8),"& .MuiOutlinedInput-input":{padding:0,height:"auto",overflow:"auto !important","&::-webkit-scrollbar":{display:"block"}}}),notchedOutline:{top:0,borderColor:THEME_COLORS.components.fieldBorder,"& > legend":{display:"none"}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0}}},MuiPagination:{defaultProps:{shape:"rounded"}},MuiPaginationItem:{defaultProps:{size:"small"},styleOverrides:{root:({theme:on})=>({minWidth:on.spacing(30),height:on.spacing(30)}),text:({theme:on})=>({borderStyle:"solid",borderWidth:on.spacing(1),borderColor:"transparent",color:THEME_COLORS.components.buttonText,backgroundColor:"transparent","&:focus, &:focus.Mui-selected":{borderColor:THEME_COLORS.components.buttonHoverBorder,color:THEME_COLORS.components.buttonHoverText,backgroundColor:THEME_COLORS.components.buttonHover},"&:hover, &.Mui-selected":{borderColor:THEME_COLORS.components.buttonHoverBorder,color:THEME_COLORS.components.buttonHoverText,backgroundColor:THEME_COLORS.components.buttonHover},"&:disabled":{borderColor:"transparent",color:THEME_COLORS.components.buttonDisabledText,backgroundColor:"transparent"}})}},MuiPaper:{styleOverrides:{root:({theme:on})=>({"&.Menu":{padding:on.spacing(4,0),color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`},"&.MuiPaper-rounded":{borderRadius:on.spacing(4)}})}},MuiPickerPopper:{styleOverrides:{root:({theme:on})=>({padding:on.spacing(4),overflow:"visible"}),paper:({theme:on})=>({color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`,margin:`-${on.spacing(3)} -${on.spacing(4)}`})}},MuiPickersArrowSwitcher:{styleOverrides:{button:{color:THEME_COLORS.components.buttonText,"&.Mui-disabled":{color:THEME_COLORS.components.buttonDisabledText}},spacer:({theme:on})=>({width:on.spacing(24)})}},MuiPickersCalendarHeader:{styleOverrides:{root:({theme:on})=>({margin:on.spacing(8,16,4,24),padding:0}),labelContainer:({theme:on})=>({fontSize:on.typography.h6.fontSize,fontWeight:on.typography.h6.fontWeight,lineHeight:on.typography.h6.lineHeight})}},MuiPickersLayout:{styleOverrides:{root:({theme:on})=>({"& .MuiChip-sizeMedium":{height:on.spacing(28),fontSize:"1.083rem"}})}},MuiPickersTextField:{styleOverrides:{root:{"& > .MuiPickersInputBase-root":{padding:0}}}},MuiPopper:{defaultProps:{transition:!1},styleOverrides:{root:{overflow:"visible !important"}}},MuiSkeleton:{styleOverrides:{root:{backgroundColor:THEME_COLORS.base.text}}},MuiStepContent:{styleOverrides:{root:({theme:on})=>({marginLeft:on.spacing(15),paddingLeft:on.spacing(23)})}},MuiStepConnector:{styleOverrides:{root:({theme:on})=>({marginLeft:on.spacing(15)})}},MuiStepLabel:{styleOverrides:{iconContainer:({theme:on})=>({"& > .MuiStepIcon-root":{width:on.spacing(30),height:on.spacing(30),color:THEME_COLORS.states.none,fill:THEME_COLORS.states.none},"& > .MuiStepIcon-root > .MuiStepIcon-text":{fill:THEME_COLORS.states.noneText}}),label:{fontSize:"1.25rem",fontWeight:500,lineHeight:"1.5",color:THEME_COLORS.base.heading,"&.Mui-active":{color:THEME_COLORS.base.heading},"&.Mui-completed":{color:THEME_COLORS.base.heading},"&.Mui-disabled":{color:THEME_COLORS.base.heading}}}},MuiSwitch:{defaultProps:{size:"small"}},MuiTab:{defaultProps:{disableRipple:!0},styleOverrides:{root:({theme:on})=>({borderTopLeftRadius:0,borderTopRightRadius:0,paddingTop:0,paddingRight:on.spacing(2),paddingBottom:0,paddingLeft:on.spacing(2),minWidth:"initial",minHeight:on.spacing(30),fontWeight:"500",textTransform:"none","& > .label":{borderRadius:on.spacing(4),padding:on.spacing(4,6),color:THEME_COLORS.base.tabText,backgroundColor:THEME_COLORS.base.tab,transition:"background-color 0.2s ease, color 0.2s ease",".MuiBadge-dot":{top:0,right:on.spacing(-2)}},"&:hover > .label":{color:THEME_COLORS.base.tabHoverText,backgroundColor:THEME_COLORS.base.tabHover},"&.Mui-selected > .label":{color:THEME_COLORS.base.tabActiveText,backgroundColor:THEME_COLORS.base.tabActive},"&.Mui-selected:hover > .label":{color:THEME_COLORS.base.tabActiveText,backgroundColor:THEME_COLORS.base.tabActiveHover}})}},MuiTable:{defaultProps:{size:"small"},styleOverrides:{root:{borderCollapse:"separate"}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:THEME_COLORS.base.itemHover}}}},MuiTableCell:{defaultProps:{size:"medium"},styleOverrides:{root:({theme:on})=>({color:THEME_COLORS.base.text,fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,borderTop:`${on.spacing(1)} solid ${THEME_COLORS.base.border}`,borderBottomWidth:0}),sizeMedium:({theme:on})=>({height:on.spacing(36),padding:on.spacing(0,8)}),head:{border:0},footer:({theme:on})=>({borderBottom:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`})}},MuiTabs:{defaultProps:{TabIndicatorProps:{style:{transition:"none"}}},styleOverrides:{root:({theme:on})=>({minHeight:on.spacing(36),"& .MuiTabs-flexContainer":{overflow:"unset"},"& .MuiTabs-indicator":{borderRadius:on.spacing(3,3,0,0),height:on.spacing(3),backgroundColor:THEME_COLORS.base.tabActiveBorder},"& .MuiTabs-indicator:hover":{backgroundColor:THEME_COLORS.base.tabActiveHoverBorder},"& button":{minHeight:on.spacing(36),fontSize:on.typography.body1.fontSize}})}},MuiTextField:{defaultProps:{margin:"dense"},styleOverrides:{root:{margin:0}}},MuiToggleButton:{defaultProps:{disableRipple:!0},styleOverrides:{root:({theme:on})=>({border:`${on.spacing(1)} solid ${THEME_COLORS.components.toggleButtonBorder}`,borderRadius:on.spacing(4),backgroundColor:THEME_COLORS.components.toggleButton,height:on.spacing(30),"& > .icon":{fill:THEME_COLORS.components.toggleButtonText},"&:hover":{backgroundColor:THEME_COLORS.components.toggleButtonHover,"& > .icon":{fill:THEME_COLORS.components.toggleButtonHoverText}},"&.Mui-selected":{backgroundColor:THEME_COLORS.components.toggleButtonActive,"& > .icon":{fill:THEME_COLORS.components.toggleButtonActiveText}},"&.Mui-selected:hover":{backgroundColor:THEME_COLORS.components.toggleButtonActive,"& > .icon":{fill:THEME_COLORS.components.toggleButtonActiveText}}})}},MuiToggleButtonGroup:{styleOverrides:{root:({theme:on})=>({borderRadius:on.spacing(4),backgroundColor:"transparent",flex:"0 0 auto","& .MuiToggleButtonGroup-grouped:not(:first-of-type)":{marginLeft:0,borderLeft:0}})}},MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:on})=>({border:`${on.spacing(1)} solid ${THEME_COLORS.components.tooltipBorder}`,backgroundColor:THEME_COLORS.components.tooltip,boxShadow:`0 ${on.spacing(1)} ${on.spacing(4)} 0 ${THEME_COLORS.base.shadow}`,color:THEME_COLORS.components.tooltipText,[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]:{marginRight:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]:{marginLeft:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]:{marginBottom:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]:{marginTop:on.spacing(4)}})}},MuiToolbar:{defaultProps:{variant:"dense"},styleOverrides:{root:({theme:on})=>({width:"100%",height:on.spacing(36),minHeight:on.spacing(36),paddingLeft:0,paddingRight:0,"@media (min-width: 600px)":{paddingLeft:0,paddingRight:0}})}},MuiTypography:{defaultProps:{variant:"body1"},styleOverrides:{root:{"&.ellipsis":{overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",whiteSpace:"nowrap"}},h1:{"&.MuiTypography-root.MuiTypography-h1":{color:THEME_COLORS.base.heading}},h2:{"&.MuiTypography-root.MuiTypography-h2":{color:THEME_COLORS.base.heading}},h3:{"&.MuiTypography-root.MuiTypography-h3":{color:THEME_COLORS.base.heading}},h4:{"&.MuiTypography-root.MuiTypography-h4":{color:THEME_COLORS.base.heading}},h5:{"&.MuiTypography-root.MuiTypography-h5":{color:THEME_COLORS.base.heading}},h6:{"&.MuiTypography-root.MuiTypography-h6":{color:THEME_COLORS.base.heading}},subtitle1:{"&.MuiTypography-root.MuiTypography-subtitle1":{color:THEME_COLORS.base.textAlt}},subtitle2:{"&.MuiTypography-root.MuiTypography-subtitle2":{color:THEME_COLORS.base.textAlt}},body1:{"&.MuiTypography-root.MuiTypography-body1":{color:THEME_COLORS.base.text}},body2:{"&.MuiTypography-root.MuiTypography-body2":{color:THEME_COLORS.base.text}}}}}});function createNamedContext(on,In){const Rn=reactExports.createContext(on);return Rn.displayName=In,Rn}const COMPONENTS_CONTAINER_ID="components",ROOT_CONTAINER_ID="root",APP_LICENSE="ChilliCream License 1.0",APP_LICENSE_URL="https://chillicream.com/licensing/chillicream-license",APP_NAME="Nitro",APP_VERSION$1="31.0.2",APP_SCHEME="chillicream-nitro",APP_SIGNIN_PATH="signin-redirect",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",COMPANY_NAME="ChilliCream, Inc.",COMPANY_URL="https://chillicream.com",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION$1} (${APP_TYPE})`,OS_NAME=getOsName(),IS_MAC_LIKE=isMacLike();function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const on=navigator.userAgent.toLowerCase();return on.includes("mac os")||on.includes("ipad")}const CONTEXT_NOT_INITIALIZED="Context not initialized",HEADER_ACCEPT="Accept",HEADER_ACCEPT_ENCODING="Accept-Encoding",HEADER_AUTHORIZATION="Authorization",HEADER_CONTENT_TYPE="Content-Type",HEADER_FUSION_OPERATION_PLAN="Fusion-Operation-Plan",HEADER_ORIGIN="Origin",HEADER_SET_COOKIE="Set-Cookie",HEADER_USER_AGENT="User-Agent",HTTP_SCHEME_PATTERN=/^https?:\/\//i,HTTP_SECURE_SCHEME_PATTERN=/^https:\/\//i,WS_SCHEME_PATTERN=/^wss?:\/\//i,INTERPOLATION_PATTERN=/({{\s*[a-z0-9_\-|.:+#$!?;,]+\s*}})/gi,INTERPOLATION_VARIABLE_NAME_PATTERN=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,INTERPOLATION_EXPRESSION_PATTERN=/({{)(\s*)([a-z0-9_\-|.:+#$!?;,]+)(\s*)(}})/gi,FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN=/fusion-operation-plan/i,STARTS_WITH_INTERPOLATION_PATTERN=/^{{/i,VALID_NAME_PATTERN=/^[a-z0-9]{1}[_\-&+.:#!/\\()[\]{}a-z0-9\s]{0,63}$/i,TWENTY_FIVE_MILLISECONDS=25,FIFTY_MILLISECONDS=50,ONE_HUNDRED_MILLISECONDS=100,TWO_HUNDRED_MILLISECONDS=200,TWO_HUNDRED_FIFTY_MILLISECONDS=250,THREE_HUNDRED_MILLISECONDS=300,FIVE_HUNDRED_MILLISECONDS=500,ONE_SECOND$1=1e3,TWO_SECONDS=2e3,FIVE_SECONDS=5e3,TEN_SECONDS=1e4,THIRTY_SECONDS=3e4,ONE_MINUTE$1=6e4,TWO_MINUTES=12e4,FIVE_MINUTES=3e5,SIX_HOURS=216e5,NINETY_DAYS=7776e6,PERSONAL_ORGANIZATION_ID="personal",PERSONAL_WORKSPACE_TENANT="personal";function getDuration(on){return on?on>0&&on<1?"~1 ms":on>0&&on<ONE_SECOND$1?on+" ms":on>=ONE_SECOND$1&&on<=ONE_MINUTE$1?Math.round(on/ONE_SECOND$1)+" sec":Math.round(on/ONE_MINUTE$1)+" min":"N/A"}function round$5(on,In){const Rn=Math.pow(10,In);return Math.round(on*Rn)/Rn}function getSize$2(on){return on?on<1e3?on+" B":on>=1e3&&on<1e6?round$5(on/1e3,1)+" KB":on>=1e6&&on<1e9?round$5(on/1e6,1)+" MB":round$5(on/1e9,1)+" GB":"N/A"}const ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(In,Rn){this.#e=In,this.#t=Rn}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(In){return this.#e.dispatchEvent(In)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const In=this;let Rn=!1;return this.#r=new Promise((Mn,Ln)=>{if(In.aborted){Rn=!0,Ln(TIMEOUT_ABORT_ERROR);return}if(In.cancelled){Rn=!0,Mn();return}function Hn(){In.removeEventListener("abort",Hn),In.removeEventListener("cancelled",jn),Rn||(Rn=!0,Ln(TIMEOUT_ABORT_ERROR))}function jn(){In.removeEventListener("abort",Hn),In.removeEventListener("cancelled",jn),Rn||(Rn=!0,Mn())}In.addEventListener("abort",Hn),In.addEventListener("cancelled",jn)}),this.#r}addEventListener(In,Rn,Mn){this.#e.addEventListener(In,Rn,Mn)}removeEventListener(In,Rn,Mn){this.#e.removeEventListener(In,Rn,Mn)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(In){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},In)}get signal(){return this._signal}abort(In){this._controller.abort(In)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(on){return on instanceof DOMException&&on.name===ABORT_ERROR_NAME}function isTimeoutAbortError(on){return isAbortError(on)&&on.message===TIMEOUT_ABORT_ERROR_MESSAGE}function linkAbortSignals(on,In){const Rn=new AbortController;if(on.aborted||In.aborted)Rn.abort(on.reason??In.reason);else{let Mn=function(Hn){return()=>{Rn.signal.aborted||Rn.abort(Hn.reason)}},Ln=function(){Rn.signal.removeEventListener("abort",Ln),on.removeEventListener("abort",Mn(on)),In.removeEventListener("abort",Mn(In))};Rn.signal.addEventListener("abort",Ln),on.addEventListener("abort",Mn(on)),In.addEventListener("abort",Mn(In))}return Rn.signal}function createAbortScope(on,In,Rn){return Rn?Rn.aborted?Promise.reject(ABORT_ERROR):(Rn.addEventListener("abort",on),In().finally(()=>{Rn.removeEventListener("abort",on)})):In()}function distinct(on){return on.filter((In,Rn,Mn)=>Mn.indexOf(In)===Rn)}function equals(on,In){let Rn=on.length;if(Rn!==In.length)return!1;for(;Rn--;)if(on[Rn]!==In[Rn])return!1;return!0}class LinkedListImplementation{stack;constructor(In){this.stack=In?[...In]:[]}append(In){return this.stack.indexOf(In)===-1&&this.stack.push(In),this}find(In){const Rn=this.stack.indexOf(In);return Rn!==-1?this.stack[Rn]:null}getFirst(){return this.stack[0]||null}setFirst(In){const Rn=this.stack.indexOf(In);return Rn!==0&&In&&(Rn===-1?this.stack.splice(0,0,In):this.stack.splice(0,0,this.stack.splice(Rn,1).pop())),this}getLast(){return this.stack.length>0?this.stack[this.stack.length-1]:null}setLast(In){const Rn=this.stack.indexOf(In),Mn=this.stack.length-1;return(Rn===-1||Rn!==Mn)&&In&&(Rn===-1?this.stack.push(In):this.stack.push(this.stack.splice(Rn,1).pop())),this}count(){return this.stack.length}remove(...In){return In.forEach(Rn=>{const Mn=this.stack.indexOf(Rn);Mn!==-1&&this.stack.splice(Mn,1)}),this}update(In,Rn){const Mn=this.stack.indexOf(In);return Mn!==-1&&this.stack.splice(Mn,1,Rn),this}toArray(){return[].concat(this.stack)}}function createLinkedList(on){return new LinkedListImplementation(on)}function encodeBase64$1(on,In){return Buffer$1.from(on,In).toString("base64")}function decodeBase64(on,In){return Buffer$1.from(on,"base64").toString(In)}function beautifyEndpoint(on,In){if(on?.length){let Rn=on?.trim().replace(HTTP_SCHEME_PATTERN,"");const Mn=Rn.indexOf("/");return Mn===-1?Rn:Rn.substring(0,Mn)}return In??""}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(In,Rn){Rn&&(In.super_=Rn,In.prototype=Object.create(Rn.prototype,{constructor:{value:In,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(In,Rn){if(Rn){In.super_=Rn;var Mn=function(){};Mn.prototype=Rn.prototype,In.prototype=new Mn,In.prototype.constructor=In}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist$2={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(on){Object.defineProperties(on,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var In={},Rn={};Rn.byteLength=vi,Rn.toByteArray=mi,Rn.fromByteArray=Ei;for(var Mn=[],Ln=[],Hn=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wn=0,Yn=jn.length;Wn<Yn;++Wn)Mn[Wn]=jn[Wn],Ln[jn.charCodeAt(Wn)]=Wn;Ln[45]=62,Ln[95]=63;function hi(Ci){var Ai=Ci.length;if(Ai%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Ii=Ci.indexOf("=");Ii===-1&&(Ii=Ai);var Ni=Ii===Ai?0:4-Ii%4;return[Ii,Ni]}function vi(Ci){var Ai=hi(Ci),Ii=Ai[0],Ni=Ai[1];return(Ii+Ni)*3/4-Ni}function gi(Ci,Ai,Ii){return(Ai+Ii)*3/4-Ii}function mi(Ci){var Ai,Ii=hi(Ci),Ni=Ii[0],Pi=Ii[1],Vi=new Hn(gi(Ci,Ni,Pi)),Ui=0,Gi=Pi>0?Ni-4:Ni,Yi;for(Yi=0;Yi<Gi;Yi+=4)Ai=Ln[Ci.charCodeAt(Yi)]<<18|Ln[Ci.charCodeAt(Yi+1)]<<12|Ln[Ci.charCodeAt(Yi+2)]<<6|Ln[Ci.charCodeAt(Yi+3)],Vi[Ui++]=Ai>>16&255,Vi[Ui++]=Ai>>8&255,Vi[Ui++]=Ai&255;return Pi===2&&(Ai=Ln[Ci.charCodeAt(Yi)]<<2|Ln[Ci.charCodeAt(Yi+1)]>>4,Vi[Ui++]=Ai&255),Pi===1&&(Ai=Ln[Ci.charCodeAt(Yi)]<<10|Ln[Ci.charCodeAt(Yi+1)]<<4|Ln[Ci.charCodeAt(Yi+2)]>>2,Vi[Ui++]=Ai>>8&255,Vi[Ui++]=Ai&255),Vi}function yi(Ci){return Mn[Ci>>18&63]+Mn[Ci>>12&63]+Mn[Ci>>6&63]+Mn[Ci&63]}function bi(Ci,Ai,Ii){for(var Ni,Pi=[],Vi=Ai;Vi<Ii;Vi+=3)Ni=(Ci[Vi]<<16&16711680)+(Ci[Vi+1]<<8&65280)+(Ci[Vi+2]&255),Pi.push(yi(Ni));return Pi.join("")}function Ei(Ci){for(var Ai,Ii=Ci.length,Ni=Ii%3,Pi=[],Vi=16383,Ui=0,Gi=Ii-Ni;Ui<Gi;Ui+=Vi)Pi.push(bi(Ci,Ui,Ui+Vi>Gi?Gi:Ui+Vi));return Ni===1?(Ai=Ci[Ii-1],Pi.push(Mn[Ai>>2]+Mn[Ai<<4&63]+"==")):Ni===2&&(Ai=(Ci[Ii-2]<<8)+Ci[Ii-1],Pi.push(Mn[Ai>>10]+Mn[Ai>>4&63]+Mn[Ai<<2&63]+"=")),Pi.join("")}var _i={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_i.read=function(Ci,Ai,Ii,Ni,Pi){var Vi,Ui,Gi=Pi*8-Ni-1,Yi=(1<<Gi)-1,zi=Yi>>1,Mi=-7,Li=Ii?Pi-1:0,wi=Ii?-1:1,Ri=Ci[Ai+Li];for(Li+=wi,Vi=Ri&(1<<-Mi)-1,Ri>>=-Mi,Mi+=Gi;Mi>0;Vi=Vi*256+Ci[Ai+Li],Li+=wi,Mi-=8);for(Ui=Vi&(1<<-Mi)-1,Vi>>=-Mi,Mi+=Ni;Mi>0;Ui=Ui*256+Ci[Ai+Li],Li+=wi,Mi-=8);if(Vi===0)Vi=1-zi;else{if(Vi===Yi)return Ui?NaN:(Ri?-1:1)*(1/0);Ui=Ui+Math.pow(2,Ni),Vi=Vi-zi}return(Ri?-1:1)*Ui*Math.pow(2,Vi-Ni)},_i.write=function(Ci,Ai,Ii,Ni,Pi,Vi){var Ui,Gi,Yi,zi=Vi*8-Pi-1,Mi=(1<<zi)-1,Li=Mi>>1,wi=Pi===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ri=Ni?0:Vi-1,ki=Ni?1:-1,Bi=Ai<0||Ai===0&&1/Ai<0?1:0;for(Ai=Math.abs(Ai),isNaN(Ai)||Ai===1/0?(Gi=isNaN(Ai)?1:0,Ui=Mi):(Ui=Math.floor(Math.log(Ai)/Math.LN2),Ai*(Yi=Math.pow(2,-Ui))<1&&(Ui--,Yi*=2),Ui+Li>=1?Ai+=wi/Yi:Ai+=wi*Math.pow(2,1-Li),Ai*Yi>=2&&(Ui++,Yi/=2),Ui+Li>=Mi?(Gi=0,Ui=Mi):Ui+Li>=1?(Gi=(Ai*Yi-1)*Math.pow(2,Pi),Ui=Ui+Li):(Gi=Ai*Math.pow(2,Li-1)*Math.pow(2,Pi),Ui=0));Pi>=8;Ci[Ii+Ri]=Gi&255,Ri+=ki,Gi/=256,Pi-=8);for(Ui=Ui<<Pi|Gi,zi+=Pi;zi>0;Ci[Ii+Ri]=Ui&255,Ri+=ki,Ui/=256,zi-=8);Ci[Ii+Ri-ki]|=Bi*128};/*!
4236
+ ${THEME_COLORS.components.buttonIconBorder}`,color:THEME_COLORS.components.buttonIconText,backgroundColor:THEME_COLORS.components.buttonIcon,"&:disabled":{pointerEvents:"none",cursor:"default",opacity:.5,"&:hover":{backgroundColor:"initial"}},"& > .icon":{fill:THEME_COLORS.components.buttonIconText}}),sizeSmall:({theme:on})=>({width:on.spacing(30),height:on.spacing(30)})}},MuiInputAdornment:{styleOverrides:{root:({theme:on})=>({flexShrink:0,justifyContent:"center",margin:0,"&.MuiInputAdornment-sizeSmall":{minWidth:on.spacing(28),minHeight:on.spacing(28),"&.MuiInputAdornment-positionStart":{marginRight:on.spacing(-6)}}})}},MuiInputBase:{defaultProps:{margin:"dense"},styleOverrides:{root:({theme:on})=>({borderRadius:on.spacing(4),height:on.spacing(30),fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,backgroundColor:THEME_COLORS.components.field,color:THEME_COLORS.components.fieldText,transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease","&.MuiInputBase-multiline":{height:"auto"},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:THEME_COLORS.components.fieldDisabled,color:THEME_COLORS.components.fieldDisabledText,"& .MuiInputBase-input::placeholder":{color:THEME_COLORS.components.fieldDisabledPlaceholder}},"&.Mui-focused, &:hover":{backgroundColor:THEME_COLORS.components.fieldHover,color:THEME_COLORS.components.fieldHoverText,"& .MuiInputBase-input::placeholder":{color:THEME_COLORS.components.fieldHoverPlaceholder}},"&.Mui-error":{color:THEME_COLORS.states.failure}}),adornedStart:{"& .icon":{fill:THEME_COLORS.components.fieldText},"&:Mui-disabled .icon":{fill:THEME_COLORS.components.fieldDisabled},"&.Mui-error .icon":{fill:THEME_COLORS.states.failure}},adornedEnd:{"& .icon":{fill:THEME_COLORS.components.fieldText},"&:Mui-disabled .icon":{fill:THEME_COLORS.components.fieldDisabled},"&.Mui-error .icon":{fill:THEME_COLORS.states.failure}},input:({theme:on})=>({height:on.spacing(16),padding:on.spacing(6,8),"&::placeholder":{opacity:1,color:THEME_COLORS.components.fieldPlaceholder,transition:"color 0.2s ease"},"&:autofill":{transitionProperty:"background-color, color",transitionDelay:"86400s"}})}},MuiInputLabel:{defaultProps:{margin:"dense",shrink:!0},styleOverrides:{root:({theme:on})=>({position:"relative",transform:"none",fontSize:on.typography.body1.fontSize,fontWeight:on.typography.fontWeightMedium,color:THEME_COLORS.components.labelText,"&.Mui-focused":{color:THEME_COLORS.components.labelText},"&.Mui-error":{color:THEME_COLORS.states.failure}})}},MuiLinearProgress:{styleOverrides:{root:({theme:on})=>({height:on.spacing(2),"&.impact > .MuiLinearProgress-barColorPrimary":{backgroundColor:THEME_COLORS.chart.impact},"&.impact.MuiLinearProgress-colorPrimary":{backgroundColor:THEME_COLORS.chart.impactBackground}}),barColorPrimary:{backgroundColor:THEME_COLORS.base.spinner},colorPrimary:{backgroundColor:THEME_COLORS.base.separator}}},MuiLink:{styleOverrides:{root:({theme:on})=>({textDecoration:"underline",whiteSpace:"nowrap","& > .icon":{flex:`0 0 ${on.spacing(14)}`,width:on.spacing(14),height:on.spacing(14)},"&:hover":{textDecoration:"none"},"&.MuiTypography-root":{display:"inline-flex",gap:on.spacing(4),alignItems:"center",cursor:"pointer",color:THEME_COLORS.components.linkText+" !important",textDecorationColor:THEME_COLORS.components.linkText+" !important","& > .icon.link":{fill:THEME_COLORS.components.linkText}},"&.MuiTypography-root:hover":{color:THEME_COLORS.components.linkHoverText+" !important",textDecorationColor:THEME_COLORS.components.linkHoverText+" !important","& > .icon.link":{fill:THEME_COLORS.components.linkHoverText}}}),button:{"&.MuiTypography-root, .MuiPaper-root &.MuiTypography-root":{cursor:"pointer",color:THEME_COLORS.components.linkText,textDecorationColor:THEME_COLORS.components.linkText,"& > .icon.link":{fill:THEME_COLORS.components.linkText}},"&.MuiTypography-root:hover":{color:THEME_COLORS.components.linkHoverText,textDecorationColor:THEME_COLORS.components.linkHoverText,"& > .icon.link":{fill:THEME_COLORS.components.linkHoverText}}}}},MuiList:{defaultProps:{dense:!0},styleOverrides:{root:({theme:on})=>({overflow:"visible",padding:on.spacing(0,8),"& .MuiList-root":{padding:on.spacing(0)}})}},MuiListSubheader:{defaultProps:{disableSticky:!0},styleOverrides:{root:({theme:on})=>({padding:on.spacing(4,12),fontSize:on.typography.body2.fontSize,fontWeight:600,lineHeight:on.typography.body2.lineHeight,color:THEME_COLORS.base.textAlt,backgroundColor:"unset"})}},MuiListItemButton:{styleOverrides:{root:({theme:on})=>({display:"flex",alignItems:"center",gap:on.spacing(8),borderRadius:on.spacing(4),height:on.spacing(32),padding:on.spacing(3,12),overflow:"visible",fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,backgroundColor:THEME_COLORS.base.tab,"&:hover":{backgroundColor:THEME_COLORS.base.tabHover,"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabHoverText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabHoverText}},"&.Mui-selected":{position:"relative",backgroundColor:THEME_COLORS.base.tabActiveHover,"&:hover":{backgroundColor:THEME_COLORS.base.tabActiveHover,"&::before":{backgroundColor:THEME_COLORS.base.tabActiveHoverBorder},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabActiveHoverText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabActiveHoverText}},"&::before":{position:"absolute",top:on.spacing(2),bottom:on.spacing(2),left:on.spacing(-8),width:on.spacing(4),pointerEvents:"none",content:'""',borderRadius:on.spacing(2),backgroundColor:THEME_COLORS.base.tabActiveBorder},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabActiveText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabActiveText}},"& > .MuiListItemIcon-root > .icon":{fill:THEME_COLORS.base.tabText},"& > .MuiListItemText-root > .MuiListItemText-primary":{color:THEME_COLORS.base.tabText}})}},MuiListItemIcon:{styleOverrides:{root:({theme:on})=>({"&.MuiListItemIcon-root":{display:"flex",alignItems:"center",justifyContent:"center",minWidth:on.spacing(16)}})}},MuiListItemText:{styleOverrides:{root:({theme:on})=>({"&.child-selected > .MuiListItemText-primary":{fontWeight:500},"& .MuiListItemText-primary":{display:"flex",flex:"1 1 auto",flexDirection:"row",alignItems:"center",gap:on.spacing(7),fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight}})}},MuiListItemSecondaryAction:{styleOverrides:{root:({theme:on})=>({"& .MuiTypography-body2":{fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight}})}},MuiMenu:{defaultProps:{MenuListProps:{disablePadding:!0},transitionDuration:0,slotProps:{paper:{elevation:1}}},styleOverrides:{root:{pointerEvents:"none"},list:({theme:on})=>({minWidth:on.spacing(180),padding:on.spacing(4)}),paper:({theme:on})=>({padding:0,pointerEvents:"auto",color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`})}},MuiMenuItem:{defaultProps:{disableRipple:!0,disableTouchRipple:!0},styleOverrides:{root:({theme:on})=>({height:on.spacing(24),minHeight:"auto",boxSizing:"content-box",borderRadius:on.spacing(4),padding:on.spacing(3,12),fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight,color:THEME_COLORS.components.menuItemText,backgroundColor:THEME_COLORS.components.menuItem,"&:hover, &:focus":{backgroundColor:THEME_COLORS.components.menuItemHover},"&.Mui-focusVisible":{color:THEME_COLORS.components.menuItemHoverText,backgroundColor:THEME_COLORS.components.menuItemHover},"&.Mui-selected, &.Mui-selected:hover":{color:THEME_COLORS.components.menuItemHoverText,backgroundColor:THEME_COLORS.components.menuItemHover},"+.MuiDivider-root":{marginTop:on.spacing(4),marginBottom:on.spacing(4),borderBottomWidth:on.spacing(1),borderColor:THEME_COLORS.components.menuSeparator},"& .MuiListItemSecondaryAction-root":{right:on.spacing(12)},"& > .MuiListItemIcon-root":{marginRight:on.spacing(6),minWidth:on.spacing(16)}})}},MuiMultiSectionDigitalClockSection:{styleOverrides:{root:({theme:on})=>({fontSize:on.typography.body1.fontSize,fontWeight:on.typography.body1.fontWeight,lineHeight:on.typography.body1.lineHeight,padding:on.spacing(4)}),item:({theme:on})=>({margin:"0 !important",width:"initial",height:on.spacing(24),padding:on.spacing(3,12),"&:not(.Mui-selected):hover, &:not(.Mui-selected):focus":{backgroundColor:THEME_COLORS.components.menuItemHover,color:THEME_COLORS.components.menuItemHoverText},"&.Mui-selected":{backgroundColor:THEME_COLORS.components.buttonPrimary,color:THEME_COLORS.components.buttonPrimaryText},"&.Mui-selected:hover, &.Mui-selected:focus":{backgroundColor:THEME_COLORS.components.buttonPrimaryHover,color:THEME_COLORS.components.buttonPrimaryHoverText}})}},MuiOutlinedInput:{defaultProps:{margin:"dense"},styleOverrides:{root:({theme:on})=>({"&.Mui-disabled .MuiOutlinedInput-notchedOutline, &.Mui-disabled:hover .MuiOutlinedInput-notchedOutline":{borderColor:THEME_COLORS.components.fieldDisabledBorder},"&.Mui-focused .MuiOutlinedInput-notchedOutline, &:hover .MuiOutlinedInput-notchedOutline":{borderWidth:on.spacing(1),borderColor:THEME_COLORS.components.fieldHoverBorder},"&.Mui-error .MuiOutlinedInput-notchedOutline, &.Mui-error:hover .MuiOutlinedInput-notchedOutline, &.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:THEME_COLORS.states.failure}}),input:({theme:on})=>({height:on.spacing(16),padding:on.spacing(6,8)}),multiline:({theme:on})=>({padding:on.spacing(6,8),"& .MuiOutlinedInput-input":{padding:0,height:"auto",overflow:"auto !important","&::-webkit-scrollbar":{display:"block"}}}),notchedOutline:{top:0,borderColor:THEME_COLORS.components.fieldBorder,"& > legend":{display:"none"}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0}}},MuiPagination:{defaultProps:{shape:"rounded"}},MuiPaginationItem:{defaultProps:{size:"small"},styleOverrides:{root:({theme:on})=>({minWidth:on.spacing(30),height:on.spacing(30)}),text:({theme:on})=>({borderStyle:"solid",borderWidth:on.spacing(1),borderColor:"transparent",color:THEME_COLORS.components.buttonText,backgroundColor:"transparent","&:focus, &:focus.Mui-selected":{borderColor:THEME_COLORS.components.buttonHoverBorder,color:THEME_COLORS.components.buttonHoverText,backgroundColor:THEME_COLORS.components.buttonHover},"&:hover, &.Mui-selected":{borderColor:THEME_COLORS.components.buttonHoverBorder,color:THEME_COLORS.components.buttonHoverText,backgroundColor:THEME_COLORS.components.buttonHover},"&:disabled":{borderColor:"transparent",color:THEME_COLORS.components.buttonDisabledText,backgroundColor:"transparent"}})}},MuiPaper:{styleOverrides:{root:({theme:on})=>({"&.Menu":{padding:on.spacing(4,0),color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`},"&.MuiPaper-rounded":{borderRadius:on.spacing(4)}})}},MuiPickerPopper:{styleOverrides:{root:({theme:on})=>({padding:on.spacing(4),overflow:"visible"}),paper:({theme:on})=>({color:THEME_COLORS.base.text,backgroundColor:THEME_COLORS.components.menu,border:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`,margin:`-${on.spacing(3)} -${on.spacing(4)}`})}},MuiPickersArrowSwitcher:{styleOverrides:{button:{color:THEME_COLORS.components.buttonText,"&.Mui-disabled":{color:THEME_COLORS.components.buttonDisabledText}},spacer:({theme:on})=>({width:on.spacing(24)})}},MuiPickersCalendarHeader:{styleOverrides:{root:({theme:on})=>({margin:on.spacing(8,16,4,24),padding:0}),labelContainer:({theme:on})=>({fontSize:on.typography.h6.fontSize,fontWeight:on.typography.h6.fontWeight,lineHeight:on.typography.h6.lineHeight})}},MuiPickersLayout:{styleOverrides:{root:({theme:on})=>({"& .MuiChip-sizeMedium":{height:on.spacing(28),fontSize:"1.083rem"}})}},MuiPickersTextField:{styleOverrides:{root:{"& > .MuiPickersInputBase-root":{padding:0}}}},MuiPopper:{defaultProps:{transition:!1},styleOverrides:{root:{overflow:"visible !important"}}},MuiSkeleton:{styleOverrides:{root:{backgroundColor:THEME_COLORS.base.text}}},MuiStepContent:{styleOverrides:{root:({theme:on})=>({marginLeft:on.spacing(15),paddingLeft:on.spacing(23)})}},MuiStepConnector:{styleOverrides:{root:({theme:on})=>({marginLeft:on.spacing(15)})}},MuiStepLabel:{styleOverrides:{iconContainer:({theme:on})=>({"& > .MuiStepIcon-root":{width:on.spacing(30),height:on.spacing(30),color:THEME_COLORS.states.none,fill:THEME_COLORS.states.none},"& > .MuiStepIcon-root > .MuiStepIcon-text":{fill:THEME_COLORS.states.noneText}}),label:{fontSize:"1.25rem",fontWeight:500,lineHeight:"1.5",color:THEME_COLORS.base.heading,"&.Mui-active":{color:THEME_COLORS.base.heading},"&.Mui-completed":{color:THEME_COLORS.base.heading},"&.Mui-disabled":{color:THEME_COLORS.base.heading}}}},MuiSwitch:{defaultProps:{size:"small"}},MuiTab:{defaultProps:{disableRipple:!0},styleOverrides:{root:({theme:on})=>({borderTopLeftRadius:0,borderTopRightRadius:0,paddingTop:0,paddingRight:on.spacing(2),paddingBottom:0,paddingLeft:on.spacing(2),minWidth:"initial",minHeight:on.spacing(30),fontWeight:"500",textTransform:"none","& > .label":{borderRadius:on.spacing(4),padding:on.spacing(4,6),color:THEME_COLORS.base.tabText,backgroundColor:THEME_COLORS.base.tab,transition:"background-color 0.2s ease, color 0.2s ease",".MuiBadge-dot":{top:0,right:on.spacing(-2)}},"&:hover > .label":{color:THEME_COLORS.base.tabHoverText,backgroundColor:THEME_COLORS.base.tabHover},"&.Mui-selected > .label":{color:THEME_COLORS.base.tabActiveText,backgroundColor:THEME_COLORS.base.tabActive},"&.Mui-selected:hover > .label":{color:THEME_COLORS.base.tabActiveText,backgroundColor:THEME_COLORS.base.tabActiveHover}})}},MuiTable:{defaultProps:{size:"small"},styleOverrides:{root:{borderCollapse:"separate"}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:THEME_COLORS.base.itemHover}}}},MuiTableCell:{defaultProps:{size:"medium"},styleOverrides:{root:({theme:on})=>({color:THEME_COLORS.base.text,fontSize:on.typography.body1.fontSize,lineHeight:on.typography.body1.lineHeight,borderTop:`${on.spacing(1)} solid ${THEME_COLORS.base.border}`,borderBottomWidth:0}),sizeMedium:({theme:on})=>({height:on.spacing(36),padding:on.spacing(0,8)}),head:{border:0},footer:({theme:on})=>({borderBottom:`${on.spacing(1)} solid ${THEME_COLORS.components.menuBorder}`})}},MuiTabs:{defaultProps:{TabIndicatorProps:{style:{transition:"none"}}},styleOverrides:{root:({theme:on})=>({minHeight:on.spacing(36),"& .MuiTabs-flexContainer":{overflow:"unset"},"& .MuiTabs-indicator":{borderRadius:on.spacing(3,3,0,0),height:on.spacing(3),backgroundColor:THEME_COLORS.base.tabActiveBorder},"& .MuiTabs-indicator:hover":{backgroundColor:THEME_COLORS.base.tabActiveHoverBorder},"& button":{minHeight:on.spacing(36),fontSize:on.typography.body1.fontSize}})}},MuiTextField:{defaultProps:{margin:"dense"},styleOverrides:{root:{margin:0}}},MuiToggleButton:{defaultProps:{disableRipple:!0},styleOverrides:{root:({theme:on})=>({border:`${on.spacing(1)} solid ${THEME_COLORS.components.toggleButtonBorder}`,borderRadius:on.spacing(4),backgroundColor:THEME_COLORS.components.toggleButton,height:on.spacing(30),"& > .icon":{fill:THEME_COLORS.components.toggleButtonText},"&:hover":{backgroundColor:THEME_COLORS.components.toggleButtonHover,"& > .icon":{fill:THEME_COLORS.components.toggleButtonHoverText}},"&.Mui-selected":{backgroundColor:THEME_COLORS.components.toggleButtonActive,"& > .icon":{fill:THEME_COLORS.components.toggleButtonActiveText}},"&.Mui-selected:hover":{backgroundColor:THEME_COLORS.components.toggleButtonActive,"& > .icon":{fill:THEME_COLORS.components.toggleButtonActiveText}}})}},MuiToggleButtonGroup:{styleOverrides:{root:({theme:on})=>({borderRadius:on.spacing(4),backgroundColor:"transparent",flex:"0 0 auto","& .MuiToggleButtonGroup-grouped:not(:first-of-type)":{marginLeft:0,borderLeft:0}})}},MuiTooltip:{defaultProps:{disableInteractive:!0},styleOverrides:{tooltip:({theme:on})=>({border:`${on.spacing(1)} solid ${THEME_COLORS.components.tooltipBorder}`,backgroundColor:THEME_COLORS.components.tooltip,boxShadow:`0 ${on.spacing(1)} ${on.spacing(4)} 0 ${THEME_COLORS.base.shadow}`,color:THEME_COLORS.components.tooltipText,[`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]:{marginRight:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]:{marginLeft:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]:{marginBottom:on.spacing(4)},[`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]:{marginTop:on.spacing(4)}})}},MuiToolbar:{defaultProps:{variant:"dense"},styleOverrides:{root:({theme:on})=>({width:"100%",height:on.spacing(36),minHeight:on.spacing(36),paddingLeft:0,paddingRight:0,"@media (min-width: 600px)":{paddingLeft:0,paddingRight:0}})}},MuiTypography:{defaultProps:{variant:"body1"},styleOverrides:{root:{"&.ellipsis":{overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",whiteSpace:"nowrap"}},h1:{"&.MuiTypography-root.MuiTypography-h1":{color:THEME_COLORS.base.heading}},h2:{"&.MuiTypography-root.MuiTypography-h2":{color:THEME_COLORS.base.heading}},h3:{"&.MuiTypography-root.MuiTypography-h3":{color:THEME_COLORS.base.heading}},h4:{"&.MuiTypography-root.MuiTypography-h4":{color:THEME_COLORS.base.heading}},h5:{"&.MuiTypography-root.MuiTypography-h5":{color:THEME_COLORS.base.heading}},h6:{"&.MuiTypography-root.MuiTypography-h6":{color:THEME_COLORS.base.heading}},subtitle1:{"&.MuiTypography-root.MuiTypography-subtitle1":{color:THEME_COLORS.base.textAlt}},subtitle2:{"&.MuiTypography-root.MuiTypography-subtitle2":{color:THEME_COLORS.base.textAlt}},body1:{"&.MuiTypography-root.MuiTypography-body1":{color:THEME_COLORS.base.text}},body2:{"&.MuiTypography-root.MuiTypography-body2":{color:THEME_COLORS.base.text}}}}}});function createNamedContext(on,In){const Rn=reactExports.createContext(on);return Rn.displayName=In,Rn}const COMPONENTS_CONTAINER_ID="components",ROOT_CONTAINER_ID="root",APP_LICENSE="ChilliCream License 1.0",APP_LICENSE_URL="https://chillicream.com/licensing/chillicream-license",APP_NAME="Nitro",APP_VERSION$1="31.0.3",APP_SCHEME="chillicream-nitro",APP_SIGNIN_PATH="signin-redirect",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",COMPANY_NAME="ChilliCream, Inc.",COMPANY_URL="https://chillicream.com",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION$1} (${APP_TYPE})`,OS_NAME=getOsName(),IS_MAC_LIKE=isMacLike();function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const on=navigator.userAgent.toLowerCase();return on.includes("mac os")||on.includes("ipad")}const CONTEXT_NOT_INITIALIZED="Context not initialized",HEADER_ACCEPT="Accept",HEADER_ACCEPT_ENCODING="Accept-Encoding",HEADER_AUTHORIZATION="Authorization",HEADER_CONTENT_TYPE="Content-Type",HEADER_FUSION_OPERATION_PLAN="Fusion-Operation-Plan",HEADER_ORIGIN="Origin",HEADER_SET_COOKIE="Set-Cookie",HEADER_USER_AGENT="User-Agent",HTTP_SCHEME_PATTERN=/^https?:\/\//i,HTTP_SECURE_SCHEME_PATTERN=/^https:\/\//i,WS_SCHEME_PATTERN=/^wss?:\/\//i,INTERPOLATION_PATTERN=/({{\s*[a-z0-9_\-|.:+#$!?;,]+\s*}})/gi,INTERPOLATION_VARIABLE_NAME_PATTERN=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,INTERPOLATION_EXPRESSION_PATTERN=/({{)(\s*)([a-z0-9_\-|.:+#$!?;,]+)(\s*)(}})/gi,FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN=/fusion-operation-plan/i,STARTS_WITH_INTERPOLATION_PATTERN=/^{{/i,VALID_NAME_PATTERN=/^[a-z0-9]{1}[_\-&+.:#!/\\()[\]{}a-z0-9\s]{0,63}$/i,TWENTY_FIVE_MILLISECONDS=25,FIFTY_MILLISECONDS=50,ONE_HUNDRED_MILLISECONDS=100,TWO_HUNDRED_MILLISECONDS=200,TWO_HUNDRED_FIFTY_MILLISECONDS=250,THREE_HUNDRED_MILLISECONDS=300,FIVE_HUNDRED_MILLISECONDS=500,ONE_SECOND$1=1e3,TWO_SECONDS=2e3,FIVE_SECONDS=5e3,TEN_SECONDS=1e4,THIRTY_SECONDS=3e4,ONE_MINUTE$1=6e4,TWO_MINUTES=12e4,FIVE_MINUTES=3e5,SIX_HOURS=216e5,NINETY_DAYS=7776e6,PERSONAL_ORGANIZATION_ID="personal",PERSONAL_WORKSPACE_TENANT="personal";function getDuration(on){return on?on>0&&on<1?"~1 ms":on>0&&on<ONE_SECOND$1?on+" ms":on>=ONE_SECOND$1&&on<=ONE_MINUTE$1?Math.round(on/ONE_SECOND$1)+" sec":Math.round(on/ONE_MINUTE$1)+" min":"N/A"}function round$5(on,In){const Rn=Math.pow(10,In);return Math.round(on*Rn)/Rn}function getSize$2(on){return on?on<1e3?on+" B":on>=1e3&&on<1e6?round$5(on/1e3,1)+" KB":on>=1e6&&on<1e9?round$5(on/1e6,1)+" MB":round$5(on/1e9,1)+" GB":"N/A"}const ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(In,Rn){this.#e=In,this.#t=Rn}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(In){return this.#e.dispatchEvent(In)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const In=this;let Rn=!1;return this.#r=new Promise((Mn,Ln)=>{if(In.aborted){Rn=!0,Ln(TIMEOUT_ABORT_ERROR);return}if(In.cancelled){Rn=!0,Mn();return}function Hn(){In.removeEventListener("abort",Hn),In.removeEventListener("cancelled",jn),Rn||(Rn=!0,Ln(TIMEOUT_ABORT_ERROR))}function jn(){In.removeEventListener("abort",Hn),In.removeEventListener("cancelled",jn),Rn||(Rn=!0,Mn())}In.addEventListener("abort",Hn),In.addEventListener("cancelled",jn)}),this.#r}addEventListener(In,Rn,Mn){this.#e.addEventListener(In,Rn,Mn)}removeEventListener(In,Rn,Mn){this.#e.removeEventListener(In,Rn,Mn)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(In){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},In)}get signal(){return this._signal}abort(In){this._controller.abort(In)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(on){return on instanceof DOMException&&on.name===ABORT_ERROR_NAME}function isTimeoutAbortError(on){return isAbortError(on)&&on.message===TIMEOUT_ABORT_ERROR_MESSAGE}function linkAbortSignals(on,In){const Rn=new AbortController;if(on.aborted||In.aborted)Rn.abort(on.reason??In.reason);else{let Mn=function(Hn){return()=>{Rn.signal.aborted||Rn.abort(Hn.reason)}},Ln=function(){Rn.signal.removeEventListener("abort",Ln),on.removeEventListener("abort",Mn(on)),In.removeEventListener("abort",Mn(In))};Rn.signal.addEventListener("abort",Ln),on.addEventListener("abort",Mn(on)),In.addEventListener("abort",Mn(In))}return Rn.signal}function createAbortScope(on,In,Rn){return Rn?Rn.aborted?Promise.reject(ABORT_ERROR):(Rn.addEventListener("abort",on),In().finally(()=>{Rn.removeEventListener("abort",on)})):In()}function distinct(on){return on.filter((In,Rn,Mn)=>Mn.indexOf(In)===Rn)}function equals(on,In){let Rn=on.length;if(Rn!==In.length)return!1;for(;Rn--;)if(on[Rn]!==In[Rn])return!1;return!0}class LinkedListImplementation{stack;constructor(In){this.stack=In?[...In]:[]}append(In){return this.stack.indexOf(In)===-1&&this.stack.push(In),this}find(In){const Rn=this.stack.indexOf(In);return Rn!==-1?this.stack[Rn]:null}getFirst(){return this.stack[0]||null}setFirst(In){const Rn=this.stack.indexOf(In);return Rn!==0&&In&&(Rn===-1?this.stack.splice(0,0,In):this.stack.splice(0,0,this.stack.splice(Rn,1).pop())),this}getLast(){return this.stack.length>0?this.stack[this.stack.length-1]:null}setLast(In){const Rn=this.stack.indexOf(In),Mn=this.stack.length-1;return(Rn===-1||Rn!==Mn)&&In&&(Rn===-1?this.stack.push(In):this.stack.push(this.stack.splice(Rn,1).pop())),this}count(){return this.stack.length}remove(...In){return In.forEach(Rn=>{const Mn=this.stack.indexOf(Rn);Mn!==-1&&this.stack.splice(Mn,1)}),this}update(In,Rn){const Mn=this.stack.indexOf(In);return Mn!==-1&&this.stack.splice(Mn,1,Rn),this}toArray(){return[].concat(this.stack)}}function createLinkedList(on){return new LinkedListImplementation(on)}function encodeBase64$1(on,In){return Buffer$1.from(on,In).toString("base64")}function decodeBase64(on,In){return Buffer$1.from(on,"base64").toString(In)}function beautifyEndpoint(on,In){if(on?.length){let Rn=on?.trim().replace(HTTP_SCHEME_PATTERN,"");const Mn=Rn.indexOf("/");return Mn===-1?Rn:Rn.substring(0,Mn)}return In??""}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(In,Rn){Rn&&(In.super_=Rn,In.prototype=Object.create(Rn.prototype,{constructor:{value:In,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(In,Rn){if(Rn){In.super_=Rn;var Mn=function(){};Mn.prototype=Rn.prototype,In.prototype=new Mn,In.prototype.constructor=In}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist$2={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(on){Object.defineProperties(on,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var In={},Rn={};Rn.byteLength=vi,Rn.toByteArray=mi,Rn.fromByteArray=Ei;for(var Mn=[],Ln=[],Hn=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wn=0,Yn=jn.length;Wn<Yn;++Wn)Mn[Wn]=jn[Wn],Ln[jn.charCodeAt(Wn)]=Wn;Ln[45]=62,Ln[95]=63;function hi(Ci){var Ai=Ci.length;if(Ai%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Ii=Ci.indexOf("=");Ii===-1&&(Ii=Ai);var Ni=Ii===Ai?0:4-Ii%4;return[Ii,Ni]}function vi(Ci){var Ai=hi(Ci),Ii=Ai[0],Ni=Ai[1];return(Ii+Ni)*3/4-Ni}function gi(Ci,Ai,Ii){return(Ai+Ii)*3/4-Ii}function mi(Ci){var Ai,Ii=hi(Ci),Ni=Ii[0],Pi=Ii[1],Vi=new Hn(gi(Ci,Ni,Pi)),Ui=0,Gi=Pi>0?Ni-4:Ni,Yi;for(Yi=0;Yi<Gi;Yi+=4)Ai=Ln[Ci.charCodeAt(Yi)]<<18|Ln[Ci.charCodeAt(Yi+1)]<<12|Ln[Ci.charCodeAt(Yi+2)]<<6|Ln[Ci.charCodeAt(Yi+3)],Vi[Ui++]=Ai>>16&255,Vi[Ui++]=Ai>>8&255,Vi[Ui++]=Ai&255;return Pi===2&&(Ai=Ln[Ci.charCodeAt(Yi)]<<2|Ln[Ci.charCodeAt(Yi+1)]>>4,Vi[Ui++]=Ai&255),Pi===1&&(Ai=Ln[Ci.charCodeAt(Yi)]<<10|Ln[Ci.charCodeAt(Yi+1)]<<4|Ln[Ci.charCodeAt(Yi+2)]>>2,Vi[Ui++]=Ai>>8&255,Vi[Ui++]=Ai&255),Vi}function yi(Ci){return Mn[Ci>>18&63]+Mn[Ci>>12&63]+Mn[Ci>>6&63]+Mn[Ci&63]}function bi(Ci,Ai,Ii){for(var Ni,Pi=[],Vi=Ai;Vi<Ii;Vi+=3)Ni=(Ci[Vi]<<16&16711680)+(Ci[Vi+1]<<8&65280)+(Ci[Vi+2]&255),Pi.push(yi(Ni));return Pi.join("")}function Ei(Ci){for(var Ai,Ii=Ci.length,Ni=Ii%3,Pi=[],Vi=16383,Ui=0,Gi=Ii-Ni;Ui<Gi;Ui+=Vi)Pi.push(bi(Ci,Ui,Ui+Vi>Gi?Gi:Ui+Vi));return Ni===1?(Ai=Ci[Ii-1],Pi.push(Mn[Ai>>2]+Mn[Ai<<4&63]+"==")):Ni===2&&(Ai=(Ci[Ii-2]<<8)+Ci[Ii-1],Pi.push(Mn[Ai>>10]+Mn[Ai>>4&63]+Mn[Ai<<2&63]+"=")),Pi.join("")}var _i={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_i.read=function(Ci,Ai,Ii,Ni,Pi){var Vi,Ui,Gi=Pi*8-Ni-1,Yi=(1<<Gi)-1,zi=Yi>>1,Mi=-7,Li=Ii?Pi-1:0,wi=Ii?-1:1,Ri=Ci[Ai+Li];for(Li+=wi,Vi=Ri&(1<<-Mi)-1,Ri>>=-Mi,Mi+=Gi;Mi>0;Vi=Vi*256+Ci[Ai+Li],Li+=wi,Mi-=8);for(Ui=Vi&(1<<-Mi)-1,Vi>>=-Mi,Mi+=Ni;Mi>0;Ui=Ui*256+Ci[Ai+Li],Li+=wi,Mi-=8);if(Vi===0)Vi=1-zi;else{if(Vi===Yi)return Ui?NaN:(Ri?-1:1)*(1/0);Ui=Ui+Math.pow(2,Ni),Vi=Vi-zi}return(Ri?-1:1)*Ui*Math.pow(2,Vi-Ni)},_i.write=function(Ci,Ai,Ii,Ni,Pi,Vi){var Ui,Gi,Yi,zi=Vi*8-Pi-1,Mi=(1<<zi)-1,Li=Mi>>1,wi=Pi===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ri=Ni?0:Vi-1,ki=Ni?1:-1,Bi=Ai<0||Ai===0&&1/Ai<0?1:0;for(Ai=Math.abs(Ai),isNaN(Ai)||Ai===1/0?(Gi=isNaN(Ai)?1:0,Ui=Mi):(Ui=Math.floor(Math.log(Ai)/Math.LN2),Ai*(Yi=Math.pow(2,-Ui))<1&&(Ui--,Yi*=2),Ui+Li>=1?Ai+=wi/Yi:Ai+=wi*Math.pow(2,1-Li),Ai*Yi>=2&&(Ui++,Yi/=2),Ui+Li>=Mi?(Gi=0,Ui=Mi):Ui+Li>=1?(Gi=(Ai*Yi-1)*Math.pow(2,Pi),Ui=Ui+Li):(Gi=Ai*Math.pow(2,Li-1)*Math.pow(2,Pi),Ui=0));Pi>=8;Ci[Ii+Ri]=Gi&255,Ri+=ki,Gi/=256,Pi-=8);for(Ui=Ui<<Pi|Gi,zi+=Pi;zi>0;Ci[Ii+Ri]=Ui&255,Ri+=ki,Ui/=256,zi-=8);Ci[Ii+Ri-ki]|=Bi*128};/*!
4237
4237
  * The buffer module from node.js, for the browser.
4238
4238
  *
4239
4239
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -4247,7 +4247,7 @@ export default theme;`}function coefficientToPercentage(on){return typeof on=="n
4247
4247
  `))):la=Wi.stylize("[Circular]","special")),Ui(sa)){if(ra&&Ji.match(/^\d+$/))return la;sa=JSON.stringify(""+Ji),sa.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(sa=sa.slice(1,-1),sa=Wi.stylize(sa,"name")):(sa=sa.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),sa=Wi.stylize(sa,"string"))}return sa+": "+la}function _i(Wi,Qi,ea){var na=Wi.reduce(function(Ji,ra){return ra.indexOf(`
4248
4248
  `)>=0,Ji+ra.replace(/\u001b\[\d\d?m/g,"").length+1},0);return na>60?ea[0]+(Qi===""?"":Qi+`
4249
4249
  `)+" "+Wi.join(`,
4250
- `)+" "+ea[1]:ea[0]+Qi+" "+Wi.join(", ")+" "+ea[1]}on.types=requireTypes$1();function xi(Wi){return Array.isArray(Wi)}on.isArray=xi;function Ci(Wi){return typeof Wi=="boolean"}on.isBoolean=Ci;function Ai(Wi){return Wi===null}on.isNull=Ai;function Ii(Wi){return Wi==null}on.isNullOrUndefined=Ii;function Ni(Wi){return typeof Wi=="number"}on.isNumber=Ni;function Pi(Wi){return typeof Wi=="string"}on.isString=Pi;function Vi(Wi){return typeof Wi=="symbol"}on.isSymbol=Vi;function Ui(Wi){return Wi===void 0}on.isUndefined=Ui;function Gi(Wi){return Yi(Wi)&&Ri(Wi)==="[object RegExp]"}on.isRegExp=Gi,on.types.isRegExp=Gi;function Yi(Wi){return typeof Wi=="object"&&Wi!==null}on.isObject=Yi;function zi(Wi){return Yi(Wi)&&Ri(Wi)==="[object Date]"}on.isDate=zi,on.types.isDate=zi;function Mi(Wi){return Yi(Wi)&&(Ri(Wi)==="[object Error]"||Wi instanceof Error)}on.isError=Mi,on.types.isNativeError=Mi;function Li(Wi){return typeof Wi=="function"}on.isFunction=Li;function wi(Wi){return Wi===null||typeof Wi=="boolean"||typeof Wi=="number"||typeof Wi=="string"||typeof Wi=="symbol"||typeof Wi>"u"}on.isPrimitive=wi,on.isBuffer=requireIsBufferBrowser();function Ri(Wi){return Object.prototype.toString.call(Wi)}function ki(Wi){return Wi<10?"0"+Wi.toString(10):Wi.toString(10)}var Bi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Hi(){var Wi=new Date,Qi=[ki(Wi.getHours()),ki(Wi.getMinutes()),ki(Wi.getSeconds())].join(":");return[Wi.getDate(),Bi[Wi.getMonth()],Qi].join(" ")}on.log=function(){console.log("%s - %s",Hi(),on.format.apply(on,arguments))},on.inherits=requireInherits_browser(),on._extend=function(Wi,Qi){if(!Qi||!Yi(Qi))return Wi;for(var ea=Object.keys(Qi),na=ea.length;na--;)Wi[ea[na]]=Qi[ea[na]];return Wi};function Ki(Wi,Qi){return Object.prototype.hasOwnProperty.call(Wi,Qi)}var ji=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;on.promisify=function(Qi){if(typeof Qi!="function")throw new TypeError('The "original" argument must be of type Function');if(ji&&Qi[ji]){var ea=Qi[ji];if(typeof ea!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ea,ji,{value:ea,enumerable:!1,writable:!1,configurable:!0}),ea}function ea(){for(var na,Ji,ra=new Promise(function(aa,ta){na=aa,Ji=ta}),sa=[],la=0;la<arguments.length;la++)sa.push(arguments[la]);sa.push(function(aa,ta){aa?Ji(aa):na(ta)});try{Qi.apply(this,sa)}catch(aa){Ji(aa)}return ra}return Object.setPrototypeOf(ea,Object.getPrototypeOf(Qi)),ji&&Object.defineProperty(ea,ji,{value:ea,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ea,Rn(Qi))},on.promisify.custom=ji;function Fi(Wi,Qi){if(!Wi){var ea=new Error("Promise was rejected with a falsy value");ea.reason=Wi,Wi=ea}return Qi(Wi)}function $i(Wi){if(typeof Wi!="function")throw new TypeError('The "original" argument must be of type Function');function Qi(){for(var ea=[],na=0;na<arguments.length;na++)ea.push(arguments[na]);var Ji=ea.pop();if(typeof Ji!="function")throw new TypeError("The last argument must be of type Function");var ra=this,sa=function(){return Ji.apply(ra,arguments)};Wi.apply(this,ea).then(function(la){process$1.nextTick(sa.bind(null,null,la))},function(la){process$1.nextTick(Fi.bind(null,la,sa))})}return Object.setPrototypeOf(Qi,Object.getPrototypeOf(Wi)),Object.defineProperties(Qi,Rn(Wi)),Qi}on.callbackify=$i}(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function on(bi,Ei){var _i=Object.keys(bi);if(Object.getOwnPropertySymbols){var xi=Object.getOwnPropertySymbols(bi);Ei&&(xi=xi.filter(function(Ci){return Object.getOwnPropertyDescriptor(bi,Ci).enumerable})),_i.push.apply(_i,xi)}return _i}function In(bi){for(var Ei=1;Ei<arguments.length;Ei++){var _i=arguments[Ei]!=null?arguments[Ei]:{};Ei%2?on(Object(_i),!0).forEach(function(xi){Rn(bi,xi,_i[xi])}):Object.getOwnPropertyDescriptors?Object.defineProperties(bi,Object.getOwnPropertyDescriptors(_i)):on(Object(_i)).forEach(function(xi){Object.defineProperty(bi,xi,Object.getOwnPropertyDescriptor(_i,xi))})}return bi}function Rn(bi,Ei,_i){return Ei=jn(Ei),Ei in bi?Object.defineProperty(bi,Ei,{value:_i,enumerable:!0,configurable:!0,writable:!0}):bi[Ei]=_i,bi}function Mn(bi,Ei){if(!(bi instanceof Ei))throw new TypeError("Cannot call a class as a function")}function Ln(bi,Ei){for(var _i=0;_i<Ei.length;_i++){var xi=Ei[_i];xi.enumerable=xi.enumerable||!1,xi.configurable=!0,"value"in xi&&(xi.writable=!0),Object.defineProperty(bi,jn(xi.key),xi)}}function Hn(bi,Ei,_i){return Ei&&Ln(bi.prototype,Ei),Object.defineProperty(bi,"prototype",{writable:!1}),bi}function jn(bi){var Ei=Wn(bi,"string");return typeof Ei=="symbol"?Ei:String(Ei)}function Wn(bi,Ei){if(typeof bi!="object"||bi===null)return bi;var _i=bi[Symbol.toPrimitive];if(_i!==void 0){var xi=_i.call(bi,Ei);if(typeof xi!="object")return xi;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(bi)}var Yn=requireDist(),hi=Yn.Buffer,vi=requireUtil$1(),gi=vi.inspect,mi=gi&&gi.custom||"inspect";function yi(bi,Ei,_i){hi.prototype.copy.call(bi,Ei,_i)}return buffer_list=function(){function bi(){Mn(this,bi),this.head=null,this.tail=null,this.length=0}return Hn(bi,[{key:"push",value:function(_i){var xi={data:_i,next:null};this.length>0?this.tail.next=xi:this.head=xi,this.tail=xi,++this.length}},{key:"unshift",value:function(_i){var xi={data:_i,next:this.head};this.length===0&&(this.tail=xi),this.head=xi,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_i}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_i){if(this.length===0)return"";for(var xi=this.head,Ci=""+xi.data;xi=xi.next;)Ci+=_i+xi.data;return Ci}},{key:"concat",value:function(_i){if(this.length===0)return hi.alloc(0);for(var xi=hi.allocUnsafe(_i>>>0),Ci=this.head,Ai=0;Ci;)yi(Ci.data,xi,Ai),Ai+=Ci.data.length,Ci=Ci.next;return xi}},{key:"consume",value:function(_i,xi){var Ci;return _i<this.head.data.length?(Ci=this.head.data.slice(0,_i),this.head.data=this.head.data.slice(_i)):_i===this.head.data.length?Ci=this.shift():Ci=xi?this._getString(_i):this._getBuffer(_i),Ci}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_i){var xi=this.head,Ci=1,Ai=xi.data;for(_i-=Ai.length;xi=xi.next;){var Ii=xi.data,Ni=_i>Ii.length?Ii.length:_i;if(Ni===Ii.length?Ai+=Ii:Ai+=Ii.slice(0,_i),_i-=Ni,_i===0){Ni===Ii.length?(++Ci,xi.next?this.head=xi.next:this.head=this.tail=null):(this.head=xi,xi.data=Ii.slice(Ni));break}++Ci}return this.length-=Ci,Ai}},{key:"_getBuffer",value:function(_i){var xi=hi.allocUnsafe(_i),Ci=this.head,Ai=1;for(Ci.data.copy(xi),_i-=Ci.data.length;Ci=Ci.next;){var Ii=Ci.data,Ni=_i>Ii.length?Ii.length:_i;if(Ii.copy(xi,xi.length-_i,0,Ni),_i-=Ni,_i===0){Ni===Ii.length?(++Ai,Ci.next?this.head=Ci.next:this.head=this.tail=null):(this.head=Ci,Ci.data=Ii.slice(Ni));break}++Ai}return this.length-=Ai,xi}},{key:mi,value:function(_i,xi){return gi(this,In(In({},xi),{},{depth:0,customInspect:!1}))}}]),bi}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function on(jn,Wn){var Yn=this,hi=this._readableState&&this._readableState.destroyed,vi=this._writableState&&this._writableState.destroyed;return hi||vi?(Wn?Wn(jn):jn&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(Ln,this,jn)):process$1.nextTick(Ln,this,jn)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(jn||null,function(gi){!Wn&&gi?Yn._writableState?Yn._writableState.errorEmitted?process$1.nextTick(Rn,Yn):(Yn._writableState.errorEmitted=!0,process$1.nextTick(In,Yn,gi)):process$1.nextTick(In,Yn,gi):Wn?(process$1.nextTick(Rn,Yn),Wn(gi)):process$1.nextTick(Rn,Yn)}),this)}function In(jn,Wn){Ln(jn,Wn),Rn(jn)}function Rn(jn){jn._writableState&&!jn._writableState.emitClose||jn._readableState&&!jn._readableState.emitClose||jn.emit("close")}function Mn(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ln(jn,Wn){jn.emit("error",Wn)}function Hn(jn,Wn){var Yn=jn._readableState,hi=jn._writableState;Yn&&Yn.autoDestroy||hi&&hi.autoDestroy?jn.destroy(Wn):jn.emit("error",Wn)}return destroy_1$1={destroy:on,undestroy:Mn,errorOrDestroy:Hn},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function on(Wn,Yn){Wn.prototype=Object.create(Yn.prototype),Wn.prototype.constructor=Wn,Wn.__proto__=Yn}var In={};function Rn(Wn,Yn,hi){hi||(hi=Error);function vi(mi,yi,bi){return typeof Yn=="string"?Yn:Yn(mi,yi,bi)}var gi=function(mi){on(yi,mi);function yi(bi,Ei,_i){return mi.call(this,vi(bi,Ei,_i))||this}return yi}(hi);gi.prototype.name=hi.name,gi.prototype.code=Wn,In[Wn]=gi}function Mn(Wn,Yn){if(Array.isArray(Wn)){var hi=Wn.length;return Wn=Wn.map(function(vi){return String(vi)}),hi>2?"one of ".concat(Yn," ").concat(Wn.slice(0,hi-1).join(", "),", or ")+Wn[hi-1]:hi===2?"one of ".concat(Yn," ").concat(Wn[0]," or ").concat(Wn[1]):"of ".concat(Yn," ").concat(Wn[0])}else return"of ".concat(Yn," ").concat(String(Wn))}function Ln(Wn,Yn,hi){return Wn.substr(0,Yn.length)===Yn}function Hn(Wn,Yn,hi){return(hi===void 0||hi>Wn.length)&&(hi=Wn.length),Wn.substring(hi-Yn.length,hi)===Yn}function jn(Wn,Yn,hi){return typeof hi!="number"&&(hi=0),hi+Yn.length>Wn.length?!1:Wn.indexOf(Yn,hi)!==-1}return Rn("ERR_INVALID_OPT_VALUE",function(Wn,Yn){return'The value "'+Yn+'" is invalid for option "'+Wn+'"'},TypeError),Rn("ERR_INVALID_ARG_TYPE",function(Wn,Yn,hi){var vi;typeof Yn=="string"&&Ln(Yn,"not ")?(vi="must not be",Yn=Yn.replace(/^not /,"")):vi="must be";var gi;if(Hn(Wn," argument"))gi="The ".concat(Wn," ").concat(vi," ").concat(Mn(Yn,"type"));else{var mi=jn(Wn,".")?"property":"argument";gi='The "'.concat(Wn,'" ').concat(mi," ").concat(vi," ").concat(Mn(Yn,"type"))}return gi+=". Received type ".concat(typeof hi),gi},TypeError),Rn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Rn("ERR_METHOD_NOT_IMPLEMENTED",function(Wn){return"The "+Wn+" method is not implemented"}),Rn("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Rn("ERR_STREAM_DESTROYED",function(Wn){return"Cannot call "+Wn+" after a stream was destroyed"}),Rn("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Rn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Rn("ERR_STREAM_WRITE_AFTER_END","write after end"),Rn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Rn("ERR_UNKNOWN_ENCODING",function(Wn){return"Unknown encoding: "+Wn},TypeError),Rn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=In,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var on=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function In(Mn,Ln,Hn){return Mn.highWaterMark!=null?Mn.highWaterMark:Ln?Mn[Hn]:null}function Rn(Mn,Ln,Hn,jn){var Wn=In(Ln,jn,Hn);if(Wn!=null){if(!(isFinite(Wn)&&Math.floor(Wn)===Wn)||Wn<0){var Yn=jn?Hn:"highWaterMark";throw new on(Yn,Wn)}return Math.floor(Wn)}return Mn.objectMode?16:16*1024}return state={getHighWaterMark:Rn},state}var browser$c,hasRequiredBrowser$c;function requireBrowser$c(){if(hasRequiredBrowser$c)return browser$c;hasRequiredBrowser$c=1,browser$c=on;function on(Rn,Mn){if(In("noDeprecation"))return Rn;var Ln=!1;function Hn(){if(!Ln){if(In("throwDeprecation"))throw new Error(Mn);In("traceDeprecation")?console.trace(Mn):console.warn(Mn),Ln=!0}return Rn.apply(this,arguments)}return Hn}function In(Rn){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var Mn=commonjsGlobal.localStorage[Rn];return Mn==null?!1:String(Mn).toLowerCase()==="true"}return browser$c}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=Ui;function on(na){var Ji=this;this.next=null,this.entry=null,this.finish=function(){ea(Ji,na)}}var In;Ui.WritableState=Pi;var Rn={deprecate:requireBrowser$c()},Mn=requireStreamBrowser$1(),Ln=requireDist().Buffer,Hn=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function jn(na){return Ln.from(na)}function Wn(na){return Ln.isBuffer(na)||na instanceof Hn}var Yn=requireDestroy$1(),hi=requireState(),vi=hi.getHighWaterMark,gi=requireErrorsBrowser().codes,mi=gi.ERR_INVALID_ARG_TYPE,yi=gi.ERR_METHOD_NOT_IMPLEMENTED,bi=gi.ERR_MULTIPLE_CALLBACK,Ei=gi.ERR_STREAM_CANNOT_PIPE,_i=gi.ERR_STREAM_DESTROYED,xi=gi.ERR_STREAM_NULL_VALUES,Ci=gi.ERR_STREAM_WRITE_AFTER_END,Ai=gi.ERR_UNKNOWN_ENCODING,Ii=Yn.errorOrDestroy;requireInherits_browser()(Ui,Mn);function Ni(){}function Pi(na,Ji,ra){In=In||require_stream_duplex$1(),na=na||{},typeof ra!="boolean"&&(ra=Ji instanceof In),this.objectMode=!!na.objectMode,ra&&(this.objectMode=this.objectMode||!!na.writableObjectMode),this.highWaterMark=vi(this,na,"writableHighWaterMark",ra),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var sa=na.decodeStrings===!1;this.decodeStrings=!sa,this.defaultEncoding=na.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(la){ki(Ji,la)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=na.emitClose!==!1,this.autoDestroy=!!na.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new on(this)}Pi.prototype.getBuffer=function(){for(var Ji=this.bufferedRequest,ra=[];Ji;)ra.push(Ji),Ji=Ji.next;return ra},function(){try{Object.defineProperty(Pi.prototype,"buffer",{get:Rn.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Vi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Vi=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ui,Symbol.hasInstance,{value:function(Ji){return Vi.call(this,Ji)?!0:this!==Ui?!1:Ji&&Ji._writableState instanceof Pi}})):Vi=function(Ji){return Ji instanceof this};function Ui(na){In=In||require_stream_duplex$1();var Ji=this instanceof In;if(!Ji&&!Vi.call(Ui,this))return new Ui(na);this._writableState=new Pi(na,this,Ji),this.writable=!0,na&&(typeof na.write=="function"&&(this._write=na.write),typeof na.writev=="function"&&(this._writev=na.writev),typeof na.destroy=="function"&&(this._destroy=na.destroy),typeof na.final=="function"&&(this._final=na.final)),Mn.call(this)}Ui.prototype.pipe=function(){Ii(this,new Ei)};function Gi(na,Ji){var ra=new Ci;Ii(na,ra),process$1.nextTick(Ji,ra)}function Yi(na,Ji,ra,sa){var la;return ra===null?la=new xi:typeof ra!="string"&&!Ji.objectMode&&(la=new mi("chunk",["string","Buffer"],ra)),la?(Ii(na,la),process$1.nextTick(sa,la),!1):!0}Ui.prototype.write=function(na,Ji,ra){var sa=this._writableState,la=!1,aa=!sa.objectMode&&Wn(na);return aa&&!Ln.isBuffer(na)&&(na=jn(na)),typeof Ji=="function"&&(ra=Ji,Ji=null),aa?Ji="buffer":Ji||(Ji=sa.defaultEncoding),typeof ra!="function"&&(ra=Ni),sa.ending?Gi(this,ra):(aa||Yi(this,sa,na,ra))&&(sa.pendingcb++,la=Mi(this,sa,aa,na,Ji,ra)),la},Ui.prototype.cork=function(){this._writableState.corked++},Ui.prototype.uncork=function(){var na=this._writableState;na.corked&&(na.corked--,!na.writing&&!na.corked&&!na.bufferProcessing&&na.bufferedRequest&&Ki(this,na))},Ui.prototype.setDefaultEncoding=function(Ji){if(typeof Ji=="string"&&(Ji=Ji.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Ji+"").toLowerCase())>-1))throw new Ai(Ji);return this._writableState.defaultEncoding=Ji,this},Object.defineProperty(Ui.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function zi(na,Ji,ra){return!na.objectMode&&na.decodeStrings!==!1&&typeof Ji=="string"&&(Ji=Ln.from(Ji,ra)),Ji}Object.defineProperty(Ui.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Mi(na,Ji,ra,sa,la,aa){if(!ra){var ta=zi(Ji,sa,la);sa!==ta&&(ra=!0,la="buffer",sa=ta)}var fa=Ji.objectMode?1:sa.length;Ji.length+=fa;var ca=Ji.length<Ji.highWaterMark;if(ca||(Ji.needDrain=!0),Ji.writing||Ji.corked){var pa=Ji.lastBufferedRequest;Ji.lastBufferedRequest={chunk:sa,encoding:la,isBuf:ra,callback:aa,next:null},pa?pa.next=Ji.lastBufferedRequest:Ji.bufferedRequest=Ji.lastBufferedRequest,Ji.bufferedRequestCount+=1}else Li(na,Ji,!1,fa,sa,la,aa);return ca}function Li(na,Ji,ra,sa,la,aa,ta){Ji.writelen=sa,Ji.writecb=ta,Ji.writing=!0,Ji.sync=!0,Ji.destroyed?Ji.onwrite(new _i("write")):ra?na._writev(la,Ji.onwrite):na._write(la,aa,Ji.onwrite),Ji.sync=!1}function wi(na,Ji,ra,sa,la){--Ji.pendingcb,ra?(process$1.nextTick(la,sa),process$1.nextTick(Wi,na,Ji),na._writableState.errorEmitted=!0,Ii(na,sa)):(la(sa),na._writableState.errorEmitted=!0,Ii(na,sa),Wi(na,Ji))}function Ri(na){na.writing=!1,na.writecb=null,na.length-=na.writelen,na.writelen=0}function ki(na,Ji){var ra=na._writableState,sa=ra.sync,la=ra.writecb;if(typeof la!="function")throw new bi;if(Ri(ra),Ji)wi(na,ra,sa,Ji,la);else{var aa=ji(ra)||na.destroyed;!aa&&!ra.corked&&!ra.bufferProcessing&&ra.bufferedRequest&&Ki(na,ra),sa?process$1.nextTick(Bi,na,ra,aa,la):Bi(na,ra,aa,la)}}function Bi(na,Ji,ra,sa){ra||Hi(na,Ji),Ji.pendingcb--,sa(),Wi(na,Ji)}function Hi(na,Ji){Ji.length===0&&Ji.needDrain&&(Ji.needDrain=!1,na.emit("drain"))}function Ki(na,Ji){Ji.bufferProcessing=!0;var ra=Ji.bufferedRequest;if(na._writev&&ra&&ra.next){var sa=Ji.bufferedRequestCount,la=new Array(sa),aa=Ji.corkedRequestsFree;aa.entry=ra;for(var ta=0,fa=!0;ra;)la[ta]=ra,ra.isBuf||(fa=!1),ra=ra.next,ta+=1;la.allBuffers=fa,Li(na,Ji,!0,Ji.length,la,"",aa.finish),Ji.pendingcb++,Ji.lastBufferedRequest=null,aa.next?(Ji.corkedRequestsFree=aa.next,aa.next=null):Ji.corkedRequestsFree=new on(Ji),Ji.bufferedRequestCount=0}else{for(;ra;){var ca=ra.chunk,pa=ra.encoding,Ea=ra.callback,xa=Ji.objectMode?1:ca.length;if(Li(na,Ji,!1,xa,ca,pa,Ea),ra=ra.next,Ji.bufferedRequestCount--,Ji.writing)break}ra===null&&(Ji.lastBufferedRequest=null)}Ji.bufferedRequest=ra,Ji.bufferProcessing=!1}Ui.prototype._write=function(na,Ji,ra){ra(new yi("_write()"))},Ui.prototype._writev=null,Ui.prototype.end=function(na,Ji,ra){var sa=this._writableState;return typeof na=="function"?(ra=na,na=null,Ji=null):typeof Ji=="function"&&(ra=Ji,Ji=null),na!=null&&this.write(na,Ji),sa.corked&&(sa.corked=1,this.uncork()),sa.ending||Qi(this,sa,ra),this},Object.defineProperty(Ui.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ji(na){return na.ending&&na.length===0&&na.bufferedRequest===null&&!na.finished&&!na.writing}function Fi(na,Ji){na._final(function(ra){Ji.pendingcb--,ra&&Ii(na,ra),Ji.prefinished=!0,na.emit("prefinish"),Wi(na,Ji)})}function $i(na,Ji){!Ji.prefinished&&!Ji.finalCalled&&(typeof na._final=="function"&&!Ji.destroyed?(Ji.pendingcb++,Ji.finalCalled=!0,process$1.nextTick(Fi,na,Ji)):(Ji.prefinished=!0,na.emit("prefinish")))}function Wi(na,Ji){var ra=ji(Ji);if(ra&&($i(na,Ji),Ji.pendingcb===0&&(Ji.finished=!0,na.emit("finish"),Ji.autoDestroy))){var sa=na._readableState;(!sa||sa.autoDestroy&&sa.endEmitted)&&na.destroy()}return ra}function Qi(na,Ji,ra){Ji.ending=!0,Wi(na,Ji),ra&&(Ji.finished?process$1.nextTick(ra):na.once("finish",ra)),Ji.ended=!0,na.writable=!1}function ea(na,Ji,ra){var sa=na.entry;for(na.entry=null;sa;){var la=sa.callback;Ji.pendingcb--,la(ra),sa=sa.next}Ji.corkedRequestsFree.next=na}return Object.defineProperty(Ui.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Ji){this._writableState&&(this._writableState.destroyed=Ji)}}),Ui.prototype.destroy=Yn.destroy,Ui.prototype._undestroy=Yn.undestroy,Ui.prototype._destroy=function(na,Ji){Ji(na)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var on=Object.keys||function(hi){var vi=[];for(var gi in hi)vi.push(gi);return vi};_stream_duplex$1=jn;var In=require_stream_readable$1(),Rn=require_stream_writable$1();requireInherits_browser()(jn,In);for(var Mn=on(Rn.prototype),Ln=0;Ln<Mn.length;Ln++){var Hn=Mn[Ln];jn.prototype[Hn]||(jn.prototype[Hn]=Rn.prototype[Hn])}function jn(hi){if(!(this instanceof jn))return new jn(hi);In.call(this,hi),Rn.call(this,hi),this.allowHalfOpen=!0,hi&&(hi.readable===!1&&(this.readable=!1),hi.writable===!1&&(this.writable=!1),hi.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Wn)))}Object.defineProperty(jn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(jn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(jn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Wn(){this._writableState.ended||process$1.nextTick(Yn,this)}function Yn(hi){hi.end()}return Object.defineProperty(jn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(vi){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=vi,this._writableState.destroyed=vi)}}),_stream_duplex$1}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var on=requireSafeBuffer$1().Buffer,In=on.isEncoding||function(xi){switch(xi=""+xi,xi&&xi.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Rn(xi){if(!xi)return"utf8";for(var Ci;;)switch(xi){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return xi;default:if(Ci)return;xi=(""+xi).toLowerCase(),Ci=!0}}function Mn(xi){var Ci=Rn(xi);if(typeof Ci!="string"&&(on.isEncoding===In||!In(xi)))throw new Error("Unknown encoding: "+xi);return Ci||xi}string_decoder.StringDecoder=Ln;function Ln(xi){this.encoding=Mn(xi);var Ci;switch(this.encoding){case"utf16le":this.text=gi,this.end=mi,Ci=4;break;case"utf8":this.fillLast=Yn,Ci=4;break;case"base64":this.text=yi,this.end=bi,Ci=3;break;default:this.write=Ei,this.end=_i;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=on.allocUnsafe(Ci)}Ln.prototype.write=function(xi){if(xi.length===0)return"";var Ci,Ai;if(this.lastNeed){if(Ci=this.fillLast(xi),Ci===void 0)return"";Ai=this.lastNeed,this.lastNeed=0}else Ai=0;return Ai<xi.length?Ci?Ci+this.text(xi,Ai):this.text(xi,Ai):Ci||""},Ln.prototype.end=vi,Ln.prototype.text=hi,Ln.prototype.fillLast=function(xi){if(this.lastNeed<=xi.length)return xi.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);xi.copy(this.lastChar,this.lastTotal-this.lastNeed,0,xi.length),this.lastNeed-=xi.length};function Hn(xi){return xi<=127?0:xi>>5===6?2:xi>>4===14?3:xi>>3===30?4:xi>>6===2?-1:-2}function jn(xi,Ci,Ai){var Ii=Ci.length-1;if(Ii<Ai)return 0;var Ni=Hn(Ci[Ii]);return Ni>=0?(Ni>0&&(xi.lastNeed=Ni-1),Ni):--Ii<Ai||Ni===-2?0:(Ni=Hn(Ci[Ii]),Ni>=0?(Ni>0&&(xi.lastNeed=Ni-2),Ni):--Ii<Ai||Ni===-2?0:(Ni=Hn(Ci[Ii]),Ni>=0?(Ni>0&&(Ni===2?Ni=0:xi.lastNeed=Ni-3),Ni):0))}function Wn(xi,Ci,Ai){if((Ci[0]&192)!==128)return xi.lastNeed=0,"�";if(xi.lastNeed>1&&Ci.length>1){if((Ci[1]&192)!==128)return xi.lastNeed=1,"�";if(xi.lastNeed>2&&Ci.length>2&&(Ci[2]&192)!==128)return xi.lastNeed=2,"�"}}function Yn(xi){var Ci=this.lastTotal-this.lastNeed,Ai=Wn(this,xi);if(Ai!==void 0)return Ai;if(this.lastNeed<=xi.length)return xi.copy(this.lastChar,Ci,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);xi.copy(this.lastChar,Ci,0,xi.length),this.lastNeed-=xi.length}function hi(xi,Ci){var Ai=jn(this,xi,Ci);if(!this.lastNeed)return xi.toString("utf8",Ci);this.lastTotal=Ai;var Ii=xi.length-(Ai-this.lastNeed);return xi.copy(this.lastChar,0,Ii),xi.toString("utf8",Ci,Ii)}function vi(xi){var Ci=xi&&xi.length?this.write(xi):"";return this.lastNeed?Ci+"�":Ci}function gi(xi,Ci){if((xi.length-Ci)%2===0){var Ai=xi.toString("utf16le",Ci);if(Ai){var Ii=Ai.charCodeAt(Ai.length-1);if(Ii>=55296&&Ii<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=xi[xi.length-2],this.lastChar[1]=xi[xi.length-1],Ai.slice(0,-1)}return Ai}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=xi[xi.length-1],xi.toString("utf16le",Ci,xi.length-1)}function mi(xi){var Ci=xi&&xi.length?this.write(xi):"";if(this.lastNeed){var Ai=this.lastTotal-this.lastNeed;return Ci+this.lastChar.toString("utf16le",0,Ai)}return Ci}function yi(xi,Ci){var Ai=(xi.length-Ci)%3;return Ai===0?xi.toString("base64",Ci):(this.lastNeed=3-Ai,this.lastTotal=3,Ai===1?this.lastChar[0]=xi[xi.length-1]:(this.lastChar[0]=xi[xi.length-2],this.lastChar[1]=xi[xi.length-1]),xi.toString("base64",Ci,xi.length-Ai))}function bi(xi){var Ci=xi&&xi.length?this.write(xi):"";return this.lastNeed?Ci+this.lastChar.toString("base64",0,3-this.lastNeed):Ci}function Ei(xi){return xi.toString(this.encoding)}function _i(xi){return xi&&xi.length?this.write(xi):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var on=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function In(Hn){var jn=!1;return function(){if(!jn){jn=!0;for(var Wn=arguments.length,Yn=new Array(Wn),hi=0;hi<Wn;hi++)Yn[hi]=arguments[hi];Hn.apply(this,Yn)}}}function Rn(){}function Mn(Hn){return Hn.setHeader&&typeof Hn.abort=="function"}function Ln(Hn,jn,Wn){if(typeof jn=="function")return Ln(Hn,null,jn);jn||(jn={}),Wn=In(Wn||Rn);var Yn=jn.readable||jn.readable!==!1&&Hn.readable,hi=jn.writable||jn.writable!==!1&&Hn.writable,vi=function(){Hn.writable||mi()},gi=Hn._writableState&&Hn._writableState.finished,mi=function(){hi=!1,gi=!0,Yn||Wn.call(Hn)},yi=Hn._readableState&&Hn._readableState.endEmitted,bi=function(){Yn=!1,yi=!0,hi||Wn.call(Hn)},Ei=function(Ai){Wn.call(Hn,Ai)},_i=function(){var Ai;if(Yn&&!yi)return(!Hn._readableState||!Hn._readableState.ended)&&(Ai=new on),Wn.call(Hn,Ai);if(hi&&!gi)return(!Hn._writableState||!Hn._writableState.ended)&&(Ai=new on),Wn.call(Hn,Ai)},xi=function(){Hn.req.on("finish",mi)};return Mn(Hn)?(Hn.on("complete",mi),Hn.on("abort",_i),Hn.req?xi():Hn.on("request",xi)):hi&&!Hn._writableState&&(Hn.on("end",vi),Hn.on("close",vi)),Hn.on("end",bi),Hn.on("finish",mi),jn.error!==!1&&Hn.on("error",Ei),Hn.on("close",_i),function(){Hn.removeListener("complete",mi),Hn.removeListener("abort",_i),Hn.removeListener("request",xi),Hn.req&&Hn.req.removeListener("finish",mi),Hn.removeListener("end",vi),Hn.removeListener("close",vi),Hn.removeListener("finish",mi),Hn.removeListener("end",bi),Hn.removeListener("error",Ei),Hn.removeListener("close",_i)}}return endOfStream=Ln,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var on;function In(Ai,Ii,Ni){return Ii=Rn(Ii),Ii in Ai?Object.defineProperty(Ai,Ii,{value:Ni,enumerable:!0,configurable:!0,writable:!0}):Ai[Ii]=Ni,Ai}function Rn(Ai){var Ii=Mn(Ai,"string");return typeof Ii=="symbol"?Ii:String(Ii)}function Mn(Ai,Ii){if(typeof Ai!="object"||Ai===null)return Ai;var Ni=Ai[Symbol.toPrimitive];if(Ni!==void 0){var Pi=Ni.call(Ai,Ii);if(typeof Pi!="object")return Pi;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ii==="string"?String:Number)(Ai)}var Ln=requireEndOfStream(),Hn=Symbol("lastResolve"),jn=Symbol("lastReject"),Wn=Symbol("error"),Yn=Symbol("ended"),hi=Symbol("lastPromise"),vi=Symbol("handlePromise"),gi=Symbol("stream");function mi(Ai,Ii){return{value:Ai,done:Ii}}function yi(Ai){var Ii=Ai[Hn];if(Ii!==null){var Ni=Ai[gi].read();Ni!==null&&(Ai[hi]=null,Ai[Hn]=null,Ai[jn]=null,Ii(mi(Ni,!1)))}}function bi(Ai){process$1.nextTick(yi,Ai)}function Ei(Ai,Ii){return function(Ni,Pi){Ai.then(function(){if(Ii[Yn]){Ni(mi(void 0,!0));return}Ii[vi](Ni,Pi)},Pi)}}var _i=Object.getPrototypeOf(function(){}),xi=Object.setPrototypeOf((on={get stream(){return this[gi]},next:function(){var Ii=this,Ni=this[Wn];if(Ni!==null)return Promise.reject(Ni);if(this[Yn])return Promise.resolve(mi(void 0,!0));if(this[gi].destroyed)return new Promise(function(Gi,Yi){process$1.nextTick(function(){Ii[Wn]?Yi(Ii[Wn]):Gi(mi(void 0,!0))})});var Pi=this[hi],Vi;if(Pi)Vi=new Promise(Ei(Pi,this));else{var Ui=this[gi].read();if(Ui!==null)return Promise.resolve(mi(Ui,!1));Vi=new Promise(this[vi])}return this[hi]=Vi,Vi}},In(on,Symbol.asyncIterator,function(){return this}),In(on,"return",function(){var Ii=this;return new Promise(function(Ni,Pi){Ii[gi].destroy(null,function(Vi){if(Vi){Pi(Vi);return}Ni(mi(void 0,!0))})})}),on),_i),Ci=function(Ii){var Ni,Pi=Object.create(xi,(Ni={},In(Ni,gi,{value:Ii,writable:!0}),In(Ni,Hn,{value:null,writable:!0}),In(Ni,jn,{value:null,writable:!0}),In(Ni,Wn,{value:null,writable:!0}),In(Ni,Yn,{value:Ii._readableState.endEmitted,writable:!0}),In(Ni,vi,{value:function(Ui,Gi){var Yi=Pi[gi].read();Yi?(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Ui(mi(Yi,!1))):(Pi[Hn]=Ui,Pi[jn]=Gi)},writable:!0}),Ni));return Pi[hi]=null,Ln(Ii,function(Vi){if(Vi&&Vi.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ui=Pi[jn];Ui!==null&&(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Ui(Vi)),Pi[Wn]=Vi;return}var Gi=Pi[Hn];Gi!==null&&(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Gi(mi(void 0,!0))),Pi[Yn]=!0}),Ii.on("readable",bi.bind(null,Pi)),Pi};return async_iterator=Ci,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=Gi;var on;Gi.ReadableState=Ui,requireEvents().EventEmitter;var In=function(ta,fa){return ta.listeners(fa).length},Rn=requireStreamBrowser$1(),Mn=requireDist().Buffer,Ln=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hn(aa){return Mn.from(aa)}function jn(aa){return Mn.isBuffer(aa)||aa instanceof Ln}var Wn=requireUtil$1(),Yn;Wn&&Wn.debuglog?Yn=Wn.debuglog("stream"):Yn=function(){};var hi=requireBuffer_list(),vi=requireDestroy$1(),gi=requireState(),mi=gi.getHighWaterMark,yi=requireErrorsBrowser().codes,bi=yi.ERR_INVALID_ARG_TYPE,Ei=yi.ERR_STREAM_PUSH_AFTER_EOF,_i=yi.ERR_METHOD_NOT_IMPLEMENTED,xi=yi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ci,Ai,Ii;requireInherits_browser()(Gi,Rn);var Ni=vi.errorOrDestroy,Pi=["error","close","destroy","pause","resume"];function Vi(aa,ta,fa){if(typeof aa.prependListener=="function")return aa.prependListener(ta,fa);!aa._events||!aa._events[ta]?aa.on(ta,fa):Array.isArray(aa._events[ta])?aa._events[ta].unshift(fa):aa._events[ta]=[fa,aa._events[ta]]}function Ui(aa,ta,fa){on=on||require_stream_duplex$1(),aa=aa||{},typeof fa!="boolean"&&(fa=ta instanceof on),this.objectMode=!!aa.objectMode,fa&&(this.objectMode=this.objectMode||!!aa.readableObjectMode),this.highWaterMark=mi(this,aa,"readableHighWaterMark",fa),this.buffer=new hi,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=aa.emitClose!==!1,this.autoDestroy=!!aa.autoDestroy,this.destroyed=!1,this.defaultEncoding=aa.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,aa.encoding&&(Ci||(Ci=requireString_decoder().StringDecoder),this.decoder=new Ci(aa.encoding),this.encoding=aa.encoding)}function Gi(aa){if(on=on||require_stream_duplex$1(),!(this instanceof Gi))return new Gi(aa);var ta=this instanceof on;this._readableState=new Ui(aa,this,ta),this.readable=!0,aa&&(typeof aa.read=="function"&&(this._read=aa.read),typeof aa.destroy=="function"&&(this._destroy=aa.destroy)),Rn.call(this)}Object.defineProperty(Gi.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ta){this._readableState&&(this._readableState.destroyed=ta)}}),Gi.prototype.destroy=vi.destroy,Gi.prototype._undestroy=vi.undestroy,Gi.prototype._destroy=function(aa,ta){ta(aa)},Gi.prototype.push=function(aa,ta){var fa=this._readableState,ca;return fa.objectMode?ca=!0:typeof aa=="string"&&(ta=ta||fa.defaultEncoding,ta!==fa.encoding&&(aa=Mn.from(aa,ta),ta=""),ca=!0),Yi(this,aa,ta,!1,ca)},Gi.prototype.unshift=function(aa){return Yi(this,aa,null,!0,!1)};function Yi(aa,ta,fa,ca,pa){Yn("readableAddChunk",ta);var Ea=aa._readableState;if(ta===null)Ea.reading=!1,ki(aa,Ea);else{var xa;if(pa||(xa=Mi(Ea,ta)),xa)Ni(aa,xa);else if(Ea.objectMode||ta&&ta.length>0)if(typeof ta!="string"&&!Ea.objectMode&&Object.getPrototypeOf(ta)!==Mn.prototype&&(ta=Hn(ta)),ca)Ea.endEmitted?Ni(aa,new xi):zi(aa,Ea,ta,!0);else if(Ea.ended)Ni(aa,new Ei);else{if(Ea.destroyed)return!1;Ea.reading=!1,Ea.decoder&&!fa?(ta=Ea.decoder.write(ta),Ea.objectMode||ta.length!==0?zi(aa,Ea,ta,!1):Ki(aa,Ea)):zi(aa,Ea,ta,!1)}else ca||(Ea.reading=!1,Ki(aa,Ea))}return!Ea.ended&&(Ea.length<Ea.highWaterMark||Ea.length===0)}function zi(aa,ta,fa,ca){ta.flowing&&ta.length===0&&!ta.sync?(ta.awaitDrain=0,aa.emit("data",fa)):(ta.length+=ta.objectMode?1:fa.length,ca?ta.buffer.unshift(fa):ta.buffer.push(fa),ta.needReadable&&Bi(aa)),Ki(aa,ta)}function Mi(aa,ta){var fa;return!jn(ta)&&typeof ta!="string"&&ta!==void 0&&!aa.objectMode&&(fa=new bi("chunk",["string","Buffer","Uint8Array"],ta)),fa}Gi.prototype.isPaused=function(){return this._readableState.flowing===!1},Gi.prototype.setEncoding=function(aa){Ci||(Ci=requireString_decoder().StringDecoder);var ta=new Ci(aa);this._readableState.decoder=ta,this._readableState.encoding=this._readableState.decoder.encoding;for(var fa=this._readableState.buffer.head,ca="";fa!==null;)ca+=ta.write(fa.data),fa=fa.next;return this._readableState.buffer.clear(),ca!==""&&this._readableState.buffer.push(ca),this._readableState.length=ca.length,this};var Li=1073741824;function wi(aa){return aa>=Li?aa=Li:(aa--,aa|=aa>>>1,aa|=aa>>>2,aa|=aa>>>4,aa|=aa>>>8,aa|=aa>>>16,aa++),aa}function Ri(aa,ta){return aa<=0||ta.length===0&&ta.ended?0:ta.objectMode?1:aa!==aa?ta.flowing&&ta.length?ta.buffer.head.data.length:ta.length:(aa>ta.highWaterMark&&(ta.highWaterMark=wi(aa)),aa<=ta.length?aa:ta.ended?ta.length:(ta.needReadable=!0,0))}Gi.prototype.read=function(aa){Yn("read",aa),aa=parseInt(aa,10);var ta=this._readableState,fa=aa;if(aa!==0&&(ta.emittedReadable=!1),aa===0&&ta.needReadable&&((ta.highWaterMark!==0?ta.length>=ta.highWaterMark:ta.length>0)||ta.ended))return Yn("read: emitReadable",ta.length,ta.ended),ta.length===0&&ta.ended?ra(this):Bi(this),null;if(aa=Ri(aa,ta),aa===0&&ta.ended)return ta.length===0&&ra(this),null;var ca=ta.needReadable;Yn("need readable",ca),(ta.length===0||ta.length-aa<ta.highWaterMark)&&(ca=!0,Yn("length less than watermark",ca)),ta.ended||ta.reading?(ca=!1,Yn("reading or ended",ca)):ca&&(Yn("do read"),ta.reading=!0,ta.sync=!0,ta.length===0&&(ta.needReadable=!0),this._read(ta.highWaterMark),ta.sync=!1,ta.reading||(aa=Ri(fa,ta)));var pa;return aa>0?pa=Ji(aa,ta):pa=null,pa===null?(ta.needReadable=ta.length<=ta.highWaterMark,aa=0):(ta.length-=aa,ta.awaitDrain=0),ta.length===0&&(ta.ended||(ta.needReadable=!0),fa!==aa&&ta.ended&&ra(this)),pa!==null&&this.emit("data",pa),pa};function ki(aa,ta){if(Yn("onEofChunk"),!ta.ended){if(ta.decoder){var fa=ta.decoder.end();fa&&fa.length&&(ta.buffer.push(fa),ta.length+=ta.objectMode?1:fa.length)}ta.ended=!0,ta.sync?Bi(aa):(ta.needReadable=!1,ta.emittedReadable||(ta.emittedReadable=!0,Hi(aa)))}}function Bi(aa){var ta=aa._readableState;Yn("emitReadable",ta.needReadable,ta.emittedReadable),ta.needReadable=!1,ta.emittedReadable||(Yn("emitReadable",ta.flowing),ta.emittedReadable=!0,process$1.nextTick(Hi,aa))}function Hi(aa){var ta=aa._readableState;Yn("emitReadable_",ta.destroyed,ta.length,ta.ended),!ta.destroyed&&(ta.length||ta.ended)&&(aa.emit("readable"),ta.emittedReadable=!1),ta.needReadable=!ta.flowing&&!ta.ended&&ta.length<=ta.highWaterMark,na(aa)}function Ki(aa,ta){ta.readingMore||(ta.readingMore=!0,process$1.nextTick(ji,aa,ta))}function ji(aa,ta){for(;!ta.reading&&!ta.ended&&(ta.length<ta.highWaterMark||ta.flowing&&ta.length===0);){var fa=ta.length;if(Yn("maybeReadMore read 0"),aa.read(0),fa===ta.length)break}ta.readingMore=!1}Gi.prototype._read=function(aa){Ni(this,new _i("_read()"))},Gi.prototype.pipe=function(aa,ta){var fa=this,ca=this._readableState;switch(ca.pipesCount){case 0:ca.pipes=aa;break;case 1:ca.pipes=[ca.pipes,aa];break;default:ca.pipes.push(aa);break}ca.pipesCount+=1,Yn("pipe count=%d opts=%j",ca.pipesCount,ta);var pa=(!ta||ta.end!==!1)&&aa!==process$1.stdout&&aa!==process$1.stderr,Ea=pa?ga:$a;ca.endEmitted?process$1.nextTick(Ea):fa.once("end",Ea),aa.on("unpipe",xa);function xa(Ma,Ka){Yn("onunpipe"),Ma===fa&&Ka&&Ka.hasUnpiped===!1&&(Ka.hasUnpiped=!0,va())}function ga(){Yn("onend"),aa.end()}var ma=Fi(fa);aa.on("drain",ma);var Aa=!1;function va(){Yn("cleanup"),aa.removeListener("close",wa),aa.removeListener("finish",Na),aa.removeListener("drain",ma),aa.removeListener("error",Ta),aa.removeListener("unpipe",xa),fa.removeListener("end",ga),fa.removeListener("end",$a),fa.removeListener("data",Sa),Aa=!0,ca.awaitDrain&&(!aa._writableState||aa._writableState.needDrain)&&ma()}fa.on("data",Sa);function Sa(Ma){Yn("ondata");var Ka=aa.write(Ma);Yn("dest.write",Ka),Ka===!1&&((ca.pipesCount===1&&ca.pipes===aa||ca.pipesCount>1&&la(ca.pipes,aa)!==-1)&&!Aa&&(Yn("false write response, pause",ca.awaitDrain),ca.awaitDrain++),fa.pause())}function Ta(Ma){Yn("onerror",Ma),$a(),aa.removeListener("error",Ta),In(aa,"error")===0&&Ni(aa,Ma)}Vi(aa,"error",Ta);function wa(){aa.removeListener("finish",Na),$a()}aa.once("close",wa);function Na(){Yn("onfinish"),aa.removeListener("close",wa),$a()}aa.once("finish",Na);function $a(){Yn("unpipe"),fa.unpipe(aa)}return aa.emit("pipe",fa),ca.flowing||(Yn("pipe resume"),fa.resume()),aa};function Fi(aa){return function(){var fa=aa._readableState;Yn("pipeOnDrain",fa.awaitDrain),fa.awaitDrain&&fa.awaitDrain--,fa.awaitDrain===0&&In(aa,"data")&&(fa.flowing=!0,na(aa))}}Gi.prototype.unpipe=function(aa){var ta=this._readableState,fa={hasUnpiped:!1};if(ta.pipesCount===0)return this;if(ta.pipesCount===1)return aa&&aa!==ta.pipes?this:(aa||(aa=ta.pipes),ta.pipes=null,ta.pipesCount=0,ta.flowing=!1,aa&&aa.emit("unpipe",this,fa),this);if(!aa){var ca=ta.pipes,pa=ta.pipesCount;ta.pipes=null,ta.pipesCount=0,ta.flowing=!1;for(var Ea=0;Ea<pa;Ea++)ca[Ea].emit("unpipe",this,{hasUnpiped:!1});return this}var xa=la(ta.pipes,aa);return xa===-1?this:(ta.pipes.splice(xa,1),ta.pipesCount-=1,ta.pipesCount===1&&(ta.pipes=ta.pipes[0]),aa.emit("unpipe",this,fa),this)},Gi.prototype.on=function(aa,ta){var fa=Rn.prototype.on.call(this,aa,ta),ca=this._readableState;return aa==="data"?(ca.readableListening=this.listenerCount("readable")>0,ca.flowing!==!1&&this.resume()):aa==="readable"&&!ca.endEmitted&&!ca.readableListening&&(ca.readableListening=ca.needReadable=!0,ca.flowing=!1,ca.emittedReadable=!1,Yn("on readable",ca.length,ca.reading),ca.length?Bi(this):ca.reading||process$1.nextTick(Wi,this)),fa},Gi.prototype.addListener=Gi.prototype.on,Gi.prototype.removeListener=function(aa,ta){var fa=Rn.prototype.removeListener.call(this,aa,ta);return aa==="readable"&&process$1.nextTick($i,this),fa},Gi.prototype.removeAllListeners=function(aa){var ta=Rn.prototype.removeAllListeners.apply(this,arguments);return(aa==="readable"||aa===void 0)&&process$1.nextTick($i,this),ta};function $i(aa){var ta=aa._readableState;ta.readableListening=aa.listenerCount("readable")>0,ta.resumeScheduled&&!ta.paused?ta.flowing=!0:aa.listenerCount("data")>0&&aa.resume()}function Wi(aa){Yn("readable nexttick read 0"),aa.read(0)}Gi.prototype.resume=function(){var aa=this._readableState;return aa.flowing||(Yn("resume"),aa.flowing=!aa.readableListening,Qi(this,aa)),aa.paused=!1,this};function Qi(aa,ta){ta.resumeScheduled||(ta.resumeScheduled=!0,process$1.nextTick(ea,aa,ta))}function ea(aa,ta){Yn("resume",ta.reading),ta.reading||aa.read(0),ta.resumeScheduled=!1,aa.emit("resume"),na(aa),ta.flowing&&!ta.reading&&aa.read(0)}Gi.prototype.pause=function(){return Yn("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Yn("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function na(aa){var ta=aa._readableState;for(Yn("flow",ta.flowing);ta.flowing&&aa.read()!==null;);}Gi.prototype.wrap=function(aa){var ta=this,fa=this._readableState,ca=!1;aa.on("end",function(){if(Yn("wrapped end"),fa.decoder&&!fa.ended){var xa=fa.decoder.end();xa&&xa.length&&ta.push(xa)}ta.push(null)}),aa.on("data",function(xa){if(Yn("wrapped data"),fa.decoder&&(xa=fa.decoder.write(xa)),!(fa.objectMode&&xa==null)&&!(!fa.objectMode&&(!xa||!xa.length))){var ga=ta.push(xa);ga||(ca=!0,aa.pause())}});for(var pa in aa)this[pa]===void 0&&typeof aa[pa]=="function"&&(this[pa]=function(ga){return function(){return aa[ga].apply(aa,arguments)}}(pa));for(var Ea=0;Ea<Pi.length;Ea++)aa.on(Pi[Ea],this.emit.bind(this,Pi[Ea]));return this._read=function(xa){Yn("wrapped _read",xa),ca&&(ca=!1,aa.resume())},this},typeof Symbol=="function"&&(Gi.prototype[Symbol.asyncIterator]=function(){return Ai===void 0&&(Ai=requireAsync_iterator()),Ai(this)}),Object.defineProperty(Gi.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Gi.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Gi.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ta){this._readableState&&(this._readableState.flowing=ta)}}),Gi._fromList=Ji,Object.defineProperty(Gi.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ji(aa,ta){if(ta.length===0)return null;var fa;return ta.objectMode?fa=ta.buffer.shift():!aa||aa>=ta.length?(ta.decoder?fa=ta.buffer.join(""):ta.buffer.length===1?fa=ta.buffer.first():fa=ta.buffer.concat(ta.length),ta.buffer.clear()):fa=ta.buffer.consume(aa,ta.decoder),fa}function ra(aa){var ta=aa._readableState;Yn("endReadable",ta.endEmitted),ta.endEmitted||(ta.ended=!0,process$1.nextTick(sa,ta,aa))}function sa(aa,ta){if(Yn("endReadableNT",aa.endEmitted,aa.length),!aa.endEmitted&&aa.length===0&&(aa.endEmitted=!0,ta.readable=!1,ta.emit("end"),aa.autoDestroy)){var fa=ta._writableState;(!fa||fa.autoDestroy&&fa.finished)&&ta.destroy()}}typeof Symbol=="function"&&(Gi.from=function(aa,ta){return Ii===void 0&&(Ii=requireFromBrowser()),Ii(Gi,aa,ta)});function la(aa,ta){for(var fa=0,ca=aa.length;fa<ca;fa++)if(aa[fa]===ta)return fa;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=Wn;var on=requireErrorsBrowser().codes,In=on.ERR_METHOD_NOT_IMPLEMENTED,Rn=on.ERR_MULTIPLE_CALLBACK,Mn=on.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ln=on.ERR_TRANSFORM_WITH_LENGTH_0,Hn=require_stream_duplex$1();requireInherits_browser()(Wn,Hn);function jn(vi,gi){var mi=this._transformState;mi.transforming=!1;var yi=mi.writecb;if(yi===null)return this.emit("error",new Rn);mi.writechunk=null,mi.writecb=null,gi!=null&&this.push(gi),yi(vi);var bi=this._readableState;bi.reading=!1,(bi.needReadable||bi.length<bi.highWaterMark)&&this._read(bi.highWaterMark)}function Wn(vi){if(!(this instanceof Wn))return new Wn(vi);Hn.call(this,vi),this._transformState={afterTransform:jn.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,vi&&(typeof vi.transform=="function"&&(this._transform=vi.transform),typeof vi.flush=="function"&&(this._flush=vi.flush)),this.on("prefinish",Yn)}function Yn(){var vi=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(gi,mi){hi(vi,gi,mi)}):hi(this,null,null)}Wn.prototype.push=function(vi,gi){return this._transformState.needTransform=!1,Hn.prototype.push.call(this,vi,gi)},Wn.prototype._transform=function(vi,gi,mi){mi(new In("_transform()"))},Wn.prototype._write=function(vi,gi,mi){var yi=this._transformState;if(yi.writecb=mi,yi.writechunk=vi,yi.writeencoding=gi,!yi.transforming){var bi=this._readableState;(yi.needTransform||bi.needReadable||bi.length<bi.highWaterMark)&&this._read(bi.highWaterMark)}},Wn.prototype._read=function(vi){var gi=this._transformState;gi.writechunk!==null&&!gi.transforming?(gi.transforming=!0,this._transform(gi.writechunk,gi.writeencoding,gi.afterTransform)):gi.needTransform=!0},Wn.prototype._destroy=function(vi,gi){Hn.prototype._destroy.call(this,vi,function(mi){gi(mi)})};function hi(vi,gi,mi){if(gi)return vi.emit("error",gi);if(mi!=null&&vi.push(mi),vi._writableState.length)throw new Ln;if(vi._transformState.transforming)throw new Mn;return vi.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=In;var on=require_stream_transform$1();requireInherits_browser()(In,on);function In(Rn){if(!(this instanceof In))return new In(Rn);on.call(this,Rn)}return In.prototype._transform=function(Rn,Mn,Ln){Ln(null,Rn)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var on;function In(mi){var yi=!1;return function(){yi||(yi=!0,mi.apply(void 0,arguments))}}var Rn=requireErrorsBrowser().codes,Mn=Rn.ERR_MISSING_ARGS,Ln=Rn.ERR_STREAM_DESTROYED;function Hn(mi){if(mi)throw mi}function jn(mi){return mi.setHeader&&typeof mi.abort=="function"}function Wn(mi,yi,bi,Ei){Ei=In(Ei);var _i=!1;mi.on("close",function(){_i=!0}),on===void 0&&(on=requireEndOfStream()),on(mi,{readable:yi,writable:bi},function(Ci){if(Ci)return Ei(Ci);_i=!0,Ei()});var xi=!1;return function(Ci){if(!_i&&!xi){if(xi=!0,jn(mi))return mi.abort();if(typeof mi.destroy=="function")return mi.destroy();Ei(Ci||new Ln("pipe"))}}}function Yn(mi){mi()}function hi(mi,yi){return mi.pipe(yi)}function vi(mi){return!mi.length||typeof mi[mi.length-1]!="function"?Hn:mi.pop()}function gi(){for(var mi=arguments.length,yi=new Array(mi),bi=0;bi<mi;bi++)yi[bi]=arguments[bi];var Ei=vi(yi);if(Array.isArray(yi[0])&&(yi=yi[0]),yi.length<2)throw new Mn("streams");var _i,xi=yi.map(function(Ci,Ai){var Ii=Ai<yi.length-1,Ni=Ai>0;return Wn(Ci,Ii,Ni,function(Pi){_i||(_i=Pi),Pi&&xi.forEach(Yn),!Ii&&(xi.forEach(Yn),Ei(_i))})});return yi.reduce(hi)}return pipeline_1=gi,pipeline_1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,function(on,In){In=on.exports=require_stream_readable$1(),In.Stream=In,In.Readable=In,In.Writable=require_stream_writable$1(),In.Duplex=require_stream_duplex$1(),In.Transform=require_stream_transform$1(),In.PassThrough=require_stream_passthrough$1(),In.finished=requireEndOfStream(),In.pipeline=requirePipeline()}(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase$2,hasRequiredHashBase$2;function requireHashBase$2(){if(hasRequiredHashBase$2)return hashBase$2;hasRequiredHashBase$2=1;var on=requireSafeBuffer$1().Buffer,In=requireReadableBrowser$1().Transform,Rn=requireInherits_browser();function Mn(Hn,jn){if(!on.isBuffer(Hn)&&typeof Hn!="string")throw new TypeError(jn+" must be a string or a buffer")}function Ln(Hn){In.call(this),this._block=on.allocUnsafe(Hn),this._blockSize=Hn,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return Rn(Ln,In),Ln.prototype._transform=function(Hn,jn,Wn){var Yn=null;try{this.update(Hn,jn)}catch(hi){Yn=hi}Wn(Yn)},Ln.prototype._flush=function(Hn){var jn=null;try{this.push(this.digest())}catch(Wn){jn=Wn}Hn(jn)},Ln.prototype.update=function(Hn,jn){if(Mn(Hn,"Data"),this._finalized)throw new Error("Digest already called");on.isBuffer(Hn)||(Hn=on.from(Hn,jn));for(var Wn=this._block,Yn=0;this._blockOffset+Hn.length-Yn>=this._blockSize;){for(var hi=this._blockOffset;hi<this._blockSize;)Wn[hi++]=Hn[Yn++];this._update(),this._blockOffset=0}for(;Yn<Hn.length;)Wn[this._blockOffset++]=Hn[Yn++];for(var vi=0,gi=Hn.length*8;gi>0;++vi)this._length[vi]+=gi,gi=this._length[vi]/4294967296|0,gi>0&&(this._length[vi]-=4294967296*gi);return this},Ln.prototype._update=function(){throw new Error("_update is not implemented")},Ln.prototype.digest=function(Hn){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var jn=this._digest();Hn!==void 0&&(jn=jn.toString(Hn)),this._block.fill(0),this._blockOffset=0;for(var Wn=0;Wn<4;++Wn)this._length[Wn]=0;return jn},Ln.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$2=Ln,hashBase$2}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var on=requireInherits_browser(),In=requireHashBase$2(),Rn=requireSafeBuffer$1().Buffer,Mn=new Array(16);function Ln(){In.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}on(Ln,In),Ln.prototype._update=function(){for(var vi=Mn,gi=0;gi<16;++gi)vi[gi]=this._block.readInt32LE(gi*4);var mi=this._a,yi=this._b,bi=this._c,Ei=this._d;mi=jn(mi,yi,bi,Ei,vi[0],3614090360,7),Ei=jn(Ei,mi,yi,bi,vi[1],3905402710,12),bi=jn(bi,Ei,mi,yi,vi[2],606105819,17),yi=jn(yi,bi,Ei,mi,vi[3],3250441966,22),mi=jn(mi,yi,bi,Ei,vi[4],4118548399,7),Ei=jn(Ei,mi,yi,bi,vi[5],1200080426,12),bi=jn(bi,Ei,mi,yi,vi[6],2821735955,17),yi=jn(yi,bi,Ei,mi,vi[7],4249261313,22),mi=jn(mi,yi,bi,Ei,vi[8],1770035416,7),Ei=jn(Ei,mi,yi,bi,vi[9],2336552879,12),bi=jn(bi,Ei,mi,yi,vi[10],4294925233,17),yi=jn(yi,bi,Ei,mi,vi[11],2304563134,22),mi=jn(mi,yi,bi,Ei,vi[12],1804603682,7),Ei=jn(Ei,mi,yi,bi,vi[13],4254626195,12),bi=jn(bi,Ei,mi,yi,vi[14],2792965006,17),yi=jn(yi,bi,Ei,mi,vi[15],1236535329,22),mi=Wn(mi,yi,bi,Ei,vi[1],4129170786,5),Ei=Wn(Ei,mi,yi,bi,vi[6],3225465664,9),bi=Wn(bi,Ei,mi,yi,vi[11],643717713,14),yi=Wn(yi,bi,Ei,mi,vi[0],3921069994,20),mi=Wn(mi,yi,bi,Ei,vi[5],3593408605,5),Ei=Wn(Ei,mi,yi,bi,vi[10],38016083,9),bi=Wn(bi,Ei,mi,yi,vi[15],3634488961,14),yi=Wn(yi,bi,Ei,mi,vi[4],3889429448,20),mi=Wn(mi,yi,bi,Ei,vi[9],568446438,5),Ei=Wn(Ei,mi,yi,bi,vi[14],3275163606,9),bi=Wn(bi,Ei,mi,yi,vi[3],4107603335,14),yi=Wn(yi,bi,Ei,mi,vi[8],1163531501,20),mi=Wn(mi,yi,bi,Ei,vi[13],2850285829,5),Ei=Wn(Ei,mi,yi,bi,vi[2],4243563512,9),bi=Wn(bi,Ei,mi,yi,vi[7],1735328473,14),yi=Wn(yi,bi,Ei,mi,vi[12],2368359562,20),mi=Yn(mi,yi,bi,Ei,vi[5],4294588738,4),Ei=Yn(Ei,mi,yi,bi,vi[8],2272392833,11),bi=Yn(bi,Ei,mi,yi,vi[11],1839030562,16),yi=Yn(yi,bi,Ei,mi,vi[14],4259657740,23),mi=Yn(mi,yi,bi,Ei,vi[1],2763975236,4),Ei=Yn(Ei,mi,yi,bi,vi[4],1272893353,11),bi=Yn(bi,Ei,mi,yi,vi[7],4139469664,16),yi=Yn(yi,bi,Ei,mi,vi[10],3200236656,23),mi=Yn(mi,yi,bi,Ei,vi[13],681279174,4),Ei=Yn(Ei,mi,yi,bi,vi[0],3936430074,11),bi=Yn(bi,Ei,mi,yi,vi[3],3572445317,16),yi=Yn(yi,bi,Ei,mi,vi[6],76029189,23),mi=Yn(mi,yi,bi,Ei,vi[9],3654602809,4),Ei=Yn(Ei,mi,yi,bi,vi[12],3873151461,11),bi=Yn(bi,Ei,mi,yi,vi[15],530742520,16),yi=Yn(yi,bi,Ei,mi,vi[2],3299628645,23),mi=hi(mi,yi,bi,Ei,vi[0],4096336452,6),Ei=hi(Ei,mi,yi,bi,vi[7],1126891415,10),bi=hi(bi,Ei,mi,yi,vi[14],2878612391,15),yi=hi(yi,bi,Ei,mi,vi[5],4237533241,21),mi=hi(mi,yi,bi,Ei,vi[12],1700485571,6),Ei=hi(Ei,mi,yi,bi,vi[3],2399980690,10),bi=hi(bi,Ei,mi,yi,vi[10],4293915773,15),yi=hi(yi,bi,Ei,mi,vi[1],2240044497,21),mi=hi(mi,yi,bi,Ei,vi[8],1873313359,6),Ei=hi(Ei,mi,yi,bi,vi[15],4264355552,10),bi=hi(bi,Ei,mi,yi,vi[6],2734768916,15),yi=hi(yi,bi,Ei,mi,vi[13],1309151649,21),mi=hi(mi,yi,bi,Ei,vi[4],4149444226,6),Ei=hi(Ei,mi,yi,bi,vi[11],3174756917,10),bi=hi(bi,Ei,mi,yi,vi[2],718787259,15),yi=hi(yi,bi,Ei,mi,vi[9],3951481745,21),this._a=this._a+mi|0,this._b=this._b+yi|0,this._c=this._c+bi|0,this._d=this._d+Ei|0},Ln.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var vi=Rn.allocUnsafe(16);return vi.writeInt32LE(this._a,0),vi.writeInt32LE(this._b,4),vi.writeInt32LE(this._c,8),vi.writeInt32LE(this._d,12),vi};function Hn(vi,gi){return vi<<gi|vi>>>32-gi}function jn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi&mi|~gi&yi)+bi+Ei|0,_i)+gi|0}function Wn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi&yi|mi&~yi)+bi+Ei|0,_i)+gi|0}function Yn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi^mi^yi)+bi+Ei|0,_i)+gi|0}function hi(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(mi^(gi|~yi))+bi+Ei|0,_i)+gi|0}return md5_js=Ln,md5_js}var md5_jsExports=requireMd5_js();const MD5=getDefaultExportFromCjs(md5_jsExports);function createHash(...on){let In=new MD5;return on.forEach(Rn=>In=In.update(Rn)),In.digest("hex")}let nanoid=(on=21)=>crypto.getRandomValues(new Uint8Array(on)).reduce((In,Rn)=>(Rn&=63,Rn<36?In+=Rn.toString(36):Rn<62?In+=(Rn-26).toString(36).toUpperCase():Rn>62?In+="-":In+="_",In),"");const ID_PREFIX_SEPARATOR="|";function createId(on){return on&&on.length>0?`${on}${ID_PREFIX_SEPARATOR}${nanoid()}`:nanoid()}const API_ID_PREFIX="api";function createApiId(){return createId(API_ID_PREFIX)}function isApiId(on){return on.startsWith(API_ID_PREFIX+ID_PREFIX_SEPARATOR)}function createDocumentId(){return createId("doc")}function createEnvironmentId(){return createId("env")}function createFileId(){return createId("file")}function createFolderId(){return createId("dir")}function createVariableId(){return createId("var")}function formatFullDateTime(on,In={day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatShortDateTime(on,In={dateStyle:"short",timeStyle:"medium"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatLongDate(on,In={day:"numeric",month:"long",year:"numeric"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatLongTime(on,In={hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatShortTime(on,In={hour:"2-digit",minute:"2-digit"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatDateTime(on,In,Rn){return new Intl.DateTimeFormat(In,Rn).format(typeof on=="string"?Date.parse(on):on)}function formatRelativeTime(on,In={numeric:"auto"},Rn="en-US"){const Mn=now(),Ln=Mn-toTimestamp(on??Mn),Hn=Math.floor(Ln/1e3),jn=Math.floor(Hn/60),Wn=Math.floor(jn/60),Yn=Math.floor(Wn/24),hi=Math.floor(Yn/30),vi=Math.floor(hi/12),gi=new Intl.RelativeTimeFormat(Rn,In);return vi!==0?gi.format(-vi,"year"):hi!==0?gi.format(-hi,"month"):Yn!==0?gi.format(-Yn,"day"):Wn!==0?gi.format(-Wn,"hour"):jn!==0?gi.format(-jn,"minute"):gi.format(-Hn,"second")}function toTimestamp(on){switch(typeof on){case"string":return Date.parse(on);case"number":return on;default:return on.getTime()}}function convertEpochToISOString(on,In="ms"){return new Date(In==="ms"?on:on*1e3).toISOString()}function now(){return Date.now()}function toUtcDate(on){return new Date(on).setUTCHours(0,0,0,0)}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(on,In){(function(Rn,Mn){on.exports=Mn()})(dayjs_min,function(){var Rn=1e3,Mn=6e4,Ln=36e5,Hn="millisecond",jn="second",Wn="minute",Yn="hour",hi="day",vi="week",gi="month",mi="quarter",yi="year",bi="date",Ei="Invalid Date",_i=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,xi=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Ci={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(wi){var Ri=["th","st","nd","rd"],ki=wi%100;return"["+wi+(Ri[(ki-20)%10]||Ri[ki]||Ri[0])+"]"}},Ai=function(wi,Ri,ki){var Bi=String(wi);return!Bi||Bi.length>=Ri?wi:""+Array(Ri+1-Bi.length).join(ki)+wi},Ii={s:Ai,z:function(wi){var Ri=-wi.utcOffset(),ki=Math.abs(Ri),Bi=Math.floor(ki/60),Hi=ki%60;return(Ri<=0?"+":"-")+Ai(Bi,2,"0")+":"+Ai(Hi,2,"0")},m:function wi(Ri,ki){if(Ri.date()<ki.date())return-wi(ki,Ri);var Bi=12*(ki.year()-Ri.year())+(ki.month()-Ri.month()),Hi=Ri.clone().add(Bi,gi),Ki=ki-Hi<0,ji=Ri.clone().add(Bi+(Ki?-1:1),gi);return+(-(Bi+(ki-Hi)/(Ki?Hi-ji:ji-Hi))||0)},a:function(wi){return wi<0?Math.ceil(wi)||0:Math.floor(wi)},p:function(wi){return{M:gi,y:yi,w:vi,d:hi,D:bi,h:Yn,m:Wn,s:jn,ms:Hn,Q:mi}[wi]||String(wi||"").toLowerCase().replace(/s$/,"")},u:function(wi){return wi===void 0}},Ni="en",Pi={};Pi[Ni]=Ci;var Vi="$isDayjsObject",Ui=function(wi){return wi instanceof Mi||!(!wi||!wi[Vi])},Gi=function wi(Ri,ki,Bi){var Hi;if(!Ri)return Ni;if(typeof Ri=="string"){var Ki=Ri.toLowerCase();Pi[Ki]&&(Hi=Ki),ki&&(Pi[Ki]=ki,Hi=Ki);var ji=Ri.split("-");if(!Hi&&ji.length>1)return wi(ji[0])}else{var Fi=Ri.name;Pi[Fi]=Ri,Hi=Fi}return!Bi&&Hi&&(Ni=Hi),Hi||!Bi&&Ni},Yi=function(wi,Ri){if(Ui(wi))return wi.clone();var ki=typeof Ri=="object"?Ri:{};return ki.date=wi,ki.args=arguments,new Mi(ki)},zi=Ii;zi.l=Gi,zi.i=Ui,zi.w=function(wi,Ri){return Yi(wi,{locale:Ri.$L,utc:Ri.$u,x:Ri.$x,$offset:Ri.$offset})};var Mi=function(){function wi(ki){this.$L=Gi(ki.locale,null,!0),this.parse(ki),this.$x=this.$x||ki.x||{},this[Vi]=!0}var Ri=wi.prototype;return Ri.parse=function(ki){this.$d=function(Bi){var Hi=Bi.date,Ki=Bi.utc;if(Hi===null)return new Date(NaN);if(zi.u(Hi))return new Date;if(Hi instanceof Date)return new Date(Hi);if(typeof Hi=="string"&&!/Z$/i.test(Hi)){var ji=Hi.match(_i);if(ji){var Fi=ji[2]-1||0,$i=(ji[7]||"0").substring(0,3);return Ki?new Date(Date.UTC(ji[1],Fi,ji[3]||1,ji[4]||0,ji[5]||0,ji[6]||0,$i)):new Date(ji[1],Fi,ji[3]||1,ji[4]||0,ji[5]||0,ji[6]||0,$i)}}return new Date(Hi)}(ki),this.init()},Ri.init=function(){var ki=this.$d;this.$y=ki.getFullYear(),this.$M=ki.getMonth(),this.$D=ki.getDate(),this.$W=ki.getDay(),this.$H=ki.getHours(),this.$m=ki.getMinutes(),this.$s=ki.getSeconds(),this.$ms=ki.getMilliseconds()},Ri.$utils=function(){return zi},Ri.isValid=function(){return this.$d.toString()!==Ei},Ri.isSame=function(ki,Bi){var Hi=Yi(ki);return this.startOf(Bi)<=Hi&&Hi<=this.endOf(Bi)},Ri.isAfter=function(ki,Bi){return Yi(ki)<this.startOf(Bi)},Ri.isBefore=function(ki,Bi){return this.endOf(Bi)<Yi(ki)},Ri.$g=function(ki,Bi,Hi){return zi.u(ki)?this[Bi]:this.set(Hi,ki)},Ri.unix=function(){return Math.floor(this.valueOf()/1e3)},Ri.valueOf=function(){return this.$d.getTime()},Ri.startOf=function(ki,Bi){var Hi=this,Ki=!!zi.u(Bi)||Bi,ji=zi.p(ki),Fi=function(sa,la){var aa=zi.w(Hi.$u?Date.UTC(Hi.$y,la,sa):new Date(Hi.$y,la,sa),Hi);return Ki?aa:aa.endOf(hi)},$i=function(sa,la){return zi.w(Hi.toDate()[sa].apply(Hi.toDate("s"),(Ki?[0,0,0,0]:[23,59,59,999]).slice(la)),Hi)},Wi=this.$W,Qi=this.$M,ea=this.$D,na="set"+(this.$u?"UTC":"");switch(ji){case yi:return Ki?Fi(1,0):Fi(31,11);case gi:return Ki?Fi(1,Qi):Fi(0,Qi+1);case vi:var Ji=this.$locale().weekStart||0,ra=(Wi<Ji?Wi+7:Wi)-Ji;return Fi(Ki?ea-ra:ea+(6-ra),Qi);case hi:case bi:return $i(na+"Hours",0);case Yn:return $i(na+"Minutes",1);case Wn:return $i(na+"Seconds",2);case jn:return $i(na+"Milliseconds",3);default:return this.clone()}},Ri.endOf=function(ki){return this.startOf(ki,!1)},Ri.$set=function(ki,Bi){var Hi,Ki=zi.p(ki),ji="set"+(this.$u?"UTC":""),Fi=(Hi={},Hi[hi]=ji+"Date",Hi[bi]=ji+"Date",Hi[gi]=ji+"Month",Hi[yi]=ji+"FullYear",Hi[Yn]=ji+"Hours",Hi[Wn]=ji+"Minutes",Hi[jn]=ji+"Seconds",Hi[Hn]=ji+"Milliseconds",Hi)[Ki],$i=Ki===hi?this.$D+(Bi-this.$W):Bi;if(Ki===gi||Ki===yi){var Wi=this.clone().set(bi,1);Wi.$d[Fi]($i),Wi.init(),this.$d=Wi.set(bi,Math.min(this.$D,Wi.daysInMonth())).$d}else Fi&&this.$d[Fi]($i);return this.init(),this},Ri.set=function(ki,Bi){return this.clone().$set(ki,Bi)},Ri.get=function(ki){return this[zi.p(ki)]()},Ri.add=function(ki,Bi){var Hi,Ki=this;ki=Number(ki);var ji=zi.p(Bi),Fi=function(Qi){var ea=Yi(Ki);return zi.w(ea.date(ea.date()+Math.round(Qi*ki)),Ki)};if(ji===gi)return this.set(gi,this.$M+ki);if(ji===yi)return this.set(yi,this.$y+ki);if(ji===hi)return Fi(1);if(ji===vi)return Fi(7);var $i=(Hi={},Hi[Wn]=Mn,Hi[Yn]=Ln,Hi[jn]=Rn,Hi)[ji]||1,Wi=this.$d.getTime()+ki*$i;return zi.w(Wi,this)},Ri.subtract=function(ki,Bi){return this.add(-1*ki,Bi)},Ri.format=function(ki){var Bi=this,Hi=this.$locale();if(!this.isValid())return Hi.invalidDate||Ei;var Ki=ki||"YYYY-MM-DDTHH:mm:ssZ",ji=zi.z(this),Fi=this.$H,$i=this.$m,Wi=this.$M,Qi=Hi.weekdays,ea=Hi.months,na=Hi.meridiem,Ji=function(la,aa,ta,fa){return la&&(la[aa]||la(Bi,Ki))||ta[aa].slice(0,fa)},ra=function(la){return zi.s(Fi%12||12,la,"0")},sa=na||function(la,aa,ta){var fa=la<12?"AM":"PM";return ta?fa.toLowerCase():fa};return Ki.replace(xi,function(la,aa){return aa||function(ta){switch(ta){case"YY":return String(Bi.$y).slice(-2);case"YYYY":return zi.s(Bi.$y,4,"0");case"M":return Wi+1;case"MM":return zi.s(Wi+1,2,"0");case"MMM":return Ji(Hi.monthsShort,Wi,ea,3);case"MMMM":return Ji(ea,Wi);case"D":return Bi.$D;case"DD":return zi.s(Bi.$D,2,"0");case"d":return String(Bi.$W);case"dd":return Ji(Hi.weekdaysMin,Bi.$W,Qi,2);case"ddd":return Ji(Hi.weekdaysShort,Bi.$W,Qi,3);case"dddd":return Qi[Bi.$W];case"H":return String(Fi);case"HH":return zi.s(Fi,2,"0");case"h":return ra(1);case"hh":return ra(2);case"a":return sa(Fi,$i,!0);case"A":return sa(Fi,$i,!1);case"m":return String($i);case"mm":return zi.s($i,2,"0");case"s":return String(Bi.$s);case"ss":return zi.s(Bi.$s,2,"0");case"SSS":return zi.s(Bi.$ms,3,"0");case"Z":return ji}return null}(la)||ji.replace(":","")})},Ri.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Ri.diff=function(ki,Bi,Hi){var Ki,ji=this,Fi=zi.p(Bi),$i=Yi(ki),Wi=($i.utcOffset()-this.utcOffset())*Mn,Qi=this-$i,ea=function(){return zi.m(ji,$i)};switch(Fi){case yi:Ki=ea()/12;break;case gi:Ki=ea();break;case mi:Ki=ea()/3;break;case vi:Ki=(Qi-Wi)/6048e5;break;case hi:Ki=(Qi-Wi)/864e5;break;case Yn:Ki=Qi/Ln;break;case Wn:Ki=Qi/Mn;break;case jn:Ki=Qi/Rn;break;default:Ki=Qi}return Hi?Ki:zi.a(Ki)},Ri.daysInMonth=function(){return this.endOf(gi).$D},Ri.$locale=function(){return Pi[this.$L]},Ri.locale=function(ki,Bi){if(!ki)return this.$L;var Hi=this.clone(),Ki=Gi(ki,Bi,!0);return Ki&&(Hi.$L=Ki),Hi},Ri.clone=function(){return zi.w(this.$d,this)},Ri.toDate=function(){return new Date(this.valueOf())},Ri.toJSON=function(){return this.isValid()?this.toISOString():null},Ri.toISOString=function(){return this.$d.toISOString()},Ri.toString=function(){return this.$d.toUTCString()},wi}(),Li=Mi.prototype;return Yi.prototype=Li,[["$ms",Hn],["$s",jn],["$m",Wn],["$H",Yn],["$W",hi],["$M",gi],["$y",yi],["$D",bi]].forEach(function(wi){Li[wi[1]]=function(Ri){return this.$g(Ri,wi[0],wi[1])}}),Yi.extend=function(wi,Ri){return wi.$i||(wi(Ri,Mi,Yi),wi.$i=!0),Yi},Yi.locale=Gi,Yi.isDayjs=Ui,Yi.unix=function(wi){return Yi(1e3*wi)},Yi.en=Pi[Ni],Yi.Ls=Pi,Yi.p={},Yi})}(dayjs_min$1)),dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs(dayjs_minExports);var RelativeDateTimeRange=(on=>(on[on.today=0]="today",on[on.last15Minutes=900]="last15Minutes",on[on.last30Minutes=1800]="last30Minutes",on[on.lastHour=3600]="lastHour",on[on.last2Hours=7200]="last2Hours",on[on.last6Hours=21600]="last6Hours",on[on.last12Hours=43200]="last12Hours",on[on.last24Hours=86400]="last24Hours",on[on.last2Days=172800]="last2Days",on[on.last7Days=604800]="last7Days",on[on.last60Days=5184e3]="last60Days",on))(RelativeDateTimeRange||{}),DateTimeRangePrecision=(on=>(on[on.milliseconds=0]="milliseconds",on[on.seconds=1]="seconds",on[on.minutes=2]="minutes",on))(DateTimeRangePrecision||{});class DateTimeRangeFactory{constructor(In){this.range=In}static from(In){return Array.isArray(In)?new DateTimeRangeFactory([dayjs(In[0]),dayjs(In[1])]):new DateTimeRangeFactory(In)}static equals(In,Rn){const Mn=In.toEpoch(),Ln=Rn.toEpoch();return Mn[0]===Ln[0]&&Mn[1]===Ln[1]}get value(){return this.range}toDayjs(){if(Array.isArray(this.range))return this.range;const In=dayjs().millisecond(0).subtract(1,"minute");switch(this.range){case 0:return[In.hour(0).minute(0).second(0),In];default:case 1800:return[In.subtract(30,"minute"),In];case 3600:return[In.subtract(1,"hour"),In];case 7200:return[In.subtract(2,"hour"),In];case 21600:return[In.subtract(6,"hour"),In];case 43200:return[In.subtract(12,"hour"),In];case 86400:return[In.subtract(24,"hour"),In];case 172800:return[In.subtract(2,"day"),In];case 604800:return[In.subtract(7,"day"),In];case 5184e3:return[In.subtract(60,"day"),In]}}toEpoch(){const In=this.toDayjs();return[In[0].valueOf(),In[1].valueOf()]}toJSON(){const In=this.toDayjs();return[In[0].toJSON(),In[1].toJSON()]}equals(In,Rn=0){return isRelativeDateTimeRange(this.range)===isRelativeDateTimeRange(In.value)&&DateTimeRangeFactory.equals(...this.changePrecision(this,In,Rn))}changePrecision(In,Rn,Mn){switch(Mn){case 1:{const Ln=In.toDayjs(),Hn=Rn.toDayjs();return[DateTimeRangeFactory.from([Ln[0].millisecond(0),Ln[1].millisecond(0)]),DateTimeRangeFactory.from([Hn[0].millisecond(0),Hn[1].millisecond(0)])]}case 2:{const Ln=In.toDayjs(),Hn=Rn.toDayjs();return[DateTimeRangeFactory.from([Ln[0].second(0).millisecond(0),Ln[1].second(0).millisecond(0)]),DateTimeRangeFactory.from([Hn[0].second(0).millisecond(0),Hn[1].second(0).millisecond(0)])]}default:return[In,Rn]}}serialize(){return Array.isArray(this.range)?this.toEpoch():this.range}}function isRelativeDateTimeRange(on){return typeof on=="number"}const isAsyncIterable$1=on=>isFunction$2(Object(on)[Symbol.asyncIterator]);function isDictionary(on){return on!==null&&typeof on=="object"&&!Array.isArray(on)}function isFunction$2(on){return typeof on=="function"}function escape$2(on){return on.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}const slash=" \\",newLine=`
4250
+ `)+" "+ea[1]:ea[0]+Qi+" "+Wi.join(", ")+" "+ea[1]}on.types=requireTypes$1();function xi(Wi){return Array.isArray(Wi)}on.isArray=xi;function Ci(Wi){return typeof Wi=="boolean"}on.isBoolean=Ci;function Ai(Wi){return Wi===null}on.isNull=Ai;function Ii(Wi){return Wi==null}on.isNullOrUndefined=Ii;function Ni(Wi){return typeof Wi=="number"}on.isNumber=Ni;function Pi(Wi){return typeof Wi=="string"}on.isString=Pi;function Vi(Wi){return typeof Wi=="symbol"}on.isSymbol=Vi;function Ui(Wi){return Wi===void 0}on.isUndefined=Ui;function Gi(Wi){return Yi(Wi)&&Ri(Wi)==="[object RegExp]"}on.isRegExp=Gi,on.types.isRegExp=Gi;function Yi(Wi){return typeof Wi=="object"&&Wi!==null}on.isObject=Yi;function zi(Wi){return Yi(Wi)&&Ri(Wi)==="[object Date]"}on.isDate=zi,on.types.isDate=zi;function Mi(Wi){return Yi(Wi)&&(Ri(Wi)==="[object Error]"||Wi instanceof Error)}on.isError=Mi,on.types.isNativeError=Mi;function Li(Wi){return typeof Wi=="function"}on.isFunction=Li;function wi(Wi){return Wi===null||typeof Wi=="boolean"||typeof Wi=="number"||typeof Wi=="string"||typeof Wi=="symbol"||typeof Wi>"u"}on.isPrimitive=wi,on.isBuffer=requireIsBufferBrowser();function Ri(Wi){return Object.prototype.toString.call(Wi)}function ki(Wi){return Wi<10?"0"+Wi.toString(10):Wi.toString(10)}var Bi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Hi(){var Wi=new Date,Qi=[ki(Wi.getHours()),ki(Wi.getMinutes()),ki(Wi.getSeconds())].join(":");return[Wi.getDate(),Bi[Wi.getMonth()],Qi].join(" ")}on.log=function(){console.log("%s - %s",Hi(),on.format.apply(on,arguments))},on.inherits=requireInherits_browser(),on._extend=function(Wi,Qi){if(!Qi||!Yi(Qi))return Wi;for(var ea=Object.keys(Qi),na=ea.length;na--;)Wi[ea[na]]=Qi[ea[na]];return Wi};function Ki(Wi,Qi){return Object.prototype.hasOwnProperty.call(Wi,Qi)}var ji=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;on.promisify=function(Qi){if(typeof Qi!="function")throw new TypeError('The "original" argument must be of type Function');if(ji&&Qi[ji]){var ea=Qi[ji];if(typeof ea!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ea,ji,{value:ea,enumerable:!1,writable:!1,configurable:!0}),ea}function ea(){for(var na,Ji,ra=new Promise(function(aa,ta){na=aa,Ji=ta}),sa=[],la=0;la<arguments.length;la++)sa.push(arguments[la]);sa.push(function(aa,ta){aa?Ji(aa):na(ta)});try{Qi.apply(this,sa)}catch(aa){Ji(aa)}return ra}return Object.setPrototypeOf(ea,Object.getPrototypeOf(Qi)),ji&&Object.defineProperty(ea,ji,{value:ea,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ea,Rn(Qi))},on.promisify.custom=ji;function Fi(Wi,Qi){if(!Wi){var ea=new Error("Promise was rejected with a falsy value");ea.reason=Wi,Wi=ea}return Qi(Wi)}function $i(Wi){if(typeof Wi!="function")throw new TypeError('The "original" argument must be of type Function');function Qi(){for(var ea=[],na=0;na<arguments.length;na++)ea.push(arguments[na]);var Ji=ea.pop();if(typeof Ji!="function")throw new TypeError("The last argument must be of type Function");var ra=this,sa=function(){return Ji.apply(ra,arguments)};Wi.apply(this,ea).then(function(la){process$1.nextTick(sa.bind(null,null,la))},function(la){process$1.nextTick(Fi.bind(null,la,sa))})}return Object.setPrototypeOf(Qi,Object.getPrototypeOf(Wi)),Object.defineProperties(Qi,Rn(Wi)),Qi}on.callbackify=$i}(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function on(bi,Ei){var _i=Object.keys(bi);if(Object.getOwnPropertySymbols){var xi=Object.getOwnPropertySymbols(bi);Ei&&(xi=xi.filter(function(Ci){return Object.getOwnPropertyDescriptor(bi,Ci).enumerable})),_i.push.apply(_i,xi)}return _i}function In(bi){for(var Ei=1;Ei<arguments.length;Ei++){var _i=arguments[Ei]!=null?arguments[Ei]:{};Ei%2?on(Object(_i),!0).forEach(function(xi){Rn(bi,xi,_i[xi])}):Object.getOwnPropertyDescriptors?Object.defineProperties(bi,Object.getOwnPropertyDescriptors(_i)):on(Object(_i)).forEach(function(xi){Object.defineProperty(bi,xi,Object.getOwnPropertyDescriptor(_i,xi))})}return bi}function Rn(bi,Ei,_i){return Ei=jn(Ei),Ei in bi?Object.defineProperty(bi,Ei,{value:_i,enumerable:!0,configurable:!0,writable:!0}):bi[Ei]=_i,bi}function Mn(bi,Ei){if(!(bi instanceof Ei))throw new TypeError("Cannot call a class as a function")}function Ln(bi,Ei){for(var _i=0;_i<Ei.length;_i++){var xi=Ei[_i];xi.enumerable=xi.enumerable||!1,xi.configurable=!0,"value"in xi&&(xi.writable=!0),Object.defineProperty(bi,jn(xi.key),xi)}}function Hn(bi,Ei,_i){return Ei&&Ln(bi.prototype,Ei),Object.defineProperty(bi,"prototype",{writable:!1}),bi}function jn(bi){var Ei=Wn(bi,"string");return typeof Ei=="symbol"?Ei:String(Ei)}function Wn(bi,Ei){if(typeof bi!="object"||bi===null)return bi;var _i=bi[Symbol.toPrimitive];if(_i!==void 0){var xi=_i.call(bi,Ei);if(typeof xi!="object")return xi;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(bi)}var Yn=requireDist(),hi=Yn.Buffer,vi=requireUtil$1(),gi=vi.inspect,mi=gi&&gi.custom||"inspect";function yi(bi,Ei,_i){hi.prototype.copy.call(bi,Ei,_i)}return buffer_list=function(){function bi(){Mn(this,bi),this.head=null,this.tail=null,this.length=0}return Hn(bi,[{key:"push",value:function(_i){var xi={data:_i,next:null};this.length>0?this.tail.next=xi:this.head=xi,this.tail=xi,++this.length}},{key:"unshift",value:function(_i){var xi={data:_i,next:this.head};this.length===0&&(this.tail=xi),this.head=xi,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_i}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_i){if(this.length===0)return"";for(var xi=this.head,Ci=""+xi.data;xi=xi.next;)Ci+=_i+xi.data;return Ci}},{key:"concat",value:function(_i){if(this.length===0)return hi.alloc(0);for(var xi=hi.allocUnsafe(_i>>>0),Ci=this.head,Ai=0;Ci;)yi(Ci.data,xi,Ai),Ai+=Ci.data.length,Ci=Ci.next;return xi}},{key:"consume",value:function(_i,xi){var Ci;return _i<this.head.data.length?(Ci=this.head.data.slice(0,_i),this.head.data=this.head.data.slice(_i)):_i===this.head.data.length?Ci=this.shift():Ci=xi?this._getString(_i):this._getBuffer(_i),Ci}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_i){var xi=this.head,Ci=1,Ai=xi.data;for(_i-=Ai.length;xi=xi.next;){var Ii=xi.data,Ni=_i>Ii.length?Ii.length:_i;if(Ni===Ii.length?Ai+=Ii:Ai+=Ii.slice(0,_i),_i-=Ni,_i===0){Ni===Ii.length?(++Ci,xi.next?this.head=xi.next:this.head=this.tail=null):(this.head=xi,xi.data=Ii.slice(Ni));break}++Ci}return this.length-=Ci,Ai}},{key:"_getBuffer",value:function(_i){var xi=hi.allocUnsafe(_i),Ci=this.head,Ai=1;for(Ci.data.copy(xi),_i-=Ci.data.length;Ci=Ci.next;){var Ii=Ci.data,Ni=_i>Ii.length?Ii.length:_i;if(Ii.copy(xi,xi.length-_i,0,Ni),_i-=Ni,_i===0){Ni===Ii.length?(++Ai,Ci.next?this.head=Ci.next:this.head=this.tail=null):(this.head=Ci,Ci.data=Ii.slice(Ni));break}++Ai}return this.length-=Ai,xi}},{key:mi,value:function(_i,xi){return gi(this,In(In({},xi),{},{depth:0,customInspect:!1}))}}]),bi}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function on(jn,Wn){var Yn=this,hi=this._readableState&&this._readableState.destroyed,vi=this._writableState&&this._writableState.destroyed;return hi||vi?(Wn?Wn(jn):jn&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(Ln,this,jn)):process$1.nextTick(Ln,this,jn)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(jn||null,function(gi){!Wn&&gi?Yn._writableState?Yn._writableState.errorEmitted?process$1.nextTick(Rn,Yn):(Yn._writableState.errorEmitted=!0,process$1.nextTick(In,Yn,gi)):process$1.nextTick(In,Yn,gi):Wn?(process$1.nextTick(Rn,Yn),Wn(gi)):process$1.nextTick(Rn,Yn)}),this)}function In(jn,Wn){Ln(jn,Wn),Rn(jn)}function Rn(jn){jn._writableState&&!jn._writableState.emitClose||jn._readableState&&!jn._readableState.emitClose||jn.emit("close")}function Mn(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ln(jn,Wn){jn.emit("error",Wn)}function Hn(jn,Wn){var Yn=jn._readableState,hi=jn._writableState;Yn&&Yn.autoDestroy||hi&&hi.autoDestroy?jn.destroy(Wn):jn.emit("error",Wn)}return destroy_1$1={destroy:on,undestroy:Mn,errorOrDestroy:Hn},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function on(Wn,Yn){Wn.prototype=Object.create(Yn.prototype),Wn.prototype.constructor=Wn,Wn.__proto__=Yn}var In={};function Rn(Wn,Yn,hi){hi||(hi=Error);function vi(mi,yi,bi){return typeof Yn=="string"?Yn:Yn(mi,yi,bi)}var gi=function(mi){on(yi,mi);function yi(bi,Ei,_i){return mi.call(this,vi(bi,Ei,_i))||this}return yi}(hi);gi.prototype.name=hi.name,gi.prototype.code=Wn,In[Wn]=gi}function Mn(Wn,Yn){if(Array.isArray(Wn)){var hi=Wn.length;return Wn=Wn.map(function(vi){return String(vi)}),hi>2?"one of ".concat(Yn," ").concat(Wn.slice(0,hi-1).join(", "),", or ")+Wn[hi-1]:hi===2?"one of ".concat(Yn," ").concat(Wn[0]," or ").concat(Wn[1]):"of ".concat(Yn," ").concat(Wn[0])}else return"of ".concat(Yn," ").concat(String(Wn))}function Ln(Wn,Yn,hi){return Wn.substr(0,Yn.length)===Yn}function Hn(Wn,Yn,hi){return(hi===void 0||hi>Wn.length)&&(hi=Wn.length),Wn.substring(hi-Yn.length,hi)===Yn}function jn(Wn,Yn,hi){return typeof hi!="number"&&(hi=0),hi+Yn.length>Wn.length?!1:Wn.indexOf(Yn,hi)!==-1}return Rn("ERR_INVALID_OPT_VALUE",function(Wn,Yn){return'The value "'+Yn+'" is invalid for option "'+Wn+'"'},TypeError),Rn("ERR_INVALID_ARG_TYPE",function(Wn,Yn,hi){var vi;typeof Yn=="string"&&Ln(Yn,"not ")?(vi="must not be",Yn=Yn.replace(/^not /,"")):vi="must be";var gi;if(Hn(Wn," argument"))gi="The ".concat(Wn," ").concat(vi," ").concat(Mn(Yn,"type"));else{var mi=jn(Wn,".")?"property":"argument";gi='The "'.concat(Wn,'" ').concat(mi," ").concat(vi," ").concat(Mn(Yn,"type"))}return gi+=". Received type ".concat(typeof hi),gi},TypeError),Rn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Rn("ERR_METHOD_NOT_IMPLEMENTED",function(Wn){return"The "+Wn+" method is not implemented"}),Rn("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Rn("ERR_STREAM_DESTROYED",function(Wn){return"Cannot call "+Wn+" after a stream was destroyed"}),Rn("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Rn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Rn("ERR_STREAM_WRITE_AFTER_END","write after end"),Rn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Rn("ERR_UNKNOWN_ENCODING",function(Wn){return"Unknown encoding: "+Wn},TypeError),Rn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=In,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var on=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function In(Mn,Ln,Hn){return Mn.highWaterMark!=null?Mn.highWaterMark:Ln?Mn[Hn]:null}function Rn(Mn,Ln,Hn,jn){var Wn=In(Ln,jn,Hn);if(Wn!=null){if(!(isFinite(Wn)&&Math.floor(Wn)===Wn)||Wn<0){var Yn=jn?Hn:"highWaterMark";throw new on(Yn,Wn)}return Math.floor(Wn)}return Mn.objectMode?16:16*1024}return state={getHighWaterMark:Rn},state}var browser$c,hasRequiredBrowser$c;function requireBrowser$c(){if(hasRequiredBrowser$c)return browser$c;hasRequiredBrowser$c=1,browser$c=on;function on(Rn,Mn){if(In("noDeprecation"))return Rn;var Ln=!1;function Hn(){if(!Ln){if(In("throwDeprecation"))throw new Error(Mn);In("traceDeprecation")?console.trace(Mn):console.warn(Mn),Ln=!0}return Rn.apply(this,arguments)}return Hn}function In(Rn){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var Mn=commonjsGlobal.localStorage[Rn];return Mn==null?!1:String(Mn).toLowerCase()==="true"}return browser$c}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=Ui;function on(na){var Ji=this;this.next=null,this.entry=null,this.finish=function(){ea(Ji,na)}}var In;Ui.WritableState=Pi;var Rn={deprecate:requireBrowser$c()},Mn=requireStreamBrowser$1(),Ln=requireDist().Buffer,Hn=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function jn(na){return Ln.from(na)}function Wn(na){return Ln.isBuffer(na)||na instanceof Hn}var Yn=requireDestroy$1(),hi=requireState(),vi=hi.getHighWaterMark,gi=requireErrorsBrowser().codes,mi=gi.ERR_INVALID_ARG_TYPE,yi=gi.ERR_METHOD_NOT_IMPLEMENTED,bi=gi.ERR_MULTIPLE_CALLBACK,Ei=gi.ERR_STREAM_CANNOT_PIPE,_i=gi.ERR_STREAM_DESTROYED,xi=gi.ERR_STREAM_NULL_VALUES,Ci=gi.ERR_STREAM_WRITE_AFTER_END,Ai=gi.ERR_UNKNOWN_ENCODING,Ii=Yn.errorOrDestroy;requireInherits_browser()(Ui,Mn);function Ni(){}function Pi(na,Ji,ra){In=In||require_stream_duplex$1(),na=na||{},typeof ra!="boolean"&&(ra=Ji instanceof In),this.objectMode=!!na.objectMode,ra&&(this.objectMode=this.objectMode||!!na.writableObjectMode),this.highWaterMark=vi(this,na,"writableHighWaterMark",ra),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var sa=na.decodeStrings===!1;this.decodeStrings=!sa,this.defaultEncoding=na.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(la){ki(Ji,la)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=na.emitClose!==!1,this.autoDestroy=!!na.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new on(this)}Pi.prototype.getBuffer=function(){for(var Ji=this.bufferedRequest,ra=[];Ji;)ra.push(Ji),Ji=Ji.next;return ra},function(){try{Object.defineProperty(Pi.prototype,"buffer",{get:Rn.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Vi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Vi=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ui,Symbol.hasInstance,{value:function(Ji){return Vi.call(this,Ji)?!0:this!==Ui?!1:Ji&&Ji._writableState instanceof Pi}})):Vi=function(Ji){return Ji instanceof this};function Ui(na){In=In||require_stream_duplex$1();var Ji=this instanceof In;if(!Ji&&!Vi.call(Ui,this))return new Ui(na);this._writableState=new Pi(na,this,Ji),this.writable=!0,na&&(typeof na.write=="function"&&(this._write=na.write),typeof na.writev=="function"&&(this._writev=na.writev),typeof na.destroy=="function"&&(this._destroy=na.destroy),typeof na.final=="function"&&(this._final=na.final)),Mn.call(this)}Ui.prototype.pipe=function(){Ii(this,new Ei)};function Gi(na,Ji){var ra=new Ci;Ii(na,ra),process$1.nextTick(Ji,ra)}function Yi(na,Ji,ra,sa){var la;return ra===null?la=new xi:typeof ra!="string"&&!Ji.objectMode&&(la=new mi("chunk",["string","Buffer"],ra)),la?(Ii(na,la),process$1.nextTick(sa,la),!1):!0}Ui.prototype.write=function(na,Ji,ra){var sa=this._writableState,la=!1,aa=!sa.objectMode&&Wn(na);return aa&&!Ln.isBuffer(na)&&(na=jn(na)),typeof Ji=="function"&&(ra=Ji,Ji=null),aa?Ji="buffer":Ji||(Ji=sa.defaultEncoding),typeof ra!="function"&&(ra=Ni),sa.ending?Gi(this,ra):(aa||Yi(this,sa,na,ra))&&(sa.pendingcb++,la=Mi(this,sa,aa,na,Ji,ra)),la},Ui.prototype.cork=function(){this._writableState.corked++},Ui.prototype.uncork=function(){var na=this._writableState;na.corked&&(na.corked--,!na.writing&&!na.corked&&!na.bufferProcessing&&na.bufferedRequest&&Ki(this,na))},Ui.prototype.setDefaultEncoding=function(Ji){if(typeof Ji=="string"&&(Ji=Ji.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Ji+"").toLowerCase())>-1))throw new Ai(Ji);return this._writableState.defaultEncoding=Ji,this},Object.defineProperty(Ui.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function zi(na,Ji,ra){return!na.objectMode&&na.decodeStrings!==!1&&typeof Ji=="string"&&(Ji=Ln.from(Ji,ra)),Ji}Object.defineProperty(Ui.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Mi(na,Ji,ra,sa,la,aa){if(!ra){var ta=zi(Ji,sa,la);sa!==ta&&(ra=!0,la="buffer",sa=ta)}var fa=Ji.objectMode?1:sa.length;Ji.length+=fa;var ca=Ji.length<Ji.highWaterMark;if(ca||(Ji.needDrain=!0),Ji.writing||Ji.corked){var pa=Ji.lastBufferedRequest;Ji.lastBufferedRequest={chunk:sa,encoding:la,isBuf:ra,callback:aa,next:null},pa?pa.next=Ji.lastBufferedRequest:Ji.bufferedRequest=Ji.lastBufferedRequest,Ji.bufferedRequestCount+=1}else Li(na,Ji,!1,fa,sa,la,aa);return ca}function Li(na,Ji,ra,sa,la,aa,ta){Ji.writelen=sa,Ji.writecb=ta,Ji.writing=!0,Ji.sync=!0,Ji.destroyed?Ji.onwrite(new _i("write")):ra?na._writev(la,Ji.onwrite):na._write(la,aa,Ji.onwrite),Ji.sync=!1}function wi(na,Ji,ra,sa,la){--Ji.pendingcb,ra?(process$1.nextTick(la,sa),process$1.nextTick(Wi,na,Ji),na._writableState.errorEmitted=!0,Ii(na,sa)):(la(sa),na._writableState.errorEmitted=!0,Ii(na,sa),Wi(na,Ji))}function Ri(na){na.writing=!1,na.writecb=null,na.length-=na.writelen,na.writelen=0}function ki(na,Ji){var ra=na._writableState,sa=ra.sync,la=ra.writecb;if(typeof la!="function")throw new bi;if(Ri(ra),Ji)wi(na,ra,sa,Ji,la);else{var aa=ji(ra)||na.destroyed;!aa&&!ra.corked&&!ra.bufferProcessing&&ra.bufferedRequest&&Ki(na,ra),sa?process$1.nextTick(Bi,na,ra,aa,la):Bi(na,ra,aa,la)}}function Bi(na,Ji,ra,sa){ra||Hi(na,Ji),Ji.pendingcb--,sa(),Wi(na,Ji)}function Hi(na,Ji){Ji.length===0&&Ji.needDrain&&(Ji.needDrain=!1,na.emit("drain"))}function Ki(na,Ji){Ji.bufferProcessing=!0;var ra=Ji.bufferedRequest;if(na._writev&&ra&&ra.next){var sa=Ji.bufferedRequestCount,la=new Array(sa),aa=Ji.corkedRequestsFree;aa.entry=ra;for(var ta=0,fa=!0;ra;)la[ta]=ra,ra.isBuf||(fa=!1),ra=ra.next,ta+=1;la.allBuffers=fa,Li(na,Ji,!0,Ji.length,la,"",aa.finish),Ji.pendingcb++,Ji.lastBufferedRequest=null,aa.next?(Ji.corkedRequestsFree=aa.next,aa.next=null):Ji.corkedRequestsFree=new on(Ji),Ji.bufferedRequestCount=0}else{for(;ra;){var ca=ra.chunk,pa=ra.encoding,Ea=ra.callback,xa=Ji.objectMode?1:ca.length;if(Li(na,Ji,!1,xa,ca,pa,Ea),ra=ra.next,Ji.bufferedRequestCount--,Ji.writing)break}ra===null&&(Ji.lastBufferedRequest=null)}Ji.bufferedRequest=ra,Ji.bufferProcessing=!1}Ui.prototype._write=function(na,Ji,ra){ra(new yi("_write()"))},Ui.prototype._writev=null,Ui.prototype.end=function(na,Ji,ra){var sa=this._writableState;return typeof na=="function"?(ra=na,na=null,Ji=null):typeof Ji=="function"&&(ra=Ji,Ji=null),na!=null&&this.write(na,Ji),sa.corked&&(sa.corked=1,this.uncork()),sa.ending||Qi(this,sa,ra),this},Object.defineProperty(Ui.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ji(na){return na.ending&&na.length===0&&na.bufferedRequest===null&&!na.finished&&!na.writing}function Fi(na,Ji){na._final(function(ra){Ji.pendingcb--,ra&&Ii(na,ra),Ji.prefinished=!0,na.emit("prefinish"),Wi(na,Ji)})}function $i(na,Ji){!Ji.prefinished&&!Ji.finalCalled&&(typeof na._final=="function"&&!Ji.destroyed?(Ji.pendingcb++,Ji.finalCalled=!0,process$1.nextTick(Fi,na,Ji)):(Ji.prefinished=!0,na.emit("prefinish")))}function Wi(na,Ji){var ra=ji(Ji);if(ra&&($i(na,Ji),Ji.pendingcb===0&&(Ji.finished=!0,na.emit("finish"),Ji.autoDestroy))){var sa=na._readableState;(!sa||sa.autoDestroy&&sa.endEmitted)&&na.destroy()}return ra}function Qi(na,Ji,ra){Ji.ending=!0,Wi(na,Ji),ra&&(Ji.finished?process$1.nextTick(ra):na.once("finish",ra)),Ji.ended=!0,na.writable=!1}function ea(na,Ji,ra){var sa=na.entry;for(na.entry=null;sa;){var la=sa.callback;Ji.pendingcb--,la(ra),sa=sa.next}Ji.corkedRequestsFree.next=na}return Object.defineProperty(Ui.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Ji){this._writableState&&(this._writableState.destroyed=Ji)}}),Ui.prototype.destroy=Yn.destroy,Ui.prototype._undestroy=Yn.undestroy,Ui.prototype._destroy=function(na,Ji){Ji(na)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var on=Object.keys||function(hi){var vi=[];for(var gi in hi)vi.push(gi);return vi};_stream_duplex$1=jn;var In=require_stream_readable$1(),Rn=require_stream_writable$1();requireInherits_browser()(jn,In);for(var Mn=on(Rn.prototype),Ln=0;Ln<Mn.length;Ln++){var Hn=Mn[Ln];jn.prototype[Hn]||(jn.prototype[Hn]=Rn.prototype[Hn])}function jn(hi){if(!(this instanceof jn))return new jn(hi);In.call(this,hi),Rn.call(this,hi),this.allowHalfOpen=!0,hi&&(hi.readable===!1&&(this.readable=!1),hi.writable===!1&&(this.writable=!1),hi.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Wn)))}Object.defineProperty(jn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(jn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(jn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Wn(){this._writableState.ended||process$1.nextTick(Yn,this)}function Yn(hi){hi.end()}return Object.defineProperty(jn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(vi){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=vi,this._writableState.destroyed=vi)}}),_stream_duplex$1}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var on=requireSafeBuffer$1().Buffer,In=on.isEncoding||function(xi){switch(xi=""+xi,xi&&xi.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Rn(xi){if(!xi)return"utf8";for(var Ci;;)switch(xi){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return xi;default:if(Ci)return;xi=(""+xi).toLowerCase(),Ci=!0}}function Mn(xi){var Ci=Rn(xi);if(typeof Ci!="string"&&(on.isEncoding===In||!In(xi)))throw new Error("Unknown encoding: "+xi);return Ci||xi}string_decoder.StringDecoder=Ln;function Ln(xi){this.encoding=Mn(xi);var Ci;switch(this.encoding){case"utf16le":this.text=gi,this.end=mi,Ci=4;break;case"utf8":this.fillLast=Yn,Ci=4;break;case"base64":this.text=yi,this.end=bi,Ci=3;break;default:this.write=Ei,this.end=_i;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=on.allocUnsafe(Ci)}Ln.prototype.write=function(xi){if(xi.length===0)return"";var Ci,Ai;if(this.lastNeed){if(Ci=this.fillLast(xi),Ci===void 0)return"";Ai=this.lastNeed,this.lastNeed=0}else Ai=0;return Ai<xi.length?Ci?Ci+this.text(xi,Ai):this.text(xi,Ai):Ci||""},Ln.prototype.end=vi,Ln.prototype.text=hi,Ln.prototype.fillLast=function(xi){if(this.lastNeed<=xi.length)return xi.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);xi.copy(this.lastChar,this.lastTotal-this.lastNeed,0,xi.length),this.lastNeed-=xi.length};function Hn(xi){return xi<=127?0:xi>>5===6?2:xi>>4===14?3:xi>>3===30?4:xi>>6===2?-1:-2}function jn(xi,Ci,Ai){var Ii=Ci.length-1;if(Ii<Ai)return 0;var Ni=Hn(Ci[Ii]);return Ni>=0?(Ni>0&&(xi.lastNeed=Ni-1),Ni):--Ii<Ai||Ni===-2?0:(Ni=Hn(Ci[Ii]),Ni>=0?(Ni>0&&(xi.lastNeed=Ni-2),Ni):--Ii<Ai||Ni===-2?0:(Ni=Hn(Ci[Ii]),Ni>=0?(Ni>0&&(Ni===2?Ni=0:xi.lastNeed=Ni-3),Ni):0))}function Wn(xi,Ci,Ai){if((Ci[0]&192)!==128)return xi.lastNeed=0,"�";if(xi.lastNeed>1&&Ci.length>1){if((Ci[1]&192)!==128)return xi.lastNeed=1,"�";if(xi.lastNeed>2&&Ci.length>2&&(Ci[2]&192)!==128)return xi.lastNeed=2,"�"}}function Yn(xi){var Ci=this.lastTotal-this.lastNeed,Ai=Wn(this,xi);if(Ai!==void 0)return Ai;if(this.lastNeed<=xi.length)return xi.copy(this.lastChar,Ci,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);xi.copy(this.lastChar,Ci,0,xi.length),this.lastNeed-=xi.length}function hi(xi,Ci){var Ai=jn(this,xi,Ci);if(!this.lastNeed)return xi.toString("utf8",Ci);this.lastTotal=Ai;var Ii=xi.length-(Ai-this.lastNeed);return xi.copy(this.lastChar,0,Ii),xi.toString("utf8",Ci,Ii)}function vi(xi){var Ci=xi&&xi.length?this.write(xi):"";return this.lastNeed?Ci+"�":Ci}function gi(xi,Ci){if((xi.length-Ci)%2===0){var Ai=xi.toString("utf16le",Ci);if(Ai){var Ii=Ai.charCodeAt(Ai.length-1);if(Ii>=55296&&Ii<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=xi[xi.length-2],this.lastChar[1]=xi[xi.length-1],Ai.slice(0,-1)}return Ai}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=xi[xi.length-1],xi.toString("utf16le",Ci,xi.length-1)}function mi(xi){var Ci=xi&&xi.length?this.write(xi):"";if(this.lastNeed){var Ai=this.lastTotal-this.lastNeed;return Ci+this.lastChar.toString("utf16le",0,Ai)}return Ci}function yi(xi,Ci){var Ai=(xi.length-Ci)%3;return Ai===0?xi.toString("base64",Ci):(this.lastNeed=3-Ai,this.lastTotal=3,Ai===1?this.lastChar[0]=xi[xi.length-1]:(this.lastChar[0]=xi[xi.length-2],this.lastChar[1]=xi[xi.length-1]),xi.toString("base64",Ci,xi.length-Ai))}function bi(xi){var Ci=xi&&xi.length?this.write(xi):"";return this.lastNeed?Ci+this.lastChar.toString("base64",0,3-this.lastNeed):Ci}function Ei(xi){return xi.toString(this.encoding)}function _i(xi){return xi&&xi.length?this.write(xi):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var on=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function In(Hn){var jn=!1;return function(){if(!jn){jn=!0;for(var Wn=arguments.length,Yn=new Array(Wn),hi=0;hi<Wn;hi++)Yn[hi]=arguments[hi];Hn.apply(this,Yn)}}}function Rn(){}function Mn(Hn){return Hn.setHeader&&typeof Hn.abort=="function"}function Ln(Hn,jn,Wn){if(typeof jn=="function")return Ln(Hn,null,jn);jn||(jn={}),Wn=In(Wn||Rn);var Yn=jn.readable||jn.readable!==!1&&Hn.readable,hi=jn.writable||jn.writable!==!1&&Hn.writable,vi=function(){Hn.writable||mi()},gi=Hn._writableState&&Hn._writableState.finished,mi=function(){hi=!1,gi=!0,Yn||Wn.call(Hn)},yi=Hn._readableState&&Hn._readableState.endEmitted,bi=function(){Yn=!1,yi=!0,hi||Wn.call(Hn)},Ei=function(Ai){Wn.call(Hn,Ai)},_i=function(){var Ai;if(Yn&&!yi)return(!Hn._readableState||!Hn._readableState.ended)&&(Ai=new on),Wn.call(Hn,Ai);if(hi&&!gi)return(!Hn._writableState||!Hn._writableState.ended)&&(Ai=new on),Wn.call(Hn,Ai)},xi=function(){Hn.req.on("finish",mi)};return Mn(Hn)?(Hn.on("complete",mi),Hn.on("abort",_i),Hn.req?xi():Hn.on("request",xi)):hi&&!Hn._writableState&&(Hn.on("end",vi),Hn.on("close",vi)),Hn.on("end",bi),Hn.on("finish",mi),jn.error!==!1&&Hn.on("error",Ei),Hn.on("close",_i),function(){Hn.removeListener("complete",mi),Hn.removeListener("abort",_i),Hn.removeListener("request",xi),Hn.req&&Hn.req.removeListener("finish",mi),Hn.removeListener("end",vi),Hn.removeListener("close",vi),Hn.removeListener("finish",mi),Hn.removeListener("end",bi),Hn.removeListener("error",Ei),Hn.removeListener("close",_i)}}return endOfStream=Ln,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var on;function In(Ai,Ii,Ni){return Ii=Rn(Ii),Ii in Ai?Object.defineProperty(Ai,Ii,{value:Ni,enumerable:!0,configurable:!0,writable:!0}):Ai[Ii]=Ni,Ai}function Rn(Ai){var Ii=Mn(Ai,"string");return typeof Ii=="symbol"?Ii:String(Ii)}function Mn(Ai,Ii){if(typeof Ai!="object"||Ai===null)return Ai;var Ni=Ai[Symbol.toPrimitive];if(Ni!==void 0){var Pi=Ni.call(Ai,Ii);if(typeof Pi!="object")return Pi;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ii==="string"?String:Number)(Ai)}var Ln=requireEndOfStream(),Hn=Symbol("lastResolve"),jn=Symbol("lastReject"),Wn=Symbol("error"),Yn=Symbol("ended"),hi=Symbol("lastPromise"),vi=Symbol("handlePromise"),gi=Symbol("stream");function mi(Ai,Ii){return{value:Ai,done:Ii}}function yi(Ai){var Ii=Ai[Hn];if(Ii!==null){var Ni=Ai[gi].read();Ni!==null&&(Ai[hi]=null,Ai[Hn]=null,Ai[jn]=null,Ii(mi(Ni,!1)))}}function bi(Ai){process$1.nextTick(yi,Ai)}function Ei(Ai,Ii){return function(Ni,Pi){Ai.then(function(){if(Ii[Yn]){Ni(mi(void 0,!0));return}Ii[vi](Ni,Pi)},Pi)}}var _i=Object.getPrototypeOf(function(){}),xi=Object.setPrototypeOf((on={get stream(){return this[gi]},next:function(){var Ii=this,Ni=this[Wn];if(Ni!==null)return Promise.reject(Ni);if(this[Yn])return Promise.resolve(mi(void 0,!0));if(this[gi].destroyed)return new Promise(function(Gi,Yi){process$1.nextTick(function(){Ii[Wn]?Yi(Ii[Wn]):Gi(mi(void 0,!0))})});var Pi=this[hi],Vi;if(Pi)Vi=new Promise(Ei(Pi,this));else{var Ui=this[gi].read();if(Ui!==null)return Promise.resolve(mi(Ui,!1));Vi=new Promise(this[vi])}return this[hi]=Vi,Vi}},In(on,Symbol.asyncIterator,function(){return this}),In(on,"return",function(){var Ii=this;return new Promise(function(Ni,Pi){Ii[gi].destroy(null,function(Vi){if(Vi){Pi(Vi);return}Ni(mi(void 0,!0))})})}),on),_i),Ci=function(Ii){var Ni,Pi=Object.create(xi,(Ni={},In(Ni,gi,{value:Ii,writable:!0}),In(Ni,Hn,{value:null,writable:!0}),In(Ni,jn,{value:null,writable:!0}),In(Ni,Wn,{value:null,writable:!0}),In(Ni,Yn,{value:Ii._readableState.endEmitted,writable:!0}),In(Ni,vi,{value:function(Ui,Gi){var Yi=Pi[gi].read();Yi?(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Ui(mi(Yi,!1))):(Pi[Hn]=Ui,Pi[jn]=Gi)},writable:!0}),Ni));return Pi[hi]=null,Ln(Ii,function(Vi){if(Vi&&Vi.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ui=Pi[jn];Ui!==null&&(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Ui(Vi)),Pi[Wn]=Vi;return}var Gi=Pi[Hn];Gi!==null&&(Pi[hi]=null,Pi[Hn]=null,Pi[jn]=null,Gi(mi(void 0,!0))),Pi[Yn]=!0}),Ii.on("readable",bi.bind(null,Pi)),Pi};return async_iterator=Ci,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=Gi;var on;Gi.ReadableState=Ui,requireEvents().EventEmitter;var In=function(ta,fa){return ta.listeners(fa).length},Rn=requireStreamBrowser$1(),Mn=requireDist().Buffer,Ln=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hn(aa){return Mn.from(aa)}function jn(aa){return Mn.isBuffer(aa)||aa instanceof Ln}var Wn=requireUtil$1(),Yn;Wn&&Wn.debuglog?Yn=Wn.debuglog("stream"):Yn=function(){};var hi=requireBuffer_list(),vi=requireDestroy$1(),gi=requireState(),mi=gi.getHighWaterMark,yi=requireErrorsBrowser().codes,bi=yi.ERR_INVALID_ARG_TYPE,Ei=yi.ERR_STREAM_PUSH_AFTER_EOF,_i=yi.ERR_METHOD_NOT_IMPLEMENTED,xi=yi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ci,Ai,Ii;requireInherits_browser()(Gi,Rn);var Ni=vi.errorOrDestroy,Pi=["error","close","destroy","pause","resume"];function Vi(aa,ta,fa){if(typeof aa.prependListener=="function")return aa.prependListener(ta,fa);!aa._events||!aa._events[ta]?aa.on(ta,fa):Array.isArray(aa._events[ta])?aa._events[ta].unshift(fa):aa._events[ta]=[fa,aa._events[ta]]}function Ui(aa,ta,fa){on=on||require_stream_duplex$1(),aa=aa||{},typeof fa!="boolean"&&(fa=ta instanceof on),this.objectMode=!!aa.objectMode,fa&&(this.objectMode=this.objectMode||!!aa.readableObjectMode),this.highWaterMark=mi(this,aa,"readableHighWaterMark",fa),this.buffer=new hi,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=aa.emitClose!==!1,this.autoDestroy=!!aa.autoDestroy,this.destroyed=!1,this.defaultEncoding=aa.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,aa.encoding&&(Ci||(Ci=requireString_decoder().StringDecoder),this.decoder=new Ci(aa.encoding),this.encoding=aa.encoding)}function Gi(aa){if(on=on||require_stream_duplex$1(),!(this instanceof Gi))return new Gi(aa);var ta=this instanceof on;this._readableState=new Ui(aa,this,ta),this.readable=!0,aa&&(typeof aa.read=="function"&&(this._read=aa.read),typeof aa.destroy=="function"&&(this._destroy=aa.destroy)),Rn.call(this)}Object.defineProperty(Gi.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ta){this._readableState&&(this._readableState.destroyed=ta)}}),Gi.prototype.destroy=vi.destroy,Gi.prototype._undestroy=vi.undestroy,Gi.prototype._destroy=function(aa,ta){ta(aa)},Gi.prototype.push=function(aa,ta){var fa=this._readableState,ca;return fa.objectMode?ca=!0:typeof aa=="string"&&(ta=ta||fa.defaultEncoding,ta!==fa.encoding&&(aa=Mn.from(aa,ta),ta=""),ca=!0),Yi(this,aa,ta,!1,ca)},Gi.prototype.unshift=function(aa){return Yi(this,aa,null,!0,!1)};function Yi(aa,ta,fa,ca,pa){Yn("readableAddChunk",ta);var Ea=aa._readableState;if(ta===null)Ea.reading=!1,ki(aa,Ea);else{var xa;if(pa||(xa=Mi(Ea,ta)),xa)Ni(aa,xa);else if(Ea.objectMode||ta&&ta.length>0)if(typeof ta!="string"&&!Ea.objectMode&&Object.getPrototypeOf(ta)!==Mn.prototype&&(ta=Hn(ta)),ca)Ea.endEmitted?Ni(aa,new xi):zi(aa,Ea,ta,!0);else if(Ea.ended)Ni(aa,new Ei);else{if(Ea.destroyed)return!1;Ea.reading=!1,Ea.decoder&&!fa?(ta=Ea.decoder.write(ta),Ea.objectMode||ta.length!==0?zi(aa,Ea,ta,!1):Ki(aa,Ea)):zi(aa,Ea,ta,!1)}else ca||(Ea.reading=!1,Ki(aa,Ea))}return!Ea.ended&&(Ea.length<Ea.highWaterMark||Ea.length===0)}function zi(aa,ta,fa,ca){ta.flowing&&ta.length===0&&!ta.sync?(ta.awaitDrain=0,aa.emit("data",fa)):(ta.length+=ta.objectMode?1:fa.length,ca?ta.buffer.unshift(fa):ta.buffer.push(fa),ta.needReadable&&Bi(aa)),Ki(aa,ta)}function Mi(aa,ta){var fa;return!jn(ta)&&typeof ta!="string"&&ta!==void 0&&!aa.objectMode&&(fa=new bi("chunk",["string","Buffer","Uint8Array"],ta)),fa}Gi.prototype.isPaused=function(){return this._readableState.flowing===!1},Gi.prototype.setEncoding=function(aa){Ci||(Ci=requireString_decoder().StringDecoder);var ta=new Ci(aa);this._readableState.decoder=ta,this._readableState.encoding=this._readableState.decoder.encoding;for(var fa=this._readableState.buffer.head,ca="";fa!==null;)ca+=ta.write(fa.data),fa=fa.next;return this._readableState.buffer.clear(),ca!==""&&this._readableState.buffer.push(ca),this._readableState.length=ca.length,this};var Li=1073741824;function wi(aa){return aa>=Li?aa=Li:(aa--,aa|=aa>>>1,aa|=aa>>>2,aa|=aa>>>4,aa|=aa>>>8,aa|=aa>>>16,aa++),aa}function Ri(aa,ta){return aa<=0||ta.length===0&&ta.ended?0:ta.objectMode?1:aa!==aa?ta.flowing&&ta.length?ta.buffer.head.data.length:ta.length:(aa>ta.highWaterMark&&(ta.highWaterMark=wi(aa)),aa<=ta.length?aa:ta.ended?ta.length:(ta.needReadable=!0,0))}Gi.prototype.read=function(aa){Yn("read",aa),aa=parseInt(aa,10);var ta=this._readableState,fa=aa;if(aa!==0&&(ta.emittedReadable=!1),aa===0&&ta.needReadable&&((ta.highWaterMark!==0?ta.length>=ta.highWaterMark:ta.length>0)||ta.ended))return Yn("read: emitReadable",ta.length,ta.ended),ta.length===0&&ta.ended?ra(this):Bi(this),null;if(aa=Ri(aa,ta),aa===0&&ta.ended)return ta.length===0&&ra(this),null;var ca=ta.needReadable;Yn("need readable",ca),(ta.length===0||ta.length-aa<ta.highWaterMark)&&(ca=!0,Yn("length less than watermark",ca)),ta.ended||ta.reading?(ca=!1,Yn("reading or ended",ca)):ca&&(Yn("do read"),ta.reading=!0,ta.sync=!0,ta.length===0&&(ta.needReadable=!0),this._read(ta.highWaterMark),ta.sync=!1,ta.reading||(aa=Ri(fa,ta)));var pa;return aa>0?pa=Ji(aa,ta):pa=null,pa===null?(ta.needReadable=ta.length<=ta.highWaterMark,aa=0):(ta.length-=aa,ta.awaitDrain=0),ta.length===0&&(ta.ended||(ta.needReadable=!0),fa!==aa&&ta.ended&&ra(this)),pa!==null&&this.emit("data",pa),pa};function ki(aa,ta){if(Yn("onEofChunk"),!ta.ended){if(ta.decoder){var fa=ta.decoder.end();fa&&fa.length&&(ta.buffer.push(fa),ta.length+=ta.objectMode?1:fa.length)}ta.ended=!0,ta.sync?Bi(aa):(ta.needReadable=!1,ta.emittedReadable||(ta.emittedReadable=!0,Hi(aa)))}}function Bi(aa){var ta=aa._readableState;Yn("emitReadable",ta.needReadable,ta.emittedReadable),ta.needReadable=!1,ta.emittedReadable||(Yn("emitReadable",ta.flowing),ta.emittedReadable=!0,process$1.nextTick(Hi,aa))}function Hi(aa){var ta=aa._readableState;Yn("emitReadable_",ta.destroyed,ta.length,ta.ended),!ta.destroyed&&(ta.length||ta.ended)&&(aa.emit("readable"),ta.emittedReadable=!1),ta.needReadable=!ta.flowing&&!ta.ended&&ta.length<=ta.highWaterMark,na(aa)}function Ki(aa,ta){ta.readingMore||(ta.readingMore=!0,process$1.nextTick(ji,aa,ta))}function ji(aa,ta){for(;!ta.reading&&!ta.ended&&(ta.length<ta.highWaterMark||ta.flowing&&ta.length===0);){var fa=ta.length;if(Yn("maybeReadMore read 0"),aa.read(0),fa===ta.length)break}ta.readingMore=!1}Gi.prototype._read=function(aa){Ni(this,new _i("_read()"))},Gi.prototype.pipe=function(aa,ta){var fa=this,ca=this._readableState;switch(ca.pipesCount){case 0:ca.pipes=aa;break;case 1:ca.pipes=[ca.pipes,aa];break;default:ca.pipes.push(aa);break}ca.pipesCount+=1,Yn("pipe count=%d opts=%j",ca.pipesCount,ta);var pa=(!ta||ta.end!==!1)&&aa!==process$1.stdout&&aa!==process$1.stderr,Ea=pa?ga:$a;ca.endEmitted?process$1.nextTick(Ea):fa.once("end",Ea),aa.on("unpipe",xa);function xa(Ma,Ka){Yn("onunpipe"),Ma===fa&&Ka&&Ka.hasUnpiped===!1&&(Ka.hasUnpiped=!0,va())}function ga(){Yn("onend"),aa.end()}var ma=Fi(fa);aa.on("drain",ma);var Aa=!1;function va(){Yn("cleanup"),aa.removeListener("close",wa),aa.removeListener("finish",Na),aa.removeListener("drain",ma),aa.removeListener("error",Ta),aa.removeListener("unpipe",xa),fa.removeListener("end",ga),fa.removeListener("end",$a),fa.removeListener("data",Sa),Aa=!0,ca.awaitDrain&&(!aa._writableState||aa._writableState.needDrain)&&ma()}fa.on("data",Sa);function Sa(Ma){Yn("ondata");var Ka=aa.write(Ma);Yn("dest.write",Ka),Ka===!1&&((ca.pipesCount===1&&ca.pipes===aa||ca.pipesCount>1&&la(ca.pipes,aa)!==-1)&&!Aa&&(Yn("false write response, pause",ca.awaitDrain),ca.awaitDrain++),fa.pause())}function Ta(Ma){Yn("onerror",Ma),$a(),aa.removeListener("error",Ta),In(aa,"error")===0&&Ni(aa,Ma)}Vi(aa,"error",Ta);function wa(){aa.removeListener("finish",Na),$a()}aa.once("close",wa);function Na(){Yn("onfinish"),aa.removeListener("close",wa),$a()}aa.once("finish",Na);function $a(){Yn("unpipe"),fa.unpipe(aa)}return aa.emit("pipe",fa),ca.flowing||(Yn("pipe resume"),fa.resume()),aa};function Fi(aa){return function(){var fa=aa._readableState;Yn("pipeOnDrain",fa.awaitDrain),fa.awaitDrain&&fa.awaitDrain--,fa.awaitDrain===0&&In(aa,"data")&&(fa.flowing=!0,na(aa))}}Gi.prototype.unpipe=function(aa){var ta=this._readableState,fa={hasUnpiped:!1};if(ta.pipesCount===0)return this;if(ta.pipesCount===1)return aa&&aa!==ta.pipes?this:(aa||(aa=ta.pipes),ta.pipes=null,ta.pipesCount=0,ta.flowing=!1,aa&&aa.emit("unpipe",this,fa),this);if(!aa){var ca=ta.pipes,pa=ta.pipesCount;ta.pipes=null,ta.pipesCount=0,ta.flowing=!1;for(var Ea=0;Ea<pa;Ea++)ca[Ea].emit("unpipe",this,{hasUnpiped:!1});return this}var xa=la(ta.pipes,aa);return xa===-1?this:(ta.pipes.splice(xa,1),ta.pipesCount-=1,ta.pipesCount===1&&(ta.pipes=ta.pipes[0]),aa.emit("unpipe",this,fa),this)},Gi.prototype.on=function(aa,ta){var fa=Rn.prototype.on.call(this,aa,ta),ca=this._readableState;return aa==="data"?(ca.readableListening=this.listenerCount("readable")>0,ca.flowing!==!1&&this.resume()):aa==="readable"&&!ca.endEmitted&&!ca.readableListening&&(ca.readableListening=ca.needReadable=!0,ca.flowing=!1,ca.emittedReadable=!1,Yn("on readable",ca.length,ca.reading),ca.length?Bi(this):ca.reading||process$1.nextTick(Wi,this)),fa},Gi.prototype.addListener=Gi.prototype.on,Gi.prototype.removeListener=function(aa,ta){var fa=Rn.prototype.removeListener.call(this,aa,ta);return aa==="readable"&&process$1.nextTick($i,this),fa},Gi.prototype.removeAllListeners=function(aa){var ta=Rn.prototype.removeAllListeners.apply(this,arguments);return(aa==="readable"||aa===void 0)&&process$1.nextTick($i,this),ta};function $i(aa){var ta=aa._readableState;ta.readableListening=aa.listenerCount("readable")>0,ta.resumeScheduled&&!ta.paused?ta.flowing=!0:aa.listenerCount("data")>0&&aa.resume()}function Wi(aa){Yn("readable nexttick read 0"),aa.read(0)}Gi.prototype.resume=function(){var aa=this._readableState;return aa.flowing||(Yn("resume"),aa.flowing=!aa.readableListening,Qi(this,aa)),aa.paused=!1,this};function Qi(aa,ta){ta.resumeScheduled||(ta.resumeScheduled=!0,process$1.nextTick(ea,aa,ta))}function ea(aa,ta){Yn("resume",ta.reading),ta.reading||aa.read(0),ta.resumeScheduled=!1,aa.emit("resume"),na(aa),ta.flowing&&!ta.reading&&aa.read(0)}Gi.prototype.pause=function(){return Yn("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Yn("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function na(aa){var ta=aa._readableState;for(Yn("flow",ta.flowing);ta.flowing&&aa.read()!==null;);}Gi.prototype.wrap=function(aa){var ta=this,fa=this._readableState,ca=!1;aa.on("end",function(){if(Yn("wrapped end"),fa.decoder&&!fa.ended){var xa=fa.decoder.end();xa&&xa.length&&ta.push(xa)}ta.push(null)}),aa.on("data",function(xa){if(Yn("wrapped data"),fa.decoder&&(xa=fa.decoder.write(xa)),!(fa.objectMode&&xa==null)&&!(!fa.objectMode&&(!xa||!xa.length))){var ga=ta.push(xa);ga||(ca=!0,aa.pause())}});for(var pa in aa)this[pa]===void 0&&typeof aa[pa]=="function"&&(this[pa]=function(ga){return function(){return aa[ga].apply(aa,arguments)}}(pa));for(var Ea=0;Ea<Pi.length;Ea++)aa.on(Pi[Ea],this.emit.bind(this,Pi[Ea]));return this._read=function(xa){Yn("wrapped _read",xa),ca&&(ca=!1,aa.resume())},this},typeof Symbol=="function"&&(Gi.prototype[Symbol.asyncIterator]=function(){return Ai===void 0&&(Ai=requireAsync_iterator()),Ai(this)}),Object.defineProperty(Gi.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Gi.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Gi.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ta){this._readableState&&(this._readableState.flowing=ta)}}),Gi._fromList=Ji,Object.defineProperty(Gi.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ji(aa,ta){if(ta.length===0)return null;var fa;return ta.objectMode?fa=ta.buffer.shift():!aa||aa>=ta.length?(ta.decoder?fa=ta.buffer.join(""):ta.buffer.length===1?fa=ta.buffer.first():fa=ta.buffer.concat(ta.length),ta.buffer.clear()):fa=ta.buffer.consume(aa,ta.decoder),fa}function ra(aa){var ta=aa._readableState;Yn("endReadable",ta.endEmitted),ta.endEmitted||(ta.ended=!0,process$1.nextTick(sa,ta,aa))}function sa(aa,ta){if(Yn("endReadableNT",aa.endEmitted,aa.length),!aa.endEmitted&&aa.length===0&&(aa.endEmitted=!0,ta.readable=!1,ta.emit("end"),aa.autoDestroy)){var fa=ta._writableState;(!fa||fa.autoDestroy&&fa.finished)&&ta.destroy()}}typeof Symbol=="function"&&(Gi.from=function(aa,ta){return Ii===void 0&&(Ii=requireFromBrowser()),Ii(Gi,aa,ta)});function la(aa,ta){for(var fa=0,ca=aa.length;fa<ca;fa++)if(aa[fa]===ta)return fa;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=Wn;var on=requireErrorsBrowser().codes,In=on.ERR_METHOD_NOT_IMPLEMENTED,Rn=on.ERR_MULTIPLE_CALLBACK,Mn=on.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ln=on.ERR_TRANSFORM_WITH_LENGTH_0,Hn=require_stream_duplex$1();requireInherits_browser()(Wn,Hn);function jn(vi,gi){var mi=this._transformState;mi.transforming=!1;var yi=mi.writecb;if(yi===null)return this.emit("error",new Rn);mi.writechunk=null,mi.writecb=null,gi!=null&&this.push(gi),yi(vi);var bi=this._readableState;bi.reading=!1,(bi.needReadable||bi.length<bi.highWaterMark)&&this._read(bi.highWaterMark)}function Wn(vi){if(!(this instanceof Wn))return new Wn(vi);Hn.call(this,vi),this._transformState={afterTransform:jn.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,vi&&(typeof vi.transform=="function"&&(this._transform=vi.transform),typeof vi.flush=="function"&&(this._flush=vi.flush)),this.on("prefinish",Yn)}function Yn(){var vi=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(gi,mi){hi(vi,gi,mi)}):hi(this,null,null)}Wn.prototype.push=function(vi,gi){return this._transformState.needTransform=!1,Hn.prototype.push.call(this,vi,gi)},Wn.prototype._transform=function(vi,gi,mi){mi(new In("_transform()"))},Wn.prototype._write=function(vi,gi,mi){var yi=this._transformState;if(yi.writecb=mi,yi.writechunk=vi,yi.writeencoding=gi,!yi.transforming){var bi=this._readableState;(yi.needTransform||bi.needReadable||bi.length<bi.highWaterMark)&&this._read(bi.highWaterMark)}},Wn.prototype._read=function(vi){var gi=this._transformState;gi.writechunk!==null&&!gi.transforming?(gi.transforming=!0,this._transform(gi.writechunk,gi.writeencoding,gi.afterTransform)):gi.needTransform=!0},Wn.prototype._destroy=function(vi,gi){Hn.prototype._destroy.call(this,vi,function(mi){gi(mi)})};function hi(vi,gi,mi){if(gi)return vi.emit("error",gi);if(mi!=null&&vi.push(mi),vi._writableState.length)throw new Ln;if(vi._transformState.transforming)throw new Mn;return vi.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=In;var on=require_stream_transform$1();requireInherits_browser()(In,on);function In(Rn){if(!(this instanceof In))return new In(Rn);on.call(this,Rn)}return In.prototype._transform=function(Rn,Mn,Ln){Ln(null,Rn)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var on;function In(mi){var yi=!1;return function(){yi||(yi=!0,mi.apply(void 0,arguments))}}var Rn=requireErrorsBrowser().codes,Mn=Rn.ERR_MISSING_ARGS,Ln=Rn.ERR_STREAM_DESTROYED;function Hn(mi){if(mi)throw mi}function jn(mi){return mi.setHeader&&typeof mi.abort=="function"}function Wn(mi,yi,bi,Ei){Ei=In(Ei);var _i=!1;mi.on("close",function(){_i=!0}),on===void 0&&(on=requireEndOfStream()),on(mi,{readable:yi,writable:bi},function(Ci){if(Ci)return Ei(Ci);_i=!0,Ei()});var xi=!1;return function(Ci){if(!_i&&!xi){if(xi=!0,jn(mi))return mi.abort();if(typeof mi.destroy=="function")return mi.destroy();Ei(Ci||new Ln("pipe"))}}}function Yn(mi){mi()}function hi(mi,yi){return mi.pipe(yi)}function vi(mi){return!mi.length||typeof mi[mi.length-1]!="function"?Hn:mi.pop()}function gi(){for(var mi=arguments.length,yi=new Array(mi),bi=0;bi<mi;bi++)yi[bi]=arguments[bi];var Ei=vi(yi);if(Array.isArray(yi[0])&&(yi=yi[0]),yi.length<2)throw new Mn("streams");var _i,xi=yi.map(function(Ci,Ai){var Ii=Ai<yi.length-1,Ni=Ai>0;return Wn(Ci,Ii,Ni,function(Pi){_i||(_i=Pi),Pi&&xi.forEach(Yn),!Ii&&(xi.forEach(Yn),Ei(_i))})});return yi.reduce(hi)}return pipeline_1=gi,pipeline_1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,function(on,In){In=on.exports=require_stream_readable$1(),In.Stream=In,In.Readable=In,In.Writable=require_stream_writable$1(),In.Duplex=require_stream_duplex$1(),In.Transform=require_stream_transform$1(),In.PassThrough=require_stream_passthrough$1(),In.finished=requireEndOfStream(),In.pipeline=requirePipeline()}(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase$2,hasRequiredHashBase$2;function requireHashBase$2(){if(hasRequiredHashBase$2)return hashBase$2;hasRequiredHashBase$2=1;var on=requireSafeBuffer$1().Buffer,In=requireReadableBrowser$1().Transform,Rn=requireInherits_browser();function Mn(Hn,jn){if(!on.isBuffer(Hn)&&typeof Hn!="string")throw new TypeError(jn+" must be a string or a buffer")}function Ln(Hn){In.call(this),this._block=on.allocUnsafe(Hn),this._blockSize=Hn,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return Rn(Ln,In),Ln.prototype._transform=function(Hn,jn,Wn){var Yn=null;try{this.update(Hn,jn)}catch(hi){Yn=hi}Wn(Yn)},Ln.prototype._flush=function(Hn){var jn=null;try{this.push(this.digest())}catch(Wn){jn=Wn}Hn(jn)},Ln.prototype.update=function(Hn,jn){if(Mn(Hn,"Data"),this._finalized)throw new Error("Digest already called");on.isBuffer(Hn)||(Hn=on.from(Hn,jn));for(var Wn=this._block,Yn=0;this._blockOffset+Hn.length-Yn>=this._blockSize;){for(var hi=this._blockOffset;hi<this._blockSize;)Wn[hi++]=Hn[Yn++];this._update(),this._blockOffset=0}for(;Yn<Hn.length;)Wn[this._blockOffset++]=Hn[Yn++];for(var vi=0,gi=Hn.length*8;gi>0;++vi)this._length[vi]+=gi,gi=this._length[vi]/4294967296|0,gi>0&&(this._length[vi]-=4294967296*gi);return this},Ln.prototype._update=function(){throw new Error("_update is not implemented")},Ln.prototype.digest=function(Hn){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var jn=this._digest();Hn!==void 0&&(jn=jn.toString(Hn)),this._block.fill(0),this._blockOffset=0;for(var Wn=0;Wn<4;++Wn)this._length[Wn]=0;return jn},Ln.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$2=Ln,hashBase$2}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var on=requireInherits_browser(),In=requireHashBase$2(),Rn=requireSafeBuffer$1().Buffer,Mn=new Array(16);function Ln(){In.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}on(Ln,In),Ln.prototype._update=function(){for(var vi=Mn,gi=0;gi<16;++gi)vi[gi]=this._block.readInt32LE(gi*4);var mi=this._a,yi=this._b,bi=this._c,Ei=this._d;mi=jn(mi,yi,bi,Ei,vi[0],3614090360,7),Ei=jn(Ei,mi,yi,bi,vi[1],3905402710,12),bi=jn(bi,Ei,mi,yi,vi[2],606105819,17),yi=jn(yi,bi,Ei,mi,vi[3],3250441966,22),mi=jn(mi,yi,bi,Ei,vi[4],4118548399,7),Ei=jn(Ei,mi,yi,bi,vi[5],1200080426,12),bi=jn(bi,Ei,mi,yi,vi[6],2821735955,17),yi=jn(yi,bi,Ei,mi,vi[7],4249261313,22),mi=jn(mi,yi,bi,Ei,vi[8],1770035416,7),Ei=jn(Ei,mi,yi,bi,vi[9],2336552879,12),bi=jn(bi,Ei,mi,yi,vi[10],4294925233,17),yi=jn(yi,bi,Ei,mi,vi[11],2304563134,22),mi=jn(mi,yi,bi,Ei,vi[12],1804603682,7),Ei=jn(Ei,mi,yi,bi,vi[13],4254626195,12),bi=jn(bi,Ei,mi,yi,vi[14],2792965006,17),yi=jn(yi,bi,Ei,mi,vi[15],1236535329,22),mi=Wn(mi,yi,bi,Ei,vi[1],4129170786,5),Ei=Wn(Ei,mi,yi,bi,vi[6],3225465664,9),bi=Wn(bi,Ei,mi,yi,vi[11],643717713,14),yi=Wn(yi,bi,Ei,mi,vi[0],3921069994,20),mi=Wn(mi,yi,bi,Ei,vi[5],3593408605,5),Ei=Wn(Ei,mi,yi,bi,vi[10],38016083,9),bi=Wn(bi,Ei,mi,yi,vi[15],3634488961,14),yi=Wn(yi,bi,Ei,mi,vi[4],3889429448,20),mi=Wn(mi,yi,bi,Ei,vi[9],568446438,5),Ei=Wn(Ei,mi,yi,bi,vi[14],3275163606,9),bi=Wn(bi,Ei,mi,yi,vi[3],4107603335,14),yi=Wn(yi,bi,Ei,mi,vi[8],1163531501,20),mi=Wn(mi,yi,bi,Ei,vi[13],2850285829,5),Ei=Wn(Ei,mi,yi,bi,vi[2],4243563512,9),bi=Wn(bi,Ei,mi,yi,vi[7],1735328473,14),yi=Wn(yi,bi,Ei,mi,vi[12],2368359562,20),mi=Yn(mi,yi,bi,Ei,vi[5],4294588738,4),Ei=Yn(Ei,mi,yi,bi,vi[8],2272392833,11),bi=Yn(bi,Ei,mi,yi,vi[11],1839030562,16),yi=Yn(yi,bi,Ei,mi,vi[14],4259657740,23),mi=Yn(mi,yi,bi,Ei,vi[1],2763975236,4),Ei=Yn(Ei,mi,yi,bi,vi[4],1272893353,11),bi=Yn(bi,Ei,mi,yi,vi[7],4139469664,16),yi=Yn(yi,bi,Ei,mi,vi[10],3200236656,23),mi=Yn(mi,yi,bi,Ei,vi[13],681279174,4),Ei=Yn(Ei,mi,yi,bi,vi[0],3936430074,11),bi=Yn(bi,Ei,mi,yi,vi[3],3572445317,16),yi=Yn(yi,bi,Ei,mi,vi[6],76029189,23),mi=Yn(mi,yi,bi,Ei,vi[9],3654602809,4),Ei=Yn(Ei,mi,yi,bi,vi[12],3873151461,11),bi=Yn(bi,Ei,mi,yi,vi[15],530742520,16),yi=Yn(yi,bi,Ei,mi,vi[2],3299628645,23),mi=hi(mi,yi,bi,Ei,vi[0],4096336452,6),Ei=hi(Ei,mi,yi,bi,vi[7],1126891415,10),bi=hi(bi,Ei,mi,yi,vi[14],2878612391,15),yi=hi(yi,bi,Ei,mi,vi[5],4237533241,21),mi=hi(mi,yi,bi,Ei,vi[12],1700485571,6),Ei=hi(Ei,mi,yi,bi,vi[3],2399980690,10),bi=hi(bi,Ei,mi,yi,vi[10],4293915773,15),yi=hi(yi,bi,Ei,mi,vi[1],2240044497,21),mi=hi(mi,yi,bi,Ei,vi[8],1873313359,6),Ei=hi(Ei,mi,yi,bi,vi[15],4264355552,10),bi=hi(bi,Ei,mi,yi,vi[6],2734768916,15),yi=hi(yi,bi,Ei,mi,vi[13],1309151649,21),mi=hi(mi,yi,bi,Ei,vi[4],4149444226,6),Ei=hi(Ei,mi,yi,bi,vi[11],3174756917,10),bi=hi(bi,Ei,mi,yi,vi[2],718787259,15),yi=hi(yi,bi,Ei,mi,vi[9],3951481745,21),this._a=this._a+mi|0,this._b=this._b+yi|0,this._c=this._c+bi|0,this._d=this._d+Ei|0},Ln.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var vi=Rn.allocUnsafe(16);return vi.writeInt32LE(this._a,0),vi.writeInt32LE(this._b,4),vi.writeInt32LE(this._c,8),vi.writeInt32LE(this._d,12),vi};function Hn(vi,gi){return vi<<gi|vi>>>32-gi}function jn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi&mi|~gi&yi)+bi+Ei|0,_i)+gi|0}function Wn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi&yi|mi&~yi)+bi+Ei|0,_i)+gi|0}function Yn(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(gi^mi^yi)+bi+Ei|0,_i)+gi|0}function hi(vi,gi,mi,yi,bi,Ei,_i){return Hn(vi+(mi^(gi|~yi))+bi+Ei|0,_i)+gi|0}return md5_js=Ln,md5_js}var md5_jsExports=requireMd5_js();const MD5=getDefaultExportFromCjs(md5_jsExports);function createHash(...on){let In=new MD5;return on.forEach(Rn=>In=In.update(Rn)),In.digest("hex")}let nanoid=(on=21)=>crypto.getRandomValues(new Uint8Array(on)).reduce((In,Rn)=>(Rn&=63,Rn<36?In+=Rn.toString(36):Rn<62?In+=(Rn-26).toString(36).toUpperCase():Rn>62?In+="-":In+="_",In),"");const ID_PREFIX_SEPARATOR="|";function createId(on){return on&&on.length>0?`${on}${ID_PREFIX_SEPARATOR}${nanoid()}`:nanoid()}const API_ID_PREFIX="api";function createApiId(){return createId(API_ID_PREFIX)}function isApiId(on){return on.startsWith(API_ID_PREFIX+ID_PREFIX_SEPARATOR)}function createDocumentId(){return createId("doc")}function createEnvironmentId(){return createId("env")}function createFileId(){return createId("file")}function createFolderId(){return createId("dir")}function createVariableId(){return createId("var")}function formatFullDateTime(on,In={day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatShortDateTime(on,In={dateStyle:"short",timeStyle:"medium"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatLongDate(on,In={day:"numeric",month:"long",year:"numeric"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatLongTime(on,In={hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatShortTime(on,In={hour:"2-digit",minute:"2-digit"},Rn="en-US"){return formatDateTime(on,Rn,In)}function formatDateTime(on,In,Rn){return new Intl.DateTimeFormat(In,Rn).format(typeof on=="string"?Date.parse(on):on)}function formatRelativeTime(on,In={numeric:"auto"},Rn="en-US"){const Mn=now(),Ln=toTimestamp(on??Mn)-Mn,Hn=Math.trunc(Ln/1e3),jn=Math.trunc(Hn/60),Wn=Math.trunc(jn/60),Yn=Math.trunc(Wn/24),hi=Math.trunc(Yn/30),vi=Math.trunc(hi/12),gi=getRtf(Rn,In);return vi!==0?gi.format(vi,"year"):hi!==0?gi.format(hi,"month"):Yn!==0?gi.format(Yn,"day"):Wn!==0?gi.format(Wn,"hour"):jn!==0?gi.format(jn,"minute"):gi.format(Hn,"second")}function toTimestamp(on){switch(typeof on){case"string":return Date.parse(on);case"number":return on;default:return on.getTime()}}const rtfCache=new Map;function getRtf(on,In){const Rn=Array.isArray(on)?on.join(","):on??"",Mn=rtfCache.get(Rn);if(Mn)return Mn;const Ln=new Intl.RelativeTimeFormat(on,In);return rtfCache.set(Rn,Ln),Ln}function convertEpochToISOString(on,In="ms"){return new Date(In==="ms"?on:on*1e3).toISOString()}function now(){return Date.now()}function toUtcDate(on){return new Date(on).setUTCHours(0,0,0,0)}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(on,In){(function(Rn,Mn){on.exports=Mn()})(dayjs_min,function(){var Rn=1e3,Mn=6e4,Ln=36e5,Hn="millisecond",jn="second",Wn="minute",Yn="hour",hi="day",vi="week",gi="month",mi="quarter",yi="year",bi="date",Ei="Invalid Date",_i=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,xi=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Ci={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(wi){var Ri=["th","st","nd","rd"],ki=wi%100;return"["+wi+(Ri[(ki-20)%10]||Ri[ki]||Ri[0])+"]"}},Ai=function(wi,Ri,ki){var Bi=String(wi);return!Bi||Bi.length>=Ri?wi:""+Array(Ri+1-Bi.length).join(ki)+wi},Ii={s:Ai,z:function(wi){var Ri=-wi.utcOffset(),ki=Math.abs(Ri),Bi=Math.floor(ki/60),Hi=ki%60;return(Ri<=0?"+":"-")+Ai(Bi,2,"0")+":"+Ai(Hi,2,"0")},m:function wi(Ri,ki){if(Ri.date()<ki.date())return-wi(ki,Ri);var Bi=12*(ki.year()-Ri.year())+(ki.month()-Ri.month()),Hi=Ri.clone().add(Bi,gi),Ki=ki-Hi<0,ji=Ri.clone().add(Bi+(Ki?-1:1),gi);return+(-(Bi+(ki-Hi)/(Ki?Hi-ji:ji-Hi))||0)},a:function(wi){return wi<0?Math.ceil(wi)||0:Math.floor(wi)},p:function(wi){return{M:gi,y:yi,w:vi,d:hi,D:bi,h:Yn,m:Wn,s:jn,ms:Hn,Q:mi}[wi]||String(wi||"").toLowerCase().replace(/s$/,"")},u:function(wi){return wi===void 0}},Ni="en",Pi={};Pi[Ni]=Ci;var Vi="$isDayjsObject",Ui=function(wi){return wi instanceof Mi||!(!wi||!wi[Vi])},Gi=function wi(Ri,ki,Bi){var Hi;if(!Ri)return Ni;if(typeof Ri=="string"){var Ki=Ri.toLowerCase();Pi[Ki]&&(Hi=Ki),ki&&(Pi[Ki]=ki,Hi=Ki);var ji=Ri.split("-");if(!Hi&&ji.length>1)return wi(ji[0])}else{var Fi=Ri.name;Pi[Fi]=Ri,Hi=Fi}return!Bi&&Hi&&(Ni=Hi),Hi||!Bi&&Ni},Yi=function(wi,Ri){if(Ui(wi))return wi.clone();var ki=typeof Ri=="object"?Ri:{};return ki.date=wi,ki.args=arguments,new Mi(ki)},zi=Ii;zi.l=Gi,zi.i=Ui,zi.w=function(wi,Ri){return Yi(wi,{locale:Ri.$L,utc:Ri.$u,x:Ri.$x,$offset:Ri.$offset})};var Mi=function(){function wi(ki){this.$L=Gi(ki.locale,null,!0),this.parse(ki),this.$x=this.$x||ki.x||{},this[Vi]=!0}var Ri=wi.prototype;return Ri.parse=function(ki){this.$d=function(Bi){var Hi=Bi.date,Ki=Bi.utc;if(Hi===null)return new Date(NaN);if(zi.u(Hi))return new Date;if(Hi instanceof Date)return new Date(Hi);if(typeof Hi=="string"&&!/Z$/i.test(Hi)){var ji=Hi.match(_i);if(ji){var Fi=ji[2]-1||0,$i=(ji[7]||"0").substring(0,3);return Ki?new Date(Date.UTC(ji[1],Fi,ji[3]||1,ji[4]||0,ji[5]||0,ji[6]||0,$i)):new Date(ji[1],Fi,ji[3]||1,ji[4]||0,ji[5]||0,ji[6]||0,$i)}}return new Date(Hi)}(ki),this.init()},Ri.init=function(){var ki=this.$d;this.$y=ki.getFullYear(),this.$M=ki.getMonth(),this.$D=ki.getDate(),this.$W=ki.getDay(),this.$H=ki.getHours(),this.$m=ki.getMinutes(),this.$s=ki.getSeconds(),this.$ms=ki.getMilliseconds()},Ri.$utils=function(){return zi},Ri.isValid=function(){return this.$d.toString()!==Ei},Ri.isSame=function(ki,Bi){var Hi=Yi(ki);return this.startOf(Bi)<=Hi&&Hi<=this.endOf(Bi)},Ri.isAfter=function(ki,Bi){return Yi(ki)<this.startOf(Bi)},Ri.isBefore=function(ki,Bi){return this.endOf(Bi)<Yi(ki)},Ri.$g=function(ki,Bi,Hi){return zi.u(ki)?this[Bi]:this.set(Hi,ki)},Ri.unix=function(){return Math.floor(this.valueOf()/1e3)},Ri.valueOf=function(){return this.$d.getTime()},Ri.startOf=function(ki,Bi){var Hi=this,Ki=!!zi.u(Bi)||Bi,ji=zi.p(ki),Fi=function(sa,la){var aa=zi.w(Hi.$u?Date.UTC(Hi.$y,la,sa):new Date(Hi.$y,la,sa),Hi);return Ki?aa:aa.endOf(hi)},$i=function(sa,la){return zi.w(Hi.toDate()[sa].apply(Hi.toDate("s"),(Ki?[0,0,0,0]:[23,59,59,999]).slice(la)),Hi)},Wi=this.$W,Qi=this.$M,ea=this.$D,na="set"+(this.$u?"UTC":"");switch(ji){case yi:return Ki?Fi(1,0):Fi(31,11);case gi:return Ki?Fi(1,Qi):Fi(0,Qi+1);case vi:var Ji=this.$locale().weekStart||0,ra=(Wi<Ji?Wi+7:Wi)-Ji;return Fi(Ki?ea-ra:ea+(6-ra),Qi);case hi:case bi:return $i(na+"Hours",0);case Yn:return $i(na+"Minutes",1);case Wn:return $i(na+"Seconds",2);case jn:return $i(na+"Milliseconds",3);default:return this.clone()}},Ri.endOf=function(ki){return this.startOf(ki,!1)},Ri.$set=function(ki,Bi){var Hi,Ki=zi.p(ki),ji="set"+(this.$u?"UTC":""),Fi=(Hi={},Hi[hi]=ji+"Date",Hi[bi]=ji+"Date",Hi[gi]=ji+"Month",Hi[yi]=ji+"FullYear",Hi[Yn]=ji+"Hours",Hi[Wn]=ji+"Minutes",Hi[jn]=ji+"Seconds",Hi[Hn]=ji+"Milliseconds",Hi)[Ki],$i=Ki===hi?this.$D+(Bi-this.$W):Bi;if(Ki===gi||Ki===yi){var Wi=this.clone().set(bi,1);Wi.$d[Fi]($i),Wi.init(),this.$d=Wi.set(bi,Math.min(this.$D,Wi.daysInMonth())).$d}else Fi&&this.$d[Fi]($i);return this.init(),this},Ri.set=function(ki,Bi){return this.clone().$set(ki,Bi)},Ri.get=function(ki){return this[zi.p(ki)]()},Ri.add=function(ki,Bi){var Hi,Ki=this;ki=Number(ki);var ji=zi.p(Bi),Fi=function(Qi){var ea=Yi(Ki);return zi.w(ea.date(ea.date()+Math.round(Qi*ki)),Ki)};if(ji===gi)return this.set(gi,this.$M+ki);if(ji===yi)return this.set(yi,this.$y+ki);if(ji===hi)return Fi(1);if(ji===vi)return Fi(7);var $i=(Hi={},Hi[Wn]=Mn,Hi[Yn]=Ln,Hi[jn]=Rn,Hi)[ji]||1,Wi=this.$d.getTime()+ki*$i;return zi.w(Wi,this)},Ri.subtract=function(ki,Bi){return this.add(-1*ki,Bi)},Ri.format=function(ki){var Bi=this,Hi=this.$locale();if(!this.isValid())return Hi.invalidDate||Ei;var Ki=ki||"YYYY-MM-DDTHH:mm:ssZ",ji=zi.z(this),Fi=this.$H,$i=this.$m,Wi=this.$M,Qi=Hi.weekdays,ea=Hi.months,na=Hi.meridiem,Ji=function(la,aa,ta,fa){return la&&(la[aa]||la(Bi,Ki))||ta[aa].slice(0,fa)},ra=function(la){return zi.s(Fi%12||12,la,"0")},sa=na||function(la,aa,ta){var fa=la<12?"AM":"PM";return ta?fa.toLowerCase():fa};return Ki.replace(xi,function(la,aa){return aa||function(ta){switch(ta){case"YY":return String(Bi.$y).slice(-2);case"YYYY":return zi.s(Bi.$y,4,"0");case"M":return Wi+1;case"MM":return zi.s(Wi+1,2,"0");case"MMM":return Ji(Hi.monthsShort,Wi,ea,3);case"MMMM":return Ji(ea,Wi);case"D":return Bi.$D;case"DD":return zi.s(Bi.$D,2,"0");case"d":return String(Bi.$W);case"dd":return Ji(Hi.weekdaysMin,Bi.$W,Qi,2);case"ddd":return Ji(Hi.weekdaysShort,Bi.$W,Qi,3);case"dddd":return Qi[Bi.$W];case"H":return String(Fi);case"HH":return zi.s(Fi,2,"0");case"h":return ra(1);case"hh":return ra(2);case"a":return sa(Fi,$i,!0);case"A":return sa(Fi,$i,!1);case"m":return String($i);case"mm":return zi.s($i,2,"0");case"s":return String(Bi.$s);case"ss":return zi.s(Bi.$s,2,"0");case"SSS":return zi.s(Bi.$ms,3,"0");case"Z":return ji}return null}(la)||ji.replace(":","")})},Ri.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Ri.diff=function(ki,Bi,Hi){var Ki,ji=this,Fi=zi.p(Bi),$i=Yi(ki),Wi=($i.utcOffset()-this.utcOffset())*Mn,Qi=this-$i,ea=function(){return zi.m(ji,$i)};switch(Fi){case yi:Ki=ea()/12;break;case gi:Ki=ea();break;case mi:Ki=ea()/3;break;case vi:Ki=(Qi-Wi)/6048e5;break;case hi:Ki=(Qi-Wi)/864e5;break;case Yn:Ki=Qi/Ln;break;case Wn:Ki=Qi/Mn;break;case jn:Ki=Qi/Rn;break;default:Ki=Qi}return Hi?Ki:zi.a(Ki)},Ri.daysInMonth=function(){return this.endOf(gi).$D},Ri.$locale=function(){return Pi[this.$L]},Ri.locale=function(ki,Bi){if(!ki)return this.$L;var Hi=this.clone(),Ki=Gi(ki,Bi,!0);return Ki&&(Hi.$L=Ki),Hi},Ri.clone=function(){return zi.w(this.$d,this)},Ri.toDate=function(){return new Date(this.valueOf())},Ri.toJSON=function(){return this.isValid()?this.toISOString():null},Ri.toISOString=function(){return this.$d.toISOString()},Ri.toString=function(){return this.$d.toUTCString()},wi}(),Li=Mi.prototype;return Yi.prototype=Li,[["$ms",Hn],["$s",jn],["$m",Wn],["$H",Yn],["$W",hi],["$M",gi],["$y",yi],["$D",bi]].forEach(function(wi){Li[wi[1]]=function(Ri){return this.$g(Ri,wi[0],wi[1])}}),Yi.extend=function(wi,Ri){return wi.$i||(wi(Ri,Mi,Yi),wi.$i=!0),Yi},Yi.locale=Gi,Yi.isDayjs=Ui,Yi.unix=function(wi){return Yi(1e3*wi)},Yi.en=Pi[Ni],Yi.Ls=Pi,Yi.p={},Yi})}(dayjs_min$1)),dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs(dayjs_minExports);var RelativeDateTimeRange=(on=>(on[on.today=0]="today",on[on.last15Minutes=900]="last15Minutes",on[on.last30Minutes=1800]="last30Minutes",on[on.lastHour=3600]="lastHour",on[on.last2Hours=7200]="last2Hours",on[on.last6Hours=21600]="last6Hours",on[on.last12Hours=43200]="last12Hours",on[on.last24Hours=86400]="last24Hours",on[on.last2Days=172800]="last2Days",on[on.last7Days=604800]="last7Days",on[on.last60Days=5184e3]="last60Days",on))(RelativeDateTimeRange||{}),DateTimeRangePrecision=(on=>(on[on.milliseconds=0]="milliseconds",on[on.seconds=1]="seconds",on[on.minutes=2]="minutes",on))(DateTimeRangePrecision||{});class DateTimeRangeFactory{constructor(In){this.range=In}static from(In){return Array.isArray(In)?new DateTimeRangeFactory([dayjs(In[0]),dayjs(In[1])]):new DateTimeRangeFactory(In)}static equals(In,Rn){const Mn=In.toEpoch(),Ln=Rn.toEpoch();return Mn[0]===Ln[0]&&Mn[1]===Ln[1]}get value(){return this.range}toDayjs(){if(Array.isArray(this.range))return this.range;const In=dayjs().millisecond(0).subtract(1,"minute");switch(this.range){case 0:return[In.hour(0).minute(0).second(0),In];default:case 1800:return[In.subtract(30,"minute"),In];case 3600:return[In.subtract(1,"hour"),In];case 7200:return[In.subtract(2,"hour"),In];case 21600:return[In.subtract(6,"hour"),In];case 43200:return[In.subtract(12,"hour"),In];case 86400:return[In.subtract(24,"hour"),In];case 172800:return[In.subtract(2,"day"),In];case 604800:return[In.subtract(7,"day"),In];case 5184e3:return[In.subtract(60,"day"),In]}}toEpoch(){const In=this.toDayjs();return[In[0].valueOf(),In[1].valueOf()]}toJSON(){const In=this.toDayjs();return[In[0].toJSON(),In[1].toJSON()]}equals(In,Rn=0){return isRelativeDateTimeRange(this.range)===isRelativeDateTimeRange(In.value)&&DateTimeRangeFactory.equals(...this.changePrecision(this,In,Rn))}changePrecision(In,Rn,Mn){switch(Mn){case 1:{const Ln=In.toDayjs(),Hn=Rn.toDayjs();return[DateTimeRangeFactory.from([Ln[0].millisecond(0),Ln[1].millisecond(0)]),DateTimeRangeFactory.from([Hn[0].millisecond(0),Hn[1].millisecond(0)])]}case 2:{const Ln=In.toDayjs(),Hn=Rn.toDayjs();return[DateTimeRangeFactory.from([Ln[0].second(0).millisecond(0),Ln[1].second(0).millisecond(0)]),DateTimeRangeFactory.from([Hn[0].second(0).millisecond(0),Hn[1].second(0).millisecond(0)])]}default:return[In,Rn]}}serialize(){return Array.isArray(this.range)?this.toEpoch():this.range}}function isRelativeDateTimeRange(on){return typeof on=="number"}const isAsyncIterable$1=on=>isFunction$2(Object(on)[Symbol.asyncIterator]);function isDictionary(on){return on!==null&&typeof on=="object"&&!Array.isArray(on)}function isFunction$2(on){return typeof on=="function"}function escape$2(on){return on.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}const slash=" \\",newLine=`
4251
4251
  `,pad$1=" ";function generateCurl({url:on,method:In,headers:Rn,body:Mn},Ln){let Hn="curl ";return Hn+=`'${on}'`,Hn+=getCurlMethod(In),Hn+=getCurlHeaders(Rn),Hn+=getCurlBody(Mn),Hn+=getCurlOptions(Ln),Hn}function getCurlMethod(on){let In="";return on&&(In=`${slash}${newLine}${pad$1}${{GET:"-X GET",POST:"-X POST",PUT:"-X PUT",PATCH:"-X PATCH",DELETE:"-X DELETE"}[on.toUpperCase()]}`),In}function getCurlHeaders(on){let In="";return on&&Object.entries(on).forEach(([Rn,Mn])=>{In+=`${slash}${newLine}${pad$1}-H '${Rn}: ${Mn.replace(/(\\|")/g,"\\$1")}'`}),In}function getCurlBody(on){let In="";return on&&(In+=`${slash}${newLine}${pad$1}--data-raw '${JSON.stringify(on)}'`),In}function getCurlOptions(on={compressed:!0}){let In="";return Object.entries(on).forEach(([Rn,Mn])=>{const Ln=Rn.replace(/[A-Z]/g,Hn=>`-${Hn.toLowerCase()}`);typeof Mn=="boolean"?Mn&&(In+=`${In&&" "}--${Ln}`):typeof Mn=="string"&&(In+=`${In&&" "}--${Ln} ${Mn}}`)}),In&&`${slash}${newLine}${pad$1}${In}`}function getDefaultEndpoint(on,In){return(on?resolveBrowserPath(In):In??"").replace(/\/$/,"")}function resolveBrowserPath(on){const{origin:In,pathname:Rn}=window.location,Mn=In+Rn+(Rn.endsWith("/")?"":"/");return on?.length?new URL(on,Mn).href:Mn}function isDisposable(on){return Symbol.dispose in on&&typeof on[Symbol.dispose]=="function"}const HTTP_HEADER_KEY_VALID_PATTERN=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;function isHttpHeaderKeyValid(on){return HTTP_HEADER_KEY_VALID_PATTERN.test(on)}const HTTP_HEADER_KEY_WITH_VARIABLES_VALID_PATTERN=/^([\^_`a-zA-Z\-0-9!#$%&'*+.|~]+|(\{\{\w+\}\})+)+$/;function isHttpHeaderKeyWithVariablesValid(on){return HTTP_HEADER_KEY_WITH_VARIABLES_VALID_PATTERN.test(on)}const HTTP_HEADER_VALUE_INVALID_PATTERN=/[^\t\x20-\x7e\x80-\xff]/;function isHttpHeaderValueValid(on){return!HTTP_HEADER_VALUE_INVALID_PATTERN.test(on)}class LRUMap extends Map{#e=10;#t;constructor(In){super(),In?.maxSize&&In.maxSize>0&&(this.#e=In.maxSize),this.#t=In?.cleanupItem}get(In){if(!super.has(In))return;const Rn=super.get(In);return Rn!==void 0&&(super.delete(In),super.set(In,Rn)),Rn}set(In,Rn){if(this.size>=this.#e){const Mn=this.entries().next().value;this.delete(Mn[0]),this.#t?.(Mn[1])}return super.set(In,Rn)}}/*!
4252
4252
  * is-primitive <https://github.com/jonschlinkert/is-primitive>
4253
4253
  *
@@ -4726,7 +4726,7 @@ ${In.join(`
4726
4726
  }
4727
4727
  }
4728
4728
  }
4729
- `,_gql_doc={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__Type",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:137,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source}}};print(_gql_doc$3);print(_gql_doc$2);print(_gql_doc$1);print(_gql_doc);const SERVER_NOT_REACHABLE="Server Not Reachable";function isServerNotReachableError(on){return isDictionary(on)&&"message"in on&&on.message===SERVER_NOT_REACHABLE}class SchedulerClientBase extends MessageObserver{constructor(In){super(),this.createWorker=In}#e;#t;#r=!0;#n;#i=0;getContext(){if(!this.#e){const In=this.createWorker(),Rn={sendMessage:Mn=>In.postMessage(Mn)};In.onmessage=({data:Mn})=>{this.handleMessage(Rn,Mn)},this.#t=In,this.#e=Rn,this.#n=this.registerReceiveMessageHandler("scheduler-status-updated",({payload:{idling:Mn,lastUpdated:Ln}})=>{this.#r=Mn,this.#i=Ln}),this.checkIfIdle(),this.initializeWorker()}return this.#e}checkIfIdle(){const In=()=>{if(this.#t&&this.#r&&document.hidden&&now()-this.#i>TWO_MINUTES){this.stopWorker();return}this.checkIfIdle()};window.setTimeout(In,THIRTY_SECONDS)}initializeWorker(){this.sendMessage(new Message(INITIALIZE_WORKER_MESSAGE_TYPE,{appNamespace:window.appNamespace}))}stopWorker(){this.#t?.terminate(),this.#n?.(),this.#n=void 0,this.#t=void 0,this.#e=void 0}cancelTask(In){this.sendMessage(new Message(CANCEL_TASK_MESSAGE_TYPE,{taskId:In}))}}const DOCUMENT_ANALYSIS_MESSAGE_TYPE="analyze-document",DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE="analyze-document-operations",FILES_UPDATED_MESSAGE_TYPE="files-updated",VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE="variable-json-schema-updated";var backo2,hasRequiredBacko2;function requireBacko2(){if(hasRequiredBacko2)return backo2;hasRequiredBacko2=1,backo2=on;function on(In){In=In||{},this.ms=In.min||100,this.max=In.max||1e4,this.factor=In.factor||2,this.jitter=In.jitter>0&&In.jitter<=1?In.jitter:0,this.attempts=0}return on.prototype.duration=function(){var In=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var Rn=Math.random(),Mn=Math.floor(Rn*this.jitter*In);In=(Math.floor(Rn*10)&1)==0?In-Mn:In+Mn}return Math.min(In,this.max)|0},on.prototype.reset=function(){this.attempts=0},on.prototype.setMin=function(In){this.ms=In},on.prototype.setMax=function(In){this.max=In},on.prototype.setJitter=function(In){this.jitter=In},backo2}requireBacko2();var eventemitter3={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,function(on){var In=Object.prototype.hasOwnProperty,Rn="~";function Mn(){}Object.create&&(Mn.prototype=Object.create(null),new Mn().__proto__||(Rn=!1));function Ln(Yn,hi,vi){this.fn=Yn,this.context=hi,this.once=vi||!1}function Hn(Yn,hi,vi,gi,mi){if(typeof vi!="function")throw new TypeError("The listener must be a function");var yi=new Ln(vi,gi||Yn,mi),bi=Rn?Rn+hi:hi;return Yn._events[bi]?Yn._events[bi].fn?Yn._events[bi]=[Yn._events[bi],yi]:Yn._events[bi].push(yi):(Yn._events[bi]=yi,Yn._eventsCount++),Yn}function jn(Yn,hi){--Yn._eventsCount===0?Yn._events=new Mn:delete Yn._events[hi]}function Wn(){this._events=new Mn,this._eventsCount=0}Wn.prototype.eventNames=function(){var hi=[],vi,gi;if(this._eventsCount===0)return hi;for(gi in vi=this._events)In.call(vi,gi)&&hi.push(Rn?gi.slice(1):gi);return Object.getOwnPropertySymbols?hi.concat(Object.getOwnPropertySymbols(vi)):hi},Wn.prototype.listeners=function(hi){var vi=Rn?Rn+hi:hi,gi=this._events[vi];if(!gi)return[];if(gi.fn)return[gi.fn];for(var mi=0,yi=gi.length,bi=new Array(yi);mi<yi;mi++)bi[mi]=gi[mi].fn;return bi},Wn.prototype.listenerCount=function(hi){var vi=Rn?Rn+hi:hi,gi=this._events[vi];return gi?gi.fn?1:gi.length:0},Wn.prototype.emit=function(hi,vi,gi,mi,yi,bi){var Ei=Rn?Rn+hi:hi;if(!this._events[Ei])return!1;var _i=this._events[Ei],xi=arguments.length,Ci,Ai;if(_i.fn){switch(_i.once&&this.removeListener(hi,_i.fn,void 0,!0),xi){case 1:return _i.fn.call(_i.context),!0;case 2:return _i.fn.call(_i.context,vi),!0;case 3:return _i.fn.call(_i.context,vi,gi),!0;case 4:return _i.fn.call(_i.context,vi,gi,mi),!0;case 5:return _i.fn.call(_i.context,vi,gi,mi,yi),!0;case 6:return _i.fn.call(_i.context,vi,gi,mi,yi,bi),!0}for(Ai=1,Ci=new Array(xi-1);Ai<xi;Ai++)Ci[Ai-1]=arguments[Ai];_i.fn.apply(_i.context,Ci)}else{var Ii=_i.length,Ni;for(Ai=0;Ai<Ii;Ai++)switch(_i[Ai].once&&this.removeListener(hi,_i[Ai].fn,void 0,!0),xi){case 1:_i[Ai].fn.call(_i[Ai].context);break;case 2:_i[Ai].fn.call(_i[Ai].context,vi);break;case 3:_i[Ai].fn.call(_i[Ai].context,vi,gi);break;case 4:_i[Ai].fn.call(_i[Ai].context,vi,gi,mi);break;default:if(!Ci)for(Ni=1,Ci=new Array(xi-1);Ni<xi;Ni++)Ci[Ni-1]=arguments[Ni];_i[Ai].fn.apply(_i[Ai].context,Ci)}}return!0},Wn.prototype.on=function(hi,vi,gi){return Hn(this,hi,vi,gi,!1)},Wn.prototype.once=function(hi,vi,gi){return Hn(this,hi,vi,gi,!0)},Wn.prototype.removeListener=function(hi,vi,gi,mi){var yi=Rn?Rn+hi:hi;if(!this._events[yi])return this;if(!vi)return jn(this,yi),this;var bi=this._events[yi];if(bi.fn)bi.fn===vi&&(!mi||bi.once)&&(!gi||bi.context===gi)&&jn(this,yi);else{for(var Ei=0,_i=[],xi=bi.length;Ei<xi;Ei++)(bi[Ei].fn!==vi||mi&&!bi[Ei].once||gi&&bi[Ei].context!==gi)&&_i.push(bi[Ei]);_i.length?this._events[yi]=_i.length===1?_i[0]:_i:jn(this,yi)}return this},Wn.prototype.removeAllListeners=function(hi){var vi;return hi?(vi=Rn?Rn+hi:hi,this._events[vi]&&jn(this,vi)):(this._events=new Mn,this._eventsCount=0),this},Wn.prototype.off=Wn.prototype.removeListener,Wn.prototype.addListener=Wn.prototype.on,Wn.prefixed=Rn,Wn.EventEmitter=Wn,on.exports=Wn}(eventemitter3)),eventemitter3.exports}requireEventemitter3();var defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}),defaults.WS_TIMEOUT=defaults.MIN_WS_TIMEOUT=void 0;var on=1e3;defaults.MIN_WS_TIMEOUT=on;var In=3e4;return defaults.WS_TIMEOUT=In,defaults}requireDefaults();var messageTypes={},hasRequiredMessageTypes;function requireMessageTypes(){if(hasRequiredMessageTypes)return messageTypes;hasRequiredMessageTypes=1,Object.defineProperty(messageTypes,"__esModule",{value:!0});var on=function(){function In(){throw new Error("Static Class")}return In.GQL_CONNECTION_INIT="connection_init",In.GQL_CONNECTION_ACK="connection_ack",In.GQL_CONNECTION_ERROR="connection_error",In.GQL_CONNECTION_KEEP_ALIVE="ka",In.GQL_CONNECTION_TERMINATE="connection_terminate",In.GQL_START="start",In.GQL_DATA="data",In.GQL_ERROR="error",In.GQL_COMPLETE="complete",In.GQL_STOP="stop",In.SUBSCRIPTION_START="subscription_start",In.SUBSCRIPTION_DATA="subscription_data",In.SUBSCRIPTION_SUCCESS="subscription_success",In.SUBSCRIPTION_FAIL="subscription_fail",In.SUBSCRIPTION_END="subscription_end",In.INIT="init",In.INIT_SUCCESS="init_success",In.INIT_FAIL="init_fail",In.KEEP_ALIVE="keepalive",In}();return messageTypes.default=on,messageTypes}requireMessageTypes();var protocol={},hasRequiredProtocol;function requireProtocol(){if(hasRequiredProtocol)return protocol;hasRequiredProtocol=1,Object.defineProperty(protocol,"__esModule",{value:!0}),protocol.GRAPHQL_SUBSCRIPTIONS=protocol.GRAPHQL_WS=void 0;var on="graphql-ws";protocol.GRAPHQL_WS=on;var In="graphql-subscriptions";return protocol.GRAPHQL_SUBSCRIPTIONS=In,protocol}requireProtocol();var isObject$1={},hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$1;hasRequiredIsObject=1,Object.defineProperty(isObject$1,"__esModule",{value:!0});function on(In){return In!==null&&typeof In=="object"}return isObject$1.default=on,isObject$1}requireIsObject();var isString$1={},hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString$1;hasRequiredIsString=1,Object.defineProperty(isString$1,"__esModule",{value:!0});function on(In){return typeof In=="string"}return isString$1.default=on,isString$1}requireIsString();function symbolObservablePonyfill(on){var In,Rn=on.Symbol;return typeof Rn=="function"?Rn.observable?In=Rn.observable:(In=Rn("observable"),Rn.observable=In):In="@@observable",In}var root;typeof self<"u"?root=self:typeof window<"u"?root=window:typeof global$1<"u"?root=global$1:typeof module<"u"?root=module:root=Function("return this")();symbolObservablePonyfill(root);const _global=typeof global$1<"u"?global$1:typeof window<"u"?window:{};_global.WebSocket||_global.MozWebSocket;const EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE="execute-operation",DEFAULT_SCHEMA_INFO={endpoint:"",exists:!1,hash:"",indexed:!1,hasMutationType:!1,hasSubscriptionType:!1,hasUploadType:!1},CANCEL_OPERATION_REQUEST_MESSAGE_TYPE="cancel-request",SCHEMA_API_FETCHER_MESSAGE_TYPE="fetch-api-schema",FETCH_SCHEMA_DIRECTIVE="fetch-directive",FETCH_SCHEMA_DIRECTIVES="fetch-directives",SCHEMA_FETCHER_CACHED_MESSAGE_TYPE="get-cached-schema",SCHEMA_FETCHER_MESSAGE_TYPE="fetch-schema",FETCH_SCHEMA_FIELD_TYPE="fetch-field",FETCH_SCHEMA_FIELD_TYPES="fetch-fields",FETCH_SCHEMA_FIELDS_AND_TYPES="fetch-fields-and-types",FETCH_SCHEMA_REFERENCE="fetch-schema-reference",FETCH_SCHEMA_ROOT_TYPES="fetch-schema-root-types",FETCH_SCHEMA_TYPE="fetch-type",FETCH_SCHEMA_TYPES="fetch-types";class GraphQLEngineSchedulerClient extends SchedulerClientBase{analyzeDocument(In,Rn){return this.sendAndReceiveMessage(new Message(DOCUMENT_ANALYSIS_MESSAGE_TYPE,{documentId:In}),!1,Rn)}analyzeDocumentOperations(In,Rn){return this.sendAndReceiveMessage(new Message(DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE,{documentId:In}),!1,Rn)}cancelRequest(In){this.sendMessage(new Message(CANCEL_OPERATION_REQUEST_MESSAGE_TYPE,{documentId:In}))}executeOperation(In,Rn,Mn,Ln){this.sendMessage(new Message(EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE,{documentId:In,workspaceId:Rn,environmentId:Mn,operationIndex:Ln}))}filesUpdated(In){this.sendMessage(new Message(FILES_UPDATED_MESSAGE_TYPE,{documentId:In}))}fetchSchema(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(SCHEMA_FETCHER_MESSAGE_TYPE,{documentId:In,environmentId:Rn}),!1,Mn)}fetchApiSchema(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(SCHEMA_API_FETCHER_MESSAGE_TYPE,{apiId:In,stageId:Rn}),!1,Mn)}getCachedSchema(In,Rn){return this.sendAndReceiveMessage(new Message(SCHEMA_FETCHER_CACHED_MESSAGE_TYPE,{documentId:In,environmentId:Rn}))}getDirective(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_DIRECTIVE,{schemaEndpoint:In,coordinate:Rn}))}getDirectives(In){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_DIRECTIVES,{schemaEndpoint:In}))}getField(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELD_TYPE,{schemaEndpoint:In,coordinate:Rn}))}getFields(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELD_TYPES,{schemaEndpoint:In,typeName:Rn,options:Mn}))}getFieldsAndTypes(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELDS_AND_TYPES,{schemaEndpoint:In,coordinate:Rn,options:Mn}))}getRootTypes(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_ROOT_TYPES,{schemaEndpoint:In,filter:Rn}))}getSchemaReference(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_REFERENCE,{schemaEndpoint:In,typeCategory:Rn,filter:Mn}))}getType(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_TYPE,{schemaEndpoint:In,typeName:Rn}))}getTypes(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_TYPES,{schemaEndpoint:In,filter:Rn}))}onReceiveOperationRequestStatus(In){return this.registerReceiveMessageHandler(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}onReceiveHistoryEntry(In){return this.registerReceiveMessageHandler(HISTORY_ENTRY_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}onReceiveLogEntry(In){return this.registerReceiveMessageHandler(LOG_ENTRY_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}onReceiveResult(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_MESSAGE_TYPE,({payload:{documentId:Rn,result:Mn}})=>{In(Rn,Mn)})}onReceiveResultMessage(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_EVENT_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,event:Ln}})=>{In(Rn,Mn,Ln)})}onReceiveResultPatch(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_PATCH_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,patch:Ln}})=>{In(Rn,Mn,Ln)})}onReceiveVariableBatchingResult(In){return this.registerReceiveMessageHandler(OPERATION_VARIABLE_BATCHING_RESULT_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,result:Ln}})=>{In(Rn,Mn,Ln)})}onVariableJsonSchemaUpdated(In){return this.registerReceiveMessageHandler(VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE,({payload:{documentId:Rn,variableJsonSchemaHash:Mn}})=>{In(Rn,Mn)})}}const INDEX_SCHEMA_MESSAGE_TYPE="index-schema",SCHEMA_INDEXED_MESSAGE_TYPE="schema-indexed";class GraphQLIndexerSchedulerClient extends SchedulerClientBase{indexSchema(In,Rn,Mn){this.sendMessage(new Message(INDEX_SCHEMA_MESSAGE_TYPE,{schemaEndpoint:In,schemaHash:Rn,schemaUpdatedAt:Mn}))}onSchemaIndexed(In){return this.registerReceiveMessageHandler(SCHEMA_INDEXED_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}}function WorkerWrapper$6(on){return new Worker(""+new URL("graphql-engine-scheduler.4ac3c363.PzH1tV6k.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$5(on){return new Worker(""+new URL("graphql-indexer-scheduler.4ac3c363.BDH5nBJB.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$4(on){return new Worker(""+new URL("session-scheduler.4ac3c363.PThkcMQP.js",import.meta.url).href,{type:"module",name:on?.name})}const CREATE_USER_ACCOUNT_MESSAGE_TYPE="create-user-account";function createCreateUserAccountMessage(){return new Message(CREATE_USER_ACCOUNT_MESSAGE_TYPE,{})}const CREATE_WORKSPACE_TASK_TYPE="create-workspace-task";function createCreateWorkspaceMessage(on,In){return new Message(CREATE_WORKSPACE_TASK_TYPE,{userSession:on,workspaceName:In})}const DELETE_API_TASK_TYPE="delete-api-task";function createDeleteApiMessage(on){return new Message(DELETE_API_TASK_TYPE,{apiId:on})}const ORGANIZATION_INFO_FETCHER_MESSAGE_TYPE="fetch-organization-info";function createOrganizationInfoMessage(){return new Message(ORGANIZATION_INFO_FETCHER_MESSAGE_TYPE,void 0)}const SETTINGS_FETCHER_MESSAGE_TYPE="fetch-settings";function createFetchSettingsMessage(){return new Message(SETTINGS_FETCHER_MESSAGE_TYPE,void 0)}const FETCH_WORKSPACES_TASK_TYPE="fetch-workspaces-task-type";function createFetchWorkspacesMessage(on){return new Message(FETCH_WORKSPACES_TASK_TYPE,{userSession:on})}const PERSIST_THEME_SETTINGS_MESSAGE_TYPE="persist-theme-settings";function createPersistThemeSettingsMessage(on){return new Message(PERSIST_THEME_SETTINGS_MESSAGE_TYPE,on)}const REFRESH_TOKEN_MESSAGE_TYPE="refresh-token";function createRefreshTokenMessage(on){return new Message(REFRESH_TOKEN_MESSAGE_TYPE,{tenantInfo:on})}const UPDATE_FEATURE_FLAGS_MESSAGE_TYPE="update-feature-flags";function createUpdateFeatureFlagsMessage(on){return new Message(UPDATE_FEATURE_FLAGS_MESSAGE_TYPE,{featureFlags:on})}const USER_ACCOUNT_FETCHER_MESSAGE_TYPE="fetch-user-account";function createUserAccountMessage(){return new Message(USER_ACCOUNT_FETCHER_MESSAGE_TYPE,void 0)}const WORKSPACE_SYNCHRONIZATION_MESSAGE_TYPE="synchronize-workspace",WORKSPACE_SYNCHRONIZATION_PROGRESS_MESSAGE_TYPE="synchronize-workspace-progress";function createSynchronizeWorkspaceMessage(on,In){return new Message(WORKSPACE_SYNCHRONIZATION_MESSAGE_TYPE,{workspaceId:on,version:In})}const UPDATE_PREFERENCES_MESSAGE_TYPE="update-preferences";function createUpdatePreferencesMessage(on){return new Message(UPDATE_PREFERENCES_MESSAGE_TYPE,{preferences:on})}class SessionSchedulerClient extends SchedulerClientBase{fetchOrganizationInfo(In){return this.sendAndReceiveMessage(createOrganizationInfoMessage(),!1,In)}fetchUserAccount(In){return this.sendAndReceiveMessage(createUserAccountMessage(),!1,In)}createUserAccount(In){return this.sendAndReceiveMessage(createCreateUserAccountMessage(),!1,In)}refreshToken(In,Rn){return this.sendAndReceiveMessage(createRefreshTokenMessage(In),!1,Rn)}fetchSettings(In){return this.sendAndReceiveMessage(createFetchSettingsMessage(),!1,In)}persistThemeSettings(In){this.sendMessage(createPersistThemeSettingsMessage(In))}fetchWorkspaces(In,Rn){return this.sendAndReceiveMessage(createFetchWorkspacesMessage(In),!1,Rn)}createWorkspace(In,Rn,Mn){return this.sendAndReceiveMessage(createCreateWorkspaceMessage(In,Rn),!1,Mn)}synchronizeWorkspace(In,Rn,Mn){return this.sendAndReceiveMessage(createSynchronizeWorkspaceMessage(In,Rn),!1,Mn)}updateFeatureFlags(In,Rn){return this.sendAndReceiveMessage(createUpdateFeatureFlagsMessage(In),!1,Rn)}updatePreferences(In,Rn){return this.sendAndReceiveMessage(createUpdatePreferencesMessage(In),!1,Rn)}deleteApi(In,Rn){return this.sendAndReceiveMessage(createDeleteApiMessage(In),!1,Rn)}onReceiveLogEntry(In){return this.registerReceiveMessageHandler(LOG_ENTRY_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}onReceiveUserSessionExpired(In){return this.registerReceiveMessageHandler(USER_SESSION_EXPIRED_MESSAGE_TYPE,()=>In())}onReceiveWorkspaceSynchronizationProgress(In){return this.registerReceiveMessageHandler(WORKSPACE_SYNCHRONIZATION_PROGRESS_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}}const graphQLEngineSchedulerClient=new GraphQLEngineSchedulerClient(()=>new WorkerWrapper$6({name:"graphql-engine"})),graphQLIndexerSchedulerClient=new GraphQLIndexerSchedulerClient(()=>new WorkerWrapper$5({name:"graphql-indexer"})),sessionSchedulerClient=new SessionSchedulerClient(()=>new WorkerWrapper$4({name:"session"}));class ServiceProvider{#e=new Map;#t;#r=null;constructor(In,Rn){this.#t=new Map(In.map(([Mn,Ln,Hn])=>[Mn,{create:Ln,dependencies:Hn}])),this.#r=Rn??null}get parent(){return this.#r}getService(In){let Rn=this,Mn=this.#e.get(In)??null;if(Mn)return Mn;const Ln=this.#t.get(In);if(!Ln){for(;!Mn&&(Rn=Rn.parent);)Mn=Rn.getService(In);return Mn}if(Mn=Ln.create(Rn)??null,Mn&&(this.#e.set(In,Mn),Ln.dependencies))for(const Hn of Ln.dependencies)this.getService(Hn);return Mn}getRequiredService(In){const Rn=this.getService(In);if(!Rn)throw new Error(`Service "${In}" not found!`);return Rn}[Symbol.dispose](){this.#e.forEach(In=>{isDisposable(In)&&In[Symbol.dispose]()}),this.#e.clear()}}function ServiceDependencyProvider({children:on,services:In}){const Rn=useServiceProvider(),Mn=useRefWithInitializer(()=>new ServiceProvider(In,Rn));return reactExports.useEffect(()=>()=>Mn.current[Symbol.dispose](),[Mn]),jsx$1(ServiceProviderContext.Provider,{value:Mn.current,children:on})}const ServiceProviderContext=createNamedContext(null,ServiceProvider.name);function useServiceProvider(){return reactExports.useContext(ServiceProviderContext)}function useRequiredService(on){const In=useServiceProvider();if(!In)throw new Error("Provider undefined!");return In.getRequiredService(on)}var ItemChangeAction=(on=>(on.LOAD="load",on.LOAD_DEPENDENCY="load-dependency",on.UNLOAD="unload",on.UPDATE="update",on.SAVE="save",on))(ItemChangeAction||{});const ALL_LISTENER_NAME$1="all";class ItemStore{#e=new LifecycleCache({lru:!1});#t=new Map;#r;#n=new Map;constructor(){this.#r=[registerReceiveMessage(ACTIVATED_WORKSPACE_MESSAGE,({workspaceId:In})=>{this.#e.forEach(Rn=>{Rn.workspaceId!==In&&this.unloadItem(Rn.id)})}),registerReceiveMessage(DELETED_ITEMS_MESSAGE,({deletedItems:In})=>{In.forEach(({id:Rn})=>this.unloadItem(Rn))}),registerReceiveMessage(RENAMED_ITEM_MESSAGE,({itemId:In,itemKind:Rn})=>this.reload(In,Rn)),registerReceiveMessage(MOVED_ITEMS_MESSAGE,({movedItems:In})=>In.forEach(({id:Rn,kind:Mn})=>this.reload(Rn,Mn))),sessionSchedulerClient.onReceiveWorkspaceSynchronizationProgress(({changes:In})=>In.forEach(async Rn=>{switch(Rn.kind){case"delete":this.unloadItem(Rn.id);break;case"update":await this.reload(Rn.id,Rn.itemKind);break}}))]}async createApi(In,Rn,Mn,Ln){const Hn=await createApiItem(In,Rn,Mn,null,null,Ln);return this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"load",Hn),Hn}async createNewApi(In,Rn,Mn){const Ln=await createNewApiItem(In,Rn,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async createApiDocument(In,Rn,Mn,Ln,Hn){const jn=await createApiDocumentItem(In,Rn,Mn,Ln,null,null,Hn);return await this.setDocument(In,jn,"load"),jn}async createBasicDocument(In,Rn,Mn,Ln,Hn){const jn=await createBasicDocumentItem(In,Rn,Mn,null,null,Ln,Hn);return await this.setDocument(In,jn,"load"),jn}async createNewDocument(In,Rn,Mn,Ln){const Hn=await createNewDocumentItem(In,Rn,Mn,Ln);return await this.setDocument(In,Hn,"load"),Hn}async createEnvironment(In,Rn,Mn){const Ln=await createEnvironmentItem(In,Rn,null,null,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async createNewEnvironment(In,Rn,Mn){const Ln=await createNewEnvironmentItem(In,Rn,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async duplicateApi(In,Rn,Mn){const Ln=await duplicateApiItem(In,Rn,Mn);return Ln&&(this.#e.set(Rn,Ln,{permanent:!0}),this.triggerListeners(Rn,"load",Ln)),Ln}async duplicateDocument(In,Rn,Mn){const Ln=await duplicateDocumentItem(In,Rn,Mn);return Ln&&await this.setDocument(Rn,Ln,"load"),Ln}async duplicateEnvironment(In,Rn,Mn){const Ln=await duplicateEnvironmentItem(In,Rn,Mn);return Ln&&(this.#e.set(Rn,Ln,{permanent:!0}),this.triggerListeners(Rn,"load",Ln)),Ln}get(In){return this.#e.get(In)}async getApi(In){const Rn=this.#e.get(In);return isApiItem(Rn)?(this.#e.isPermanent(In)||(this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,"load",Rn)),Rn):await this.reloadApi(In,!0)}async getNewApi(In){const Rn=this.#e.get(In);if(isNewApiItem(Rn))return this.#e.isPermanent(In)||(this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,"load",Rn)),Rn;const[Mn,Ln]=this.loadItem(In,()=>this.getNewApi(In));if(Mn)return await Ln;const Hn=await Ln;return Hn&&(this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"load",Hn)),Hn}async getDocument(In){const Rn=this.#e.get(In);return isDocumentItem(Rn)?Rn:await this.reloadDocument(In)}async getEnvironment(In){const Rn=this.#e.get(In);return isEnvironmentItem(Rn)?Rn:await this.reloadEnvironment(In)}async saveApi(In,Rn){const Mn=this.#e.get(In);if(isApiItem(Mn))try{const Ln=await saveApiItem(In,Rn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"save",Ln),Ln}catch{return}}async saveNewApi(In,Rn,Mn,Ln,Hn){const jn=this.#e.get(In);if(isNewApiItem(jn))try{const Wn=await saveNewApiItem(In,Rn,Mn,Ln,Hn);return this.#e.set(In,Wn,{permanent:!0}),this.triggerListeners(In,"save",Wn),Wn}catch{return}}async saveDocument(In){const Rn=this.#e.get(In);if(isDocumentItem(Rn))try{const Mn=await saveDocumentItem(In);return await this.setDocument(In,Mn,"save"),Mn}catch{return}}async saveNewDocument(In,Rn,Mn,Ln){const Hn=this.#e.get(In);if(isDocumentItem(Hn))try{const jn=await saveNewDocumentItem(In,Rn,Mn,Ln);return await this.setDocument(In,jn,"save"),jn}catch{return}}async saveEnvironment(In){const Rn=this.#e.get(In);if(isEnvironmentItem(Rn))try{const Mn=await saveEnvironmentItem(In);return this.#e.set(In,Mn,{permanent:!0}),this.triggerListeners(In,"save",Mn),Mn}catch{return}}async saveNewEnvironment(In,Rn,Mn){const Ln=this.#e.get(In);if(isNewEnvironmentItem(Ln))try{const Hn=await saveNewEnvironmentItem(In,Rn,Mn);return this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"save",Hn),Hn}catch{return}}subscribe(In,Rn){let Mn=this.#n.get(In);return Mn||(Mn=new Set,this.#n.set(In,Mn)),Mn.has(Rn)||Mn.add(Rn),()=>{Mn.delete(Rn),Mn.size===0&&this.#n.delete(In)}}subscribeAll(In){return this.subscribe(ALL_LISTENER_NAME$1,In)}unloadItem(In){const Rn=this.#e.get(In);if(Rn){const Mn=this.#e.isPermanent(In);return this.#e.delete(In),Mn&&this.triggerListeners(In,"unload",Rn),!0}return!1}updateDocumentContentBody(In,Rn){return this.updateDocumentContent(In,Mn=>updateDocumentContentBody(Mn,Rn))}updateDocumentContentVariables(In,Rn){return this.updateDocumentContent(In,Mn=>updateDocumentContentVariables(Mn,Rn))}[Symbol.dispose](){this.#e[Symbol.dispose](),this.#r.forEach(In=>In())}loadItem(In,Rn){if(this.#t.has(In))return[!0,this.#t.get(In)];const Mn=Rn().then(Ln=>(this.#t.delete(In),Ln));return this.#t.set(In,Mn),[!1,Mn]}async reload(In,Rn){switch(Rn){case"api":await this.reloadApi(In,!1);break;case"api-document":case"document":await this.reloadDocument(In);break;case"environment":await this.reloadEnvironment(In);break}}async reloadApi(In,Rn){const[Mn,Ln]=this.loadItem(In,()=>getApiItem(In));if(Mn)return await Ln;const Hn=await Ln;if(Hn){const jn=Rn||this.#e.isPermanent(In);this.#e.set(In,Hn,{permanent:jn}),jn?this.triggerListeners(In,"load",Hn):this.triggerListeners(In,"load-dependency",Hn)}return Hn}async reloadDocument(In){const[Rn,Mn]=this.loadItem(In,()=>getDocumentItemAndContent(In));if(Rn)return await Mn;const Ln=await Mn;return Ln&&await this.setDocument(In,Ln,"load"),Ln}async reloadEnvironment(In){const[Rn,Mn]=this.loadItem(In,()=>getEnvironmentItemAndVariables(In));if(Rn)return await Mn;const Ln=await Mn;return Ln&&(this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln)),Ln}async setDocument(In,Rn,Mn){if(isApiDocumentItem(Rn)){if(this.#e.set(In,Rn,{permanent:!0,references:[Rn.apiId]}),this.#e.has(Rn.apiId)){this.triggerListeners(In,Mn,Rn);return}const[Ln,Hn]=this.loadItem(Rn.apiId,()=>getApiItem(Rn.apiId));if(Ln){await Hn,this.triggerListeners(In,Mn,Rn);return}const jn=await Hn;jn&&(this.#e.set(jn.id,jn,{permanent:!1}),this.triggerListeners(jn.id,"load-dependency",jn)),this.triggerListeners(In,Mn,Rn)}else this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,Mn,Rn)}async updateDocumentContent(In,Rn){const Mn=this.#e.get(In);if(!isDocumentItem(Mn))return;const Ln=await Rn(In);return Ln&&(this.#e.update(In,Ln),this.triggerListeners(In,"update",Ln)),Ln}triggerListeners(In,Rn,Mn){requestAnimationFrame(()=>{const Ln=this.#n.get(ALL_LISTENER_NAME$1);Ln&&Ln.forEach(jn=>jn(Rn,Mn));const Hn=this.#n.get(In);Hn&&Hn.forEach(jn=>jn(Rn,Mn))})}}function useItemStore(){return useRequiredService(ItemStore.name)}function applyObjectChanges(on,In){let Rn=null;for(const Mn of Object.keys(on)){const Ln=In[Mn],Hn=on[Mn];let jn;typeof Ln=="object"&&Ln!==null&&typeof Hn=="object"&&Hn!==null&&!Array.isArray(Ln)&&!Array.isArray(Hn)?jn=applyObjectChanges(Hn,Ln):jn=Hn,Object.is(jn,Ln)||(Rn??={...In},Rn[Mn]=jn)}return Rn??In}const ALL_LISTENER_NAME="all";class TabViewStateStore{#e=new SimpleCache({lru:!1});#t;#r=new Map;constructor(){this.#t=[registerReceiveMessage(DELETED_ITEMS_MESSAGE,({deletedItems:In})=>In.forEach(({id:Rn})=>this.delete(Rn))),registerReceiveMessage(DOCUMENT_ANALYZED_MESSAGE,({documentId:In,operations:Rn})=>{const Mn=this.#e.get(In);if(!(!Mn||!Mn.graphqlDocument)){if(Rn.length===0){this.update(In,{graphqlDocument:{activeOperation:void 0}});return}(Mn.graphqlDocument.activeOperation===void 0||Mn.graphqlDocument.activeOperation>=Rn.length)&&this.update(In,{graphqlDocument:{activeOperation:0}})}}),sessionSchedulerClient.onReceiveWorkspaceSynchronizationProgress(({changes:In})=>In.forEach(async Rn=>{switch(Rn.kind){case"delete":await this.delete(Rn.id);break}}))]}create(In){this.#e.set(In.id,In),this.triggerListeners(In.id,"create",In),setTabViewState(In)}createApi(In,Rn,Mn){this.create({id:In,workspaceId:Rn,api:{...Mn?.api,activeViewId:Mn?.api?.activeViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeViewId,activeSchemaChangelogViewId:Mn?.api?.activeSchemaChangelogViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeSchemaChangelogViewId,activeMonitoringViewId:Mn?.api?.activeMonitoringViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeMonitoringViewId,metricsDateTimeRange:Mn?.api?.metricsDateTimeRange??DEFAULT_TAB_VIEW_STATE_VALUES.api.metricsDateTimeRange},detailInfo:Mn?.detailInfo?{...Mn?.detailInfo}:void 0,schema:{...Mn?.schema,activeSchemaViewId:Mn?.schema?.activeSchemaViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaViewId,activeSchemaReferenceViewId:Mn?.schema?.activeSchemaReferenceViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaReferenceViewId,hideDeprecatedItemsInSchemaReference:Mn?.schema?.hideDeprecatedItemsInSchemaReference??DEFAULT_TAB_VIEW_STATE_VALUES.schema.hideDeprecatedItemsInSchemaReference}})}createGraphqlDocument(In,Rn,Mn){this.create({id:In,workspaceId:Rn,api:{...Mn?.api,metricsDateTimeRange:Mn?.api?.metricsDateTimeRange??DEFAULT_TAB_VIEW_STATE_VALUES.api.metricsDateTimeRange},graphqlDocument:{...Mn?.graphqlDocument,activeViewId:Mn?.graphqlDocument?.activeViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeViewId,activeOperationCompanionViewId:Mn?.graphqlDocument?.activeOperationCompanionViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeOperationCompanionViewId,activeOperationsSettingsViewId:Mn?.graphqlDocument?.activeOperationsSettingsViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeOperationsSettingsViewId,activeResponseViewId:Mn?.graphqlDocument?.activeResponseViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeResponseViewId,isOperationCompanionCollapsed:Mn?.graphqlDocument?.isOperationCompanionCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isOperationCompanionCollapsed,isOperationsSettingsPaneCollapsed:Mn?.graphqlDocument?.isOperationsSettingsPaneCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isOperationsSettingsPaneCollapsed,isResponseEntriesPaneCollapsed:Mn?.graphqlDocument?.isResponseEntriesPaneCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isResponseEntriesPaneCollapsed,operationsSettingsPaneHeight:Mn?.graphqlDocument?.operationsSettingsPaneHeight??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.operationsSettingsPaneHeight,responseEntriesPaneHeight:Mn?.graphqlDocument?.responseEntriesPaneHeight??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.responseEntriesPaneHeight,focusedElement:Mn?.graphqlDocument?.focusedElement??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.focusedElement,showIntrospectionFieldsInOperationBuilder:Mn?.graphqlDocument?.showIntrospectionFieldsInOperationBuilder??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.showIntrospectionFieldsInOperationBuilder},detailInfo:Mn?.detailInfo?{...Mn?.detailInfo}:void 0,schema:{...Mn?.schema,activeSchemaViewId:Mn?.schema?.activeSchemaViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaViewId,activeSchemaReferenceViewId:Mn?.schema?.activeSchemaReferenceViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaReferenceViewId,hideDeprecatedItemsInSchemaReference:Mn?.schema?.hideDeprecatedItemsInSchemaReference??DEFAULT_TAB_VIEW_STATE_VALUES.schema.hideDeprecatedItemsInSchemaReference}})}async delete(In){const Rn=this.#e.get(In);return Rn?(await deleteTabViewState(In),this.#e.delete(In),this.triggerListeners(In,"delete",Rn),!0):!1}get(In){return this.#e.get(In)}async load(In){this.#e.forEach(Mn=>{this.#e.delete(Mn.id),this.triggerListeners(Mn.id,"unload",Mn)});const Rn=await loadAllTabViewState(In);if(Rn)for(const Mn of Rn)this.#e.set(Mn.id,Mn),this.triggerListeners(Mn.id,"load",Mn)}subscribe(In,Rn){let Mn=this.#r.get(In);return Mn||(Mn=new Set,this.#r.set(In,Mn)),Mn.has(Rn)||Mn.add(Rn),()=>{Mn.delete(Rn),Mn.size===0&&this.#r.delete(In)}}subscribeAll(In){return this.subscribe(ALL_LISTENER_NAME,In)}update(In,Rn){const Mn=this.#e.get(In);if(!Mn)return;typeof Rn=="function"&&(Rn=Rn(Mn));const Ln=applyObjectChanges(Rn,Mn);Ln!==Mn&&(this.#e.set(In,Ln),this.triggerListeners(In,"update",Ln),setTabViewState(Ln))}[Symbol.dispose](){this.#e[Symbol.dispose](),this.#t.forEach(In=>In())}triggerListeners(In,Rn,Mn){const Ln=this.#r.get(ALL_LISTENER_NAME);Ln&&Ln.forEach(jn=>jn(Rn,Mn));const Hn=this.#r.get(In);Hn&&Hn.forEach(jn=>jn(Rn,Mn))}}function useTabViewStateStore(){return useRequiredService(TabViewStateStore.name)}class SchemaErrorCache extends SimpleCache{constructor(){super({lru:!0})}[Symbol.dispose](){super[Symbol.dispose]()}}function useSchemaErrorCache(){return useRequiredService(SchemaErrorCache.name)}const INITIAL_STATE$5={activeId:null,activeChildId:null,entries:[],followNewest:!0,stats:{all:0,errors:0,infos:0,warnings:0}};function LogProvider({children:on}){const In=useSubject(INITIAL_STATE$5);return useOnWorkspaceSwitchResetState(In.current),jsx$1(ActivateLogEntryProvider,{state$:In.current,children:jsx$1(AppendLogEntryProvider,{state$:In.current,children:jsx$1(AppendSchedulerLogEntryProvider,{state$:In.current,children:jsx$1(ClearLogProvider,{state$:In.current,children:jsx$1(CollapseLogScopeProvider,{state$:In.current,children:jsx$1(DeactivateLogEntryProvider,{state$:In.current,children:jsx$1(ExpandLogScopeProvider,{state$:In.current,children:jsx$1(UpdateFollowNewestProvider,{state$:In.current,children:jsx$1(LogStateContext.Provider,{value:In.current,children:on})})})})})})})})})}function useOnReceiveLogEntry$1(on){reactExports.useEffect(()=>graphQLEngineSchedulerClient.onReceiveLogEntry(on),[on])}function useOnWorkspaceSwitchResetState(on){reactExports.useEffect(()=>registerReceiveMessage(ACTIVATED_WORKSPACE_MESSAGE,()=>{on.next(INITIAL_STATE$5)}),[on])}const ActivateLogEntryContext=createNamedContext(noop$2,"ActivateLogEntry");function useActivateLogEntry(){return reactExports.useContext(ActivateLogEntryContext)}function ActivateLogEntryProvider({children:on,state$:In}){const Rn=reactExports.useCallback((Mn,Ln,Hn)=>{const jn=In.value();(jn.activeId!==Mn||jn.activeChildId!==Ln)&&jn.entries.some(({id:Wn})=>Wn===Mn)&&(In.next({...jn,entries:jn.entries.map(Wn=>Wn.id===Mn&&Wn.kind==="scope"?{...Wn,expanded:!0}:Wn),activeId:Mn,activeChildId:Ln??null,followNewest:Hn===void 0?jn.followNewest:Hn}),Mn&&sendMessage({kind:LOG_ENTRY_ACTIVATED_MESSAGE,logEntryId:Mn}))},[In]);return jsx$1(ActivateLogEntryContext.Provider,{value:Rn,children:on})}const AppendLogEntryContext=createNamedContext(async()=>"","AppendLogEntry");function useAppendLogEntry(){return reactExports.useContext(AppendLogEntryContext)}function AppendLogEntryProvider({children:on,state$:In}){const Rn=reactExports.useCallback(async(Mn,Ln,Hn,jn)=>{const Wn=await getItemDetails(Mn),Yn=createId();return appendLogEntry(In,{id:Yn,item:Wn,kind:"basic",level:Ln,message:Hn,timestamp:now(),details:jn}),Yn},[In]);return jsx$1(AppendLogEntryContext.Provider,{value:Rn,children:on})}const AppendSchedulerLogEntryContext=createNamedContext(noop$2,"AppendSchedulerLogEntry");function useAppendSchedulerLogEntry(){return reactExports.useContext(AppendSchedulerLogEntryContext)}function AppendSchedulerLogEntryProvider({children:on,state$:In}){const Rn=useSchemaErrorCache(),Mn=reactExports.useCallback(async Ln=>{const{kind:Hn}=Ln,jn=await getItemDetails(Ln.itemId);switch(Hn){case BASIC_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId??createId(),item:jn,kind:"basic",level:Ln.level,timestamp:now(),message:Ln.message,details:Ln.details});break;case HTTP_REQUEST_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId,scopeId:Ln.scopeId,item:jn,kind:"http-request",name:Ln.name,level:Ln.level,status:"pending",started:Ln.started,request:{uri:Ln.requestUri,method:Ln.method,headers:Ln.headers,body:Ln.body,cache:Ln.cache,credentials:Ln.credentials,referrerPolicy:Ln.referrerPolicy}});break;case HTTP_RESPONSE_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,response:{body:"",headers:Ln.headers,chunks:0,contentLength:0,statusCode:Ln.statusCode,statusText:Ln.statusText}}));break;case HTTP_RESPONSE_BODY_CHUNK_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,response:{...vi.response,body:vi.response.body+Ln.chunk,chunks:Ln.chunkIndex+1}}));break;case HTTP_RESPONSE_CANCELLED_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,level:LogLevel.warning,status:"cancelled",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength,error:Ln.error}}));break;case HTTP_RESPONSE_FAILED_LOG_ENTRY_KIND:{if(updateLogEntry(In,Ln.requestId,vi=>({...vi,level:LogLevel.error,status:"failed",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength,error:Ln.error}})),Ln.requestKind===RequestKind.GRAPHQL_INTROSPECTION||Ln.requestKind===RequestKind.GRAPHQL_SDL_FETCH){const vi=Rn.get(Ln.itemId);if(Ln.scopeId!==vi?.scopeId||!Ln.scopeId&&!vi?.scopeId){const gi=In.value().entries.find(({id:mi})=>mi===Ln.requestId);gi?.kind==="http-request"&&Rn.set(Ln.itemId,gi)}}break}case HTTP_RESPONSE_FINISHED_LOG_ENTRY_KIND:{if(updateLogEntry(In,Ln.requestId,vi=>({...vi,status:"succeeded",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength}})),Ln.requestKind===RequestKind.GRAPHQL_INTROSPECTION||Ln.requestKind===RequestKind.GRAPHQL_SDL_FETCH||Ln.requestKind===RequestKind.GRAPHQL_SDL_PROBE){const vi=Rn.get(Ln.itemId);vi&&(vi.scopeId!==Ln.scopeId||!vi.scopeId&&!Ln.scopeId)&&Rn.delete(Ln.itemId)}break}case SCOPE_BEGIN_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.scopeId,item:jn,kind:"scope",name:Ln.name,level:Ln.level,started:Ln.started,details:Ln.details?{...Ln.details,status:"pending"}:{status:"pending"}});break;case SCOPE_END_LOG_ENTRY_KIND:const Wn=In.value().entries.filter(vi=>vi.kind==="http-request"&&vi.scopeId===Ln.scopeId),Yn=Wn.length?Wn[Wn.length-1]:null,hi=Wn.length?Wn.find(vi=>vi.status==="cancelled"||vi.status==="failed")??Yn:null;updateLogEntry(In,Ln.scopeId,vi=>({...vi,stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),level:hi?.level??vi.level,details:{...vi.details,cache:Yn?.request.cache,contentLength:Wn.reduce((gi,mi)=>gi+(mi.response?.contentLength??0),0),credentials:Yn?.request.credentials,method:Yn?.request.method,referrerPolicy:Yn?.request.referrerPolicy,requestHeaders:Yn?.request.headers,responseHeaders:Yn?.response?.headers,status:hi?.status??"succeeded",statusCode:hi?.response?.statusCode,statusText:hi?.response?.statusText}}));break;case SUBSCRIPTION_REQUEST_STARTED_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId,item:jn,kind:"subscription-request",level:Ln.level,status:"pending",started:Ln.started,uri:Ln.requestUri,protocol:Ln.protocol,connectionParams:Ln.connectionParams,contentLength:0,messages:0,data:""});break;case SUBSCRIPTION_REQUEST_PROTOCOL_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,protocol:Ln.protocol}));break;case SUBSCRIPTION_REQUEST_MESSAGE_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>{const gi=vi.data+Ln.data+`
4729
+ `,_gql_doc={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__Type",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fields"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:137,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source}}};print(_gql_doc$3);print(_gql_doc$2);print(_gql_doc$1);print(_gql_doc);const SERVER_NOT_REACHABLE="Server Not Reachable";function isServerNotReachableError(on){return isDictionary(on)&&"message"in on&&on.message===SERVER_NOT_REACHABLE}class SchedulerClientBase extends MessageObserver{constructor(In){super(),this.createWorker=In}#e;#t;#r=!0;#n;#i=0;getContext(){if(!this.#e){const In=this.createWorker(),Rn={sendMessage:Mn=>In.postMessage(Mn)};In.onmessage=({data:Mn})=>{this.handleMessage(Rn,Mn)},this.#t=In,this.#e=Rn,this.#n=this.registerReceiveMessageHandler("scheduler-status-updated",({payload:{idling:Mn,lastUpdated:Ln}})=>{this.#r=Mn,this.#i=Ln}),this.checkIfIdle(),this.initializeWorker()}return this.#e}checkIfIdle(){const In=()=>{if(this.#t&&this.#r&&document.hidden&&now()-this.#i>TWO_MINUTES){this.stopWorker();return}this.checkIfIdle()};window.setTimeout(In,THIRTY_SECONDS)}initializeWorker(){this.sendMessage(new Message(INITIALIZE_WORKER_MESSAGE_TYPE,{appNamespace:window.appNamespace}))}stopWorker(){this.#t?.terminate(),this.#n?.(),this.#n=void 0,this.#t=void 0,this.#e=void 0}cancelTask(In){this.sendMessage(new Message(CANCEL_TASK_MESSAGE_TYPE,{taskId:In}))}}const DOCUMENT_ANALYSIS_MESSAGE_TYPE="analyze-document",DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE="analyze-document-operations",FILES_UPDATED_MESSAGE_TYPE="files-updated",VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE="variable-json-schema-updated";var backo2,hasRequiredBacko2;function requireBacko2(){if(hasRequiredBacko2)return backo2;hasRequiredBacko2=1,backo2=on;function on(In){In=In||{},this.ms=In.min||100,this.max=In.max||1e4,this.factor=In.factor||2,this.jitter=In.jitter>0&&In.jitter<=1?In.jitter:0,this.attempts=0}return on.prototype.duration=function(){var In=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var Rn=Math.random(),Mn=Math.floor(Rn*this.jitter*In);In=(Math.floor(Rn*10)&1)==0?In-Mn:In+Mn}return Math.min(In,this.max)|0},on.prototype.reset=function(){this.attempts=0},on.prototype.setMin=function(In){this.ms=In},on.prototype.setMax=function(In){this.max=In},on.prototype.setJitter=function(In){this.jitter=In},backo2}requireBacko2();var eventemitter3={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,function(on){var In=Object.prototype.hasOwnProperty,Rn="~";function Mn(){}Object.create&&(Mn.prototype=Object.create(null),new Mn().__proto__||(Rn=!1));function Ln(Yn,hi,vi){this.fn=Yn,this.context=hi,this.once=vi||!1}function Hn(Yn,hi,vi,gi,mi){if(typeof vi!="function")throw new TypeError("The listener must be a function");var yi=new Ln(vi,gi||Yn,mi),bi=Rn?Rn+hi:hi;return Yn._events[bi]?Yn._events[bi].fn?Yn._events[bi]=[Yn._events[bi],yi]:Yn._events[bi].push(yi):(Yn._events[bi]=yi,Yn._eventsCount++),Yn}function jn(Yn,hi){--Yn._eventsCount===0?Yn._events=new Mn:delete Yn._events[hi]}function Wn(){this._events=new Mn,this._eventsCount=0}Wn.prototype.eventNames=function(){var hi=[],vi,gi;if(this._eventsCount===0)return hi;for(gi in vi=this._events)In.call(vi,gi)&&hi.push(Rn?gi.slice(1):gi);return Object.getOwnPropertySymbols?hi.concat(Object.getOwnPropertySymbols(vi)):hi},Wn.prototype.listeners=function(hi){var vi=Rn?Rn+hi:hi,gi=this._events[vi];if(!gi)return[];if(gi.fn)return[gi.fn];for(var mi=0,yi=gi.length,bi=new Array(yi);mi<yi;mi++)bi[mi]=gi[mi].fn;return bi},Wn.prototype.listenerCount=function(hi){var vi=Rn?Rn+hi:hi,gi=this._events[vi];return gi?gi.fn?1:gi.length:0},Wn.prototype.emit=function(hi,vi,gi,mi,yi,bi){var Ei=Rn?Rn+hi:hi;if(!this._events[Ei])return!1;var _i=this._events[Ei],xi=arguments.length,Ci,Ai;if(_i.fn){switch(_i.once&&this.removeListener(hi,_i.fn,void 0,!0),xi){case 1:return _i.fn.call(_i.context),!0;case 2:return _i.fn.call(_i.context,vi),!0;case 3:return _i.fn.call(_i.context,vi,gi),!0;case 4:return _i.fn.call(_i.context,vi,gi,mi),!0;case 5:return _i.fn.call(_i.context,vi,gi,mi,yi),!0;case 6:return _i.fn.call(_i.context,vi,gi,mi,yi,bi),!0}for(Ai=1,Ci=new Array(xi-1);Ai<xi;Ai++)Ci[Ai-1]=arguments[Ai];_i.fn.apply(_i.context,Ci)}else{var Ii=_i.length,Ni;for(Ai=0;Ai<Ii;Ai++)switch(_i[Ai].once&&this.removeListener(hi,_i[Ai].fn,void 0,!0),xi){case 1:_i[Ai].fn.call(_i[Ai].context);break;case 2:_i[Ai].fn.call(_i[Ai].context,vi);break;case 3:_i[Ai].fn.call(_i[Ai].context,vi,gi);break;case 4:_i[Ai].fn.call(_i[Ai].context,vi,gi,mi);break;default:if(!Ci)for(Ni=1,Ci=new Array(xi-1);Ni<xi;Ni++)Ci[Ni-1]=arguments[Ni];_i[Ai].fn.apply(_i[Ai].context,Ci)}}return!0},Wn.prototype.on=function(hi,vi,gi){return Hn(this,hi,vi,gi,!1)},Wn.prototype.once=function(hi,vi,gi){return Hn(this,hi,vi,gi,!0)},Wn.prototype.removeListener=function(hi,vi,gi,mi){var yi=Rn?Rn+hi:hi;if(!this._events[yi])return this;if(!vi)return jn(this,yi),this;var bi=this._events[yi];if(bi.fn)bi.fn===vi&&(!mi||bi.once)&&(!gi||bi.context===gi)&&jn(this,yi);else{for(var Ei=0,_i=[],xi=bi.length;Ei<xi;Ei++)(bi[Ei].fn!==vi||mi&&!bi[Ei].once||gi&&bi[Ei].context!==gi)&&_i.push(bi[Ei]);_i.length?this._events[yi]=_i.length===1?_i[0]:_i:jn(this,yi)}return this},Wn.prototype.removeAllListeners=function(hi){var vi;return hi?(vi=Rn?Rn+hi:hi,this._events[vi]&&jn(this,vi)):(this._events=new Mn,this._eventsCount=0),this},Wn.prototype.off=Wn.prototype.removeListener,Wn.prototype.addListener=Wn.prototype.on,Wn.prefixed=Rn,Wn.EventEmitter=Wn,on.exports=Wn}(eventemitter3)),eventemitter3.exports}requireEventemitter3();var defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}),defaults.WS_TIMEOUT=defaults.MIN_WS_TIMEOUT=void 0;var on=1e3;defaults.MIN_WS_TIMEOUT=on;var In=3e4;return defaults.WS_TIMEOUT=In,defaults}requireDefaults();var messageTypes={},hasRequiredMessageTypes;function requireMessageTypes(){if(hasRequiredMessageTypes)return messageTypes;hasRequiredMessageTypes=1,Object.defineProperty(messageTypes,"__esModule",{value:!0});var on=function(){function In(){throw new Error("Static Class")}return In.GQL_CONNECTION_INIT="connection_init",In.GQL_CONNECTION_ACK="connection_ack",In.GQL_CONNECTION_ERROR="connection_error",In.GQL_CONNECTION_KEEP_ALIVE="ka",In.GQL_CONNECTION_TERMINATE="connection_terminate",In.GQL_START="start",In.GQL_DATA="data",In.GQL_ERROR="error",In.GQL_COMPLETE="complete",In.GQL_STOP="stop",In.SUBSCRIPTION_START="subscription_start",In.SUBSCRIPTION_DATA="subscription_data",In.SUBSCRIPTION_SUCCESS="subscription_success",In.SUBSCRIPTION_FAIL="subscription_fail",In.SUBSCRIPTION_END="subscription_end",In.INIT="init",In.INIT_SUCCESS="init_success",In.INIT_FAIL="init_fail",In.KEEP_ALIVE="keepalive",In}();return messageTypes.default=on,messageTypes}requireMessageTypes();var protocol={},hasRequiredProtocol;function requireProtocol(){if(hasRequiredProtocol)return protocol;hasRequiredProtocol=1,Object.defineProperty(protocol,"__esModule",{value:!0}),protocol.GRAPHQL_SUBSCRIPTIONS=protocol.GRAPHQL_WS=void 0;var on="graphql-ws";protocol.GRAPHQL_WS=on;var In="graphql-subscriptions";return protocol.GRAPHQL_SUBSCRIPTIONS=In,protocol}requireProtocol();var isObject$1={},hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$1;hasRequiredIsObject=1,Object.defineProperty(isObject$1,"__esModule",{value:!0});function on(In){return In!==null&&typeof In=="object"}return isObject$1.default=on,isObject$1}requireIsObject();var isString$1={},hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString$1;hasRequiredIsString=1,Object.defineProperty(isString$1,"__esModule",{value:!0});function on(In){return typeof In=="string"}return isString$1.default=on,isString$1}requireIsString();function symbolObservablePonyfill(on){var In,Rn=on.Symbol;return typeof Rn=="function"?Rn.observable?In=Rn.observable:(In=Rn("observable"),Rn.observable=In):In="@@observable",In}var root;typeof self<"u"?root=self:typeof window<"u"?root=window:typeof global$1<"u"?root=global$1:typeof module<"u"?root=module:root=Function("return this")();symbolObservablePonyfill(root);const _global=typeof global$1<"u"?global$1:typeof window<"u"?window:{};_global.WebSocket||_global.MozWebSocket;const EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE="execute-operation",DEFAULT_SCHEMA_INFO={endpoint:"",exists:!1,hash:"",indexed:!1,hasMutationType:!1,hasSubscriptionType:!1,hasUploadType:!1},CANCEL_OPERATION_REQUEST_MESSAGE_TYPE="cancel-request",SCHEMA_API_FETCHER_MESSAGE_TYPE="fetch-api-schema",FETCH_SCHEMA_DIRECTIVE="fetch-directive",FETCH_SCHEMA_DIRECTIVES="fetch-directives",SCHEMA_FETCHER_CACHED_MESSAGE_TYPE="get-cached-schema",SCHEMA_FETCHER_MESSAGE_TYPE="fetch-schema",FETCH_SCHEMA_FIELD_TYPE="fetch-field",FETCH_SCHEMA_FIELD_TYPES="fetch-fields",FETCH_SCHEMA_FIELDS_AND_TYPES="fetch-fields-and-types",FETCH_SCHEMA_REFERENCE="fetch-schema-reference",FETCH_SCHEMA_ROOT_TYPES="fetch-schema-root-types",FETCH_SCHEMA_TYPE="fetch-type",FETCH_SCHEMA_TYPES="fetch-types";class GraphQLEngineSchedulerClient extends SchedulerClientBase{analyzeDocument(In,Rn){return this.sendAndReceiveMessage(new Message(DOCUMENT_ANALYSIS_MESSAGE_TYPE,{documentId:In}),!1,Rn)}analyzeDocumentOperations(In,Rn){return this.sendAndReceiveMessage(new Message(DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE,{documentId:In}),!1,Rn)}cancelRequest(In){this.sendMessage(new Message(CANCEL_OPERATION_REQUEST_MESSAGE_TYPE,{documentId:In}))}executeOperation(In,Rn,Mn,Ln){this.sendMessage(new Message(EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE,{documentId:In,workspaceId:Rn,environmentId:Mn,operationIndex:Ln}))}filesUpdated(In){this.sendMessage(new Message(FILES_UPDATED_MESSAGE_TYPE,{documentId:In}))}fetchSchema(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(SCHEMA_FETCHER_MESSAGE_TYPE,{documentId:In,environmentId:Rn}),!1,Mn)}fetchApiSchema(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(SCHEMA_API_FETCHER_MESSAGE_TYPE,{apiId:In,stageId:Rn}),!1,Mn)}getCachedSchema(In,Rn){return this.sendAndReceiveMessage(new Message(SCHEMA_FETCHER_CACHED_MESSAGE_TYPE,{documentId:In,environmentId:Rn}))}getDirective(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_DIRECTIVE,{schemaEndpoint:In,coordinate:Rn}))}getDirectives(In){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_DIRECTIVES,{schemaEndpoint:In}))}getField(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELD_TYPE,{schemaEndpoint:In,coordinate:Rn}))}getFields(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELD_TYPES,{schemaEndpoint:In,typeName:Rn,options:Mn}))}getFieldsAndTypes(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_FIELDS_AND_TYPES,{schemaEndpoint:In,coordinate:Rn,options:Mn}))}getRootTypes(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_ROOT_TYPES,{schemaEndpoint:In,filter:Rn}))}getSchemaReference(In,Rn,Mn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_REFERENCE,{schemaEndpoint:In,typeCategory:Rn,filter:Mn}))}getType(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_TYPE,{schemaEndpoint:In,typeName:Rn}))}getTypes(In,Rn){return this.sendAndReceiveMessage(new Message(FETCH_SCHEMA_TYPES,{schemaEndpoint:In,filter:Rn}))}onReceiveOperationRequestStatus(In){return this.registerReceiveMessageHandler(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}onReceiveHistoryEntry(In){return this.registerReceiveMessageHandler(HISTORY_ENTRY_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}onReceiveLogEntry(In){return this.registerReceiveMessageHandler(LOG_ENTRY_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}onReceiveResult(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_MESSAGE_TYPE,({payload:{documentId:Rn,result:Mn}})=>{In(Rn,Mn)})}onReceiveResultMessage(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_EVENT_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,event:Ln}})=>{In(Rn,Mn,Ln)})}onReceiveResultPatch(In){return this.registerReceiveMessageHandler(OPERATION_RESULT_PATCH_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,patch:Ln}})=>{In(Rn,Mn,Ln)})}onReceiveVariableBatchingResult(In){return this.registerReceiveMessageHandler(OPERATION_VARIABLE_BATCHING_RESULT_MESSAGE_TYPE,({payload:{documentId:Rn,resultId:Mn,result:Ln}})=>{In(Rn,Mn,Ln)})}onVariableJsonSchemaUpdated(In){return this.registerReceiveMessageHandler(VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE,({payload:{documentId:Rn,variableJsonSchemaHash:Mn}})=>{In(Rn,Mn)})}}const INDEX_SCHEMA_MESSAGE_TYPE="index-schema",SCHEMA_INDEXED_MESSAGE_TYPE="schema-indexed";class GraphQLIndexerSchedulerClient extends SchedulerClientBase{indexSchema(In,Rn,Mn){this.sendMessage(new Message(INDEX_SCHEMA_MESSAGE_TYPE,{schemaEndpoint:In,schemaHash:Rn,schemaUpdatedAt:Mn}))}onSchemaIndexed(In){return this.registerReceiveMessageHandler(SCHEMA_INDEXED_MESSAGE_TYPE,({payload:Rn})=>{In(Rn)})}}function WorkerWrapper$6(on){return new Worker(""+new URL("graphql-engine-scheduler.b77dd5d8.B1RXbWAw.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$5(on){return new Worker(""+new URL("graphql-indexer-scheduler.b77dd5d8.C87eltaF.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$4(on){return new Worker(""+new URL("session-scheduler.b77dd5d8.H9hh1gOM.js",import.meta.url).href,{type:"module",name:on?.name})}const CREATE_USER_ACCOUNT_MESSAGE_TYPE="create-user-account";function createCreateUserAccountMessage(){return new Message(CREATE_USER_ACCOUNT_MESSAGE_TYPE,{})}const CREATE_WORKSPACE_TASK_TYPE="create-workspace-task";function createCreateWorkspaceMessage(on,In){return new Message(CREATE_WORKSPACE_TASK_TYPE,{userSession:on,workspaceName:In})}const DELETE_API_TASK_TYPE="delete-api-task";function createDeleteApiMessage(on){return new Message(DELETE_API_TASK_TYPE,{apiId:on})}const ORGANIZATION_INFO_FETCHER_MESSAGE_TYPE="fetch-organization-info";function createOrganizationInfoMessage(){return new Message(ORGANIZATION_INFO_FETCHER_MESSAGE_TYPE,void 0)}const SETTINGS_FETCHER_MESSAGE_TYPE="fetch-settings";function createFetchSettingsMessage(){return new Message(SETTINGS_FETCHER_MESSAGE_TYPE,void 0)}const FETCH_WORKSPACES_TASK_TYPE="fetch-workspaces-task-type";function createFetchWorkspacesMessage(on){return new Message(FETCH_WORKSPACES_TASK_TYPE,{userSession:on})}const PERSIST_THEME_SETTINGS_MESSAGE_TYPE="persist-theme-settings";function createPersistThemeSettingsMessage(on){return new Message(PERSIST_THEME_SETTINGS_MESSAGE_TYPE,on)}const REFRESH_TOKEN_MESSAGE_TYPE="refresh-token";function createRefreshTokenMessage(on){return new Message(REFRESH_TOKEN_MESSAGE_TYPE,{tenantInfo:on})}const UPDATE_FEATURE_FLAGS_MESSAGE_TYPE="update-feature-flags";function createUpdateFeatureFlagsMessage(on){return new Message(UPDATE_FEATURE_FLAGS_MESSAGE_TYPE,{featureFlags:on})}const USER_ACCOUNT_FETCHER_MESSAGE_TYPE="fetch-user-account";function createUserAccountMessage(){return new Message(USER_ACCOUNT_FETCHER_MESSAGE_TYPE,void 0)}const WORKSPACE_SYNCHRONIZATION_MESSAGE_TYPE="synchronize-workspace",WORKSPACE_SYNCHRONIZATION_PROGRESS_MESSAGE_TYPE="synchronize-workspace-progress";function createSynchronizeWorkspaceMessage(on,In){return new Message(WORKSPACE_SYNCHRONIZATION_MESSAGE_TYPE,{workspaceId:on,version:In})}const UPDATE_PREFERENCES_MESSAGE_TYPE="update-preferences";function createUpdatePreferencesMessage(on){return new Message(UPDATE_PREFERENCES_MESSAGE_TYPE,{preferences:on})}class SessionSchedulerClient extends SchedulerClientBase{fetchOrganizationInfo(In){return this.sendAndReceiveMessage(createOrganizationInfoMessage(),!1,In)}fetchUserAccount(In){return this.sendAndReceiveMessage(createUserAccountMessage(),!1,In)}createUserAccount(In){return this.sendAndReceiveMessage(createCreateUserAccountMessage(),!1,In)}refreshToken(In,Rn){return this.sendAndReceiveMessage(createRefreshTokenMessage(In),!1,Rn)}fetchSettings(In){return this.sendAndReceiveMessage(createFetchSettingsMessage(),!1,In)}persistThemeSettings(In){this.sendMessage(createPersistThemeSettingsMessage(In))}fetchWorkspaces(In,Rn){return this.sendAndReceiveMessage(createFetchWorkspacesMessage(In),!1,Rn)}createWorkspace(In,Rn,Mn){return this.sendAndReceiveMessage(createCreateWorkspaceMessage(In,Rn),!1,Mn)}synchronizeWorkspace(In,Rn,Mn){return this.sendAndReceiveMessage(createSynchronizeWorkspaceMessage(In,Rn),!1,Mn)}updateFeatureFlags(In,Rn){return this.sendAndReceiveMessage(createUpdateFeatureFlagsMessage(In),!1,Rn)}updatePreferences(In,Rn){return this.sendAndReceiveMessage(createUpdatePreferencesMessage(In),!1,Rn)}deleteApi(In,Rn){return this.sendAndReceiveMessage(createDeleteApiMessage(In),!1,Rn)}onReceiveLogEntry(In){return this.registerReceiveMessageHandler(LOG_ENTRY_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}onReceiveUserSessionExpired(In){return this.registerReceiveMessageHandler(USER_SESSION_EXPIRED_MESSAGE_TYPE,()=>In())}onReceiveWorkspaceSynchronizationProgress(In){return this.registerReceiveMessageHandler(WORKSPACE_SYNCHRONIZATION_PROGRESS_MESSAGE_TYPE,({payload:Rn})=>In(Rn))}}const graphQLEngineSchedulerClient=new GraphQLEngineSchedulerClient(()=>new WorkerWrapper$6({name:"graphql-engine"})),graphQLIndexerSchedulerClient=new GraphQLIndexerSchedulerClient(()=>new WorkerWrapper$5({name:"graphql-indexer"})),sessionSchedulerClient=new SessionSchedulerClient(()=>new WorkerWrapper$4({name:"session"}));class ServiceProvider{#e=new Map;#t;#r=null;constructor(In,Rn){this.#t=new Map(In.map(([Mn,Ln,Hn])=>[Mn,{create:Ln,dependencies:Hn}])),this.#r=Rn??null}get parent(){return this.#r}getService(In){let Rn=this,Mn=this.#e.get(In)??null;if(Mn)return Mn;const Ln=this.#t.get(In);if(!Ln){for(;!Mn&&(Rn=Rn.parent);)Mn=Rn.getService(In);return Mn}if(Mn=Ln.create(Rn)??null,Mn&&(this.#e.set(In,Mn),Ln.dependencies))for(const Hn of Ln.dependencies)this.getService(Hn);return Mn}getRequiredService(In){const Rn=this.getService(In);if(!Rn)throw new Error(`Service "${In}" not found!`);return Rn}[Symbol.dispose](){this.#e.forEach(In=>{isDisposable(In)&&In[Symbol.dispose]()}),this.#e.clear()}}function ServiceDependencyProvider({children:on,services:In}){const Rn=useServiceProvider(),Mn=useRefWithInitializer(()=>new ServiceProvider(In,Rn));return reactExports.useEffect(()=>()=>Mn.current[Symbol.dispose](),[Mn]),jsx$1(ServiceProviderContext.Provider,{value:Mn.current,children:on})}const ServiceProviderContext=createNamedContext(null,ServiceProvider.name);function useServiceProvider(){return reactExports.useContext(ServiceProviderContext)}function useRequiredService(on){const In=useServiceProvider();if(!In)throw new Error("Provider undefined!");return In.getRequiredService(on)}var ItemChangeAction=(on=>(on.LOAD="load",on.LOAD_DEPENDENCY="load-dependency",on.UNLOAD="unload",on.UPDATE="update",on.SAVE="save",on))(ItemChangeAction||{});const ALL_LISTENER_NAME$1="all";class ItemStore{#e=new LifecycleCache({lru:!1});#t=new Map;#r;#n=new Map;constructor(){this.#r=[registerReceiveMessage(ACTIVATED_WORKSPACE_MESSAGE,({workspaceId:In})=>{this.#e.forEach(Rn=>{Rn.workspaceId!==In&&this.unloadItem(Rn.id)})}),registerReceiveMessage(DELETED_ITEMS_MESSAGE,({deletedItems:In})=>{In.forEach(({id:Rn})=>this.unloadItem(Rn))}),registerReceiveMessage(RENAMED_ITEM_MESSAGE,({itemId:In,itemKind:Rn})=>this.reload(In,Rn)),registerReceiveMessage(MOVED_ITEMS_MESSAGE,({movedItems:In})=>In.forEach(({id:Rn,kind:Mn})=>this.reload(Rn,Mn))),sessionSchedulerClient.onReceiveWorkspaceSynchronizationProgress(({changes:In})=>In.forEach(async Rn=>{switch(Rn.kind){case"delete":this.unloadItem(Rn.id);break;case"update":await this.reload(Rn.id,Rn.itemKind);break}}))]}async createApi(In,Rn,Mn,Ln){const Hn=await createApiItem(In,Rn,Mn,null,null,Ln);return this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"load",Hn),Hn}async createNewApi(In,Rn,Mn){const Ln=await createNewApiItem(In,Rn,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async createApiDocument(In,Rn,Mn,Ln,Hn){const jn=await createApiDocumentItem(In,Rn,Mn,Ln,null,null,Hn);return await this.setDocument(In,jn,"load"),jn}async createBasicDocument(In,Rn,Mn,Ln,Hn){const jn=await createBasicDocumentItem(In,Rn,Mn,null,null,Ln,Hn);return await this.setDocument(In,jn,"load"),jn}async createNewDocument(In,Rn,Mn,Ln){const Hn=await createNewDocumentItem(In,Rn,Mn,Ln);return await this.setDocument(In,Hn,"load"),Hn}async createEnvironment(In,Rn,Mn){const Ln=await createEnvironmentItem(In,Rn,null,null,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async createNewEnvironment(In,Rn,Mn){const Ln=await createNewEnvironmentItem(In,Rn,Mn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln),Ln}async duplicateApi(In,Rn,Mn){const Ln=await duplicateApiItem(In,Rn,Mn);return Ln&&(this.#e.set(Rn,Ln,{permanent:!0}),this.triggerListeners(Rn,"load",Ln)),Ln}async duplicateDocument(In,Rn,Mn){const Ln=await duplicateDocumentItem(In,Rn,Mn);return Ln&&await this.setDocument(Rn,Ln,"load"),Ln}async duplicateEnvironment(In,Rn,Mn){const Ln=await duplicateEnvironmentItem(In,Rn,Mn);return Ln&&(this.#e.set(Rn,Ln,{permanent:!0}),this.triggerListeners(Rn,"load",Ln)),Ln}get(In){return this.#e.get(In)}async getApi(In){const Rn=this.#e.get(In);return isApiItem(Rn)?(this.#e.isPermanent(In)||(this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,"load",Rn)),Rn):await this.reloadApi(In,!0)}async getNewApi(In){const Rn=this.#e.get(In);if(isNewApiItem(Rn))return this.#e.isPermanent(In)||(this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,"load",Rn)),Rn;const[Mn,Ln]=this.loadItem(In,()=>this.getNewApi(In));if(Mn)return await Ln;const Hn=await Ln;return Hn&&(this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"load",Hn)),Hn}async getDocument(In){const Rn=this.#e.get(In);return isDocumentItem(Rn)?Rn:await this.reloadDocument(In)}async getEnvironment(In){const Rn=this.#e.get(In);return isEnvironmentItem(Rn)?Rn:await this.reloadEnvironment(In)}async saveApi(In,Rn){const Mn=this.#e.get(In);if(isApiItem(Mn))try{const Ln=await saveApiItem(In,Rn);return this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"save",Ln),Ln}catch{return}}async saveNewApi(In,Rn,Mn,Ln,Hn){const jn=this.#e.get(In);if(isNewApiItem(jn))try{const Wn=await saveNewApiItem(In,Rn,Mn,Ln,Hn);return this.#e.set(In,Wn,{permanent:!0}),this.triggerListeners(In,"save",Wn),Wn}catch{return}}async saveDocument(In){const Rn=this.#e.get(In);if(isDocumentItem(Rn))try{const Mn=await saveDocumentItem(In);return await this.setDocument(In,Mn,"save"),Mn}catch{return}}async saveNewDocument(In,Rn,Mn,Ln){const Hn=this.#e.get(In);if(isDocumentItem(Hn))try{const jn=await saveNewDocumentItem(In,Rn,Mn,Ln);return await this.setDocument(In,jn,"save"),jn}catch{return}}async saveEnvironment(In){const Rn=this.#e.get(In);if(isEnvironmentItem(Rn))try{const Mn=await saveEnvironmentItem(In);return this.#e.set(In,Mn,{permanent:!0}),this.triggerListeners(In,"save",Mn),Mn}catch{return}}async saveNewEnvironment(In,Rn,Mn){const Ln=this.#e.get(In);if(isNewEnvironmentItem(Ln))try{const Hn=await saveNewEnvironmentItem(In,Rn,Mn);return this.#e.set(In,Hn,{permanent:!0}),this.triggerListeners(In,"save",Hn),Hn}catch{return}}subscribe(In,Rn){let Mn=this.#n.get(In);return Mn||(Mn=new Set,this.#n.set(In,Mn)),Mn.has(Rn)||Mn.add(Rn),()=>{Mn.delete(Rn),Mn.size===0&&this.#n.delete(In)}}subscribeAll(In){return this.subscribe(ALL_LISTENER_NAME$1,In)}unloadItem(In){const Rn=this.#e.get(In);if(Rn){const Mn=this.#e.isPermanent(In);return this.#e.delete(In),Mn&&this.triggerListeners(In,"unload",Rn),!0}return!1}updateDocumentContentBody(In,Rn){return this.updateDocumentContent(In,Mn=>updateDocumentContentBody(Mn,Rn))}updateDocumentContentVariables(In,Rn){return this.updateDocumentContent(In,Mn=>updateDocumentContentVariables(Mn,Rn))}[Symbol.dispose](){this.#e[Symbol.dispose](),this.#r.forEach(In=>In())}loadItem(In,Rn){if(this.#t.has(In))return[!0,this.#t.get(In)];const Mn=Rn().then(Ln=>(this.#t.delete(In),Ln));return this.#t.set(In,Mn),[!1,Mn]}async reload(In,Rn){switch(Rn){case"api":await this.reloadApi(In,!1);break;case"api-document":case"document":await this.reloadDocument(In);break;case"environment":await this.reloadEnvironment(In);break}}async reloadApi(In,Rn){const[Mn,Ln]=this.loadItem(In,()=>getApiItem(In));if(Mn)return await Ln;const Hn=await Ln;if(Hn){const jn=Rn||this.#e.isPermanent(In);this.#e.set(In,Hn,{permanent:jn}),jn?this.triggerListeners(In,"load",Hn):this.triggerListeners(In,"load-dependency",Hn)}return Hn}async reloadDocument(In){const[Rn,Mn]=this.loadItem(In,()=>getDocumentItemAndContent(In));if(Rn)return await Mn;const Ln=await Mn;return Ln&&await this.setDocument(In,Ln,"load"),Ln}async reloadEnvironment(In){const[Rn,Mn]=this.loadItem(In,()=>getEnvironmentItemAndVariables(In));if(Rn)return await Mn;const Ln=await Mn;return Ln&&(this.#e.set(In,Ln,{permanent:!0}),this.triggerListeners(In,"load",Ln)),Ln}async setDocument(In,Rn,Mn){if(isApiDocumentItem(Rn)){if(this.#e.set(In,Rn,{permanent:!0,references:[Rn.apiId]}),this.#e.has(Rn.apiId)){this.triggerListeners(In,Mn,Rn);return}const[Ln,Hn]=this.loadItem(Rn.apiId,()=>getApiItem(Rn.apiId));if(Ln){await Hn,this.triggerListeners(In,Mn,Rn);return}const jn=await Hn;jn&&(this.#e.set(jn.id,jn,{permanent:!1}),this.triggerListeners(jn.id,"load-dependency",jn)),this.triggerListeners(In,Mn,Rn)}else this.#e.set(In,Rn,{permanent:!0}),this.triggerListeners(In,Mn,Rn)}async updateDocumentContent(In,Rn){const Mn=this.#e.get(In);if(!isDocumentItem(Mn))return;const Ln=await Rn(In);return Ln&&(this.#e.update(In,Ln),this.triggerListeners(In,"update",Ln)),Ln}triggerListeners(In,Rn,Mn){requestAnimationFrame(()=>{const Ln=this.#n.get(ALL_LISTENER_NAME$1);Ln&&Ln.forEach(jn=>jn(Rn,Mn));const Hn=this.#n.get(In);Hn&&Hn.forEach(jn=>jn(Rn,Mn))})}}function useItemStore(){return useRequiredService(ItemStore.name)}function applyObjectChanges(on,In){let Rn=null;for(const Mn of Object.keys(on)){const Ln=In[Mn],Hn=on[Mn];let jn;typeof Ln=="object"&&Ln!==null&&typeof Hn=="object"&&Hn!==null&&!Array.isArray(Ln)&&!Array.isArray(Hn)?jn=applyObjectChanges(Hn,Ln):jn=Hn,Object.is(jn,Ln)||(Rn??={...In},Rn[Mn]=jn)}return Rn??In}const ALL_LISTENER_NAME="all";class TabViewStateStore{#e=new SimpleCache({lru:!1});#t;#r=new Map;constructor(){this.#t=[registerReceiveMessage(DELETED_ITEMS_MESSAGE,({deletedItems:In})=>In.forEach(({id:Rn})=>this.delete(Rn))),registerReceiveMessage(DOCUMENT_ANALYZED_MESSAGE,({documentId:In,operations:Rn})=>{const Mn=this.#e.get(In);if(!(!Mn||!Mn.graphqlDocument)){if(Rn.length===0){this.update(In,{graphqlDocument:{activeOperation:void 0}});return}(Mn.graphqlDocument.activeOperation===void 0||Mn.graphqlDocument.activeOperation>=Rn.length)&&this.update(In,{graphqlDocument:{activeOperation:0}})}}),sessionSchedulerClient.onReceiveWorkspaceSynchronizationProgress(({changes:In})=>In.forEach(async Rn=>{switch(Rn.kind){case"delete":await this.delete(Rn.id);break}}))]}create(In){this.#e.set(In.id,In),this.triggerListeners(In.id,"create",In),setTabViewState(In)}createApi(In,Rn,Mn){this.create({id:In,workspaceId:Rn,api:{...Mn?.api,activeViewId:Mn?.api?.activeViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeViewId,activeSchemaChangelogViewId:Mn?.api?.activeSchemaChangelogViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeSchemaChangelogViewId,activeMonitoringViewId:Mn?.api?.activeMonitoringViewId??DEFAULT_TAB_VIEW_STATE_VALUES.api.activeMonitoringViewId,metricsDateTimeRange:Mn?.api?.metricsDateTimeRange??DEFAULT_TAB_VIEW_STATE_VALUES.api.metricsDateTimeRange},detailInfo:Mn?.detailInfo?{...Mn?.detailInfo}:void 0,schema:{...Mn?.schema,activeSchemaViewId:Mn?.schema?.activeSchemaViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaViewId,activeSchemaReferenceViewId:Mn?.schema?.activeSchemaReferenceViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaReferenceViewId,hideDeprecatedItemsInSchemaReference:Mn?.schema?.hideDeprecatedItemsInSchemaReference??DEFAULT_TAB_VIEW_STATE_VALUES.schema.hideDeprecatedItemsInSchemaReference}})}createGraphqlDocument(In,Rn,Mn){this.create({id:In,workspaceId:Rn,api:{...Mn?.api,metricsDateTimeRange:Mn?.api?.metricsDateTimeRange??DEFAULT_TAB_VIEW_STATE_VALUES.api.metricsDateTimeRange},graphqlDocument:{...Mn?.graphqlDocument,activeViewId:Mn?.graphqlDocument?.activeViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeViewId,activeOperationCompanionViewId:Mn?.graphqlDocument?.activeOperationCompanionViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeOperationCompanionViewId,activeOperationsSettingsViewId:Mn?.graphqlDocument?.activeOperationsSettingsViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeOperationsSettingsViewId,activeResponseViewId:Mn?.graphqlDocument?.activeResponseViewId??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.activeResponseViewId,isOperationCompanionCollapsed:Mn?.graphqlDocument?.isOperationCompanionCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isOperationCompanionCollapsed,isOperationsSettingsPaneCollapsed:Mn?.graphqlDocument?.isOperationsSettingsPaneCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isOperationsSettingsPaneCollapsed,isResponseEntriesPaneCollapsed:Mn?.graphqlDocument?.isResponseEntriesPaneCollapsed??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.isResponseEntriesPaneCollapsed,operationsSettingsPaneHeight:Mn?.graphqlDocument?.operationsSettingsPaneHeight??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.operationsSettingsPaneHeight,responseEntriesPaneHeight:Mn?.graphqlDocument?.responseEntriesPaneHeight??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.responseEntriesPaneHeight,focusedElement:Mn?.graphqlDocument?.focusedElement??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.focusedElement,showIntrospectionFieldsInOperationBuilder:Mn?.graphqlDocument?.showIntrospectionFieldsInOperationBuilder??DEFAULT_TAB_VIEW_STATE_VALUES.graphqlDocument.showIntrospectionFieldsInOperationBuilder},detailInfo:Mn?.detailInfo?{...Mn?.detailInfo}:void 0,schema:{...Mn?.schema,activeSchemaViewId:Mn?.schema?.activeSchemaViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaViewId,activeSchemaReferenceViewId:Mn?.schema?.activeSchemaReferenceViewId??DEFAULT_TAB_VIEW_STATE_VALUES.schema.activeSchemaReferenceViewId,hideDeprecatedItemsInSchemaReference:Mn?.schema?.hideDeprecatedItemsInSchemaReference??DEFAULT_TAB_VIEW_STATE_VALUES.schema.hideDeprecatedItemsInSchemaReference}})}async delete(In){const Rn=this.#e.get(In);return Rn?(await deleteTabViewState(In),this.#e.delete(In),this.triggerListeners(In,"delete",Rn),!0):!1}get(In){return this.#e.get(In)}async load(In){this.#e.forEach(Mn=>{this.#e.delete(Mn.id),this.triggerListeners(Mn.id,"unload",Mn)});const Rn=await loadAllTabViewState(In);if(Rn)for(const Mn of Rn)this.#e.set(Mn.id,Mn),this.triggerListeners(Mn.id,"load",Mn)}subscribe(In,Rn){let Mn=this.#r.get(In);return Mn||(Mn=new Set,this.#r.set(In,Mn)),Mn.has(Rn)||Mn.add(Rn),()=>{Mn.delete(Rn),Mn.size===0&&this.#r.delete(In)}}subscribeAll(In){return this.subscribe(ALL_LISTENER_NAME,In)}update(In,Rn){const Mn=this.#e.get(In);if(!Mn)return;typeof Rn=="function"&&(Rn=Rn(Mn));const Ln=applyObjectChanges(Rn,Mn);Ln!==Mn&&(this.#e.set(In,Ln),this.triggerListeners(In,"update",Ln),setTabViewState(Ln))}[Symbol.dispose](){this.#e[Symbol.dispose](),this.#t.forEach(In=>In())}triggerListeners(In,Rn,Mn){const Ln=this.#r.get(ALL_LISTENER_NAME);Ln&&Ln.forEach(jn=>jn(Rn,Mn));const Hn=this.#r.get(In);Hn&&Hn.forEach(jn=>jn(Rn,Mn))}}function useTabViewStateStore(){return useRequiredService(TabViewStateStore.name)}class SchemaErrorCache extends SimpleCache{constructor(){super({lru:!0})}[Symbol.dispose](){super[Symbol.dispose]()}}function useSchemaErrorCache(){return useRequiredService(SchemaErrorCache.name)}const INITIAL_STATE$5={activeId:null,activeChildId:null,entries:[],followNewest:!0,stats:{all:0,errors:0,infos:0,warnings:0}};function LogProvider({children:on}){const In=useSubject(INITIAL_STATE$5);return useOnWorkspaceSwitchResetState(In.current),jsx$1(ActivateLogEntryProvider,{state$:In.current,children:jsx$1(AppendLogEntryProvider,{state$:In.current,children:jsx$1(AppendSchedulerLogEntryProvider,{state$:In.current,children:jsx$1(ClearLogProvider,{state$:In.current,children:jsx$1(CollapseLogScopeProvider,{state$:In.current,children:jsx$1(DeactivateLogEntryProvider,{state$:In.current,children:jsx$1(ExpandLogScopeProvider,{state$:In.current,children:jsx$1(UpdateFollowNewestProvider,{state$:In.current,children:jsx$1(LogStateContext.Provider,{value:In.current,children:on})})})})})})})})})}function useOnReceiveLogEntry$1(on){reactExports.useEffect(()=>graphQLEngineSchedulerClient.onReceiveLogEntry(on),[on])}function useOnWorkspaceSwitchResetState(on){reactExports.useEffect(()=>registerReceiveMessage(ACTIVATED_WORKSPACE_MESSAGE,()=>{on.next(INITIAL_STATE$5)}),[on])}const ActivateLogEntryContext=createNamedContext(noop$2,"ActivateLogEntry");function useActivateLogEntry(){return reactExports.useContext(ActivateLogEntryContext)}function ActivateLogEntryProvider({children:on,state$:In}){const Rn=reactExports.useCallback((Mn,Ln,Hn)=>{const jn=In.value();(jn.activeId!==Mn||jn.activeChildId!==Ln)&&jn.entries.some(({id:Wn})=>Wn===Mn)&&(In.next({...jn,entries:jn.entries.map(Wn=>Wn.id===Mn&&Wn.kind==="scope"?{...Wn,expanded:!0}:Wn),activeId:Mn,activeChildId:Ln??null,followNewest:Hn===void 0?jn.followNewest:Hn}),Mn&&sendMessage({kind:LOG_ENTRY_ACTIVATED_MESSAGE,logEntryId:Mn}))},[In]);return jsx$1(ActivateLogEntryContext.Provider,{value:Rn,children:on})}const AppendLogEntryContext=createNamedContext(async()=>"","AppendLogEntry");function useAppendLogEntry(){return reactExports.useContext(AppendLogEntryContext)}function AppendLogEntryProvider({children:on,state$:In}){const Rn=reactExports.useCallback(async(Mn,Ln,Hn,jn)=>{const Wn=await getItemDetails(Mn),Yn=createId();return appendLogEntry(In,{id:Yn,item:Wn,kind:"basic",level:Ln,message:Hn,timestamp:now(),details:jn}),Yn},[In]);return jsx$1(AppendLogEntryContext.Provider,{value:Rn,children:on})}const AppendSchedulerLogEntryContext=createNamedContext(noop$2,"AppendSchedulerLogEntry");function useAppendSchedulerLogEntry(){return reactExports.useContext(AppendSchedulerLogEntryContext)}function AppendSchedulerLogEntryProvider({children:on,state$:In}){const Rn=useSchemaErrorCache(),Mn=reactExports.useCallback(async Ln=>{const{kind:Hn}=Ln,jn=await getItemDetails(Ln.itemId);switch(Hn){case BASIC_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId??createId(),item:jn,kind:"basic",level:Ln.level,timestamp:now(),message:Ln.message,details:Ln.details});break;case HTTP_REQUEST_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId,scopeId:Ln.scopeId,item:jn,kind:"http-request",name:Ln.name,level:Ln.level,status:"pending",started:Ln.started,request:{uri:Ln.requestUri,method:Ln.method,headers:Ln.headers,body:Ln.body,cache:Ln.cache,credentials:Ln.credentials,referrerPolicy:Ln.referrerPolicy}});break;case HTTP_RESPONSE_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,response:{body:"",headers:Ln.headers,chunks:0,contentLength:0,statusCode:Ln.statusCode,statusText:Ln.statusText}}));break;case HTTP_RESPONSE_BODY_CHUNK_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,response:{...vi.response,body:vi.response.body+Ln.chunk,chunks:Ln.chunkIndex+1}}));break;case HTTP_RESPONSE_CANCELLED_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,level:LogLevel.warning,status:"cancelled",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength,error:Ln.error}}));break;case HTTP_RESPONSE_FAILED_LOG_ENTRY_KIND:{if(updateLogEntry(In,Ln.requestId,vi=>({...vi,level:LogLevel.error,status:"failed",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength,error:Ln.error}})),Ln.requestKind===RequestKind.GRAPHQL_INTROSPECTION||Ln.requestKind===RequestKind.GRAPHQL_SDL_FETCH){const vi=Rn.get(Ln.itemId);if(Ln.scopeId!==vi?.scopeId||!Ln.scopeId&&!vi?.scopeId){const gi=In.value().entries.find(({id:mi})=>mi===Ln.requestId);gi?.kind==="http-request"&&Rn.set(Ln.itemId,gi)}}break}case HTTP_RESPONSE_FINISHED_LOG_ENTRY_KIND:{if(updateLogEntry(In,Ln.requestId,vi=>({...vi,status:"succeeded",stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),response:{...vi.response,contentLength:Ln.contentLength}})),Ln.requestKind===RequestKind.GRAPHQL_INTROSPECTION||Ln.requestKind===RequestKind.GRAPHQL_SDL_FETCH||Ln.requestKind===RequestKind.GRAPHQL_SDL_PROBE){const vi=Rn.get(Ln.itemId);vi&&(vi.scopeId!==Ln.scopeId||!vi.scopeId&&!Ln.scopeId)&&Rn.delete(Ln.itemId)}break}case SCOPE_BEGIN_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.scopeId,item:jn,kind:"scope",name:Ln.name,level:Ln.level,started:Ln.started,details:Ln.details?{...Ln.details,status:"pending"}:{status:"pending"}});break;case SCOPE_END_LOG_ENTRY_KIND:const Wn=In.value().entries.filter(vi=>vi.kind==="http-request"&&vi.scopeId===Ln.scopeId),Yn=Wn.length?Wn[Wn.length-1]:null,hi=Wn.length?Wn.find(vi=>vi.status==="cancelled"||vi.status==="failed")??Yn:null;updateLogEntry(In,Ln.scopeId,vi=>({...vi,stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped),level:hi?.level??vi.level,details:{...vi.details,cache:Yn?.request.cache,contentLength:Wn.reduce((gi,mi)=>gi+(mi.response?.contentLength??0),0),credentials:Yn?.request.credentials,method:Yn?.request.method,referrerPolicy:Yn?.request.referrerPolicy,requestHeaders:Yn?.request.headers,responseHeaders:Yn?.response?.headers,status:hi?.status??"succeeded",statusCode:hi?.response?.statusCode,statusText:hi?.response?.statusText}}));break;case SUBSCRIPTION_REQUEST_STARTED_LOG_ENTRY_KIND:appendLogEntry(In,{id:Ln.requestId,item:jn,kind:"subscription-request",level:Ln.level,status:"pending",started:Ln.started,uri:Ln.requestUri,protocol:Ln.protocol,connectionParams:Ln.connectionParams,contentLength:0,messages:0,data:""});break;case SUBSCRIPTION_REQUEST_PROTOCOL_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,protocol:Ln.protocol}));break;case SUBSCRIPTION_REQUEST_MESSAGE_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>{const gi=vi.data+Ln.data+`
4730
4730
  `;return{...vi,messages:vi.messages+1,contentLength:gi.length,data:gi}});break;case SUBSCRIPTION_REQUEST_STOPPED_LOG_ENTRY_KIND:updateLogEntry(In,Ln.requestId,vi=>({...vi,level:Ln.reason==="failed"?LogLevel.error:LogLevel.info,status:Ln.reason,error:Ln.error,stopped:Ln.stopped,duration:diff$1(vi.started,Ln.stopped)}));break}},[Rn,In]);return useOnReceiveLogEntry$1(Mn),jsx$1(AppendSchedulerLogEntryContext.Provider,{value:Mn,children:on})}const ClearLogContext=createNamedContext(noop$2,"ClearLog");function useClearLog(){return reactExports.useContext(ClearLogContext)}function ClearLogProvider({children:on,state$:In}){const Rn=reactExports.useCallback(()=>{In.next(INITIAL_STATE$5)},[In]);return jsx$1(ClearLogContext.Provider,{value:Rn,children:on})}const CollapseLogScopeContext=createNamedContext(noop$2,"CollapseLogScope");function useCollapseLogScope(){return reactExports.useContext(CollapseLogScopeContext)}function CollapseLogScopeProvider({children:on,state$:In}){const Rn=reactExports.useCallback(Mn=>{In.value().entries.some(Ln=>Ln.id===Mn&&Ln.kind==="scope"&&Ln.expanded)&&In.next(Ln=>({...Ln,activeChildId:Ln.activeId===Mn?null:Ln.activeChildId,followNewest:!1,entries:Ln.entries.map(Hn=>Hn.id===Mn?{...Hn,expanded:!1}:Hn)}))},[In]);return jsx$1(CollapseLogScopeContext.Provider,{value:Rn,children:on})}const DeactivateLogEntryContext=createNamedContext(noop$2,"DeactivateLogEntry");function useDeactivateLogEntry(){return reactExports.useContext(DeactivateLogEntryContext)}function DeactivateLogEntryProvider({children:on,state$:In}){const Rn=reactExports.useCallback(()=>{In.next(Mn=>({...Mn,activeId:null}))},[In]);return jsx$1(DeactivateLogEntryContext.Provider,{value:Rn,children:on})}const ExpandLogScopeContext=createNamedContext(noop$2,"ExpandLogScope");function useExpandLogScope(){return reactExports.useContext(ExpandLogScopeContext)}function ExpandLogScopeProvider({children:on,state$:In}){const Rn=reactExports.useCallback(Mn=>{In.value().entries.some(Ln=>Ln.id===Mn&&Ln.kind==="scope"&&!Ln.expanded)&&In.next(Ln=>({...Ln,followNewest:!1,entries:Ln.entries.map(Hn=>Hn.id===Mn?{...Hn,expanded:!0}:Hn)}))},[In]);return jsx$1(ExpandLogScopeContext.Provider,{value:Rn,children:on})}const UpdateFollowNewestContext=createNamedContext(noop$2,"UpdateFollowNewest");function useUpdateFollowNewest(){return reactExports.useContext(UpdateFollowNewestContext)}function UpdateFollowNewestProvider({children:on,state$:In}){const Rn=reactExports.useCallback(Mn=>{const Ln=In.value();Ln.followNewest!==Mn&&In.next({...Ln,followNewest:Mn})},[In]);return jsx$1(UpdateFollowNewestContext.Provider,{value:Rn,children:on})}const LogStateContext=createNamedContext(null,"LogState");function LogSelector(on){const In={activeId:on.activeId,activeChildId:on.activeChildId,entries:on.entries.filter(Rn=>!(Rn.kind==="http-request"&&Rn.scopeId)).reduce((Rn,Mn)=>{const{id:Ln,kind:Hn,item:jn,level:Wn}=Mn;switch(Hn){case"basic":Rn.push({id:Ln,kind:Hn,item:jn,level:Wn,message:Mn.message,timestamp:Mn.timestamp});break;case"http-request":Rn.push(mapToHttpRequestLogListEntry(Mn));break;case"scope":Rn.push({id:Ln,kind:Hn,item:jn,level:Wn,name:Mn.name,started:Mn.started,duration:Mn.duration,details:Mn.details,expanded:!!Mn.expanded});const Yn=on.entries.filter(vi=>vi.kind==="http-request"&&vi.scopeId===Ln),hi=Yn[Yn.length-1];if(Yn.length&&Mn.expanded)for(const vi of Yn)Rn.push(mapToHttpRequestLogListEntry(vi,vi===hi));break;case"subscription-request":Rn.push({id:Ln,kind:Hn,item:jn,level:Wn,uri:Mn.uri,contentLength:Mn.stopped?Mn.contentLength:0,started:Mn.started,status:Mn.status,duration:Mn.duration,protocol:Mn.protocol});break;default:throw new Error("Unknown kind")}return Rn},[]),followNewest:on.followNewest,hash:""};return{...In,hash:createHash(JSON.stringify(In))}}function mapToHttpRequestLogListEntry(on,In){return{id:on.id,kind:on.kind,scopeId:on.scopeId,item:on.item,level:on.level,uri:on.request.uri,method:on.request.method,name:on.name,contentLength:on.stopped?on.response?.contentLength??0:0,started:on.started,status:on.status,statusCode:on.response?.statusCode,duration:on.duration,lastChild:In}}function useLog(){return useSelector(LogStateContext,LogSelector,(on,In)=>on.hash===In.hash)}function ActiveLogEntrySelector(on){const In=on.activeChildId||on.activeId;if(In)return on.entries.find(({id:Rn})=>Rn===In)}function useActiveLogEntry(){return useSelector(LogStateContext,ActiveLogEntrySelector)}function ActiveLogEntryIdSelector(on){return on.activeId}function useActiveLogEntryId(){return useSelector(LogStateContext,ActiveLogEntryIdSelector)}function HasLogEntrySelector(on){return In=>!!In?.entries.some(({id:Rn})=>Rn===on)}function useHasLogEntry(on){return useSelector(LogStateContext,HasLogEntrySelector(on))}function HasLogEntriesSelector(on){return!!on?.entries.length}function useHasLogEntries(){return useSelector(LogStateContext,HasLogEntriesSelector)}function LogStatsSelector(on){return on.stats}function useLogStats(){return useSelector(LogStateContext,LogStatsSelector)}async function appendLogEntry(on,In){on.next(Rn=>({...Rn,entries:[...Rn.entries,In],stats:{all:Rn.stats.all+1,errors:In.level===LogLevel.error?Rn.stats.errors+1:Rn.stats.errors,infos:In.level===LogLevel.info?Rn.stats.infos+1:Rn.stats.infos,warnings:In.level===LogLevel.warning?Rn.stats.warnings+1:Rn.stats.warnings}}))}function updateLogEntry(on,In,Rn){on.next(Mn=>{const Ln=Mn.entries.map(Hn=>Hn.id===In?Rn(Hn):Hn);return{...Mn,entries:Ln,stats:{...Mn.stats,errors:Ln.filter(({level:Hn})=>Hn===LogLevel.error).length,infos:Ln.filter(({level:Hn})=>Hn===LogLevel.info).length,warnings:Ln.filter(({level:Hn})=>Hn===LogLevel.warning).length}}})}async function getItemDetails(on){if(!on)return null;const In=await getItemNameAndKind(on);if(In){const[Rn,Mn]=In;return{id:on,name:Rn,kind:Mn}}return{id:on,name:"N/A"}}function NetworkProvider({children:on}){const In=reactExports.useRef(null),Rn=useSubject(window.navigator.onLine);return reactExports.useEffect(()=>{async function Mn(){try{const hi=await fetch("https://api.chillicream.com/status",{method:"GET",cache:"no-store",signal:AbortSignal.timeout(5e3)});Rn.current.next(hi.ok)}catch{Rn.current.next(!1)}}function Ln(){In.current&&window.clearInterval(In.current),Mn(),In.current=window.setInterval(Mn,THIRTY_SECONDS)}function Hn(){In.current&&(window.clearInterval(In.current),In.current=null)}window.navigator.onLine?document.visibilityState==="visible"&&Ln():Rn.current.next(!1);function jn(){document.visibilityState==="visible"&&Ln()}function Wn(){Rn.current.next(!1),Hn()}function Yn(){document.visibilityState==="visible"?window.navigator.onLine&&Ln():Hn()}return window.addEventListener("offline",Wn),window.addEventListener("online",jn),document.addEventListener("visibilitychange",Yn),()=>{window.removeEventListener("offline",Wn),window.removeEventListener("online",jn),document.removeEventListener("visibilitychange",Yn),Hn()}},[Rn]),jsx$1(IsOnlineContext.Provider,{value:Rn.current,children:on})}const IsOnlineContext=createNamedContext(null,"IsOnline");function IsOnlineSelector(on){return on}function useIsOnline(){return useSelector(IsOnlineContext,IsOnlineSelector)}function useIsOnlineObservable(){return useObservable(IsOnlineContext)}const DEFAULT_PRESET={useBrowserUrlAsEndpoint:!1},LOAD_PRESET=!(IS_RUNNING_IN_CLOUD||IS_RUNNING_IN_ELECTRON);function PresetProvider({children:on}){const In=useInitialize$7();return In?jsx$1(PresetContext.Provider,{value:In,children:on}):null}function useInitialize$7(){const on=useForceUpdate(),In=reactExports.useRef(null);return LOAD_PRESET||(In.current=DEFAULT_PRESET),reactExports.useEffect(()=>{In.current||getPreset().then(Rn=>{In.current=Rn,on()})},[on]),In.current}async function getPreset(){const on=await fetchPreset("nitro-config.json");return on||(await fetchPreset("bcp-config.json")??DEFAULT_PRESET)}async function fetchPreset(on){const{origin:In}=window.location,Rn=extractAppUrlPath(window.location);try{return await(await fetch(resolveUrl$1(`${In}${Rn}`,on))).json()}catch{return null}}const PresetContext=createNamedContext(DEFAULT_PRESET,"Preset");function usePreset(){return reactExports.useContext(PresetContext)}function useIsBoundToOrganization(){return!!usePreset().organization}const INITIAL_STATE$4={signInState:"init",synchronizing:!1,sessions:[]};function SessionProvider({children:on}){const In=useInitialize$6();return useOnReceiveLogEntry(),In?jsx$1(HandleSignInCallbackProvider,{state$:In,children:jsx$1(UpsertSessionProvider,{state$:In,children:jsx$1(ActivateSessionProvider,{state$:In,children:jsx$1(SignInProvider,{state$:In,children:jsx$1(SignOutProvider,{state$:In,children:jsx$1(SignOutAllProvider,{state$:In,children:jsx$1(CreateUserAccountProvider,{children:jsx$1(SignOutOfCurrentSessionProvider,{state$:In,children:jsx$1(SignInActiveSessionProvider,{state$:In,children:jsx$1(SessionStateContext.Provider,{value:In,children:on})})})})})})})})})}):null}function useInitialize$6(){const on=reactExports.useRef(null),In=useForceUpdate();return reactExports.useEffect(()=>{if(!on.current){let Rn=function(Mn){on.current=createSubject(refreshSignInState(Mn)),In()};createLoadAppSessionAction().then(Rn,()=>Rn(INITIAL_STATE$4))}},[In]),useExpiredSessionNotification(on.current),useRefreshToken(on.current),useActivatedWorkspace(on.current),on.current}async function createLoadAppSessionAction(on){const In=await getAppSession(on);return In?{synchronizing:!1,signInState:"sign-in",sessions:In.userSessions,activeSession:In.activeSession}:INITIAL_STATE$4}function useOnReceiveLogEntry(){const on=useAppendSchedulerLogEntry();reactExports.useEffect(()=>sessionSchedulerClient.onReceiveLogEntry(on),[on])}function useExpiredSessionNotification(on){const In=reactExports.useRef(()=>{});reactExports.useEffect(()=>{if(on){let Rn=function(Hn){if(Hn.activeSession===Ln)return;Mn?.abort();const jn=new AbortController;Mn=jn,Ln=Hn.activeSession,In.current=()=>{isSigninRedirect(window.location)||triggerUserSessionExpiredNotification(jn.signal)}},Mn,Ln;return Rn(on.value()),on.subscribe(Rn)}},[on]),reactExports.useEffect(()=>sessionSchedulerClient.onReceiveUserSessionExpired(In.current),[]),reactExports.useEffect(()=>{function Rn(Mn){Mn.activeSession?.requiresSignIn&&In.current()}if(on)return Rn(on.value()),on.subscribe(Rn)},[on])}function useRefreshToken(on){const In=useCombine(on??createSubject(INITIAL_STATE$4),useIsOnlineObservable()),Rn=useUpsertSessionAction(on);reactExports.useEffect(()=>{let Mn;function Ln([Hn,jn]){if(jn&&Hn.activeSession&&!Hn.activeSession.requiresSignIn){Mn=new AbortController;const Wn=async()=>{if(!Hn.activeSession)return;const vi=await sessionSchedulerClient.refreshToken(Hn.activeSession,Mn?.signal);await Rn(vi)},Yn=msUntilSessionExpired(Hn.activeSession),hi=window.setTimeout(Wn,Yn>0?Yn:0);Mn.signal.addEventListener("abort",()=>window.clearTimeout(hi))}else Mn&&(Mn.abort(),Mn=void 0)}return Ln(In.value()),In.subscribe(Ln)},[In,Rn])}function useActivatedWorkspace(on){reactExports.useEffect(()=>registerReceiveMessage(ACTIVATED_WORKSPACE_MESSAGE,async({session:In,workspaceId:Rn})=>{if(!on)return;const Mn=on.value(),{activeSession:Ln}=Mn;if(Ln?.id===In.id&&Ln.activeWorkspaceId!==Rn){const Hn={...Ln,activeWorkspaceId:Rn||void 0};await replaceUserSession(Hn),on.next(jn=>({...jn,activeSession:Hn}))}}),[on])}function HandleSignInCallbackProvider({children:on,state$:In}){const Rn=useHandleSignInCallback(In);return IS_RUNNING_IN_ELECTRON?jsx$1(HandleElectronSignInCallbackProvider,{state$:In,handleSignInCallback:Rn,children:on}):jsx$1(HandleWebSignInCallbackProvider,{handleSignInCallback:Rn,children:on})}function HandleElectronSignInCallbackProvider({children:on,state$:In,handleSignInCallback:Rn}){return useElectronSignInListener(In,Rn),jsx$1(Fragment,{children:on})}function HandleWebSignInCallbackProvider({children:on,handleSignInCallback:In}){return reactExports.useEffect(()=>{!IS_RUNNING_IN_ELECTRON&&isSigninRedirect(window.location)&&In(window.location.href)},[In]),jsx$1(Fragment,{children:on})}function useHandleSignInCallback(on){const In=useSignOut(),Rn=useUpsertSessionAction(on),Mn=useActivateSessionAction(on);return reactExports.useCallback(async(Ln,Hn)=>{const jn=new AbortController,Wn=Hn?linkAbortSignals(jn.signal,Hn):jn.signal;let Yn,hi=!1;try{Wn.addEventListener("abort",()=>{hi||triggerSignInCancelledNotification()}),on.next(Mi=>({...Mi,signInState:"sign-in"})),triggerSignInNotification(jn);const vi=parseCodeFromUrl(Ln),gi=parseIssuerFromUrl(Ln),{codeVerifier:mi,redirectUrl:yi}=await getAndValidateAuthenticationState(),{refreshToken:bi,idToken:Ei,accessToken:_i,expiresAt:xi}=await getAndValidateToken(gi,vi,yi,mi,Wn),{tenant:Ci,sub:Ai,email:Ii,login:Ni,apiUrl:Pi}=parseAccessToken(_i),Vi=await getUserSession({sub:Ai,tenant:Ci,issuer:gi});Yn=Vi?{id:Vi.id,issuer:gi,tenant:Ci,sub:Ai,accessToken:_i,refreshToken:bi,idToken:Ei,expiresAt:xi*ONE_SECOND$1,email:Ii,login:Ni,requiresSignIn:!1,hasUserAccount:!0,organization:Vi?Vi.organization:{displayName:"",id:""},activeWorkspaceId:Vi.activeWorkspaceId,billingUrl:Vi.billingUrl,manageTenantUrl:Vi.manageTenantUrl,apiUrl:Pi}:{id:nanoid(),issuer:gi,tenant:Ci,sub:Ai,accessToken:_i,refreshToken:bi,idToken:Ei,expiresAt:xi*ONE_SECOND$1,email:Ii,login:Ni,requiresSignIn:!1,hasUserAccount:!1,organization:{displayName:"",id:""},billingUrl:null,manageTenantUrl:null,apiUrl:Pi},await setCurrentTenant({tenant:Ci,sub:Ai,login:Ni,issuer:gi,apiUrl:Pi}),await Rn(Yn),triggerLoadAccountNotification();const Ui=await fetchUserAccount(Wn);if(Wn.aborted)return;const Gi=await fetchOrganizationInfo(Wn);if(Wn.aborted)return;const Yi=Ui!=="user-not-found",zi={...Yn,hasUserAccount:Yi,organization:Gi,billingUrl:Yi?Ui.billingUrl:null,manageTenantUrl:Yi?Ui.manageTenantUrl:null};await Rn(zi),await Mn(zi),hi=!0,triggerSingInCompleteNotification(),sendMessage({kind:SIGNED_IN_MESSAGE})}catch{Yn&&await In(Yn),triggerSignInFailedNotification()}finally{clearSignInPathFromUrl(),on.next(vi=>refreshSignInState({...vi,electron:void 0})),await deleteAuthenticationState()}},[on,Mn,In,Rn])}function clearSignInPathFromUrl(){const on=new URL(window.location.href);on.pathname=on.pathname.replace(APP_SIGNIN_PATH,""),window.history.pushState("","",`${on.origin}${on.pathname}`)}function useElectronSignInListener(on,In){reactExports.useEffect(()=>{if(IS_RUNNING_IN_ELECTRON){let Rn=function(Yn){const hi=window.messageChannel;if(!hi){triggerSignInFailedNotification();return}Hn=new AbortController,triggerSignInNotification(Hn),Hn.signal.addEventListener("abort",jn);function vi(mi){In(mi,Hn?.signal).then(()=>Hn=void 0).finally(jn)}const gi=hi.onRedirectUrlReceiver(vi);hi.triggerSignIn(Yn),jn=()=>{Hn?.abort(),gi()}},Mn=function(Yn){Ln.electron!==Yn.electron&&(Ln=Yn,Yn.electron&&Rn(Yn.electron.signInUrl))},Ln=on.value(),Hn,jn;const Wn=on.subscribe(Mn);return()=>{Wn(),jn()}}},[on,In])}function useIsUserSignedIn(){const on=useSignInState();return on==="signed-in"||on==="session-expired"}function UserNameSelector(on){return on.activeSession?.email??""}function useUserName(){return useSelector(SessionStateContext,UserNameSelector)}const ActivateSessionContext=createNamedContext(asyncNoop,"ActivateSession");function useActivateSessionAction(on){return reactExports.useCallback(async In=>{if(await setCurrentTenant(In?{tenant:In.tenant,sub:In.sub,login:In.login,issuer:In.issuer,apiUrl:In.apiUrl}:void 0),In){const Rn="accessToken"in In?In:await getUserSession(In);on.next(Mn=>refreshSignInState({...Mn,activeSession:Rn}))}else on.next(Rn=>refreshSignInState({...Rn,activeSession:void 0}))},[on])}function ActivateSessionProvider({children:on,state$:In}){const Rn=useActivateSessionAction(In);return jsx$1(ActivateSessionContext.Provider,{value:Rn,children:on})}function useActivateSession(){return reactExports.useContext(ActivateSessionContext)}const SignOutContext=createNamedContext(asyncNoop,"SignOut");function SignOutProvider({children:on,state$:In}){const Rn=useActivateSession(),Mn=reactExports.useCallback(async Ln=>{await signOutFromIssuers([Ln],In.value().activeSession===Ln);const Hn=await getUserSessions();Hn.length?(In.next(jn=>({...jn,sessions:Hn})),await Rn(Hn[0])):In.next({sessions:Hn,signInState:"signed-out",synchronizing:!1})},[In,Rn]);return jsx$1(SignOutContext.Provider,{value:Mn,children:on})}function useSignOut(){const on=reactExports.useContext(SignOutContext);return In=>triggerSignOutNotification(on(In))}const UpsertSessionContext=createNamedContext(asyncNoop,"UpsertSession");function useUpsertSession(){return reactExports.useContext(UpsertSessionContext)}function useUpsertSessionAction(on){return reactExports.useCallback(async In=>{if(on){await replaceUserSession(In);const Rn=await getUserSessions();on.next(Mn=>({...Mn,activeSession:areTenantsEqual(Mn.activeSession,In)?In:Mn.activeSession,sessions:Rn}))}},[on])}function UpsertSessionProvider({children:on,state$:In}){return jsx$1(UpsertSessionContext.Provider,{value:useUpsertSessionAction(In),children:on})}const CreateUserAccountContext=createNamedContext(asyncNoop,"CreateUserAccount");function useCreateUserAccount(){return reactExports.useContext(CreateUserAccountContext)}function CreateUserAccountProvider({children:on}){const In=useUpsertSession(),Rn=reactExports.useCallback(async(Mn,Ln)=>{try{triggerCreateAccountNotification();const Hn=await sessionSchedulerClient.createUserAccount(Ln),jn=await getUserSession(Mn);!jn||(Hn.errors?.length??0)>0?triggerSignInFailedNotification():await In({...jn,hasUserAccount:!0})}catch{triggerSignInFailedNotification()}},[In]);return jsx$1(CreateUserAccountContext.Provider,{value:Rn,children:on})}const SignOutOfCurrentSessionContext=createNamedContext(asyncNoop,"SignOutOfCurrentSession");function useSignOutOfCurrentSession(){return reactExports.useContext(SignOutOfCurrentSessionContext)}function SignOutOfCurrentSessionProvider({children:on,state$:In}){const Rn=useSignOut(),Mn=reactExports.useCallback(async()=>{const Ln=In.value()?.activeSession;Ln&&await Rn(Ln)},[In,Rn]);return jsx$1(SignOutOfCurrentSessionContext.Provider,{value:Mn,children:on})}const SignInContext=createNamedContext(asyncNoop,"SignIn");function useSignIn(){return reactExports.useContext(SignInContext)}function SignInProvider({children:on,state$:In}){const Rn=usePreset(),Mn=useAppendLogEntry(),Ln=reactExports.useCallback(async(Hn,jn)=>{let{codeVerifier:Wn,codeChallenge:Yn}=generateCodeVerifier(PKCE_CHALLENGE_S256);const hi=getRedirectUrl(),vi=Hn?.issuer??jn??Rn.organization?.serverUrl??Rn.instanceUrl??"https://identity.chillicream.com",gi=Hn?`tenant:${Hn.tenant}`:!Rn.organization?.serverUrl&&Rn.organization?.name?`tenant:${Rn.organization.name}`:"",mi=buildAuthorizeUrl({authorizationUrl:`${vi}/connect/authorize`,clientId:"3c9f56bd-0e2c-4358-9bf5-ff3a0efa9bf5",redirectUrl:hi,scope:"openid offline_access documents:read documents:write workspace:manage",pkceMethod:PKCE_CHALLENGE_S256,codeChallenge:Yn,acrValues:gi,loginHint:Hn?`${Hn.sub}:${Hn.login}`:""});await setAuthenticationState({codeVerifier:Wn,codeChallenge:Yn,redirectUrl:hi}),IS_RUNNING_IN_ELECTRON?In.next(yi=>({...yi,signInState:"sign-in",electron:{signInUrl:mi}})):redirect(mi)},[In,Rn?.instanceUrl,Rn?.organization]);return reactExports.useEffect(()=>registerReceiveMessage(RENEW_SESSION_MESSAGE,()=>{Mn(null,LogLevel.info,"Renew user session"),Ln(In.value()?.activeSession)}),[In,Mn,Ln]),jsx$1(SignInContext.Provider,{value:Ln,children:on})}const SignInActiveSessionContext=createNamedContext(asyncNoop,"SignInActiveSession");function SignInActiveSessionProvider({children:on,state$:In}){const Rn=useSignIn(),Mn=reactExports.useCallback(async()=>{await Rn(In.value()?.activeSession)},[Rn,In]);return jsx$1(SignInActiveSessionContext.Provider,{value:Mn,children:on})}function useSignInActiveSession(){return reactExports.useContext(SignInActiveSessionContext)}const SessionStateContext=createNamedContext(null,"SessionState");function ActiveSessionSelector(on){return on.activeSession}function useActiveSession(){return useSelector(SessionStateContext,ActiveSessionSelector)}function useActiveSessionObservable(){return useSelectionObservable(reactExports.useContext(SessionStateContext),ActiveSessionSelector,void 0)}function SignInStateSelector(on){return on.signInState}function useSignInState(){return useSelector(SessionStateContext,SignInStateSelector)}function useSignInStateObservable(){return useSelectionObservable(reactExports.useContext(SessionStateContext),SignInStateSelector,INITIAL_STATE$4.signInState)}function SessionsSelector(on){return on.sessions}function useSessions(){return useSelector(SessionStateContext,SessionsSelector)}function IsUserAccountMissingSelector(on){return on.activeSession?.hasUserAccount===!1}function useIsUserAccountMissing(){return useSelector(SessionStateContext,IsUserAccountMissingSelector)}const SignOutAllContext=createNamedContext(asyncNoop,"SignOutAll");function SignOutAllProvider({children:on,state$:In}){const Rn=reactExports.useCallback(()=>{const Mn=In.value().sessions;return triggerSignOutNotification(signOutFromIssuers(Mn,!0).then(()=>{In.next({sessions:[],signInState:"signed-out",synchronizing:!1})}))},[In]);return jsx$1(SignOutAllContext.Provider,{value:Rn,children:on})}function useSignOutAll(){return reactExports.useContext(SignOutAllContext)}async function signOutFromIssuers(on,In){await Promise.all(on.map(async({idToken:Rn,issuer:Mn})=>{try{await fetch(`${Mn}/connect/endsession?id_token_hint${Rn?`=${Rn}`:""}`)}finally{}})),await purgeByTenants(on),In&&sendMessage({kind:SIGNED_OUT_MESSAGE})}function refreshSignInState(on){return{...on,signInState:on.activeSession?.hasUserAccount?"signed-in":"signed-out"}}function parseCodeFromUrl(on){const In=parseCodeResponse(new URL(on));if(!In.code)throw new Error("no code");return In.code}function parseIssuerFromUrl(on){const In=new URL(on),Rn=In.searchParams.get("iss");if(Rn)return removeTrailingSlash(Rn);if(In.hash?.length>0)return parseIssuerFromUrl("http://temp/"+In.hash.substring(1));throw new Error("Could not get issuer from callback url")}async function getAndValidateAuthenticationState(){const on=await getAuthenticationState();if(!on?.codeVerifier||!on.codeChallenge||!on.redirectUrl)throw new Error("illegal auth state");return on}async function getAndValidateToken(on,In,Rn,Mn,Ln){const Hn=await getToken$1({accessTokenUrl:`${on}/connect/token`,clientId:"3c9f56bd-0e2c-4358-9bf5-ff3a0efa9bf5",credentialsInBody:!1,redirectUrl:Rn,code:In,codeVerifier:Mn},Ln),{refreshToken:jn,identityToken:Wn,accessToken:Yn,expiresAt:hi}=Hn;if(!jn||!Wn||!Yn||!hi)throw new Error("illegal auth state");return{refreshToken:jn,idToken:Wn,accessToken:Yn,expiresAt:hi}}function parseAccessToken(on){const In=parseJwt(on)??{},{tenant:Rn,sub:Mn,email:Ln,login:Hn,api_url:jn}=In,Wn=Yn=>Yn instanceof String||typeof Yn=="string";if(!Wn(Rn)||!Wn(Mn)||!Wn(Ln)||!Wn(Hn)||!Wn(jn))throw new Error("Could not parse access token");return{tenant:Rn,sub:Mn,email:Ln,login:Hn,apiUrl:`https://${jn}`}}async function fetchOrganizationInfo(on){const In=await sessionSchedulerClient.fetchOrganizationInfo(on);switch(In.kind){case"error":throw new Error(In.error);case"personal":return{displayName:"Personal Account",id:PERSONAL_ORGANIZATION_ID};case"organization":{const{displayName:Rn,id:Mn}=In;if(!Rn||!Mn)throw new Error("Could not parse the organization info response");return{displayName:Rn,id:Mn}}default:throw new Error("Illegal state")}}async function fetchUserAccount(on){const In=await sessionSchedulerClient.fetchUserAccount(on);switch(In.kind){case"error":throw new Error(In.error);case"user-not-found":return"user-not-found";case"user":const{id:Rn,username:Mn,billingUrl:Ln,manageTenantUrl:Hn}=In;if(!Mn||!Rn)throw new Error("Could not parse the user response");return{id:Rn,username:Mn,billingUrl:Ln,manageTenantUrl:Hn};default:throw new Error("Illegal state")}}function getRedirectUrl(){return IS_RUNNING_IN_ELECTRON?`${APP_SCHEME}://${APP_SIGNIN_PATH}`:appendUrlSegment(window.location.href,APP_SIGNIN_PATH).toString()}function redirect(on){IS_RUNNING_IN_ELECTRON?window.open(on):window.location.replace(on)}function isSigninRedirect({hash:on,pathname:In}){return on.startsWith(`#/${APP_SIGNIN_PATH}`)||In.endsWith(`/${APP_SIGNIN_PATH}`)}const DEFAULT_WORKSPACE_NAME="Default",DEFAULT_STATE={workspaces:[],activeWorkspace:void 0,synchronizing:!1,synchronizationResult:null,loading:!1};function WorkspaceProvider({children:on}){const In=reactExports.useRef(null),[Rn,Mn]=useInitialize$5();return Rn?jsx$1(ActivateWorkspaceProvider,{state$:Rn,activeSession$:Mn,children:jsx$1(CancelSynchronizeWorkspaceProvider,{abortControllerRef:In,children:jsx$1(SynchronizeWorkspaceProvider,{state$:Rn,abortControllerRef:In,children:jsx$1(WorkspaceStateContext.Provider,{value:Rn,children:on})})})}):null}function useInitialize$5(){const on=useForceUpdate(),In=useActiveSessionObservable(),Rn=reactExports.useRef(null);return reactExports.useEffect(()=>{let Mn;async function Ln(Hn){if(Rn.current)areTenantsEqual(Mn,Hn)&&Mn?.hasUserAccount===Hn?.hasUserAccount||(Mn=Hn,Hn&&Hn.hasUserAccount?(Rn.current.next(jn=>({...jn,loading:!0})),await loadInitialState(Hn,Rn.current)):Rn.current.next(DEFAULT_STATE));else if(Mn=Hn,Hn&&Hn.hasUserAccount){Rn.current=createSubject({...DEFAULT_STATE,loading:!0});try{await loadInitialState(Hn,Rn.current)}finally{on()}}else Rn.current=createSubject(DEFAULT_STATE),on()}return Ln(In.value()),In.subscribe(Ln)},[In,on]),usePersistState$1(Rn.current),[Rn.current,In]}function usePersistState$1(on){reactExports.useEffect(()=>{if(on){const In=on.value().activeWorkspace;return on.subscribe(async Rn=>{Rn.activeWorkspace&&Rn.activeWorkspace!==In&&await upsertWorkspace(Rn.activeWorkspace)})}},[on])}async function loadInitialState(on,In,Rn){try{const Mn=await loadWorkspaces(on,In);let Ln;try{Ln=await refreshWorkspaces(on,In,Rn),Ln.length||(triggerPrepareWorkspaceNotification(),await sessionSchedulerClient.createWorkspace(on,DEFAULT_WORKSPACE_NAME),Ln=await loadWorkspaces(on,In))}catch{Ln=Mn}Ln.length?triggerWorkspacePrepared():triggerWorkspacePreparationFailed()}catch{In.next(DEFAULT_STATE)}}async function loadWorkspaces(on,In){const Rn=await getWorkspacesByTenant(on);let Mn=on.activeWorkspaceId?Rn.find(({id:Ln})=>Ln===on.activeWorkspaceId):void 0;return!Mn&&Rn.length&&(Mn=Rn[0]),sendMessage({kind:ACTIVATED_WORKSPACE_MESSAGE,session:on,workspaceId:Mn?.id??null}),In.next(Ln=>({...Ln,activeWorkspace:Mn,workspaces:Rn,loading:!Rn.length})),Rn}async function refreshWorkspaces(on,In,Rn){return await sessionSchedulerClient.fetchWorkspaces(on,Rn),loadWorkspaces(on,In)}const ActivateWorkspaceContext=createNamedContext(noop$2,"ActivateWorkspace");function ActivateWorkspaceProvider({children:on,state$:In,activeSession$:Rn}){const Mn=reactExports.useCallback(Ln=>{const Hn=In.value(),jn=Rn.value();if(!jn||Hn.activeWorkspace?.id===Ln)return;const Wn=Hn.workspaces.find(({id:Yn})=>Yn===Ln);Wn&&(sendMessage({kind:ACTIVATED_WORKSPACE_MESSAGE,session:jn,workspaceId:Wn.id}),In.next(Yn=>({...Yn,activeWorkspace:Wn})))},[Rn,In]);return jsx$1(ActivateWorkspaceContext.Provider,{value:Mn,children:on})}function useActivateWorkspace(){return reactExports.useContext(ActivateWorkspaceContext)}const CancelSynchronizeWorkspaceContext=createNamedContext(noop$2,"CancelSynchronizeWorkspace");function CancelSynchronizeWorkspaceProvider({children:on,abortControllerRef:In}){const Rn=reactExports.useCallback(()=>{In.current?.abort()},[In]);return jsx$1(CancelSynchronizeWorkspaceContext.Provider,{value:Rn,children:on})}const SynchronizeWorkspaceContext=createNamedContext(asyncNoop,"SynchronizeWorkspace");function SynchronizeWorkspaceProvider({children:on,state$:In,abortControllerRef:Rn}){const Mn=useIsOnline(),Ln=reactExports.useRef(Mn),Hn=useDatabaseVersion(),jn=useAppendLogEntry();Ln.current=Mn;const Wn=reactExports.useCallback(async()=>{const Yn=In.value().activeWorkspace;if(!Yn||Rn.current||!Ln.current)return;Rn.current=new AbortController,In.next(gi=>({...gi,synchronizing:!0}));const vi=Yn.dbVersion!==Hn?void 0:Yn.version;try{const gi=await synchronizeWorkspace(jn,Yn.id,vi,Rn.current.signal);if(gi){const mi=yi=>yi&&yi.id===Yn.id?{...yi,version:gi.version,hasChanges:gi.hasChanges,dbVersion:Hn}:yi;In.next(yi=>{const bi=mi(yi.activeWorkspace);return{...yi,activeWorkspace:bi,workspaces:yi.workspaces.map(Ei=>Ei.id===bi?.id?bi:Ei),synchronizing:!1,synchronizationResult:gi}})}else In.next(mi=>mi.synchronizing?{...mi,synchronizing:!1}:mi)}catch{In.next(gi=>gi.synchronizing?{...gi,synchronizing:!1}:gi)}finally{Rn.current=null}},[Rn,Hn,In,jn]);return useTriggerSynchronizationOnWorkspaceSwitch(Wn,In),useSynchronizeWorkspaceEveryMinute(Wn,Mn),jsx$1(SynchronizeWorkspaceContext.Provider,{value:Wn,children:on})}async function synchronizeWorkspace(on,In,Rn,Mn){try{const Ln=await sessionSchedulerClient.synchronizeWorkspace(In,Rn,Mn);if(Ln.kind==="aborted")return null;switch(Ln.version&&Ln.version!==Rn&&sendMessage({kind:WORKSPACE_SYNCHRONIZED_MESSAGE,workspaceId:In,version:Ln.version}),Ln.kind){case"cancelled":return on(null,LogLevel.info,"Workspace synchronization has been cancelled."),{workspaceId:Ln.workspaceId,version:Ln.version,hasChanges:Ln.hasChanges};case"failed":return on(null,LogLevel.info,"Workspace synchronization has been failed."),null;case"success":return{workspaceId:Ln.workspaceId,version:Ln.version,hasChanges:Ln.hasChanges}}}catch{return on(null,LogLevel.info,"Workspace synchronization has been failed."),null}}function useSynchronizeWorkspaceEveryMinute(on,In){const Mn=useActiveSession()?.requiresSignIn;reactExports.useEffect(()=>{if(In){let Ln=!1;const Hn=()=>window.setTimeout(async()=>{Mn||await on(),Ln||(jn=Hn())},ONE_MINUTE$1);let jn=Hn();return()=>{Ln=!0,window.clearTimeout(jn)}}},[In,on,Mn])}function useTriggerSynchronizationOnWorkspaceSwitch(on,In){reactExports.useEffect(()=>{let Rn;function Mn(Ln){Ln.activeWorkspace?.id!==Rn&&(Rn=Ln.activeWorkspace?.id,Ln.activeWorkspace&&!Ln.synchronizing&&on())}return Mn(In.value()),In.subscribe(Mn)},[on,In])}function useSynchronizeWorkspace(){const on=reactExports.useContext(SynchronizeWorkspaceContext);return()=>void on()}const WorkspaceStateContext=createNamedContext(null,"WorkspaceStateContext");function useWorkspaceStateSubject(){return reactExports.useContext(WorkspaceStateContext)}function ActiveWorkspaceSelector(on){return on.activeWorkspace??null}function useActiveWorkspace(){return useSelector(WorkspaceStateContext,ActiveWorkspaceSelector)}function useActiveWorkspaceObservable(){return useSelectionObservable(reactExports.useContext(WorkspaceStateContext),ActiveWorkspaceSelector,null)}function WorkspacesSelector(on){return on.workspaces}function useWorkspaces(){return useSelector(WorkspaceStateContext,WorkspacesSelector)}function WorkspaceIdSelector(on){return on.activeWorkspace?.id??null}function useWorkspaceId(){return useSelector(WorkspaceStateContext,WorkspaceIdSelector)}function useWorkspaceIdObservable(){return useSelectionObservable(reactExports.useContext(WorkspaceStateContext),WorkspaceIdSelector,null)}function WorkspaceNameSelector(on){return on.activeWorkspace?.name??null}function useWorkspaceNameObservable(){return useSelectionObservable(reactExports.useContext(WorkspaceStateContext),WorkspaceNameSelector,null)}function WorkspaceSynchronizingSelector(on){return on.synchronizing}function useWorkspaceSynchronizing(){return useSelector(WorkspaceStateContext,WorkspaceSynchronizingSelector)}function IsOrganizationalWorkspace(on){return on.activeWorkspace?on.activeWorkspace.tenant!==PERSONAL_WORKSPACE_TENANT:!1}function useIsOrganizationalWorkspace(){return useSelector(WorkspaceStateContext,IsOrganizationalWorkspace)}function useReloadWorkspaces(){const on=reactExports.useContext(WorkspaceStateContext),In=useActiveSession();return reactExports.useCallback(async()=>{!on||!In||await refreshWorkspaces(In,on)},[on,In])}const INITIAL_STATE$3={activeEnvironment:null,environments:[],loading:!1};function EnvironmentProvider({children:on}){const In=useWorkspaceIdObservable(),Rn=useInitialize$4(In);return Rn?jsx$1(CreateEnvironmentProvider,{state$:Rn,workspaceId$:In,children:jsx$1(DeleteEnvironmentProvider,{state$:Rn,workspaceId$:In,children:jsx$1(RenameEnvironmentProvider,{state$:Rn,workspaceId$:In,children:jsx$1(EnvironmentStateContext.Provider,{value:Rn,children:on})})})}):null}function useInitialize$4(on){const In=useForceUpdate(),Rn=useCombine(on,useActiveEnvironmentIdObservable()),Mn=reactExports.useRef(null);return reactExports.useEffect(()=>{let Ln=null,Hn=null;async function jn(hi,vi){async function gi(mi,yi){if(mi.next({...INITIAL_STATE$3,loading:!!yi}),!!yi)try{const bi=await getEnvironmentItems(yi);mi.next({activeEnvironment:bi.find(({id:Ei})=>Ei===vi)??null,environments:sortEnvironments(bi),loading:!1})}catch{mi.next(INITIAL_STATE$3)}}if(Mn.current)Ln!==hi?await gi(Mn.current,hi):Hn!==vi&&Mn.current.next(mi=>({...mi,activeEnvironment:mi.environments.find(({id:yi})=>yi===vi)??null}));else{Mn.current=createSubject(INITIAL_STATE$3);try{await gi(Mn.current,hi)}finally{In()}}Ln=hi,Hn=vi}const[Wn,Yn]=Rn.value();return jn(Wn,Yn),Rn.subscribe(([hi,vi])=>jn(hi,vi))},[Rn,In]),useCleanupRemovedEnvironments(Mn.current),useReloadEnvironments(Mn.current),Mn.current}function useCleanupRemovedEnvironments(on){const In=useActivateEnvironment();reactExports.useEffect(()=>{if(on)return registerReceiveMessage(DELETED_ITEMS_MESSAGE,({deletedItems:Rn})=>{const Mn=Rn.filter(({kind:Hn})=>isEnvironmentItemKind(Hn)).map(({id:Hn})=>Hn),Ln=on.value().activeEnvironment?.id;Ln&&Mn.includes(Ln)&&In(null),on.next(Hn=>Mn.length?{...Hn,environments:Hn.environments.filter(({id:jn})=>!Mn.includes(jn))}:Hn)})},[on,In])}function useReloadEnvironments(on){const In=useActivateEnvironment();reactExports.useEffect(()=>{if(on)return registerReceiveMessage(WORKSPACE_SYNCHRONIZED_MESSAGE,async({workspaceId:Rn})=>{const Mn=await getEnvironmentItems(Rn),Ln=on.value().activeEnvironment?.id;Ln&&!Mn.some(({id:jn})=>jn===Ln)&&In(null);let{activeEnvironment:Hn}=on.value();Hn&&(Hn=await getEnvironmentItem(Hn.id)??null),on.next(jn=>({...jn,activeEnvironment:Hn,environments:sortEnvironments(Mn)}))})},[on,In])}function sortEnvironments(on){return on.sort((In,Rn)=>In.name.localeCompare(Rn.name,"en",{sensitivity:"base"}))}const EnvironmentStateContext=createNamedContext(null,"EnvironmentState");function useActivateEnvironment(){return useSubjectNext(useWorkspaceStateSubject(),updateActiveEnvironmentId)}function updateActiveEnvironmentId(on,In){const{activeWorkspace:Rn}=on;return!Rn||ActiveEnvironmentIdSelector(on)===In?on:{...on,activeWorkspace:{...Rn,appState:{...Rn.appState,activeEnvironmentId:In}}}}const CreateEnvironmentContext=createNamedContext(asyncNoop,"CreateEnvironment");function CreateEnvironmentProvider({children:on,state$:In,workspaceId$:Rn}){const Mn=reactExports.useCallback(async(Ln,Hn)=>{const jn=Rn.value();jn&&(await createEnvironmentItem(Ln,jn,null,null,Hn),In.next(Wn=>({...Wn,environments:sortEnvironments([...Wn.environments,{id:Ln,name:Hn}])})))},[In,Rn]);return jsx$1(CreateEnvironmentContext.Provider,{value:Mn,children:on})}const DeleteEnvironmentContext=createNamedContext(asyncNoop,"CreateEnvironment");function useDeleteEnvironment(){return reactExports.useContext(DeleteEnvironmentContext)}function DeleteEnvironmentProvider({children:on,state$:In,workspaceId$:Rn}){const Mn=useActivateEnvironment(),Ln=useSynchronizeWorkspace(),Hn=reactExports.useCallback(async jn=>{const Wn=Rn.value();if(Wn){const Yn=In.value().activeEnvironment?.id===jn;Yn&&Mn(null);const hi=await deleteItem(jn);In.next(vi=>({...vi,environments:vi.environments.filter(gi=>gi.id!==jn),activeEnvironment:Yn?null:vi.activeEnvironment})),sendMessage({kind:DELETED_ITEMS_MESSAGE,workspaceId:Wn,deletedItems:hi}),Ln()}},[In,Rn,Mn,Ln]);return jsx$1(DeleteEnvironmentContext.Provider,{value:Hn,children:on})}const RenameEnvironmentContext=createNamedContext(asyncNoop,"CreateEnvironment");function useRenameEnvironment(){return reactExports.useContext(RenameEnvironmentContext)}function RenameEnvironmentProvider({children:on,state$:In,workspaceId$:Rn}){const Mn=useSynchronizeWorkspace(),Ln=reactExports.useCallback(async(Hn,jn)=>{const Wn=Rn.value();if(Wn){let Yn=In.value().activeEnvironment;Yn?.id===Hn&&(Yn={id:Hn,name:jn});const hi=await renameItem(Hn,jn);hi&&(In.next(vi=>({...vi,environments:sortEnvironments(vi.environments.map(gi=>gi.id===Hn?{id:Hn,name:jn}:gi)),activeEnvironment:Yn})),sendMessage({kind:RENAMED_ITEM_MESSAGE,workspaceId:Wn,itemId:Hn,itemKind:hi.kind,itemName:jn}),Mn())}},[In,Rn,Mn]);return jsx$1(RenameEnvironmentContext.Provider,{value:Ln,children:on})}function ActiveEnvironmentSelector(on){return on.activeEnvironment}function useActiveEnvironment(){return useSelector(EnvironmentStateContext,ActiveEnvironmentSelector)}function ActiveEnvironmentIdSelector(on){return on.activeWorkspace?.appState?.activeEnvironmentId||null}function useActiveEnvironmentId(){return useObservableSelector(useWorkspaceStateSubject(),ActiveEnvironmentIdSelector)}function useActiveEnvironmentIdObservable(){return useSelectionObservable(useWorkspaceStateSubject(),ActiveEnvironmentIdSelector,null)}function EnvironmentsSelector(on){return on.environments}function useEnvironments(){return useSelector(EnvironmentStateContext,EnvironmentsSelector)}function useFetchToken(){const on=useActiveEnvironmentId(),[In,Rn]=reactExports.useState(!1),[Mn,Ln]=reactExports.useState(),Hn=reactExports.useRef(),jn=reactExports.useCallback(()=>{Hn.current?.abort(),Hn.current=void 0,Rn(!1)},[Rn]),Wn=reactExports.useCallback(async Yn=>{if(In)return;const hi=new AbortController;Hn.current=hi;try{Rn(!0),Ln(void 0);const vi=await getResolvedVariables(on);return await authorizeAndGetToken(interpolateOAuth2Authentication(Yn,vi)??Yn,hi.signal)}catch(vi){Ln(vi);return}finally{Rn(!1),hi.abort()}},[on,In,Ln,Rn]);return reactExports.useEffect(()=>jn,[jn]),{error:Mn,cancel:jn,fetchToken:Wn,loading:In}}const INITIAL_STATE$2={refs:{},cache:{}};function ConnectionSettingsProvider({children:on}){const In=useInitialize$3();return jsx$1(UpdateConnectionSettingsProvider,{state$:In.current,children:jsx$1(ConnectionSettingsStateContext.Provider,{value:In.current,children:on})})}function useInitialize$3(){const on=useRefWithInitializer(()=>createSubject(INITIAL_STATE$2)),In=useItemStore(),Rn=useSetCacheItem(on.current);return useConnectionSettingsUpdated(on.current),reactExports.useEffect(()=>In.subscribeAll(async(Mn,Ln)=>{if(!(!isApiItem(Ln)&&!isDocumentItem(Ln)))switch(Mn){case ItemChangeAction.LOAD:{const Hn=isApiDocumentItem(Ln)?Ln.apiId:Ln.id,jn=on.current.value().refs[Ln.id],Wn=on.current.value();if(isApiItem(Ln)&&isApiAlreadyCached(Wn,Hn)){on.current.next(hi=>removeUnreferencedCacheItem({...hi,refs:{...hi.refs,[Ln.id]:Hn}},jn));break}const Yn=(await getConnectionSettings(Hn))?.http??DEFAULT_HTTP_CONNECTION;Rn(Hn,jn,Ln.id,Yn)}break;case ItemChangeAction.UNLOAD:{const Hn=on.current.value().refs[Ln.id];if(!Hn)return;on.current.next(jn=>removeCacheItemAndKey(jn,Hn,Ln.id))}break}}),[on,In,Rn]),on}function useConnectionSettingsUpdated(on){reactExports.useEffect(()=>registerReceiveMessage(CONNECTION_SETTINGS_UPDATED_MESSAGE,({documentId:In,connectionSettings:Rn})=>{const Mn=on.value().refs[In];Mn&&on.next(Ln=>({...Ln,cache:{...Ln.cache,[Mn]:{...Ln.cache[Mn],data:Rn.http}}}))}),[on])}const ConnectionSettingsStateContext=createNamedContext(null,"ConnectionSettingsState");function ConnectionSettingsSelector(on){return reactExports.useCallback(In=>{const Rn=In.refs[on]??"";return{apiOrDocumentId:Rn,httpConnection:In.cache[Rn]?.data??DEFAULT_HTTP_CONNECTION}},[on])}function useConnectionSettings(on){return useSelector(ConnectionSettingsStateContext,ConnectionSettingsSelector(on))}function AuthorizationHeaderValueSelector(on){return In=>ConnectionSettingsSelector(on)(In).httpConnection.authentication?.headerValue??null}function useAuthorizationHeaderValue(on){return useSelector(ConnectionSettingsStateContext,AuthorizationHeaderValueSelector(on))}function HttpHeadersSelector(on){return In=>ConnectionSettingsSelector(on)(In).httpConnection.headers??null}function useHttpHeaders(on){return useSelector(ConnectionSettingsStateContext,HttpHeadersSelector(on))}function HttpSchemaEndpointSelector(on){return In=>{const Rn=ConnectionSettingsSelector(on)(In).httpConnection;return Rn.sdlEndpoint||Rn.endpoint}}function useHttpSchemaEndpoint(on){return useSelector(ConnectionSettingsStateContext,HttpSchemaEndpointSelector(on))}function useHttpSchemaEndpointObservable(on){return useSelectionObservable(reactExports.useContext(ConnectionSettingsStateContext),In=>{const Rn=In.refs[on]??"",Mn=In.cache[Rn]?.data??DEFAULT_HTTP_CONNECTION;return Mn.sdlEndpoint||Mn.endpoint},"")}function HttpEndpointSelector(on){return In=>ConnectionSettingsSelector(on)(In).httpConnection.endpoint}function useHttpEndpoint(on){return useSelector(ConnectionSettingsStateContext,HttpEndpointSelector(on))}function useBeautifiedHttpEndpoint(on){return beautifyEndpoint(useSelector(ConnectionSettingsStateContext,HttpEndpointSelector(on)))}function QueryPlanEnabledSelector(on){return In=>ConnectionSettingsSelector(on)(In).httpConnection.headers?.some(({name:Rn,value:Mn,enabled:Ln})=>FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN.test(Rn)&&Mn.trim()==="1"&&Ln)??!1}function useQueryPlanEnabled(on){return useSelector(ConnectionSettingsStateContext,QueryPlanEnabledSelector(on))}const UpdateConnectionSettingsContext=createNamedContext(asyncNoop,"UpdateConnectionSettings");function UpdateConnectionSettingsProvider({children:on,state$:In}){const Rn=reactExports.useCallback(async function(Ln,Hn,jn){const Wn=await updateHttpConnectionSettings(Ln,Hn,jn);Wn&&In.next(Yn=>Yn.cache[Wn.itemId]?{...Yn,cache:{...Yn.cache,[Wn.itemId]:{...Yn.cache[Wn.itemId],data:Wn.http}}}:Yn)},[In]);return jsx$1(UpdateConnectionSettingsContext.Provider,{value:Rn,children:on})}function useUpdateConnectionSettings(){return reactExports.useContext(UpdateConnectionSettingsContext)}function useEnableQueryPlan(on){const In=useUpdateConnectionSettings(),Rn=useHttpHeaders(on);return reactExports.useCallback(Mn=>{if(!Rn)return In(on,{headers:[{name:HEADER_FUSION_OPERATION_PLAN,value:"1",enabled:!0}]},Mn);const Ln=Rn.findLastIndex(({name:Hn})=>FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN.test(Hn));return In(on,{headers:Ln!==-1?Rn.map((Hn,jn)=>jn===Ln?{name:HEADER_FUSION_OPERATION_PLAN,value:"1",enabled:!0}:Hn):[...Rn,{name:HEADER_FUSION_OPERATION_PLAN,value:"1",enabled:!0}]})},[on,Rn,In])}function useSetCacheItem(on){return reactExports.useCallback((In,Rn,Mn,Ln)=>{const Hn={apiOrDocumentId:In,data:Ln};on.next(jn=>removeUnreferencedCacheItem({...jn,refs:{...jn.refs,[Mn]:In},cache:{...jn.cache,[In]:Hn}},Rn))},[on])}function isApiAlreadyCached(on,In){return Object.values(on.refs).some(Rn=>Rn===In)}function removeCacheItemAndKey(on,In,Rn){const Mn=Object.values(on.refs).filter(jn=>jn===In).length,Ln=Object.entries(on.cache).filter(([jn])=>!(jn===In&&!Mn)),Hn=Object.entries(on.refs).filter(([jn])=>jn!==Rn);return{...on,refs:Object.fromEntries(Hn),cache:Object.fromEntries(Ln)}}function removeUnreferencedCacheItem(on,In){const Rn=Object.values(on.refs).filter(Ln=>Ln===In).length,Mn=Object.entries(on.cache).filter(([Ln])=>!(Ln===In&&!Rn));return{...on,cache:Object.fromEntries(Mn)}}const modalSubject$=createSubject(void 0),modalApi={get current(){return modalSubject$.observable},show(on){modalSubject$.next(on)},hide(on,In){const Rn=modalSubject$.value();Rn?.id===on&&(modalSubject$.next(void 0),In!==void 0&&Rn.onDone?.(In))}};function isEqual(on,In){return on?.item?.id===In?.item?.id}function useActiveModal(on){const In=reactExports.useCallback(Rn=>{if(Rn&&(!on||on&&Rn.id===on))return{item:Rn,hide(Mn){modalApi.hide(Rn.id,Mn)}}},[on]);return useSyncStore(modalApi.current,In,{useRequestAnimationFrame:!1,isEqual})}const ButtonGroup=styled("div")(({theme:on})=>css`
4731
4731
  display: flex;
4732
4732
  flex: 0 0 auto;
@@ -4969,7 +4969,7 @@ ${In.join(`
4969
4969
  `),Text$1=styled("span")`
4970
4970
  flex-wrap: nowrap;
4971
4971
  color: ${THEME_COLORS.base.text};
4972
- `,StyledSwitch=styled(Switch)(({theme:on})=>({width:30,height:18,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .Mui-disabled":{opacity:"0.5 !important","& + .MuiSwitch-track":{opacity:"0.5 !important"}},"& .MuiSwitch-switchBase":{padding:2,color:THEME_COLORS.components.toggleThumb,transition:"color 0.2s ease","& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackBorder,backgroundColor:THEME_COLORS.components.toggleTrack,transition:"background-color 0.2s ease, border-color 0.2s ease"},"&.Mui-checked":{transform:"translateX(12px)",color:THEME_COLORS.components.toggleThumbActive,"& + .MuiSwitch-track":{opacity:1,borderColor:THEME_COLORS.components.toggleTrackActiveBorder,backgroundColor:THEME_COLORS.components.toggleTrackActive}}},"& .MuiSwitch-switchBase:hover":{color:THEME_COLORS.components.toggleThumbHover,"& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackHoverBorder,backgroundColor:THEME_COLORS.components.toggleTrackHover},"&.Mui-checked":{color:THEME_COLORS.components.toggleThumbActiveHover,"& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackActiveHoverBorder,backgroundColor:THEME_COLORS.components.toggleTrackActiveHover}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",margin:1,width:12,height:12,borderRadius:6,transition:on.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:18/2,opacity:1,boxSizing:"border-box",borderStyle:"solid",borderWidth:1}})),defaultOptions={grantType:GRANT_TYPE_AUTHORIZATION_CODE,activeFlowKind:GRANT_TYPE_AUTHORIZATION_CODE,authorizationUrl:"",accessTokenUrl:"",credentialsInBody:!1,clientId:"",clientSecret:"",redirectUrl:"",scope:"",state:"",audience:"",resource:"",responseType:RESPONSE_TYPE_TOKEN,usePkce:!0,pkceMethod:PKCE_CHALLENGE_S256,origin:"",username:"",password:"",prefix:""},OAuth2AuthForm=reactExports.memo(function on({options:In=defaultOptions,onChange:Rn}){const{error:Mn,cancel:Ln,fetchToken:Hn,loading:jn}=useFetchToken();return jsxs(Fragment,{children:[jsx$1(GrantTypeInput,{options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"authorizationUrl",type:"text",placeholder:"https://authorization-server.com/oauth2/authorize",options:In,onChange:Rn,label:"Authorization URL"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_PASSWORD],id:"username",type:"text",placeholder:"",options:In,onChange:Rn,label:"Username"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_PASSWORD],id:"password",type:"password",placeholder:"",options:In,onChange:Rn,label:"Password"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"accessTokenUrl",type:"text",placeholder:"https://authorization-server.com/oauth2/token",options:In,onChange:Rn,label:"Access Token URL"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_IMPLICIT,GRANT_TYPE_PASSWORD],id:"clientId",type:"text",options:In,onChange:Rn,label:"Client ID"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"clientSecret",type:"password",options:In,onChange:Rn,label:"Client Secret"}),jsx$1(UsePkceInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],options:In,onChange:Rn}),jsx$1(CodeChallengeMethodInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"redirectUrl",type:"text",options:In,onChange:Rn,label:"Redirect URL"}),jsx$1(RedirectUrlInfoMessage,{redirectUrl:In.redirectUrl}),jsx$1(ResponseTypeInput,{flows:[GRANT_TYPE_IMPLICIT],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"scope",type:"text",options:In,onChange:Rn,label:"Scope"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"state",type:"text",options:In,onChange:Rn,label:"State"}),jsx$1(CredentialsInBodyInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"prefix",type:"text",options:In,onChange:Rn,label:"Header Prefix"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"audience",type:"text",options:In,onChange:Rn,label:"Audience"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS],id:"resource",type:"text",options:In,onChange:Rn,label:"Resource"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],id:"origin",type:"text",options:In,onChange:Rn,label:"Origin"}),jsx$1(TokenDetails,{options:In,onChange:Rn}),jsxs(Group,{children:[jsx$1(ClearTokenButton,{options:In,onChange:Rn}),jsx$1(RefreshTokenButton,{options:In,onChange:Rn,cancel:Ln,fetchToken:Hn,loading:jn}),jsx$1(FetchTokenButton,{options:In,onChange:Rn,cancel:Ln,fetchToken:Hn,loading:jn}),jsx$1(ChangeSessionButton,{options:In,onChange:Rn})]}),Mn&&jsx$1(Alert,{severity:"warning",title:"Error",children:Mn.message??"Ops, something went wrong!"})]})}),FetchTokenButton=({cancel:on,fetchToken:In,loading:Rn,options:Mn,onChange:Ln})=>jsx$1(ButtonWithDescription,{description:"Fetch token",onClick:Rn?hi=>{hi.preventDefault(),hi.stopPropagation(),on()}:async hi=>{hi.preventDefault(),hi.stopPropagation();const vi=await In(Mn);vi&&Ln({oAuth2Options:{...Mn,token:vi}})},children:Rn?jsxs(Fragment,{children:[jsx$1(Spinner$1,{colorSelector:hi=>hi.components.buttonText}),"Cancel"]}):jsx$1(Fragment,{children:"Fetch"})}),GrantTypeInput=({onChange:on,options:In})=>jsxs(Group,{children:[jsx$1(Label,{htmlFor:"grant-type",children:"Grant Type"}),jsxs(Select,{id:"grant-type",onChange:Mn=>{let Ln=GRANT_TYPE_AUTHORIZATION_CODE,Hn=GRANT_TYPE_AUTHORIZATION_CODE;switch(Mn.target.value??""){case GRANT_TYPE_IMPLICIT:Ln=GRANT_TYPE_IMPLICIT,Hn=GRANT_TYPE_IMPLICIT;break;case GRANT_TYPE_CLIENT_CREDENTIALS:Ln=GRANT_TYPE_CLIENT_CREDENTIALS,Hn=GRANT_TYPE_CLIENT_CREDENTIALS;break;case GRANT_TYPE_PASSWORD:Ln=GRANT_TYPE_PASSWORD,Hn=GRANT_TYPE_PASSWORD;break}on({oAuth2Options:{...In,grantType:Hn,activeFlowKind:Ln}})},value:In.activeFlowKind,children:[jsx$1("option",{value:GRANT_TYPE_AUTHORIZATION_CODE,children:"Authorization Code"}),jsx$1("option",{value:GRANT_TYPE_IMPLICIT,children:"Implicit"}),jsx$1("option",{value:GRANT_TYPE_CLIENT_CREDENTIALS,children:"Client Credentials"}),jsx$1("option",{value:GRANT_TYPE_PASSWORD,children:"Resource Owner Password Credentials"})]})]}),GroupInput=({flows:on,label:In,id:Rn,onChange:Mn,options:Ln,...Hn})=>{const jn=useIsFlowActive(Ln.activeFlowKind,on),Wn=Yn=>{Mn({oAuth2Options:{...Ln,[Rn]:Yn.target.value??""}})};return jn?jsxs(Group,{children:[jsx$1(Label,{htmlFor:String(Rn),children:In}),jsx$1(InterpolationInput,{id:String(Rn),value:Ln[Rn],onChange:Wn,...Hn})]}):null},UsePkceInput=({onChange:on,options:In,flows:Rn})=>{const Mn=useIsFlowActive(In.activeFlowKind,Rn),Ln=Hn=>{on({oAuth2Options:{...In,usePkce:Hn}})};return Mn?jsx$1(Group,{children:jsxs(Label,{children:[jsx$1(LabelDescription,{children:"Use PKCE"}),jsx$1(Toggle,{checked:In.usePkce,offText:"No",onText:"Yes",onChange:Ln})]})}):null},CodeChallengeMethodInput=({onChange:on,options:In,flows:Rn})=>{const Mn=useIsFlowActive(In.activeFlowKind,Rn),Ln=Hn=>{const jn=Hn.target.value===PKCE_CHALLENGE_PLAIN?PKCE_CHALLENGE_PLAIN:PKCE_CHALLENGE_S256;on({oAuth2Options:{...In,pkceMethod:jn}})};return Mn&&In.usePkce?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"pkce-method-code-challenge",children:"Code Challenge Method"}),jsxs(Select,{id:"pkce-method-code-challenge",value:In.pkceMethod,onChange:Ln,children:[jsx$1("option",{value:PKCE_CHALLENGE_S256,children:"SHA-256"}),jsx$1("option",{value:PKCE_CHALLENGE_PLAIN,children:"Plain"})]})]}):null},CredentialsInBodyInput=({onChange:on,options:In,flows:Rn})=>useIsFlowActive(In.activeFlowKind,Rn)?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"pkce-method-credentials",children:"Credentials"}),jsxs(Select,{id:"pkce-method-credentials",onChange:Hn=>{const jn=Hn.target.value==="body";on({oAuth2Options:{...In,credentialsInBody:jn}})},value:In.credentialsInBody?"body":"header",children:[jsx$1("option",{value:"header",children:"As Basic Auth Header (default)"}),jsx$1("option",{value:"body",children:"In Request Body"})]})]}):null,TokenDetails=({options:on})=>on.token?jsxs(Fragment,{children:[jsxs(Group,{children:[jsx$1(Label,{htmlFor:"id_token",children:"Id Token"}),jsx$1(Input,{id:"id_token",disabled:!0,value:on.token.identityToken??""})]}),jsxs(Group,{children:[jsx$1(Label,{htmlFor:"access_token",children:"Access Token"}),jsx$1(Input,{id:"access_token",disabled:!0,value:on.token.accessToken??""})]}),jsxs(Group,{children:[jsx$1(Label,{htmlFor:"refresh_token",children:"Refresh Token"}),jsx$1(Input,{id:"refresh_token",disabled:!0,value:on.token.refreshToken??""})]})]}):null;function ClearTokenButton({options:on,onChange:In}){return on.token?jsx$1(ButtonWithDescription,{description:"Clear tokens",onClick:()=>{In({oAuth2Options:{...on,token:void 0}})},children:"Clear"}):null}function ChangeSessionButton({options:on,onChange:In}){if(!IS_RUNNING_IN_ELECTRON||on.activeFlowKind!==GRANT_TYPE_AUTHORIZATION_CODE&&on.activeFlowKind!==GRANT_TYPE_IMPLICIT)return null;const Rn=Mn=>{Mn.preventDefault(),Mn.stopPropagation(),In({oAuth2Options:{...on,sessionId:nanoid()}})};return jsx$1(ButtonWithDescription,{description:"Reset session on identity server",tooltip:`The browser persist your authentication session on ${on.authorizationUrl??"your identity server."}, so that you do not have to sign in every time. If you want to log in with a different user, you should reset your session by pressing the button on the right.`,onClick:Rn,children:"Reset"})}const RefreshTokenButton=({cancel:on,fetchToken:In,loading:Rn,options:Mn,onChange:Ln})=>{const Hn=hi=>{hi.preventDefault(),hi.stopPropagation(),on()},jn=async hi=>{hi.preventDefault(),hi.stopPropagation();const vi=await In({...Mn,grantType:GRANT_TYPE_REFRESH});vi&&Ln({oAuth2Options:{...Mn,token:vi}})};return Mn?.token?.refreshToken?jsx$1(ButtonWithDescription,{description:"Refresh token",onClick:Rn?Hn:jn,children:Rn?jsxs(Fragment,{children:[jsx$1(Spinner$1,{colorSelector:hi=>hi.components.buttonText}),"Cancel"]}):jsx$1(Fragment,{children:"Refresh"})}):null},ResponseTypeInput=({flows:on,onChange:In,options:Rn})=>useIsFlowActive(Rn.activeFlowKind,on)?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"response-type",children:"Response Type"}),jsxs(Select,{id:"response-type",onChange:Hn=>{let jn=RESPONSE_TYPE_TOKEN;switch(Hn.target.value??""){case RESPONSE_TYPE_ID_TOKEN:jn=RESPONSE_TYPE_ID_TOKEN;break;case RESPONSE_TYPE_ID_TOKEN_TOKEN:jn=RESPONSE_TYPE_ID_TOKEN_TOKEN;break}In({oAuth2Options:{...Rn,responseType:jn}})},value:Rn.responseType,children:[jsx$1("option",{value:RESPONSE_TYPE_TOKEN,children:"Access Token"}),jsx$1("option",{value:RESPONSE_TYPE_ID_TOKEN,children:"ID Token"}),jsx$1("option",{value:RESPONSE_TYPE_ID_TOKEN_TOKEN,children:"ID and Access Token"})]})]}):null;function useIsFlowActive(on,In){return reactExports.useMemo(()=>!!In.find(Rn=>Rn===on),[In,on])}function ButtonWithDescription({children:on,description:In,tooltip:Rn,...Mn}){return jsxs(Label,{children:[jsxs(LabelDescription,{children:[In,Rn&&jsx$1(Tooltip,{title:Rn,placement:"top-start",children:jsx$1("span",{children:jsx$1(InfoIcon,{})})})]}),Rn?jsx$1(TooltipButton,{tooltip:Rn,...Mn,children:on}):jsx$1(Button,{...Mn,children:on})]})}function RedirectUrlInfoMessage({redirectUrl:on}){if(!on||IS_RUNNING_IN_ELECTRON)return null;const In=tryParseUrl(on);return In&&isSigninRedirect(In)?jsx$1(Alert,{severity:"error",children:jsxs("p",{children:["The provided URL ",jsx$1("code",{children:on})," cannot be used as it is internally utilized by Nitro for authentication. Please ensure you select a different URL to avoid conflicts with the internal authentication mechanism."]})}):on.startsWith(window.location.href)?null:jsx$1(Alert,{severity:"warning",children:jsxs("p",{children:["The current redirect URL is set to ",jsx$1("code",{children:on}),". Once the authentication process is complete, your browser will be directed to this URL. However, please note that Nitro cannot access this domain, as it is hosted on ",jsx$1("code",{children:window.location.href}),". If you face any problems while fetching the token, make sure to use a redirect URL that begins with ",jsx$1("code",{children:window.location.href}),"."]})})}const AuthFlow=({authentication:on,onChange:In})=>{switch(on.activeAuthenticationKind){case BASIC_AUTHENTICATION_FLOW:return jsx$1(BasicAuthForm,{options:on.basicOptions,onChange:In});case BEARER_TOKEN_AUTHENTICATION_FLOW:return jsx$1(BearerAuthForm,{options:on.bearerOptions,onChange:In});case OAUTH_2_AUTHENTICATION_FLOW:return jsx$1(OAuth2AuthForm,{options:on.oAuth2Options,onChange:In});default:return null}},defaultAuthenticationFlow={activeAuthenticationKind:NO_AUTH_AUTHENTICATION_FLOW},AuthSettings=reactExports.memo(function on({authentication:In=defaultAuthenticationFlow,onChange:Rn}){const[Mn,Ln]=reactExports.useState(In),Hn=Wn=>{let Yn={...Mn,...Wn};const hi=createAuthHeaderValue(Yn);Yn={...Yn,headerValue:hi},Ln(Yn),Rn(Yn)},jn=Wn=>{Hn({activeAuthenticationKind:Wn.target.value})};return reactExports.useEffect(()=>{Ln(In)},[In]),jsxs(Fragment,{children:[jsxs(Group,{children:[jsx$1(Label,{htmlFor:"auth-flow",children:"Type"}),jsx$1(Select,{id:"auth-flow",value:Mn.activeAuthenticationKind,onChange:jn,children:ALL_AUTH_FLOWS.map(({kind:Wn,text:Yn})=>jsx$1("option",{value:Wn,children:Yn},Wn))})]}),jsx$1(AuthFlow,{authentication:Mn,onChange:Hn})]})});function tryParseJsonString(on){if(on===void 0)return on;try{return JSON.parse(on)}catch{return on}}function getSubscriptionTransport(on){switch(on){case AUTO_SUBSCRIPTION_PROTOCOL:return"AUTO";case GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL:return"SSE";case APOLLO_SUBSCRIPTION_PROTOCOL:case GRAPHQL_WS_SUBSCRIPTION_PROTOCOL:return"WS";default:throw new Error("Unknown subscription protocol")}}const DEFAULT_SETTINGS={id:"-",apiUrl:"-",sub:"-",featureFlags:[],preferences:{},theme:DEFAULT_THEME_SETTINGS};function SettingsProvider({children:on}){const In=useInitialize$2();return In?jsx$1(AddFeatureFlagProvider,{settings$:In,children:jsx$1(RemoveFeatureFlagProvider,{settings$:In,children:jsx$1(SetPreferenceProvider,{settings$:In,children:jsx$1(UpdateThemeSettingsProvider,{settings$:In,children:jsx$1(SettingsContext.Provider,{value:In,children:on})})})})}):null}function useInitialize$2(){const on=useActiveSessionObservable(),In=reactExports.useRef(void 0),Rn=useForceUpdate();return reactExports.useEffect(()=>{function Mn(Yn){In.current?(In.current.next(Yn),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme})):(In.current=createSubject(Yn),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme}),Rn())}let Ln;async function Hn(Yn){let hi=DEFAULT_SETTINGS;Ln&&(Ln.abort(),Ln=void 0),Yn&&(Ln=new AbortController,hi=await getSettingsBySession(Yn,Ln.signal),Ln=void 0),Mn(hi)}let jn=on.value(),Wn=on.subscribe(Yn=>{jn!==Yn&&(jn=Yn,Hn(Yn))});return Hn(jn),()=>{Wn(),Ln?.abort()}},[on,Rn]),In.current}async function getSettingsBySession(on,In){const{apiUrl:Rn,sub:Mn}=on;let Ln,Hn;try{if(Ln=await getSettings(Mn,Rn),Hn=await fetchSettings(Ln?.id,Mn,Rn,In),Hn)return await upsertSettings(Hn),Hn}catch{}return Hn??Ln??DEFAULT_SETTINGS}async function fetchSettings(on,In,Rn,Mn){const Ln=await sessionSchedulerClient.fetchSettings(Mn);if(Ln.kind==="error")return;let{preferences:Hn,settings:{featureFlags:jn,theme:{usePreferredOsAppearance:Wn,darkThemeName:Yn,lightThemeName:hi,themeName:vi}}}=Ln;return Yn??=DEFAULT_THEME_SETTINGS.darkThemeName,hi??=DEFAULT_THEME_SETTINGS.lightThemeName,vi??=DEFAULT_THEME_SETTINGS.themeName,{id:on??nanoid(),apiUrl:Rn,sub:In,featureFlags:jn,preferences:Hn,theme:{usePreferredOsAppearance:Wn,darkThemeName:Yn,lightThemeName:hi,themeName:vi}}}function useTriggerFeatureFlagsUpdatedFailed(){const on=useActivateLogEntry(),In=useAppendLogEntry();return reactExports.useCallback(async Rn=>{const Mn=await In(null,LogLevel.error,"Feature Flags Not Pushed",Rn.length===1?Rn[0]:Rn);let Ln;function Hn(){on(Mn,void 0,!1),Ln()}const{dismiss:jn}=triggerErrorNotification("Feature Flags Not Pushed",jsxs(Fragment,{children:[jsx$1(ToastContentParagraph,{children:"We were not able to store the latest Feature Flag update on the server. Click on Details to find out more."}),jsx$1(ToastFooter,{children:jsx$1(Button,{color:"primary",onClick:Hn,children:"Details"})})]}));Ln=jn},[on,In])}function useTriggerPreferenceUpdatedFailed(){const on=useActivateLogEntry(),In=useAppendLogEntry();return reactExports.useCallback(async Rn=>{const Mn=await In(null,LogLevel.error,"Preference Not Pushed",Rn.length===1?Rn[0]:Rn);let Ln;function Hn(){on(Mn,void 0,!1),Ln()}const{dismiss:jn}=triggerErrorNotification("Preference Not Pushed",jsxs(Fragment,{children:[jsx$1(ToastContentParagraph,{children:"We were not able to store the latest Preference update on the server. Click on Details to find out more."}),jsx$1(ToastFooter,{children:jsx$1(Button,{color:"primary",onClick:Hn,children:"Details"})})]}));Ln=jn},[on,In])}const SettingsContext=createNamedContext(null,"Settings");function PreferencesSelector(on){return on.preferences??{}}function usePreferences(){return useSelector(SettingsContext,PreferencesSelector)}function usePreferencesObservable(){return useSelectionObservable(reactExports.useContext(SettingsContext),PreferencesSelector,{})}function ThemeSettingsSelector(on){return on.theme}function useThemeSettings(){return useSelector(SettingsContext,ThemeSettingsSelector)}const AddFeatureFlagContext=createNamedContext(noop$2,"AddFeatureFlag");function AddFeatureFlagProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerFeatureFlagsUpdatedFailed(),Ln=reactExports.useCallback(async Hn=>{if(!Rn)return;const{apiUrl:jn,sub:Wn}=Rn,Yn=await getSettings(Wn,jn);if(Yn?.featureFlags?.includes(Hn))return;const hi=Yn?.featureFlags?[...Yn.featureFlags,Hn]:[Hn],vi=Yn?{...Yn,featureFlags:hi}:{...DEFAULT_SETTINGS,id:nanoid(),featureFlags:hi};In.next(vi);const[gi]=await Promise.all([sessionSchedulerClient.updateFeatureFlags(hi),upsertSettings(vi)]);gi.success||Mn(gi.errorMessages)},[Rn,In,Mn]);return jsx$1(AddFeatureFlagContext.Provider,{value:Ln,children:on})}const RemoveFeatureFlagContext=createNamedContext(noop$2,"RemoveFeatureFlag");function RemoveFeatureFlagProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerFeatureFlagsUpdatedFailed(),Ln=reactExports.useCallback(async Hn=>{if(!Rn)return;const{apiUrl:jn,sub:Wn}=Rn,Yn=await getSettings(Wn,jn);if(!Yn?.featureFlags?.includes(Hn))return;const hi=Yn.featureFlags.filter(mi=>mi!==Hn),vi={...Yn,featureFlags:hi};In.next(vi);const[gi]=await Promise.all([sessionSchedulerClient.updateFeatureFlags(hi),upsertSettings(vi)]);gi.success||Mn(gi.errorMessages)},[Rn,In,Mn]);return jsx$1(RemoveFeatureFlagContext.Provider,{value:Ln,children:on})}const SetPreferenceContext=createNamedContext(noop$2,"SetPreference");function SetPreferenceProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerPreferenceUpdatedFailed(),Ln=reactExports.useCallback(async(Hn,jn)=>{if(!Rn)return;const{apiUrl:Wn,sub:Yn}=Rn,hi=await getSettings(Yn,Wn);if(hi?.preferences?.[Hn]===jn)return;const vi=hi?.preferences?{...hi.preferences,[Hn]:jn}:{[Hn]:jn},gi=hi?{...hi,preferences:vi}:{...DEFAULT_SETTINGS,id:nanoid(),preferences:vi};In.next(gi);const[mi]=await Promise.all([sessionSchedulerClient.updatePreferences(vi),upsertSettings(gi)]);mi.success||Mn(mi.errorMessages)},[Rn,In,Mn]);return jsx$1(SetPreferenceContext.Provider,{value:Ln,children:on})}function useSetPreference(){return reactExports.useContext(SetPreferenceContext)}const UpdateThemeSettingsContext=createNamedContext(noop$2,"UpdateThemeSettings");function UpdateThemeSettingsProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=reactExports.useCallback(async Ln=>{if(!Rn)return;const{apiUrl:Hn,sub:jn}=Rn,Wn=await getSettings(jn,Hn),Yn=Wn?{...Wn,theme:Ln}:{...DEFAULT_SETTINGS,id:nanoid(),theme:Ln};In.next(Yn),sessionSchedulerClient.persistThemeSettings(Ln),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme}),await upsertSettings(Yn)},[Rn,In]);return jsx$1(UpdateThemeSettingsContext.Provider,{value:Mn,children:on})}function useUpdateThemeSettings(){return reactExports.useContext(UpdateThemeSettingsContext)}const FiraCodeMedium=""+new URL("FiraCode-Medium.4ac3c363.-YTCSZkP.woff2",import.meta.url).href,BREAD_CRUMB_SIZE=20,HEADER_AND_CONTROL_SIZE=36;function Section({$sectionName:on,...In}){return jsx$1(SectionElement,{...In,role:"section","data-section-name":on})}const SectionElement=styled("div")(({theme:on,$fixedSize:In,$flex:Rn="auto",$flexDirection:Mn,$separator:Ln,$spacing:Hn})=>css`
4972
+ `,StyledSwitch=styled(Switch)(({theme:on})=>({width:30,height:18,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .Mui-disabled":{opacity:"0.5 !important","& + .MuiSwitch-track":{opacity:"0.5 !important"}},"& .MuiSwitch-switchBase":{padding:2,color:THEME_COLORS.components.toggleThumb,transition:"color 0.2s ease","& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackBorder,backgroundColor:THEME_COLORS.components.toggleTrack,transition:"background-color 0.2s ease, border-color 0.2s ease"},"&.Mui-checked":{transform:"translateX(12px)",color:THEME_COLORS.components.toggleThumbActive,"& + .MuiSwitch-track":{opacity:1,borderColor:THEME_COLORS.components.toggleTrackActiveBorder,backgroundColor:THEME_COLORS.components.toggleTrackActive}}},"& .MuiSwitch-switchBase:hover":{color:THEME_COLORS.components.toggleThumbHover,"& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackHoverBorder,backgroundColor:THEME_COLORS.components.toggleTrackHover},"&.Mui-checked":{color:THEME_COLORS.components.toggleThumbActiveHover,"& + .MuiSwitch-track":{borderColor:THEME_COLORS.components.toggleTrackActiveHoverBorder,backgroundColor:THEME_COLORS.components.toggleTrackActiveHover}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",margin:1,width:12,height:12,borderRadius:6,transition:on.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:18/2,opacity:1,boxSizing:"border-box",borderStyle:"solid",borderWidth:1}})),defaultOptions={grantType:GRANT_TYPE_AUTHORIZATION_CODE,activeFlowKind:GRANT_TYPE_AUTHORIZATION_CODE,authorizationUrl:"",accessTokenUrl:"",credentialsInBody:!1,clientId:"",clientSecret:"",redirectUrl:"",scope:"",state:"",audience:"",resource:"",responseType:RESPONSE_TYPE_TOKEN,usePkce:!0,pkceMethod:PKCE_CHALLENGE_S256,origin:"",username:"",password:"",prefix:""},OAuth2AuthForm=reactExports.memo(function on({options:In=defaultOptions,onChange:Rn}){const{error:Mn,cancel:Ln,fetchToken:Hn,loading:jn}=useFetchToken();return jsxs(Fragment,{children:[jsx$1(GrantTypeInput,{options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"authorizationUrl",type:"text",placeholder:"https://authorization-server.com/oauth2/authorize",options:In,onChange:Rn,label:"Authorization URL"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_PASSWORD],id:"username",type:"text",placeholder:"",options:In,onChange:Rn,label:"Username"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_PASSWORD],id:"password",type:"password",placeholder:"",options:In,onChange:Rn,label:"Password"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"accessTokenUrl",type:"text",placeholder:"https://authorization-server.com/oauth2/token",options:In,onChange:Rn,label:"Access Token URL"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_IMPLICIT,GRANT_TYPE_PASSWORD],id:"clientId",type:"text",options:In,onChange:Rn,label:"Client ID"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"clientSecret",type:"password",options:In,onChange:Rn,label:"Client Secret"}),jsx$1(UsePkceInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],options:In,onChange:Rn}),jsx$1(CodeChallengeMethodInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"redirectUrl",type:"text",options:In,onChange:Rn,label:"Redirect URL"}),jsx$1(RedirectUrlInfoMessage,{redirectUrl:In.redirectUrl}),jsx$1(ResponseTypeInput,{flows:[GRANT_TYPE_IMPLICIT],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"scope",type:"text",options:In,onChange:Rn,label:"Scope"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT],id:"state",type:"text",options:In,onChange:Rn,label:"State"}),jsx$1(CredentialsInBodyInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],options:In,onChange:Rn}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"prefix",type:"text",options:In,onChange:Rn,label:"Header Prefix"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_IMPLICIT,GRANT_TYPE_CLIENT_CREDENTIALS,GRANT_TYPE_PASSWORD],id:"audience",type:"text",options:In,onChange:Rn,label:"Audience"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE,GRANT_TYPE_CLIENT_CREDENTIALS],id:"resource",type:"text",options:In,onChange:Rn,label:"Resource"}),jsx$1(GroupInput,{flows:[GRANT_TYPE_AUTHORIZATION_CODE],id:"origin",type:"text",options:In,onChange:Rn,label:"Origin"}),jsx$1(TokenDetails,{options:In,onChange:Rn}),jsxs(Group,{children:[jsx$1(ClearTokenButton,{options:In,onChange:Rn}),jsx$1(RefreshTokenButton,{options:In,onChange:Rn,cancel:Ln,fetchToken:Hn,loading:jn}),jsx$1(FetchTokenButton,{options:In,onChange:Rn,cancel:Ln,fetchToken:Hn,loading:jn}),jsx$1(ChangeSessionButton,{options:In,onChange:Rn})]}),Mn&&jsx$1(Alert,{severity:"warning",title:"Error",children:Mn.message??"Ops, something went wrong!"})]})}),FetchTokenButton=({cancel:on,fetchToken:In,loading:Rn,options:Mn,onChange:Ln})=>jsx$1(ButtonWithDescription,{description:"Fetch token",onClick:Rn?hi=>{hi.preventDefault(),hi.stopPropagation(),on()}:async hi=>{hi.preventDefault(),hi.stopPropagation();const vi=await In(Mn);vi&&Ln({oAuth2Options:{...Mn,token:vi}})},children:Rn?jsxs(Fragment,{children:[jsx$1(Spinner$1,{colorSelector:hi=>hi.components.buttonText}),"Cancel"]}):jsx$1(Fragment,{children:"Fetch"})}),GrantTypeInput=({onChange:on,options:In})=>jsxs(Group,{children:[jsx$1(Label,{htmlFor:"grant-type",children:"Grant Type"}),jsxs(Select,{id:"grant-type",onChange:Mn=>{let Ln=GRANT_TYPE_AUTHORIZATION_CODE,Hn=GRANT_TYPE_AUTHORIZATION_CODE;switch(Mn.target.value??""){case GRANT_TYPE_IMPLICIT:Ln=GRANT_TYPE_IMPLICIT,Hn=GRANT_TYPE_IMPLICIT;break;case GRANT_TYPE_CLIENT_CREDENTIALS:Ln=GRANT_TYPE_CLIENT_CREDENTIALS,Hn=GRANT_TYPE_CLIENT_CREDENTIALS;break;case GRANT_TYPE_PASSWORD:Ln=GRANT_TYPE_PASSWORD,Hn=GRANT_TYPE_PASSWORD;break}on({oAuth2Options:{...In,grantType:Hn,activeFlowKind:Ln}})},value:In.activeFlowKind,children:[jsx$1("option",{value:GRANT_TYPE_AUTHORIZATION_CODE,children:"Authorization Code"}),jsx$1("option",{value:GRANT_TYPE_IMPLICIT,children:"Implicit"}),jsx$1("option",{value:GRANT_TYPE_CLIENT_CREDENTIALS,children:"Client Credentials"}),jsx$1("option",{value:GRANT_TYPE_PASSWORD,children:"Resource Owner Password Credentials"})]})]}),GroupInput=({flows:on,label:In,id:Rn,onChange:Mn,options:Ln,...Hn})=>{const jn=useIsFlowActive(Ln.activeFlowKind,on),Wn=Yn=>{Mn({oAuth2Options:{...Ln,[Rn]:Yn.target.value??""}})};return jn?jsxs(Group,{children:[jsx$1(Label,{htmlFor:String(Rn),children:In}),jsx$1(InterpolationInput,{id:String(Rn),value:Ln[Rn],onChange:Wn,...Hn})]}):null},UsePkceInput=({onChange:on,options:In,flows:Rn})=>{const Mn=useIsFlowActive(In.activeFlowKind,Rn),Ln=Hn=>{on({oAuth2Options:{...In,usePkce:Hn}})};return Mn?jsx$1(Group,{children:jsxs(Label,{children:[jsx$1(LabelDescription,{children:"Use PKCE"}),jsx$1(Toggle,{checked:In.usePkce,offText:"No",onText:"Yes",onChange:Ln})]})}):null},CodeChallengeMethodInput=({onChange:on,options:In,flows:Rn})=>{const Mn=useIsFlowActive(In.activeFlowKind,Rn),Ln=Hn=>{const jn=Hn.target.value===PKCE_CHALLENGE_PLAIN?PKCE_CHALLENGE_PLAIN:PKCE_CHALLENGE_S256;on({oAuth2Options:{...In,pkceMethod:jn}})};return Mn&&In.usePkce?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"pkce-method-code-challenge",children:"Code Challenge Method"}),jsxs(Select,{id:"pkce-method-code-challenge",value:In.pkceMethod,onChange:Ln,children:[jsx$1("option",{value:PKCE_CHALLENGE_S256,children:"SHA-256"}),jsx$1("option",{value:PKCE_CHALLENGE_PLAIN,children:"Plain"})]})]}):null},CredentialsInBodyInput=({onChange:on,options:In,flows:Rn})=>useIsFlowActive(In.activeFlowKind,Rn)?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"pkce-method-credentials",children:"Credentials"}),jsxs(Select,{id:"pkce-method-credentials",onChange:Hn=>{const jn=Hn.target.value==="body";on({oAuth2Options:{...In,credentialsInBody:jn}})},value:In.credentialsInBody?"body":"header",children:[jsx$1("option",{value:"header",children:"As Basic Auth Header (default)"}),jsx$1("option",{value:"body",children:"In Request Body"})]})]}):null,TokenDetails=({options:on})=>on.token?jsxs(Fragment,{children:[jsxs(Group,{children:[jsx$1(Label,{htmlFor:"id_token",children:"Id Token"}),jsx$1(Input,{id:"id_token",disabled:!0,value:on.token.identityToken??""})]}),jsxs(Group,{children:[jsx$1(Label,{htmlFor:"access_token",children:"Access Token"}),jsx$1(Input,{id:"access_token",disabled:!0,value:on.token.accessToken??""})]}),jsxs(Group,{children:[jsx$1(Label,{htmlFor:"refresh_token",children:"Refresh Token"}),jsx$1(Input,{id:"refresh_token",disabled:!0,value:on.token.refreshToken??""})]})]}):null;function ClearTokenButton({options:on,onChange:In}){return on.token?jsx$1(ButtonWithDescription,{description:"Clear tokens",onClick:()=>{In({oAuth2Options:{...on,token:void 0}})},children:"Clear"}):null}function ChangeSessionButton({options:on,onChange:In}){if(!IS_RUNNING_IN_ELECTRON||on.activeFlowKind!==GRANT_TYPE_AUTHORIZATION_CODE&&on.activeFlowKind!==GRANT_TYPE_IMPLICIT)return null;const Rn=Mn=>{Mn.preventDefault(),Mn.stopPropagation(),In({oAuth2Options:{...on,sessionId:nanoid()}})};return jsx$1(ButtonWithDescription,{description:"Reset session on identity server",tooltip:`The browser persist your authentication session on ${on.authorizationUrl??"your identity server."}, so that you do not have to sign in every time. If you want to log in with a different user, you should reset your session by pressing the button on the right.`,onClick:Rn,children:"Reset"})}const RefreshTokenButton=({cancel:on,fetchToken:In,loading:Rn,options:Mn,onChange:Ln})=>{const Hn=hi=>{hi.preventDefault(),hi.stopPropagation(),on()},jn=async hi=>{hi.preventDefault(),hi.stopPropagation();const vi=await In({...Mn,grantType:GRANT_TYPE_REFRESH});vi&&Ln({oAuth2Options:{...Mn,token:vi}})};return Mn?.token?.refreshToken?jsx$1(ButtonWithDescription,{description:"Refresh token",onClick:Rn?Hn:jn,children:Rn?jsxs(Fragment,{children:[jsx$1(Spinner$1,{colorSelector:hi=>hi.components.buttonText}),"Cancel"]}):jsx$1(Fragment,{children:"Refresh"})}):null},ResponseTypeInput=({flows:on,onChange:In,options:Rn})=>useIsFlowActive(Rn.activeFlowKind,on)?jsxs(Group,{children:[jsx$1(Label,{htmlFor:"response-type",children:"Response Type"}),jsxs(Select,{id:"response-type",onChange:Hn=>{let jn=RESPONSE_TYPE_TOKEN;switch(Hn.target.value??""){case RESPONSE_TYPE_ID_TOKEN:jn=RESPONSE_TYPE_ID_TOKEN;break;case RESPONSE_TYPE_ID_TOKEN_TOKEN:jn=RESPONSE_TYPE_ID_TOKEN_TOKEN;break}In({oAuth2Options:{...Rn,responseType:jn}})},value:Rn.responseType,children:[jsx$1("option",{value:RESPONSE_TYPE_TOKEN,children:"Access Token"}),jsx$1("option",{value:RESPONSE_TYPE_ID_TOKEN,children:"ID Token"}),jsx$1("option",{value:RESPONSE_TYPE_ID_TOKEN_TOKEN,children:"ID and Access Token"})]})]}):null;function useIsFlowActive(on,In){return reactExports.useMemo(()=>!!In.find(Rn=>Rn===on),[In,on])}function ButtonWithDescription({children:on,description:In,tooltip:Rn,...Mn}){return jsxs(Label,{children:[jsxs(LabelDescription,{children:[In,Rn&&jsx$1(Tooltip,{title:Rn,placement:"top-start",children:jsx$1("span",{children:jsx$1(InfoIcon,{})})})]}),Rn?jsx$1(TooltipButton,{tooltip:Rn,...Mn,children:on}):jsx$1(Button,{...Mn,children:on})]})}function RedirectUrlInfoMessage({redirectUrl:on}){if(!on||IS_RUNNING_IN_ELECTRON)return null;const In=tryParseUrl(on);return In&&isSigninRedirect(In)?jsx$1(Alert,{severity:"error",children:jsxs("p",{children:["The provided URL ",jsx$1("code",{children:on})," cannot be used as it is internally utilized by Nitro for authentication. Please ensure you select a different URL to avoid conflicts with the internal authentication mechanism."]})}):on.startsWith(window.location.href)?null:jsx$1(Alert,{severity:"warning",children:jsxs("p",{children:["The current redirect URL is set to ",jsx$1("code",{children:on}),". Once the authentication process is complete, your browser will be directed to this URL. However, please note that Nitro cannot access this domain, as it is hosted on ",jsx$1("code",{children:window.location.href}),". If you face any problems while fetching the token, make sure to use a redirect URL that begins with ",jsx$1("code",{children:window.location.href}),"."]})})}const AuthFlow=({authentication:on,onChange:In})=>{switch(on.activeAuthenticationKind){case BASIC_AUTHENTICATION_FLOW:return jsx$1(BasicAuthForm,{options:on.basicOptions,onChange:In});case BEARER_TOKEN_AUTHENTICATION_FLOW:return jsx$1(BearerAuthForm,{options:on.bearerOptions,onChange:In});case OAUTH_2_AUTHENTICATION_FLOW:return jsx$1(OAuth2AuthForm,{options:on.oAuth2Options,onChange:In});default:return null}},defaultAuthenticationFlow={activeAuthenticationKind:NO_AUTH_AUTHENTICATION_FLOW},AuthSettings=reactExports.memo(function on({authentication:In=defaultAuthenticationFlow,onChange:Rn}){const[Mn,Ln]=reactExports.useState(In),Hn=Wn=>{let Yn={...Mn,...Wn};const hi=createAuthHeaderValue(Yn);Yn={...Yn,headerValue:hi},Ln(Yn),Rn(Yn)},jn=Wn=>{Hn({activeAuthenticationKind:Wn.target.value})};return reactExports.useEffect(()=>{Ln(In)},[In]),jsxs(Fragment,{children:[jsxs(Group,{children:[jsx$1(Label,{htmlFor:"auth-flow",children:"Type"}),jsx$1(Select,{id:"auth-flow",value:Mn.activeAuthenticationKind,onChange:jn,children:ALL_AUTH_FLOWS.map(({kind:Wn,text:Yn})=>jsx$1("option",{value:Wn,children:Yn},Wn))})]}),jsx$1(AuthFlow,{authentication:Mn,onChange:Hn})]})});function tryParseJsonString(on){if(on===void 0)return on;try{return JSON.parse(on)}catch{return on}}function getSubscriptionTransport(on){switch(on){case AUTO_SUBSCRIPTION_PROTOCOL:return"AUTO";case GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL:return"SSE";case APOLLO_SUBSCRIPTION_PROTOCOL:case GRAPHQL_WS_SUBSCRIPTION_PROTOCOL:return"WS";default:throw new Error("Unknown subscription protocol")}}const DEFAULT_SETTINGS={id:"-",apiUrl:"-",sub:"-",featureFlags:[],preferences:{},theme:DEFAULT_THEME_SETTINGS};function SettingsProvider({children:on}){const In=useInitialize$2();return In?jsx$1(AddFeatureFlagProvider,{settings$:In,children:jsx$1(RemoveFeatureFlagProvider,{settings$:In,children:jsx$1(SetPreferenceProvider,{settings$:In,children:jsx$1(UpdateThemeSettingsProvider,{settings$:In,children:jsx$1(SettingsContext.Provider,{value:In,children:on})})})})}):null}function useInitialize$2(){const on=useActiveSessionObservable(),In=reactExports.useRef(void 0),Rn=useForceUpdate();return reactExports.useEffect(()=>{function Mn(Yn){In.current?(In.current.next(Yn),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme})):(In.current=createSubject(Yn),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme}),Rn())}let Ln;async function Hn(Yn){let hi=DEFAULT_SETTINGS;Ln&&(Ln.abort(),Ln=void 0),Yn&&(Ln=new AbortController,hi=await getSettingsBySession(Yn,Ln.signal),Ln=void 0),Mn(hi)}let jn=on.value(),Wn=on.subscribe(Yn=>{jn!==Yn&&(jn=Yn,Hn(Yn))});return Hn(jn),()=>{Wn(),Ln?.abort()}},[on,Rn]),In.current}async function getSettingsBySession(on,In){const{apiUrl:Rn,sub:Mn}=on;let Ln,Hn;try{if(Ln=await getSettings(Mn,Rn),Hn=await fetchSettings(Ln?.id,Mn,Rn,In),Hn)return await upsertSettings(Hn),Hn}catch{}return Hn??Ln??DEFAULT_SETTINGS}async function fetchSettings(on,In,Rn,Mn){const Ln=await sessionSchedulerClient.fetchSettings(Mn);if(Ln.kind==="error")return;let{preferences:Hn,settings:{featureFlags:jn,theme:{usePreferredOsAppearance:Wn,darkThemeName:Yn,lightThemeName:hi,themeName:vi}}}=Ln;return Yn??=DEFAULT_THEME_SETTINGS.darkThemeName,hi??=DEFAULT_THEME_SETTINGS.lightThemeName,vi??=DEFAULT_THEME_SETTINGS.themeName,{id:on??nanoid(),apiUrl:Rn,sub:In,featureFlags:jn,preferences:Hn,theme:{usePreferredOsAppearance:Wn,darkThemeName:Yn,lightThemeName:hi,themeName:vi}}}function useTriggerFeatureFlagsUpdatedFailed(){const on=useActivateLogEntry(),In=useAppendLogEntry();return reactExports.useCallback(async Rn=>{const Mn=await In(null,LogLevel.error,"Feature Flags Not Pushed",Rn.length===1?Rn[0]:Rn);let Ln;function Hn(){on(Mn,void 0,!1),Ln()}const{dismiss:jn}=triggerErrorNotification("Feature Flags Not Pushed",jsxs(Fragment,{children:[jsx$1(ToastContentParagraph,{children:"We were not able to store the latest Feature Flag update on the server. Click on Details to find out more."}),jsx$1(ToastFooter,{children:jsx$1(Button,{color:"primary",onClick:Hn,children:"Details"})})]}));Ln=jn},[on,In])}function useTriggerPreferenceUpdatedFailed(){const on=useActivateLogEntry(),In=useAppendLogEntry();return reactExports.useCallback(async Rn=>{const Mn=await In(null,LogLevel.error,"Preference Not Pushed",Rn.length===1?Rn[0]:Rn);let Ln;function Hn(){on(Mn,void 0,!1),Ln()}const{dismiss:jn}=triggerErrorNotification("Preference Not Pushed",jsxs(Fragment,{children:[jsx$1(ToastContentParagraph,{children:"We were not able to store the latest Preference update on the server. Click on Details to find out more."}),jsx$1(ToastFooter,{children:jsx$1(Button,{color:"primary",onClick:Hn,children:"Details"})})]}));Ln=jn},[on,In])}const SettingsContext=createNamedContext(null,"Settings");function PreferencesSelector(on){return on.preferences??{}}function usePreferences(){return useSelector(SettingsContext,PreferencesSelector)}function usePreferencesObservable(){return useSelectionObservable(reactExports.useContext(SettingsContext),PreferencesSelector,{})}function ThemeSettingsSelector(on){return on.theme}function useThemeSettings(){return useSelector(SettingsContext,ThemeSettingsSelector)}const AddFeatureFlagContext=createNamedContext(noop$2,"AddFeatureFlag");function AddFeatureFlagProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerFeatureFlagsUpdatedFailed(),Ln=reactExports.useCallback(async Hn=>{if(!Rn)return;const{apiUrl:jn,sub:Wn}=Rn,Yn=await getSettings(Wn,jn);if(Yn?.featureFlags?.includes(Hn))return;const hi=Yn?.featureFlags?[...Yn.featureFlags,Hn]:[Hn],vi=Yn?{...Yn,featureFlags:hi}:{...DEFAULT_SETTINGS,id:nanoid(),featureFlags:hi};In.next(vi);const[gi]=await Promise.all([sessionSchedulerClient.updateFeatureFlags(hi),upsertSettings(vi)]);gi.success||Mn(gi.errorMessages)},[Rn,In,Mn]);return jsx$1(AddFeatureFlagContext.Provider,{value:Ln,children:on})}const RemoveFeatureFlagContext=createNamedContext(noop$2,"RemoveFeatureFlag");function RemoveFeatureFlagProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerFeatureFlagsUpdatedFailed(),Ln=reactExports.useCallback(async Hn=>{if(!Rn)return;const{apiUrl:jn,sub:Wn}=Rn,Yn=await getSettings(Wn,jn);if(!Yn?.featureFlags?.includes(Hn))return;const hi=Yn.featureFlags.filter(mi=>mi!==Hn),vi={...Yn,featureFlags:hi};In.next(vi);const[gi]=await Promise.all([sessionSchedulerClient.updateFeatureFlags(hi),upsertSettings(vi)]);gi.success||Mn(gi.errorMessages)},[Rn,In,Mn]);return jsx$1(RemoveFeatureFlagContext.Provider,{value:Ln,children:on})}const SetPreferenceContext=createNamedContext(noop$2,"SetPreference");function SetPreferenceProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=useTriggerPreferenceUpdatedFailed(),Ln=reactExports.useCallback(async(Hn,jn)=>{if(!Rn)return;const{apiUrl:Wn,sub:Yn}=Rn,hi=await getSettings(Yn,Wn);if(hi?.preferences?.[Hn]===jn)return;const vi=hi?.preferences?{...hi.preferences,[Hn]:jn}:{[Hn]:jn},gi=hi?{...hi,preferences:vi}:{...DEFAULT_SETTINGS,id:nanoid(),preferences:vi};In.next(gi);const[mi]=await Promise.all([sessionSchedulerClient.updatePreferences(vi),upsertSettings(gi)]);mi.success||Mn(mi.errorMessages)},[Rn,In,Mn]);return jsx$1(SetPreferenceContext.Provider,{value:Ln,children:on})}function useSetPreference(){return reactExports.useContext(SetPreferenceContext)}const UpdateThemeSettingsContext=createNamedContext(noop$2,"UpdateThemeSettings");function UpdateThemeSettingsProvider({children:on,settings$:In}){const Rn=useActiveSession(),Mn=reactExports.useCallback(async Ln=>{if(!Rn)return;const{apiUrl:Hn,sub:jn}=Rn,Wn=await getSettings(jn,Hn),Yn=Wn?{...Wn,theme:Ln}:{...DEFAULT_SETTINGS,id:nanoid(),theme:Ln};In.next(Yn),sessionSchedulerClient.persistThemeSettings(Ln),sendMessage({kind:THEME_SETTINGS_CHANGED_MESSAGE,themeSettings:Yn.theme}),await upsertSettings(Yn)},[Rn,In]);return jsx$1(UpdateThemeSettingsContext.Provider,{value:Mn,children:on})}function useUpdateThemeSettings(){return reactExports.useContext(UpdateThemeSettingsContext)}const FiraCodeMedium=""+new URL("FiraCode-Medium.b77dd5d8.-YTCSZkP.woff2",import.meta.url).href,BREAD_CRUMB_SIZE=20,HEADER_AND_CONTROL_SIZE=36;function Section({$sectionName:on,...In}){return jsx$1(SectionElement,{...In,role:"section","data-section-name":on})}const SectionElement=styled("div")(({theme:on,$fixedSize:In,$flex:Rn="auto",$flexDirection:Mn,$separator:Ln,$spacing:Hn})=>css`
4973
4973
  display: flex;
4974
4974
  flex: ${In?`0 0 ${on.spacing(In)}`:Rn};
4975
4975
  overflow: hidden;
@@ -5143,7 +5143,7 @@ ${In.join(`
5143
5143
  color: ${THEME_COLORS.states.success};
5144
5144
  `;default:return css`
5145
5145
  color: ${THEME_COLORS.base.heading};
5146
- `}}function WorkerWrapper$3(on){return new Worker(""+new URL("graphql.worker.4ac3c363.D-xCIFcX.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$2(on){return new Worker(""+new URL("editor.worker.4ac3c363.CqPoWJS8.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$1(on){return new Worker(""+new URL("json.worker.4ac3c363.CJUMUcV6.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper(on){return new Worker(""+new URL("yaml.worker.4ac3c363.4bkJTgWN.js",import.meta.url).href,{type:"module",name:on?.name})}let initialized=!1;(function(){initialized||(self.MonacoEnvironment={getWorker:function(on,In){switch(In){case"json":return new WorkerWrapper$1({name:"json-worker"});case"yaml":return new WorkerWrapper({name:"yaml-worker"});case"graphql":return new WorkerWrapper$3({name:"graphql-worker"});default:return new WorkerWrapper$2({name:"editor-worker"})}}},initialized=!0)})();const ALIAS=Symbol.for("yaml.alias"),DOC=Symbol.for("yaml.document"),MAP=Symbol.for("yaml.map"),PAIR=Symbol.for("yaml.pair"),SCALAR$1=Symbol.for("yaml.scalar"),SEQ=Symbol.for("yaml.seq"),NODE_TYPE=Symbol.for("yaml.node.type"),isAlias=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===ALIAS,isDocument=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===DOC,isMap=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===MAP,isPair=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===PAIR,isScalar$1=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===SCALAR$1,isSeq=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===SEQ;function isCollection$1(on){if(on&&typeof on=="object")switch(on[NODE_TYPE]){case MAP:case SEQ:return!0}return!1}function isNode(on){if(on&&typeof on=="object")switch(on[NODE_TYPE]){case ALIAS:case MAP:case SCALAR$1:case SEQ:return!0}return!1}const hasAnchor=on=>(isScalar$1(on)||isCollection$1(on))&&!!on.anchor,BREAK$1=Symbol("break visit"),SKIP$1=Symbol("skip children"),REMOVE$1=Symbol("remove node");function visit$1(on,In){const Rn=initVisitor(In);isDocument(on)?visit_(null,on.contents,Rn,Object.freeze([on]))===REMOVE$1&&(on.contents=null):visit_(null,on,Rn,Object.freeze([]))}visit$1.BREAK=BREAK$1;visit$1.SKIP=SKIP$1;visit$1.REMOVE=REMOVE$1;function visit_(on,In,Rn,Mn){const Ln=callVisitor(on,In,Rn,Mn);if(isNode(Ln)||isPair(Ln))return replaceNode(on,Mn,Ln),visit_(on,Ln,Rn,Mn);if(typeof Ln!="symbol"){if(isCollection$1(In)){Mn=Object.freeze(Mn.concat(In));for(let Hn=0;Hn<In.items.length;++Hn){const jn=visit_(Hn,In.items[Hn],Rn,Mn);if(typeof jn=="number")Hn=jn-1;else{if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.items.splice(Hn,1),Hn-=1)}}}else if(isPair(In)){Mn=Object.freeze(Mn.concat(In));const Hn=visit_("key",In.key,Rn,Mn);if(Hn===BREAK$1)return BREAK$1;Hn===REMOVE$1&&(In.key=null);const jn=visit_("value",In.value,Rn,Mn);if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.value=null)}}return Ln}async function visitAsync(on,In){const Rn=initVisitor(In);isDocument(on)?await visitAsync_(null,on.contents,Rn,Object.freeze([on]))===REMOVE$1&&(on.contents=null):await visitAsync_(null,on,Rn,Object.freeze([]))}visitAsync.BREAK=BREAK$1;visitAsync.SKIP=SKIP$1;visitAsync.REMOVE=REMOVE$1;async function visitAsync_(on,In,Rn,Mn){const Ln=await callVisitor(on,In,Rn,Mn);if(isNode(Ln)||isPair(Ln))return replaceNode(on,Mn,Ln),visitAsync_(on,Ln,Rn,Mn);if(typeof Ln!="symbol"){if(isCollection$1(In)){Mn=Object.freeze(Mn.concat(In));for(let Hn=0;Hn<In.items.length;++Hn){const jn=await visitAsync_(Hn,In.items[Hn],Rn,Mn);if(typeof jn=="number")Hn=jn-1;else{if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.items.splice(Hn,1),Hn-=1)}}}else if(isPair(In)){Mn=Object.freeze(Mn.concat(In));const Hn=await visitAsync_("key",In.key,Rn,Mn);if(Hn===BREAK$1)return BREAK$1;Hn===REMOVE$1&&(In.key=null);const jn=await visitAsync_("value",In.value,Rn,Mn);if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.value=null)}}return Ln}function initVisitor(on){return typeof on=="object"&&(on.Collection||on.Node||on.Value)?Object.assign({Alias:on.Node,Map:on.Node,Scalar:on.Node,Seq:on.Node},on.Value&&{Map:on.Value,Scalar:on.Value,Seq:on.Value},on.Collection&&{Map:on.Collection,Seq:on.Collection},on):on}function callVisitor(on,In,Rn,Mn){if(typeof Rn=="function")return Rn(on,In,Mn);if(isMap(In))return Rn.Map?.(on,In,Mn);if(isSeq(In))return Rn.Seq?.(on,In,Mn);if(isPair(In))return Rn.Pair?.(on,In,Mn);if(isScalar$1(In))return Rn.Scalar?.(on,In,Mn);if(isAlias(In))return Rn.Alias?.(on,In,Mn)}function replaceNode(on,In,Rn){const Mn=In[In.length-1];if(isCollection$1(Mn))Mn.items[on]=Rn;else if(isPair(Mn))on==="key"?Mn.key=Rn:Mn.value=Rn;else if(isDocument(Mn))Mn.contents=Rn;else{const Ln=isAlias(Mn)?"alias":"scalar";throw new Error(`Cannot replace node with ${Ln} parent`)}}const escapeChars={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},escapeTagName=on=>on.replace(/[!,[\]{}]/g,In=>escapeChars[In]);class Directives{constructor(In,Rn){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Directives.defaultYaml,In),this.tags=Object.assign({},Directives.defaultTags,Rn)}clone(){const In=new Directives(this.yaml,this.tags);return In.docStart=this.docStart,In}atDocument(){const In=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Directives.defaultTags);break}return In}add(In,Rn){this.atNextDocument&&(this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Directives.defaultTags),this.atNextDocument=!1);const Mn=In.trim().split(/[ \t]+/),Ln=Mn.shift();switch(Ln){case"%TAG":{if(Mn.length!==2&&(Rn(0,"%TAG directive should contain exactly two parts"),Mn.length<2))return!1;const[Hn,jn]=Mn;return this.tags[Hn]=jn,!0}case"%YAML":{if(this.yaml.explicit=!0,Mn.length!==1)return Rn(0,"%YAML directive should contain exactly one part"),!1;const[Hn]=Mn;if(Hn==="1.1"||Hn==="1.2")return this.yaml.version=Hn,!0;{const jn=/^\d+\.\d+$/.test(Hn);return Rn(6,`Unsupported YAML version ${Hn}`,jn),!1}}default:return Rn(0,`Unknown directive ${Ln}`,!0),!1}}tagName(In,Rn){if(In==="!")return"!";if(In[0]!=="!")return Rn(`Not a valid tag: ${In}`),null;if(In[1]==="<"){const jn=In.slice(2,-1);return jn==="!"||jn==="!!"?(Rn(`Verbatim tags aren't resolved, so ${In} is invalid.`),null):(In[In.length-1]!==">"&&Rn("Verbatim tags must end with a >"),jn)}const[,Mn,Ln]=In.match(/^(.*!)([^!]*)$/s);Ln||Rn(`The ${In} tag has no suffix`);const Hn=this.tags[Mn];if(Hn)try{return Hn+decodeURIComponent(Ln)}catch(jn){return Rn(String(jn)),null}return Mn==="!"?In:(Rn(`Could not resolve tag: ${In}`),null)}tagString(In){for(const[Rn,Mn]of Object.entries(this.tags))if(In.startsWith(Mn))return Rn+escapeTagName(In.substring(Mn.length));return In[0]==="!"?In:`!<${In}>`}toString(In){const Rn=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Mn=Object.entries(this.tags);let Ln;if(In&&Mn.length>0&&isNode(In.contents)){const Hn={};visit$1(In.contents,(jn,Wn)=>{isNode(Wn)&&Wn.tag&&(Hn[Wn.tag]=!0)}),Ln=Object.keys(Hn)}else Ln=[];for(const[Hn,jn]of Mn)Hn==="!!"&&jn==="tag:yaml.org,2002:"||(!In||Ln.some(Wn=>Wn.startsWith(jn)))&&Rn.push(`%TAG ${Hn} ${jn}`);return Rn.join(`
5146
+ `}}function WorkerWrapper$3(on){return new Worker(""+new URL("graphql.worker.b77dd5d8.CWVFy7o0.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$2(on){return new Worker(""+new URL("editor.worker.b77dd5d8.C0IIxtwH.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper$1(on){return new Worker(""+new URL("json.worker.b77dd5d8.DZEULY4m.js",import.meta.url).href,{type:"module",name:on?.name})}function WorkerWrapper(on){return new Worker(""+new URL("yaml.worker.b77dd5d8.BVSUE8bO.js",import.meta.url).href,{type:"module",name:on?.name})}let initialized=!1;(function(){initialized||(self.MonacoEnvironment={getWorker:function(on,In){switch(In){case"json":return new WorkerWrapper$1({name:"json-worker"});case"yaml":return new WorkerWrapper({name:"yaml-worker"});case"graphql":return new WorkerWrapper$3({name:"graphql-worker"});default:return new WorkerWrapper$2({name:"editor-worker"})}}},initialized=!0)})();const ALIAS=Symbol.for("yaml.alias"),DOC=Symbol.for("yaml.document"),MAP=Symbol.for("yaml.map"),PAIR=Symbol.for("yaml.pair"),SCALAR$1=Symbol.for("yaml.scalar"),SEQ=Symbol.for("yaml.seq"),NODE_TYPE=Symbol.for("yaml.node.type"),isAlias=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===ALIAS,isDocument=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===DOC,isMap=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===MAP,isPair=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===PAIR,isScalar$1=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===SCALAR$1,isSeq=on=>!!on&&typeof on=="object"&&on[NODE_TYPE]===SEQ;function isCollection$1(on){if(on&&typeof on=="object")switch(on[NODE_TYPE]){case MAP:case SEQ:return!0}return!1}function isNode(on){if(on&&typeof on=="object")switch(on[NODE_TYPE]){case ALIAS:case MAP:case SCALAR$1:case SEQ:return!0}return!1}const hasAnchor=on=>(isScalar$1(on)||isCollection$1(on))&&!!on.anchor,BREAK$1=Symbol("break visit"),SKIP$1=Symbol("skip children"),REMOVE$1=Symbol("remove node");function visit$1(on,In){const Rn=initVisitor(In);isDocument(on)?visit_(null,on.contents,Rn,Object.freeze([on]))===REMOVE$1&&(on.contents=null):visit_(null,on,Rn,Object.freeze([]))}visit$1.BREAK=BREAK$1;visit$1.SKIP=SKIP$1;visit$1.REMOVE=REMOVE$1;function visit_(on,In,Rn,Mn){const Ln=callVisitor(on,In,Rn,Mn);if(isNode(Ln)||isPair(Ln))return replaceNode(on,Mn,Ln),visit_(on,Ln,Rn,Mn);if(typeof Ln!="symbol"){if(isCollection$1(In)){Mn=Object.freeze(Mn.concat(In));for(let Hn=0;Hn<In.items.length;++Hn){const jn=visit_(Hn,In.items[Hn],Rn,Mn);if(typeof jn=="number")Hn=jn-1;else{if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.items.splice(Hn,1),Hn-=1)}}}else if(isPair(In)){Mn=Object.freeze(Mn.concat(In));const Hn=visit_("key",In.key,Rn,Mn);if(Hn===BREAK$1)return BREAK$1;Hn===REMOVE$1&&(In.key=null);const jn=visit_("value",In.value,Rn,Mn);if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.value=null)}}return Ln}async function visitAsync(on,In){const Rn=initVisitor(In);isDocument(on)?await visitAsync_(null,on.contents,Rn,Object.freeze([on]))===REMOVE$1&&(on.contents=null):await visitAsync_(null,on,Rn,Object.freeze([]))}visitAsync.BREAK=BREAK$1;visitAsync.SKIP=SKIP$1;visitAsync.REMOVE=REMOVE$1;async function visitAsync_(on,In,Rn,Mn){const Ln=await callVisitor(on,In,Rn,Mn);if(isNode(Ln)||isPair(Ln))return replaceNode(on,Mn,Ln),visitAsync_(on,Ln,Rn,Mn);if(typeof Ln!="symbol"){if(isCollection$1(In)){Mn=Object.freeze(Mn.concat(In));for(let Hn=0;Hn<In.items.length;++Hn){const jn=await visitAsync_(Hn,In.items[Hn],Rn,Mn);if(typeof jn=="number")Hn=jn-1;else{if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.items.splice(Hn,1),Hn-=1)}}}else if(isPair(In)){Mn=Object.freeze(Mn.concat(In));const Hn=await visitAsync_("key",In.key,Rn,Mn);if(Hn===BREAK$1)return BREAK$1;Hn===REMOVE$1&&(In.key=null);const jn=await visitAsync_("value",In.value,Rn,Mn);if(jn===BREAK$1)return BREAK$1;jn===REMOVE$1&&(In.value=null)}}return Ln}function initVisitor(on){return typeof on=="object"&&(on.Collection||on.Node||on.Value)?Object.assign({Alias:on.Node,Map:on.Node,Scalar:on.Node,Seq:on.Node},on.Value&&{Map:on.Value,Scalar:on.Value,Seq:on.Value},on.Collection&&{Map:on.Collection,Seq:on.Collection},on):on}function callVisitor(on,In,Rn,Mn){if(typeof Rn=="function")return Rn(on,In,Mn);if(isMap(In))return Rn.Map?.(on,In,Mn);if(isSeq(In))return Rn.Seq?.(on,In,Mn);if(isPair(In))return Rn.Pair?.(on,In,Mn);if(isScalar$1(In))return Rn.Scalar?.(on,In,Mn);if(isAlias(In))return Rn.Alias?.(on,In,Mn)}function replaceNode(on,In,Rn){const Mn=In[In.length-1];if(isCollection$1(Mn))Mn.items[on]=Rn;else if(isPair(Mn))on==="key"?Mn.key=Rn:Mn.value=Rn;else if(isDocument(Mn))Mn.contents=Rn;else{const Ln=isAlias(Mn)?"alias":"scalar";throw new Error(`Cannot replace node with ${Ln} parent`)}}const escapeChars={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},escapeTagName=on=>on.replace(/[!,[\]{}]/g,In=>escapeChars[In]);class Directives{constructor(In,Rn){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Directives.defaultYaml,In),this.tags=Object.assign({},Directives.defaultTags,Rn)}clone(){const In=new Directives(this.yaml,this.tags);return In.docStart=this.docStart,In}atDocument(){const In=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Directives.defaultTags);break}return In}add(In,Rn){this.atNextDocument&&(this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Directives.defaultTags),this.atNextDocument=!1);const Mn=In.trim().split(/[ \t]+/),Ln=Mn.shift();switch(Ln){case"%TAG":{if(Mn.length!==2&&(Rn(0,"%TAG directive should contain exactly two parts"),Mn.length<2))return!1;const[Hn,jn]=Mn;return this.tags[Hn]=jn,!0}case"%YAML":{if(this.yaml.explicit=!0,Mn.length!==1)return Rn(0,"%YAML directive should contain exactly one part"),!1;const[Hn]=Mn;if(Hn==="1.1"||Hn==="1.2")return this.yaml.version=Hn,!0;{const jn=/^\d+\.\d+$/.test(Hn);return Rn(6,`Unsupported YAML version ${Hn}`,jn),!1}}default:return Rn(0,`Unknown directive ${Ln}`,!0),!1}}tagName(In,Rn){if(In==="!")return"!";if(In[0]!=="!")return Rn(`Not a valid tag: ${In}`),null;if(In[1]==="<"){const jn=In.slice(2,-1);return jn==="!"||jn==="!!"?(Rn(`Verbatim tags aren't resolved, so ${In} is invalid.`),null):(In[In.length-1]!==">"&&Rn("Verbatim tags must end with a >"),jn)}const[,Mn,Ln]=In.match(/^(.*!)([^!]*)$/s);Ln||Rn(`The ${In} tag has no suffix`);const Hn=this.tags[Mn];if(Hn)try{return Hn+decodeURIComponent(Ln)}catch(jn){return Rn(String(jn)),null}return Mn==="!"?In:(Rn(`Could not resolve tag: ${In}`),null)}tagString(In){for(const[Rn,Mn]of Object.entries(this.tags))if(In.startsWith(Mn))return Rn+escapeTagName(In.substring(Mn.length));return In[0]==="!"?In:`!<${In}>`}toString(In){const Rn=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Mn=Object.entries(this.tags);let Ln;if(In&&Mn.length>0&&isNode(In.contents)){const Hn={};visit$1(In.contents,(jn,Wn)=>{isNode(Wn)&&Wn.tag&&(Hn[Wn.tag]=!0)}),Ln=Object.keys(Hn)}else Ln=[];for(const[Hn,jn]of Mn)Hn==="!!"&&jn==="tag:yaml.org,2002:"||(!In||Ln.some(Wn=>Wn.startsWith(jn)))&&Rn.push(`%TAG ${Hn} ${jn}`);return Rn.join(`
5147
5147
  `)}}Directives.defaultYaml={explicit:!1,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};function anchorIsValid(on){if(/[\x00-\x19\s,[\]{}]/.test(on)){const Rn=`Anchor must not contain whitespace or control characters: ${JSON.stringify(on)}`;throw new Error(Rn)}return!0}function anchorNames(on){const In=new Set;return visit$1(on,{Value(Rn,Mn){Mn.anchor&&In.add(Mn.anchor)}}),In}function findNewAnchor(on,In){for(let Rn=1;;++Rn){const Mn=`${on}${Rn}`;if(!In.has(Mn))return Mn}}function createNodeAnchors(on,In){const Rn=[],Mn=new Map;let Ln=null;return{onAnchor:Hn=>{Rn.push(Hn),Ln||(Ln=anchorNames(on));const jn=findNewAnchor(In,Ln);return Ln.add(jn),jn},setAnchors:()=>{for(const Hn of Rn){const jn=Mn.get(Hn);if(typeof jn=="object"&&jn.anchor&&(isScalar$1(jn.node)||isCollection$1(jn.node)))jn.node.anchor=jn.anchor;else{const Wn=new Error("Failed to resolve repeated object (this should not happen)");throw Wn.source=Hn,Wn}}},sourceObjects:Mn}}function applyReviver(on,In,Rn,Mn){if(Mn&&typeof Mn=="object")if(Array.isArray(Mn))for(let Ln=0,Hn=Mn.length;Ln<Hn;++Ln){const jn=Mn[Ln],Wn=applyReviver(on,Mn,String(Ln),jn);Wn===void 0?delete Mn[Ln]:Wn!==jn&&(Mn[Ln]=Wn)}else if(Mn instanceof Map)for(const Ln of Array.from(Mn.keys())){const Hn=Mn.get(Ln),jn=applyReviver(on,Mn,Ln,Hn);jn===void 0?Mn.delete(Ln):jn!==Hn&&Mn.set(Ln,jn)}else if(Mn instanceof Set)for(const Ln of Array.from(Mn)){const Hn=applyReviver(on,Mn,Ln,Ln);Hn===void 0?Mn.delete(Ln):Hn!==Ln&&(Mn.delete(Ln),Mn.add(Hn))}else for(const[Ln,Hn]of Object.entries(Mn)){const jn=applyReviver(on,Mn,Ln,Hn);jn===void 0?delete Mn[Ln]:jn!==Hn&&(Mn[Ln]=jn)}return on.call(In,Rn,Mn)}function toJS(on,In,Rn){if(Array.isArray(on))return on.map((Mn,Ln)=>toJS(Mn,String(Ln),Rn));if(on&&typeof on.toJSON=="function"){if(!Rn||!hasAnchor(on))return on.toJSON(In,Rn);const Mn={aliasCount:0,count:1,res:void 0};Rn.anchors.set(on,Mn),Rn.onCreate=Hn=>{Mn.res=Hn,delete Rn.onCreate};const Ln=on.toJSON(In,Rn);return Rn.onCreate&&Rn.onCreate(Ln),Ln}return typeof on=="bigint"&&!Rn?.keep?Number(on):on}class NodeBase{constructor(In){Object.defineProperty(this,NODE_TYPE,{value:In})}clone(){const In=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(In.range=this.range.slice()),In}toJS(In,{mapAsMap:Rn,maxAliasCount:Mn,onAnchor:Ln,reviver:Hn}={}){if(!isDocument(In))throw new TypeError("A document argument is required");const jn={anchors:new Map,doc:In,keep:!0,mapAsMap:Rn===!0,mapKeyWarned:!1,maxAliasCount:typeof Mn=="number"?Mn:100},Wn=toJS(this,"",jn);if(typeof Ln=="function")for(const{count:Yn,res:hi}of jn.anchors.values())Ln(hi,Yn);return typeof Hn=="function"?applyReviver(Hn,{"":Wn},"",Wn):Wn}}class Alias extends NodeBase{constructor(In){super(ALIAS),this.source=In,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(In){let Rn;return visit$1(In,{Node:(Mn,Ln)=>{if(Ln===this)return visit$1.BREAK;Ln.anchor===this.source&&(Rn=Ln)}}),Rn}toJSON(In,Rn){if(!Rn)return{source:this.source};const{anchors:Mn,doc:Ln,maxAliasCount:Hn}=Rn,jn=this.resolve(Ln);if(!jn){const Yn=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(Yn)}let Wn=Mn.get(jn);if(Wn||(toJS(jn,null,Rn),Wn=Mn.get(jn)),!Wn||Wn.res===void 0){const Yn="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(Yn)}if(Hn>=0&&(Wn.count+=1,Wn.aliasCount===0&&(Wn.aliasCount=getAliasCount(Ln,jn,Mn)),Wn.count*Wn.aliasCount>Hn)){const Yn="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(Yn)}return Wn.res}toString(In,Rn,Mn){const Ln=`*${this.source}`;if(In){if(anchorIsValid(this.source),In.options.verifyAliasOrder&&!In.anchors.has(this.source)){const Hn=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(Hn)}if(In.implicitKey)return`${Ln} `}return Ln}}function getAliasCount(on,In,Rn){if(isAlias(In)){const Mn=In.resolve(on),Ln=Rn&&Mn&&Rn.get(Mn);return Ln?Ln.count*Ln.aliasCount:0}else if(isCollection$1(In)){let Mn=0;for(const Ln of In.items){const Hn=getAliasCount(on,Ln,Rn);Hn>Mn&&(Mn=Hn)}return Mn}else if(isPair(In)){const Mn=getAliasCount(on,In.key,Rn),Ln=getAliasCount(on,In.value,Rn);return Math.max(Mn,Ln)}return 1}const isScalarValue=on=>!on||typeof on!="function"&&typeof on!="object";class Scalar extends NodeBase{constructor(In){super(SCALAR$1),this.value=In}toJSON(In,Rn){return Rn?.keep?this.value:toJS(this.value,In,Rn)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";const defaultTagPrefix="tag:yaml.org,2002:";function findTagObject(on,In,Rn){if(In){const Mn=Rn.filter(Hn=>Hn.tag===In),Ln=Mn.find(Hn=>!Hn.format)??Mn[0];if(!Ln)throw new Error(`Tag ${In} not found`);return Ln}return Rn.find(Mn=>Mn.identify?.(on)&&!Mn.format)}function createNode(on,In,Rn){if(isDocument(on)&&(on=on.contents),isNode(on))return on;if(isPair(on)){const gi=Rn.schema[MAP].createNode?.(Rn.schema,null,Rn);return gi.items.push(on),gi}(on instanceof String||on instanceof Number||on instanceof Boolean||typeof BigInt<"u"&&on instanceof BigInt)&&(on=on.valueOf());const{aliasDuplicateObjects:Mn,onAnchor:Ln,onTagObj:Hn,schema:jn,sourceObjects:Wn}=Rn;let Yn;if(Mn&&on&&typeof on=="object"){if(Yn=Wn.get(on),Yn)return Yn.anchor||(Yn.anchor=Ln(on)),new Alias(Yn.anchor);Yn={anchor:null,node:null},Wn.set(on,Yn)}In?.startsWith("!!")&&(In=defaultTagPrefix+In.slice(2));let hi=findTagObject(on,In,jn.tags);if(!hi){if(on&&typeof on.toJSON=="function"&&(on=on.toJSON()),!on||typeof on!="object"){const gi=new Scalar(on);return Yn&&(Yn.node=gi),gi}hi=on instanceof Map?jn[MAP]:Symbol.iterator in Object(on)?jn[SEQ]:jn[MAP]}Hn&&(Hn(hi),delete Rn.onTagObj);const vi=hi?.createNode?hi.createNode(Rn.schema,on,Rn):typeof hi?.nodeClass?.from=="function"?hi.nodeClass.from(Rn.schema,on,Rn):new Scalar(on);return In?vi.tag=In:hi.default||(vi.tag=hi.tag),Yn&&(Yn.node=vi),vi}function collectionFromPath(on,In,Rn){let Mn=Rn;for(let Ln=In.length-1;Ln>=0;--Ln){const Hn=In[Ln];if(typeof Hn=="number"&&Number.isInteger(Hn)&&Hn>=0){const jn=[];jn[Hn]=Mn,Mn=jn}else Mn=new Map([[Hn,Mn]])}return createNode(Mn,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:on,sourceObjects:new Map})}const isEmptyPath=on=>on==null||typeof on=="object"&&!!on[Symbol.iterator]().next().done;class Collection extends NodeBase{constructor(In,Rn){super(In),Object.defineProperty(this,"schema",{value:Rn,configurable:!0,enumerable:!1,writable:!0})}clone(In){const Rn=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return In&&(Rn.schema=In),Rn.items=Rn.items.map(Mn=>isNode(Mn)||isPair(Mn)?Mn.clone(In):Mn),this.range&&(Rn.range=this.range.slice()),Rn}addIn(In,Rn){if(isEmptyPath(In))this.add(Rn);else{const[Mn,...Ln]=In,Hn=this.get(Mn,!0);if(isCollection$1(Hn))Hn.addIn(Ln,Rn);else if(Hn===void 0&&this.schema)this.set(Mn,collectionFromPath(this.schema,Ln,Rn));else throw new Error(`Expected YAML collection at ${Mn}. Remaining path: ${Ln}`)}}deleteIn(In){const[Rn,...Mn]=In;if(Mn.length===0)return this.delete(Rn);const Ln=this.get(Rn,!0);if(isCollection$1(Ln))return Ln.deleteIn(Mn);throw new Error(`Expected YAML collection at ${Rn}. Remaining path: ${Mn}`)}getIn(In,Rn){const[Mn,...Ln]=In,Hn=this.get(Mn,!0);return Ln.length===0?!Rn&&isScalar$1(Hn)?Hn.value:Hn:isCollection$1(Hn)?Hn.getIn(Ln,Rn):void 0}hasAllNullValues(In){return this.items.every(Rn=>{if(!isPair(Rn))return!1;const Mn=Rn.value;return Mn==null||In&&isScalar$1(Mn)&&Mn.value==null&&!Mn.commentBefore&&!Mn.comment&&!Mn.tag})}hasIn(In){const[Rn,...Mn]=In;if(Mn.length===0)return this.has(Rn);const Ln=this.get(Rn,!0);return isCollection$1(Ln)?Ln.hasIn(Mn):!1}setIn(In,Rn){const[Mn,...Ln]=In;if(Ln.length===0)this.set(Mn,Rn);else{const Hn=this.get(Mn,!0);if(isCollection$1(Hn))Hn.setIn(Ln,Rn);else if(Hn===void 0&&this.schema)this.set(Mn,collectionFromPath(this.schema,Ln,Rn));else throw new Error(`Expected YAML collection at ${Mn}. Remaining path: ${Ln}`)}}}const stringifyComment=on=>on.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(on,In){return/^\n+$/.test(on)?on.substring(1):In?on.replace(/^(?! *$)/gm,In):on}const lineComment=(on,In,Rn)=>on.endsWith(`
5148
5148
  `)?indentComment(Rn,In):Rn.includes(`
5149
5149
  `)?`
@@ -5596,7 +5596,7 @@ ${Rn.comment}`:Rn.comment}this.doc.range[2]=Rn.offset;break}default:this.errors.
5596
5596
  bottom: 0;
5597
5597
  left: 0;
5598
5598
  margin: auto;
5599
- `,Providers=reactExports.lazy(()=>__vitePreload(()=>import("./context-providers.4ac3c363.Ft2IhfCy.js").then(on=>on.v),__vite__mapDeps([0,1,2,3]),import.meta.url));function Shell(){return window.appNamespace=IS_RUNNING_IN_CLOUD||IS_RUNNING_IN_ELECTRON?"":createAppNamespace(),jsx$1(ThemeProvider,{children:jsx$1(AppLoader,{children:jsx$1(reactExports.Suspense,{children:jsx$1(Providers,{})})})})}function createAppNamespace(){return createHash(extractAppUrlPath(window.location)).slice(0,8)}var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};/**
5599
+ `,Providers=reactExports.lazy(()=>__vitePreload(()=>import("./context-providers.b77dd5d8.DnGzVvXJ.js").then(on=>on.v),__vite__mapDeps([0,1,2,3]),import.meta.url));function Shell(){return window.appNamespace=IS_RUNNING_IN_CLOUD||IS_RUNNING_IN_ELECTRON?"":createAppNamespace(),jsx$1(ThemeProvider,{children:jsx$1(AppLoader,{children:jsx$1(reactExports.Suspense,{children:jsx$1(Providers,{})})})})}function createAppNamespace(){return createHash(extractAppUrlPath(window.location)).slice(0,8)}var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};/**
5600
5600
  * @license React
5601
5601
  * scheduler.production.js
5602
5602
  *