#!/usr/bin/env node
"use strict";var n=Object.defineProperty;var r=(t,e)=>n(t,"name",{value:e,configurable:!0});var commands_agent=require("./agent.index.cjs");class TokenProviderError extends commands_agent.ProviderError{static{r(this,"TokenProviderError")}constructor(e,s=!0){super(e,s),this.name="TokenProviderError",Object.setPrototypeOf(this,TokenProviderError.prototype)}}const getSsoSessionData=r(t=>Object.entries(t).filter(([e])=>e.startsWith(commands_agent.IniSectionType.SSO_SESSION+commands_agent.CONFIG_PREFIX_SEPARATOR)).reduce((e,[s,o])=>({...e,[s.substring(s.indexOf(commands_agent.CONFIG_PREFIX_SEPARATOR)+1)]:o}),{}),"getSsoSessionData"),swallowError=r(()=>({}),"swallowError"),loadSsoSessionData=r(async(t={})=>commands_agent.slurpFile(t.configFilepath??commands_agent.getConfigFilepath()).then(commands_agent.parseIni).then(getSsoSessionData).catch(swallowError),"loadSsoSessionData");exports.TokenProviderError=TokenProviderError;exports.loadSsoSessionData=loadSsoSessionData;
