{
  "version": 3,
  "sources": ["../../../../../src/platform/browser/index.ts"],
  "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { type LogOptions } from '../../config';\n\n// NOTE: Implementation for the browser. See `package.json`.\nexport const loadOptions = (filepath?: string): LogOptions | undefined => {\n  try {\n    let dxlog: string | undefined;\n    // if running in a worker, use the localStorage.dxlog setting forwarded on worker initilization in\n    // @dxos/client/src/worker/onconnect.ts\n    if (typeof localStorage === 'undefined') {\n      if ((globalThis as any).localStorage_dxlog) {\n        dxlog = (globalThis as any).localStorage_dxlog;\n      }\n    } else {\n      dxlog = localStorage.getItem('dxlog') ?? undefined;\n    }\n    if (!dxlog) {\n      return undefined;\n    }\n    return JSON.parse(dxlog);\n  } catch (err) {\n    console.info(\"can't parse dxlog config\", err);\n    return undefined;\n  }\n};\n"],
  "mappings": ";;;;AAOO,IAAMA,cAAc,CAACC,aAAAA;AAC1B,MAAI;AACF,QAAIC;AAGJ,QAAI,OAAOC,iBAAiB,aAAa;AACvC,UAAKC,WAAmBC,oBAAoB;AAC1CH,gBAASE,WAAmBC;MAC9B;IACF,OAAO;AACLH,cAAQC,aAAaG,QAAQ,OAAA,KAAYC;IAC3C;AACA,QAAI,CAACL,OAAO;AACV,aAAOK;IACT;AACA,WAAOC,KAAKC,MAAMP,KAAAA;EACpB,SAASQ,KAAK;AACZC,YAAQC,KAAK,4BAA4BF,GAAAA;AACzC,WAAOH;EACT;AACF;",
  "names": ["loadOptions", "filepath", "dxlog", "localStorage", "globalThis", "localStorage_dxlog", "getItem", "undefined", "JSON", "parse", "err", "console", "info"]
}
