@walkeros/explorer 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/@monaco-editor/react.d.ts +3 -0
- package/dist/__mocks__/@monaco-editor/react.d.ts.map +1 -0
- package/dist/__mocks__/@monaco-editor/react.js +4 -0
- package/dist/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/components/atoms/box.d.ts +27 -0
- package/dist/components/atoms/box.d.ts.map +1 -0
- package/dist/components/atoms/box.js +86 -0
- package/dist/components/atoms/box.js.map +1 -0
- package/dist/components/atoms/box.stories.d.ts +34 -0
- package/dist/components/atoms/box.stories.d.ts.map +1 -0
- package/dist/components/atoms/box.stories.js +104 -0
- package/dist/components/atoms/box.stories.js.map +1 -0
- package/dist/components/atoms/button-group.d.ts +17 -0
- package/dist/components/atoms/button-group.d.ts.map +1 -0
- package/dist/components/atoms/button-group.js +12 -0
- package/dist/components/atoms/button-group.js.map +1 -0
- package/dist/components/atoms/button-group.stories.d.ts +18 -0
- package/dist/components/atoms/button-group.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-group.stories.js +39 -0
- package/dist/components/atoms/button-group.stories.js.map +1 -0
- package/dist/components/atoms/button-link.d.ts +12 -0
- package/dist/components/atoms/button-link.d.ts.map +1 -0
- package/dist/components/atoms/button-link.js +10 -0
- package/dist/components/atoms/button-link.js.map +1 -0
- package/dist/components/atoms/button-link.stories.d.ts +11 -0
- package/dist/components/atoms/button-link.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-link.stories.js +50 -0
- package/dist/components/atoms/button-link.stories.js.map +1 -0
- package/dist/components/atoms/button.d.ts +15 -0
- package/dist/components/atoms/button.d.ts.map +1 -0
- package/dist/components/atoms/button.js +11 -0
- package/dist/components/atoms/button.js.map +1 -0
- package/dist/components/atoms/button.stories.d.ts +14 -0
- package/dist/components/atoms/button.stories.d.ts.map +1 -0
- package/dist/components/atoms/button.stories.js +25 -0
- package/dist/components/atoms/button.stories.js.map +1 -0
- package/dist/components/atoms/code.d.ts +92 -0
- package/dist/components/atoms/code.d.ts.map +1 -0
- package/dist/components/atoms/code.js +405 -0
- package/dist/components/atoms/code.js.map +1 -0
- package/dist/components/atoms/code.stories.d.ts +46 -0
- package/dist/components/atoms/code.stories.d.ts.map +1 -0
- package/dist/components/atoms/code.stories.js +156 -0
- package/dist/components/atoms/code.stories.js.map +1 -0
- package/dist/components/atoms/footer.d.ts +21 -0
- package/dist/components/atoms/footer.d.ts.map +1 -0
- package/dist/components/atoms/footer.js +19 -0
- package/dist/components/atoms/footer.js.map +1 -0
- package/dist/components/atoms/footer.stories.d.ts +14 -0
- package/dist/components/atoms/footer.stories.d.ts.map +1 -0
- package/dist/components/atoms/footer.stories.js +29 -0
- package/dist/components/atoms/footer.stories.js.map +1 -0
- package/dist/components/atoms/grid.d.ts +65 -0
- package/dist/components/atoms/grid.d.ts.map +1 -0
- package/dist/components/atoms/grid.js +169 -0
- package/dist/components/atoms/grid.js.map +1 -0
- package/dist/components/atoms/grid.stories.d.ts +18 -0
- package/dist/components/atoms/grid.stories.d.ts.map +1 -0
- package/dist/components/atoms/grid.stories.js +60 -0
- package/dist/components/atoms/grid.stories.js.map +1 -0
- package/dist/components/atoms/header.d.ts +7 -0
- package/dist/components/atoms/header.d.ts.map +1 -0
- package/dist/components/atoms/header.js +5 -0
- package/dist/components/atoms/header.js.map +1 -0
- package/dist/components/atoms/header.stories.d.ts +15 -0
- package/dist/components/atoms/header.stories.d.ts.map +1 -0
- package/dist/components/atoms/header.stories.js +37 -0
- package/dist/components/atoms/header.stories.js.map +1 -0
- package/dist/components/atoms/icons/icon.stories.d.ts +18 -0
- package/dist/components/atoms/icons/icon.stories.d.ts.map +1 -0
- package/dist/components/atoms/icons/icon.stories.js +37 -0
- package/dist/components/atoms/icons/icon.stories.js.map +1 -0
- package/dist/components/atoms/icons/icons.d.ts +2 -0
- package/dist/components/atoms/icons/icons.d.ts.map +1 -0
- package/dist/components/atoms/icons/icons.js +7 -0
- package/dist/components/atoms/icons/icons.js.map +1 -0
- package/dist/components/atoms/icons/index.d.ts +3 -0
- package/dist/components/atoms/icons/index.d.ts.map +1 -0
- package/dist/components/atoms/icons/index.js +3 -0
- package/dist/components/atoms/icons/index.js.map +1 -0
- package/dist/components/atoms/mdx-code.d.ts +33 -0
- package/dist/components/atoms/mdx-code.d.ts.map +1 -0
- package/dist/components/atoms/mdx-code.js +69 -0
- package/dist/components/atoms/mdx-code.js.map +1 -0
- package/dist/components/atoms/preview-footer.d.ts +32 -0
- package/dist/components/atoms/preview-footer.d.ts.map +1 -0
- package/dist/components/atoms/preview-footer.js +31 -0
- package/dist/components/atoms/preview-footer.js.map +1 -0
- package/dist/components/atoms/spinner.d.ts +17 -0
- package/dist/components/atoms/spinner.d.ts.map +1 -0
- package/dist/components/atoms/spinner.js +14 -0
- package/dist/components/atoms/spinner.js.map +1 -0
- package/dist/components/atoms/spinner.stories.d.ts +7 -0
- package/dist/components/atoms/spinner.stories.d.ts.map +1 -0
- package/dist/components/atoms/spinner.stories.js +9 -0
- package/dist/components/atoms/spinner.stories.js.map +1 -0
- package/dist/components/atoms/toggle.d.ts +9 -0
- package/dist/components/atoms/toggle.d.ts.map +1 -0
- package/dist/components/atoms/toggle.js +6 -0
- package/dist/components/atoms/toggle.js.map +1 -0
- package/dist/components/demos/DestinationDemo.d.ts +48 -0
- package/dist/components/demos/DestinationDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.js +105 -0
- package/dist/components/demos/DestinationDemo.js.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.js +53 -0
- package/dist/components/demos/DestinationDemo.stories.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.d.ts +34 -0
- package/dist/components/demos/DestinationInitDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.js +73 -0
- package/dist/components/demos/DestinationInitDemo.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.js +39 -0
- package/dist/components/demos/DestinationInitDemo.stories.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.d.ts +30 -0
- package/dist/components/demos/PromotionPlayground.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.js +366 -0
- package/dist/components/demos/PromotionPlayground.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts +27 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.js +32 -0
- package/dist/components/demos/PromotionPlayground.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts +24 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js +10 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts +7 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js +71 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/index.d.ts +3 -0
- package/dist/components/molecules/architecture-flow/index.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/index.js +2 -0
- package/dist/components/molecules/architecture-flow/index.js.map +1 -0
- package/dist/components/molecules/code-box.d.ts +75 -0
- package/dist/components/molecules/code-box.d.ts.map +1 -0
- package/dist/components/molecules/code-box.js +174 -0
- package/dist/components/molecules/code-box.js.map +1 -0
- package/dist/components/molecules/code-box.stories.d.ts +87 -0
- package/dist/components/molecules/code-box.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-box.stories.js +300 -0
- package/dist/components/molecules/code-box.stories.js.map +1 -0
- package/dist/components/molecules/code-snippet.d.ts +58 -0
- package/dist/components/molecules/code-snippet.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.js +72 -0
- package/dist/components/molecules/code-snippet.js.map +1 -0
- package/dist/components/molecules/code-snippet.stories.d.ts +23 -0
- package/dist/components/molecules/code-snippet.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.stories.js +87 -0
- package/dist/components/molecules/code-snippet.stories.js.map +1 -0
- package/dist/components/molecules/dropdown.d.ts +68 -0
- package/dist/components/molecules/dropdown.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.js +47 -0
- package/dist/components/molecules/dropdown.js.map +1 -0
- package/dist/components/molecules/dropdown.stories.d.ts +7 -0
- package/dist/components/molecules/dropdown.stories.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.stories.js +18 -0
- package/dist/components/molecules/dropdown.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts +74 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.js +1039 -0
- package/dist/components/molecules/flow-map/FlowMap.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts +47 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js +355 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts +29 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js +117 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/index.d.ts +3 -0
- package/dist/components/molecules/flow-map/index.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/index.js +2 -0
- package/dist/components/molecules/flow-map/index.js.map +1 -0
- package/dist/components/molecules/preview.d.ts +23 -0
- package/dist/components/molecules/preview.d.ts.map +1 -0
- package/dist/components/molecules/preview.js +232 -0
- package/dist/components/molecules/preview.js.map +1 -0
- package/dist/components/molecules/preview.stories.d.ts +23 -0
- package/dist/components/molecules/preview.stories.d.ts.map +1 -0
- package/dist/components/molecules/preview.stories.js +186 -0
- package/dist/components/molecules/preview.stories.js.map +1 -0
- package/dist/components/molecules/property-table.d.ts +7 -0
- package/dist/components/molecules/property-table.d.ts.map +1 -0
- package/dist/components/molecules/property-table.js +88 -0
- package/dist/components/molecules/property-table.js.map +1 -0
- package/dist/components/molecules/property-table.stories.d.ts +24 -0
- package/dist/components/molecules/property-table.stories.d.ts.map +1 -0
- package/dist/components/molecules/property-table.stories.js +86 -0
- package/dist/components/molecules/property-table.stories.js.map +1 -0
- package/dist/components/organisms/browser-box.d.ts +31 -0
- package/dist/components/organisms/browser-box.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.js +80 -0
- package/dist/components/organisms/browser-box.js.map +1 -0
- package/dist/components/organisms/browser-box.stories.d.ts +26 -0
- package/dist/components/organisms/browser-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.stories.js +102 -0
- package/dist/components/organisms/browser-box.stories.js.map +1 -0
- package/dist/components/organisms/collector-box.d.ts +24 -0
- package/dist/components/organisms/collector-box.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.js +56 -0
- package/dist/components/organisms/collector-box.js.map +1 -0
- package/dist/components/organisms/collector-box.stories.d.ts +22 -0
- package/dist/components/organisms/collector-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.stories.js +59 -0
- package/dist/components/organisms/collector-box.stories.js.map +1 -0
- package/dist/components/organisms/live-code.d.ts +22 -0
- package/dist/components/organisms/live-code.d.ts.map +1 -0
- package/dist/components/organisms/live-code.js +50 -0
- package/dist/components/organisms/live-code.js.map +1 -0
- package/dist/components/organisms/live-code.stories.d.ts +24 -0
- package/dist/components/organisms/live-code.stories.d.ts.map +1 -0
- package/dist/components/organisms/live-code.stories.js +55 -0
- package/dist/components/organisms/live-code.stories.js.map +1 -0
- package/dist/components/ui/button.d.ts +4 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +6 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/icon.d.ts +5 -0
- package/dist/components/ui/icon.d.ts.map +1 -0
- package/dist/components/ui/icon.js +5 -0
- package/dist/components/ui/icon.js.map +1 -0
- package/dist/contexts/GridHeightContext.d.ts +11 -0
- package/dist/contexts/GridHeightContext.d.ts.map +1 -0
- package/dist/contexts/GridHeightContext.js +14 -0
- package/dist/contexts/GridHeightContext.js.map +1 -0
- package/dist/helpers/capture.d.ts +83 -0
- package/dist/helpers/capture.d.ts.map +1 -0
- package/dist/helpers/capture.js +125 -0
- package/dist/helpers/capture.js.map +1 -0
- package/dist/helpers/destinations.d.ts +21 -0
- package/dist/helpers/destinations.d.ts.map +1 -0
- package/dist/helpers/destinations.js +46 -0
- package/dist/helpers/destinations.js.map +1 -0
- package/dist/hooks/useDropdown.d.ts +34 -0
- package/dist/hooks/useDropdown.d.ts.map +1 -0
- package/dist/hooks/useDropdown.js +66 -0
- package/dist/hooks/useDropdown.js.map +1 -0
- package/dist/hooks/useMonacoHeight.d.ts +31 -0
- package/dist/hooks/useMonacoHeight.d.ts.map +1 -0
- package/dist/hooks/useMonacoHeight.js +83 -0
- package/dist/hooks/useMonacoHeight.js.map +1 -0
- package/dist/hooks/useTreeState.d.ts +32 -0
- package/dist/hooks/useTreeState.d.ts.map +1 -0
- package/dist/hooks/useTreeState.js +94 -0
- package/dist/hooks/useTreeState.js.map +1 -0
- package/dist/index.d.ts +69 -1338
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/MDXProvider.d.ts +40 -0
- package/dist/providers/MDXProvider.d.ts.map +1 -0
- package/dist/providers/MDXProvider.js +57 -0
- package/dist/providers/MDXProvider.js.map +1 -0
- package/dist/themes/index.d.ts +23 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +29 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/lighthouse.d.ts +26 -0
- package/dist/themes/lighthouse.d.ts.map +1 -0
- package/dist/themes/lighthouse.js +230 -0
- package/dist/themes/lighthouse.js.map +1 -0
- package/dist/themes/palenight.d.ts +31 -0
- package/dist/themes/palenight.d.ts.map +1 -0
- package/dist/themes/palenight.js +236 -0
- package/dist/themes/palenight.js.map +1 -0
- package/dist/themes/types.d.ts +103 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +8 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/types/intellisense.d.ts +33 -0
- package/dist/types/intellisense.d.ts.map +1 -0
- package/dist/types/intellisense.js +2 -0
- package/dist/types/intellisense.js.map +1 -0
- package/dist/utils/code-normalizer.d.ts +11 -0
- package/dist/utils/code-normalizer.d.ts.map +1 -0
- package/dist/utils/code-normalizer.js +21 -0
- package/dist/utils/code-normalizer.js.map +1 -0
- package/dist/utils/contract-path-walker.d.ts +27 -0
- package/dist/utils/contract-path-walker.d.ts.map +1 -0
- package/dist/utils/contract-path-walker.js +145 -0
- package/dist/utils/contract-path-walker.js.map +1 -0
- package/dist/utils/format-code.d.ts +9 -0
- package/dist/utils/format-code.d.ts.map +1 -0
- package/dist/utils/format-code.js +77 -0
- package/dist/utils/format-code.js.map +1 -0
- package/dist/utils/mapping-context-detector.d.ts +17 -0
- package/dist/utils/mapping-context-detector.d.ts.map +1 -0
- package/dist/utils/mapping-context-detector.js +22 -0
- package/dist/utils/mapping-context-detector.js.map +1 -0
- package/dist/utils/monaco-context-types.d.ts +39 -0
- package/dist/utils/monaco-context-types.d.ts.map +1 -0
- package/dist/utils/monaco-context-types.js +426 -0
- package/dist/utils/monaco-context-types.js.map +1 -0
- package/dist/utils/monaco-decorators.d.ts +17 -0
- package/dist/utils/monaco-decorators.d.ts.map +1 -0
- package/dist/utils/monaco-decorators.js +81 -0
- package/dist/utils/monaco-decorators.js.map +1 -0
- package/dist/utils/monaco-formatters.d.ts +16 -0
- package/dist/utils/monaco-formatters.d.ts.map +1 -0
- package/dist/utils/monaco-formatters.js +139 -0
- package/dist/utils/monaco-formatters.js.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts +13 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js +168 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js.map +1 -0
- package/dist/utils/monaco-json-path.d.ts +12 -0
- package/dist/utils/monaco-json-path.d.ts.map +1 -0
- package/dist/utils/monaco-json-path.js +68 -0
- package/dist/utils/monaco-json-path.js.map +1 -0
- package/dist/utils/monaco-json-schema.d.ts +45 -0
- package/dist/utils/monaco-json-schema.d.ts.map +1 -0
- package/dist/utils/monaco-json-schema.js +90 -0
- package/dist/utils/monaco-json-schema.js.map +1 -0
- package/dist/utils/monaco-schema-contract.d.ts +8 -0
- package/dist/utils/monaco-schema-contract.d.ts.map +1 -0
- package/dist/utils/monaco-schema-contract.js +73 -0
- package/dist/utils/monaco-schema-contract.js.map +1 -0
- package/dist/utils/monaco-schema-enrichment.d.ts +26 -0
- package/dist/utils/monaco-schema-enrichment.d.ts.map +1 -0
- package/dist/utils/monaco-schema-enrichment.js +31 -0
- package/dist/utils/monaco-schema-enrichment.js.map +1 -0
- package/dist/utils/monaco-schema-flow-config.d.ts +10 -0
- package/dist/utils/monaco-schema-flow-config.d.ts.map +1 -0
- package/dist/utils/monaco-schema-flow-config.js +201 -0
- package/dist/utils/monaco-schema-flow-config.js.map +1 -0
- package/dist/utils/monaco-schema-variables.d.ts +4 -0
- package/dist/utils/monaco-schema-variables.d.ts.map +1 -0
- package/dist/utils/monaco-schema-variables.js +26 -0
- package/dist/utils/monaco-schema-variables.js.map +1 -0
- package/dist/utils/monaco-types.d.ts +174 -0
- package/dist/utils/monaco-types.d.ts.map +1 -0
- package/dist/utils/monaco-types.js +378 -0
- package/dist/utils/monaco-types.js.map +1 -0
- package/dist/utils/monaco-walkeros-completions.d.ts +23 -0
- package/dist/utils/monaco-walkeros-completions.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-completions.js +258 -0
- package/dist/utils/monaco-walkeros-completions.js.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts +29 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.js +87 -0
- package/dist/utils/monaco-walkeros-decorations.js.map +1 -0
- package/dist/utils/monaco-walkeros-markers.d.ts +13 -0
- package/dist/utils/monaco-walkeros-markers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-markers.js +69 -0
- package/dist/utils/monaco-walkeros-markers.js.map +1 -0
- package/dist/utils/monaco-walkeros-providers.d.ts +19 -0
- package/dist/utils/monaco-walkeros-providers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-providers.js +284 -0
- package/dist/utils/monaco-walkeros-providers.js.map +1 -0
- package/dist/utils/path-analyzer.d.ts +88 -0
- package/dist/utils/path-analyzer.d.ts.map +1 -0
- package/dist/utils/path-analyzer.js +215 -0
- package/dist/utils/path-analyzer.js.map +1 -0
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
"use strict";var e,n,t,r=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,n)=>function(){return e&&(n=(0,e[s(e)[0]])(e=0)),n},d=(e,n)=>{for(var t in n)o(e,t,{get:n[t],enumerable:!0})},u=(e,n,t,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let a of s(n))l.call(e,a)||a===t||o(e,a,{get:()=>n[a],enumerable:!(r=i(n,a))||r.enumerable});return e},p=(e,n,t)=>(t=null!=e?r(a(e)):{},u(!n&&e&&e.__esModule?t:o(t,"default",{value:e,enumerable:!0}),e));var f,g,m=c({"src/utils/monaco-context-types.ts"(){e="\n// WalkerOS Core Types\ndeclare namespace WalkerOS {\n // Utility types\n type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n };\n\n type PromiseOrValue<T> = T | Promise<T>;\n\n // Property types\n type PropertyType = boolean | string | number | {\n [key: string]: Property;\n };\n\n type Property = PropertyType | Array<PropertyType>;\n\n interface Properties {\n [key: string]: Property | undefined;\n }\n\n interface OrderedProperties {\n [key: string]: [Property, number] | undefined;\n }\n\n // Consent\n interface Consent {\n [name: string]: boolean;\n }\n\n // User\n interface User extends Properties {\n id?: string;\n device?: string;\n session?: string;\n hash?: string;\n address?: string;\n email?: string;\n phone?: string;\n userAgent?: string;\n browser?: string;\n browserVersion?: string;\n deviceType?: string;\n language?: string;\n country?: string;\n region?: string;\n city?: string;\n zip?: string;\n timezone?: string;\n os?: string;\n osVersion?: string;\n screenSize?: string;\n ip?: string;\n internal?: boolean;\n }\n\n // Version\n interface Version extends Properties {\n source: string;\n tagging: number;\n }\n\n // Source\n type SourceType = 'web' | 'server' | 'app' | 'other' | string;\n\n interface Source extends Properties {\n type: SourceType;\n id: string;\n previous_id: string;\n }\n\n // Entity\n type Entities = Array<Entity>;\n\n interface Entity {\n entity: string;\n data: Properties;\n nested: Entities;\n context: OrderedProperties;\n }\n\n // Event\n interface Event {\n name: string;\n data: Properties;\n context: OrderedProperties;\n globals: Properties;\n custom: Properties;\n user: User;\n nested: Entities;\n consent: Consent;\n id: string;\n trigger: string;\n entity: string;\n action: string;\n timestamp: number;\n timing: number;\n group: string;\n count: number;\n version: Version;\n source: Source;\n }\n\n type DeepPartialEvent = DeepPartial<Event>;\n}\n\n// Mapping Types\ndeclare namespace Mapping {\n type ValueType = string | ValueConfig;\n type Value = ValueType | Array<ValueType>;\n type Values = Array<Value>;\n\n interface ValueConfig {\n condition?: Condition;\n consent?: WalkerOS.Consent;\n fn?: Fn;\n key?: string;\n loop?: Loop;\n map?: Map;\n set?: Value[];\n validate?: Validate;\n value?: WalkerOS.PropertyType;\n }\n\n type Loop = [Value, Value];\n\n type Map = {\n [key: string]: Value;\n };\n\n interface Options {\n consent?: WalkerOS.Consent;\n collector?: Collector.Instance;\n props?: unknown;\n }\n\n type Condition = (\n value: WalkerOS.DeepPartialEvent | unknown,\n mapping?: Value,\n collector?: Collector.Instance\n ) => WalkerOS.PromiseOrValue<boolean>;\n\n type Fn = (\n value: WalkerOS.DeepPartialEvent | unknown,\n mapping: Value,\n options: Options\n ) => WalkerOS.PromiseOrValue<WalkerOS.Property | unknown>;\n\n type Validate = (value?: unknown) => WalkerOS.PromiseOrValue<boolean>;\n}\n\n// Collector Types (minimal for fn context)\ndeclare namespace Collector {\n interface Instance {\n push: any;\n command: any;\n allowed: boolean;\n config: any;\n consent: WalkerOS.Consent;\n count: number;\n custom: WalkerOS.Properties;\n globals: WalkerOS.Properties;\n group: string;\n queue: any[];\n round: number;\n session: any;\n timing: number;\n user: WalkerOS.User;\n version: string;\n [key: string]: any;\n }\n}\n\n// Parameter declarations for fn context\ndeclare const value: WalkerOS.DeepPartialEvent | unknown;\ndeclare const mapping: Mapping.Value;\ndeclare const options: Mapping.Options;\n",n="\n// WalkerOS Core Types\ndeclare namespace WalkerOS {\n // Utility types\n type DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n };\n\n type PromiseOrValue<T> = T | Promise<T>;\n\n // Property types\n type PropertyType = boolean | string | number | {\n [key: string]: Property;\n };\n\n type Property = PropertyType | Array<PropertyType>;\n\n interface Properties {\n [key: string]: Property | undefined;\n }\n\n interface OrderedProperties {\n [key: string]: [Property, number] | undefined;\n }\n\n // Consent\n interface Consent {\n [name: string]: boolean;\n }\n\n // User\n interface User extends Properties {\n id?: string;\n device?: string;\n session?: string;\n hash?: string;\n address?: string;\n email?: string;\n phone?: string;\n userAgent?: string;\n browser?: string;\n browserVersion?: string;\n deviceType?: string;\n language?: string;\n country?: string;\n region?: string;\n city?: string;\n zip?: string;\n timezone?: string;\n os?: string;\n osVersion?: string;\n screenSize?: string;\n ip?: string;\n internal?: boolean;\n }\n\n // Version\n interface Version extends Properties {\n source: string;\n tagging: number;\n }\n\n // Source\n type SourceType = 'web' | 'server' | 'app' | 'other' | string;\n\n interface Source extends Properties {\n type: SourceType;\n id: string;\n previous_id: string;\n }\n\n // Entity\n type Entities = Array<Entity>;\n\n interface Entity {\n entity: string;\n data: Properties;\n nested: Entities;\n context: OrderedProperties;\n }\n\n // Event\n interface Event {\n name: string;\n data: Properties;\n context: OrderedProperties;\n globals: Properties;\n custom: Properties;\n user: User;\n nested: Entities;\n consent: Consent;\n id: string;\n trigger: string;\n entity: string;\n action: string;\n timestamp: number;\n timing: number;\n group: string;\n count: number;\n version: Version;\n source: Source;\n }\n\n type DeepPartialEvent = DeepPartial<Event>;\n}\n\n// Mapping Types\ndeclare namespace Mapping {\n type ValueType = string | ValueConfig;\n type Value = ValueType | Array<ValueType>;\n\n interface ValueConfig {\n condition?: Condition;\n consent?: WalkerOS.Consent;\n fn?: Fn;\n key?: string;\n loop?: Loop;\n map?: Map;\n set?: Value[];\n validate?: Validate;\n value?: WalkerOS.PropertyType;\n }\n\n type Loop = [Value, Value];\n\n type Map = {\n [key: string]: Value;\n };\n\n type Condition = (\n value: WalkerOS.DeepPartialEvent | unknown,\n mapping?: Value,\n collector?: Collector.Instance\n ) => WalkerOS.PromiseOrValue<boolean>;\n\n type Fn = (\n value: WalkerOS.DeepPartialEvent | unknown,\n mapping: Value,\n options: any\n ) => WalkerOS.PromiseOrValue<WalkerOS.Property | unknown>;\n\n type Validate = (value?: unknown) => WalkerOS.PromiseOrValue<boolean>;\n}\n\n// Collector Types (full interface for condition context)\ndeclare namespace Collector {\n interface SessionData extends WalkerOS.Properties {\n isStart: boolean;\n storage: boolean;\n id?: string;\n start?: number;\n marketing?: true;\n updated?: number;\n isNew?: boolean;\n device?: string;\n count?: number;\n runs?: number;\n }\n\n interface Config {\n run?: boolean;\n tagging: number;\n globalsStatic: WalkerOS.Properties;\n sessionStatic: Partial<SessionData>;\n verbose: boolean;\n onError?: any;\n onLog?: any;\n }\n\n interface Instance {\n push: any;\n command: any;\n allowed: boolean;\n config: Config;\n consent: WalkerOS.Consent;\n count: number;\n custom: WalkerOS.Properties;\n sources: any;\n destinations: any;\n globals: WalkerOS.Properties;\n group: string;\n hooks: any;\n on: any;\n queue: any[];\n round: number;\n session: undefined | SessionData;\n timing: number;\n user: WalkerOS.User;\n version: string;\n }\n}\n\n// Parameter declarations for condition context\ndeclare const value: WalkerOS.DeepPartialEvent | unknown;\ndeclare const mapping: Mapping.Value;\ndeclare const collector: Collector.Instance | undefined;\n",t="\n// Parameter declaration for validate context\ndeclare const value: unknown;\n"}}),h=c({"walkeros-types:virtual:walkeros-core-types"(){f='/**\n * Options for responding to an HTTP request.\n * Same interface for web and server — sources implement the handler.\n */\ninterface RespondOptions {\n /** Response body. Objects are JSON-serialized by source. */\n body?: unknown;\n /** HTTP status code (default: 200). Server-only, ignored by web sources. */\n status?: number;\n /** HTTP response headers. Server-only, ignored by web sources. */\n headers?: Record<string, string>;\n}\n/**\n * Standardized response function available on env for every step.\n * Idempotent: first call wins, subsequent calls are no-ops.\n * Created by sources via createRespond(), consumed by any step.\n */\ntype RespondFn = (options?: RespondOptions) => void;\n/**\n * Creates an idempotent respond function.\n * The sender callback is source-specific (Express wraps res, Fetch wraps Response, etc.).\n *\n * @param sender - Platform-specific function that actually sends the response\n * @returns Idempotent respond function (first call wins)\n */\ndeclare function createRespond(sender: (options: RespondOptions) => void): RespondFn;\n\n/**\n * Core collector configuration interface\n */\ninterface Config$8 {\n /** Whether to run collector automatically */\n run?: boolean;\n /** Version for event tagging */\n tagging: number;\n /** Static global properties even on a new run */\n globalsStatic: Properties;\n /** Static session data even on a new run */\n sessionStatic: Partial<SessionData>;\n /** Logger configuration */\n logger?: Config$5;\n}\n/**\n * Initialization configuration that extends Config with initial state\n */\ninterface InitConfig extends Partial<Config$8> {\n /** Initial consent state */\n consent?: Consent;\n /** Initial user data */\n user?: User;\n /** Initial global properties */\n globals?: Properties;\n /** Source configurations */\n sources?: InitSources;\n /** Destination configurations */\n destinations?: InitDestinations;\n /** Transformer configurations */\n transformers?: InitTransformers;\n /** Store configurations */\n stores?: InitStores;\n /** Initial custom properties */\n custom?: Properties;\n}\ninterface SessionData extends Properties {\n isStart: boolean;\n storage: boolean;\n id?: string;\n start?: number;\n marketing?: true;\n updated?: number;\n isNew?: boolean;\n device?: string;\n count?: number;\n runs?: number;\n}\ninterface Status {\n startedAt: number;\n in: number;\n out: number;\n failed: number;\n sources: Record<string, SourceStatus>;\n destinations: Record<string, DestinationStatus>;\n}\ninterface SourceStatus {\n count: number;\n lastAt?: number;\n duration: number;\n}\ninterface DestinationStatus {\n count: number;\n failed: number;\n lastAt?: number;\n duration: number;\n}\ninterface Sources {\n [id: string]: Instance$1;\n}\ninterface Destinations$1 {\n [id: string]: Instance$4;\n}\ninterface Transformers$1 {\n [id: string]: Instance$2;\n}\ninterface Stores$1 {\n [id: string]: Instance;\n}\ntype CommandType = \'action\' | \'config\' | \'consent\' | \'context\' | \'destination\' | \'elb\' | \'globals\' | \'hook\' | \'init\' | \'link\' | \'run\' | \'user\' | \'walker\' | string;\n/**\n * Options passed to collector.push() from sources.\n * NOT a Context - just push metadata.\n */\ninterface PushOptions {\n id?: string;\n ingest?: unknown;\n respond?: RespondFn;\n mapping?: Config$4;\n preChain?: string[];\n}\n/**\n * Push function signature - handles events only\n */\ninterface PushFn$1 {\n (event: DeepPartialEvent, options?: PushOptions): Promise<PushResult>;\n}\n/**\n * Command function signature - handles walker commands only\n */\ninterface CommandFn {\n (command: \'config\', config: Partial<Config$8>): Promise<PushResult>;\n (command: \'consent\', consent: Consent): Promise<PushResult>;\n <T extends Types$4>(command: \'destination\', destination: Init$3<T> | Instance$4<T>, config?: Config$7<T>): Promise<PushResult>;\n <K extends keyof Functions>(command: \'hook\', name: K, hookFn: Functions[K]): Promise<PushResult>;\n (command: \'on\', type: Types$3, rules: SingleOrArray<Options>): Promise<PushResult>;\n (command: \'user\', user: User): Promise<PushResult>;\n (command: \'run\', runState?: {\n consent?: Consent;\n user?: User;\n globals?: Properties;\n custom?: Properties;\n }): Promise<PushResult>;\n (command: string, data?: unknown, options?: unknown): Promise<PushResult>;\n}\ninterface Instance$5 {\n push: PushFn$1;\n command: CommandFn;\n allowed: boolean;\n config: Config$8;\n consent: Consent;\n count: number;\n custom: Properties;\n sources: Sources;\n destinations: Destinations$1;\n transformers: Transformers$1;\n stores: Stores$1;\n globals: Properties;\n group: string;\n hooks: Functions;\n logger: Instance$3;\n on: OnConfig;\n queue: Events;\n round: number;\n session: undefined | SessionData;\n status: Status;\n timing: number;\n user: User;\n version: string;\n pending: {\n sources: InitSources;\n destinations: InitDestinations;\n };\n}\n\ntype collector_CommandFn = CommandFn;\ntype collector_CommandType = CommandType;\ntype collector_DestinationStatus = DestinationStatus;\ntype collector_InitConfig = InitConfig;\ntype collector_PushOptions = PushOptions;\ntype collector_SessionData = SessionData;\ntype collector_SourceStatus = SourceStatus;\ntype collector_Sources = Sources;\ntype collector_Status = Status;\ndeclare namespace collector {\n export type { collector_CommandFn as CommandFn, collector_CommandType as CommandType, Config$8 as Config, collector_DestinationStatus as DestinationStatus, Destinations$1 as Destinations, collector_InitConfig as InitConfig, Instance$5 as Instance, PushFn$1 as PushFn, collector_PushOptions as PushOptions, collector_SessionData as SessionData, collector_SourceStatus as SourceStatus, collector_Sources as Sources, collector_Status as Status, Stores$1 as Stores, Transformers$1 as Transformers };\n}\n\n/**\n * Base context interface for walkerOS stages.\n * Sources, Transformers, and Destinations extend this.\n */\ninterface Base<C = unknown, E = unknown> {\n collector: Instance$5;\n logger: Instance$3;\n config: C;\n env: E;\n}\n\ntype context_Base<C = unknown, E = unknown> = Base<C, E>;\ndeclare namespace context {\n export type { context_Base as Base };\n}\n\n/**\n * Context provided to the destroy() lifecycle method.\n *\n * A subset of the init context — config, env, logger, and id.\n * Does NOT include collector or event data. Destroy should only\n * clean up resources, not interact with the event pipeline.\n */\ninterface DestroyContext<C = unknown, E = unknown> {\n /** Step instance ID. */\n id: string;\n /** Step configuration (contains settings with SDK clients, etc.). */\n config: C;\n /** Runtime environment/dependencies (DB clients, auth clients, etc.). */\n env: E;\n /** Scoped logger for this step instance. */\n logger: Instance$3;\n}\n/**\n * Destroy function signature for step lifecycle cleanup.\n *\n * Implementations should be idempotent — calling destroy() twice must not throw.\n * Used for closing connections, clearing timers, releasing SDK clients.\n */\ntype DestroyFn<C = unknown, E = unknown> = (context: DestroyContext<C, E>) => PromiseOrValue<void>;\n\ntype lifecycle_DestroyContext<C = unknown, E = unknown> = DestroyContext<C, E>;\ntype lifecycle_DestroyFn<C = unknown, E = unknown> = DestroyFn<C, E>;\ndeclare namespace lifecycle {\n export type { lifecycle_DestroyContext as DestroyContext, lifecycle_DestroyFn as DestroyFn };\n}\n\n/**\n * Base environment requirements interface for walkerOS destinations\n *\n * This defines the core interface that destinations can use to declare\n * their runtime environment requirements. Platform-specific extensions\n * should extend this interface.\n */\ninterface BaseEnv$3 {\n /**\n * Generic global properties that destinations may require\n * Platform-specific implementations can extend this interface\n */\n [key: string]: unknown;\n}\n/**\n * Type bundle for destination generics.\n * Groups Settings, InitSettings, Mapping, and Env into a single type parameter.\n */\ninterface Types$4<S = unknown, M = unknown, E = BaseEnv$3, I = S> {\n settings: S;\n initSettings: I;\n mapping: M;\n env: E;\n}\n/**\n * Generic constraint for Types - ensures T has required properties for indexed access\n */\ntype TypesGeneric$3 = {\n settings: any;\n initSettings: any;\n mapping: any;\n env: any;\n};\n/**\n * Type extractors for consistent usage with Types bundle\n */\ntype Settings$4<T extends TypesGeneric$3 = Types$4> = T[\'settings\'];\ntype InitSettings$3<T extends TypesGeneric$3 = Types$4> = T[\'initSettings\'];\ntype Mapping$1<T extends TypesGeneric$3 = Types$4> = T[\'mapping\'];\ntype Env$3<T extends TypesGeneric$3 = Types$4> = T[\'env\'];\n/**\n * Inference helper: Extract Types from Instance\n */\ntype TypesOf$3<I> = I extends Instance$4<infer T> ? T : never;\ninterface Instance$4<T extends TypesGeneric$3 = Types$4> {\n config: Config$7<T>;\n queuePush?: Events;\n queueOn?: Array<{\n type: Types$3;\n data?: unknown;\n }>;\n dlq?: DLQ;\n batches?: BatchRegistry<Mapping$1<T>>;\n type?: string;\n env?: Env$3<T>;\n init?: InitFn$2<T>;\n push: PushFn<T>;\n pushBatch?: PushBatchFn<T>;\n on?: OnFn;\n destroy?: DestroyFn<Config$7<T>, Env$3<T>>;\n}\ninterface Config$7<T extends TypesGeneric$3 = Types$4> {\n /** Required consent states to push events; queues events when not granted. */\n consent?: Consent;\n /** Implementation-specific configuration passed to the init function. */\n settings?: InitSettings$3<T>;\n /** Global data transformation applied to all events; result passed as context.data to push. */\n data?: Value | Values;\n /** Runtime dependencies merged from code and config env; extensible per destination. */\n env?: Env$3<T>;\n /** Destination identifier; auto-generated if not provided. */\n id?: string;\n /** Whether the destination has been initialized; prevents re-initialization. */\n init?: boolean;\n /** Whether to load external scripts (e.g., gtag.js); destination-specific behavior. */\n loadScript?: boolean;\n /** Logger configuration (level, handler) to override the collector\'s defaults. */\n logger?: Config$5;\n /** Entity-action rules to filter, rename, transform, and batch events for this destination. */\n mapping?: Rules<Rule<Mapping$1<T>>>;\n /** Pre-processing rules applied to all events before mapping; modifies events in-place. */\n policy?: Policy$1;\n /** Whether to queue events when consent is not granted; defaults to true. */\n queue?: boolean;\n /** Defer destination initialization until these collector events fire (e.g., `[\'consent\']`). */\n require?: string[];\n /** Transformer chain to run after collector processing but before this destination. */\n before?: string | string[];\n}\ntype PartialConfig$1<T extends TypesGeneric$3 = Types$4> = Config$7<Types$4<Partial<Settings$4<T>> | Settings$4<T>, Partial<Mapping$1<T>> | Mapping$1<T>, Env$3<T>>>;\ninterface Policy$1 {\n [key: string]: Value;\n}\ntype Code$1<T extends TypesGeneric$3 = Types$4> = Instance$4<T>;\ntype Init$3<T extends TypesGeneric$3 = Types$4> = {\n code: Code$1<T>;\n config?: Partial<Config$7<T>>;\n env?: Partial<Env$3<T>>;\n before?: string | string[];\n};\ninterface InitDestinations {\n [key: string]: Init$3<any>;\n}\ninterface Destinations {\n [key: string]: Instance$4;\n}\n/**\n * Context provided to destination functions.\n * Extends base context with destination-specific properties.\n */\ninterface Context$5<T extends TypesGeneric$3 = Types$4> extends Base<Config$7<T>, Env$3<T>> {\n id: string;\n data?: Data$1;\n}\ninterface PushContext<T extends TypesGeneric$3 = Types$4> extends Context$5<T> {\n ingest?: unknown;\n rule?: Rule<Mapping$1<T>>;\n}\ninterface PushBatchContext<T extends TypesGeneric$3 = Types$4> extends Context$5<T> {\n ingest?: unknown;\n rule?: Rule<Mapping$1<T>>;\n}\ntype InitFn$2<T extends TypesGeneric$3 = Types$4> = (context: Context$5<T>) => PromiseOrValue<void | false | Config$7<T>>;\ntype PushFn<T extends TypesGeneric$3 = Types$4> = (event: Event, context: PushContext<T>) => PromiseOrValue<void | unknown>;\ntype PushBatchFn<T extends TypesGeneric$3 = Types$4> = (batch: Batch<Mapping$1<T>>, context: PushBatchContext<T>) => void;\ntype PushEvent<Mapping = unknown> = {\n event: Event;\n mapping?: Rule<Mapping>;\n};\ntype PushEvents<Mapping = unknown> = Array<PushEvent<Mapping>>;\ninterface Batch<Mapping> {\n key: string;\n events: Events;\n data: Array<Data$1>;\n mapping?: Rule<Mapping>;\n}\ninterface BatchRegistry<Mapping> {\n [mappingKey: string]: {\n batched: Batch<Mapping>;\n batchFn: () => void;\n };\n}\ntype Data$1 = Property | undefined | Array<Property | undefined>;\ninterface Ref {\n type: string;\n data?: unknown;\n error?: unknown;\n}\ntype Push$1 = {\n queuePush?: Events;\n error?: unknown;\n};\ntype DLQ = Array<[Event, unknown]>;\n\ntype destination_Batch<Mapping> = Batch<Mapping>;\ntype destination_BatchRegistry<Mapping> = BatchRegistry<Mapping>;\ntype destination_DLQ = DLQ;\ntype destination_Destinations = Destinations;\ntype destination_InitDestinations = InitDestinations;\ntype destination_PushBatchContext<T extends TypesGeneric$3 = Types$4> = PushBatchContext<T>;\ntype destination_PushBatchFn<T extends TypesGeneric$3 = Types$4> = PushBatchFn<T>;\ntype destination_PushContext<T extends TypesGeneric$3 = Types$4> = PushContext<T>;\ntype destination_PushEvent<Mapping = unknown> = PushEvent<Mapping>;\ntype destination_PushEvents<Mapping = unknown> = PushEvents<Mapping>;\ntype destination_PushFn<T extends TypesGeneric$3 = Types$4> = PushFn<T>;\ntype destination_Ref = Ref;\ndeclare namespace destination {\n export type { BaseEnv$3 as BaseEnv, destination_Batch as Batch, destination_BatchRegistry as BatchRegistry, Code$1 as Code, Config$7 as Config, Context$5 as Context, destination_DLQ as DLQ, Data$1 as Data, destination_Destinations as Destinations, Env$3 as Env, Init$3 as Init, destination_InitDestinations as InitDestinations, InitFn$2 as InitFn, InitSettings$3 as InitSettings, Instance$4 as Instance, Mapping$1 as Mapping, PartialConfig$1 as PartialConfig, Policy$1 as Policy, Push$1 as Push, destination_PushBatchContext as PushBatchContext, destination_PushBatchFn as PushBatchFn, destination_PushContext as PushContext, destination_PushEvent as PushEvent, destination_PushEvents as PushEvents, destination_PushFn as PushFn, destination_Ref as Ref, Settings$4 as Settings, Types$4 as Types, TypesGeneric$3 as TypesGeneric, TypesOf$3 as TypesOf };\n}\n\ninterface EventFn<R = Promise<PushResult>> {\n (partialEvent: DeepPartialEvent): R;\n (event: string): R;\n (event: string, data: Properties): R;\n}\ninterface Fn$2<R = Promise<PushResult>, Config = unknown> extends EventFn<R>, WalkerCommands<R, Config> {\n}\ninterface WalkerCommands<R = Promise<PushResult>, Config = unknown> {\n (event: \'walker config\', config: Partial<Config>): R;\n (event: \'walker consent\', consent: Consent): R;\n <T extends Types$4>(event: \'walker destination\', destination: Init$3<T> | Instance$4<T>, config?: Config$7<T>): R;\n <K extends keyof Functions>(event: \'walker hook\', name: K, hookFn: Functions[K]): R;\n (event: \'walker on\', type: Types$3, rules: SingleOrArray<Options>): R;\n (event: \'walker user\', user: User): R;\n (event: \'walker run\', runState: {\n consent?: Consent;\n user?: User;\n globals?: Properties;\n custom?: Properties;\n }): R;\n}\ntype Event$1<R = Promise<PushResult>> = (partialEvent: DeepPartialEvent) => R;\ntype PushData<Config = unknown> = DeepPartial<Config> | Consent | User | Properties;\ninterface PushResult {\n ok: boolean;\n event?: Event;\n done?: Record<string, Ref>;\n queued?: Record<string, Ref>;\n failed?: Record<string, Ref>;\n}\ntype Layer = Array<IArguments | DeepPartialEvent | unknown[]>;\n\ntype elb_EventFn<R = Promise<PushResult>> = EventFn<R>;\ntype elb_Layer = Layer;\ntype elb_PushData<Config = unknown> = PushData<Config>;\ntype elb_PushResult = PushResult;\ntype elb_WalkerCommands<R = Promise<PushResult>, Config = unknown> = WalkerCommands<R, Config>;\ndeclare namespace elb {\n export type { Event$1 as Event, elb_EventFn as EventFn, Fn$2 as Fn, elb_Layer as Layer, elb_PushData as PushData, elb_PushResult as PushResult, elb_WalkerCommands as WalkerCommands };\n}\n\n/**\n * Flow Configuration System\n *\n * Core types for walkerOS unified configuration.\n * Platform-agnostic, runtime-focused.\n *\n * The Flow system enables "one config to rule them all" - a single\n * walkeros.config.json file that manages multiple flows\n * (web_prod, web_stage, server_prod, etc.) with shared configuration,\n * variables, and reusable definitions.\n *\n * ## Connection Rules\n *\n * Sources use `next` to connect to transformers (pre-collector chain).\n * Sources cannot have `before`.\n *\n * Destinations use `before` to connect to transformers (post-collector chain).\n * Destinations cannot have `next`.\n *\n * Transformers use `next` to chain to other transformers. The same transformer\n * pool is shared by both pre-collector and post-collector chains.\n *\n * The collector is implicit — it is never referenced directly in connections.\n * It sits between the source chain and the destination chain automatically.\n *\n * Circular `next` references are safely handled at runtime by `walkChain()`\n * in the collector module (visited-set detection).\n *\n * ```\n * Source → [next → Transformer chain] → Collector → [before → Transformer chain] → Destination\n * ```\n *\n * @packageDocumentation\n */\n\n/**\n * JSON Schema object for contract entry validation.\n * Standard JSON Schema with description/examples annotations.\n * Compatible with AJV for runtime validation.\n */\ntype ContractSchema = Record<string, unknown>;\n/**\n * Contract action entries keyed by action name.\n * Each value is a JSON Schema describing the expected WalkerOS.Event shape.\n * Use "*" as wildcard for all actions of an entity.\n */\ntype ContractActions = Record<string, ContractSchema>;\n/**\n * Entity-action event map used inside contracts.\n * Keyed by entity name, each value is an action map.\n * Use "*" as wildcard for all entities or all actions.\n */\ntype ContractEvents = Record<string, ContractActions>;\n/**\n * A single named contract entry.\n *\n * All sections are optional. Sections mirror WalkerOS.Event fields:\n * globals, context, custom, user, consent.\n * Entity-action schemas live under `events`.\n *\n * Use `extends` to inherit from another named contract (additive merge).\n */\ninterface ContractEntry {\n /** Inherit from another named contract (additive merge). */\n extends?: string;\n /** Contract version number (syncs to event.version.tagging). */\n tagging?: number;\n /** Human-readable description of the contract. */\n description?: string;\n /** JSON Schema for event.globals. */\n globals?: ContractSchema;\n /** JSON Schema for event.context. */\n context?: ContractSchema;\n /** JSON Schema for event.custom. */\n custom?: ContractSchema;\n /** JSON Schema for event.user. */\n user?: ContractSchema;\n /** JSON Schema for event.consent. */\n consent?: ContractSchema;\n /** Entity-action event schemas. */\n events?: ContractEvents;\n}\n/**\n * Named contract map.\n * Each key is a contract name, each value is a contract entry.\n *\n * Example:\n * ```json\n * {\n * "default": { "globals": { ... }, "consent": { ... } },\n * "web": { "extends": "default", "events": { ... } },\n * "server": { "extends": "default", "events": { ... } }\n * }\n * ```\n */\ntype Contract = Record<string, ContractEntry>;\n/**\n * Primitive value types for variables\n */\ntype Primitive = string | number | boolean;\n/**\n * Variables record type for interpolation.\n * Used at Config, Settings, Source, and Destination levels.\n */\ntype Variables = Record<string, Primitive>;\n/**\n * Definitions record type for reusable configurations.\n * Used at Config, Settings, Source, and Destination levels.\n */\ntype Definitions = Record<string, unknown>;\n/**\n * Inline code definition for sources/destinations/transformers.\n * Used instead of package when defining inline functions.\n */\ninterface InlineCode {\n push: string;\n type?: string;\n init?: string;\n}\n/**\n * Packages configuration for build.\n */\ntype Packages = Record<string, {\n version?: string;\n imports?: string[];\n path?: string;\n}>;\n/**\n * Web platform configuration.\n *\n * @remarks\n * Presence of this key indicates web platform (browser-based tracking).\n * Builds to IIFE format, ES2020 target, browser platform.\n */\ninterface Web {\n /**\n * Window property name for collector instance.\n * @default "collector"\n */\n windowCollector?: string;\n /**\n * Window property name for elb function.\n * @default "elb"\n */\n windowElb?: string;\n}\n/**\n * Server platform configuration.\n *\n * @remarks\n * Presence of this key indicates server platform (Node.js).\n * Builds to ESM format, Node18 target, node platform.\n * Reserved for future server-specific options.\n */\ninterface Server {\n}\n/**\n * Complete multi-flow configuration.\n * Root type for walkeros.config.json files.\n *\n * @remarks\n * If only one flow exists, it\'s auto-selected without --flow flag.\n * Convention: use "default" as the flow name for single-flow configs.\n *\n * @example\n * ```json\n * {\n * "version": 3,\n * "$schema": "https://walkeros.io/schema/flow/v3.json",\n * "variables": { "CURRENCY": "USD" },\n * "flows": {\n * "default": { "web": {}, ... }\n * }\n * }\n * ```\n */\ninterface Config$6 {\n /**\n * Configuration schema version.\n */\n version: 3;\n /**\n * JSON Schema reference for IDE validation.\n * @example "https://walkeros.io/schema/flow/v1.json"\n */\n $schema?: string;\n /**\n * Folders to include in the bundle output.\n * These folders are copied to dist/ during bundle, making them available\n * at runtime for both local and Docker execution.\n *\n * @remarks\n * Use for credential files, configuration, or other runtime assets.\n * Paths are relative to the config file location.\n * Default: `["./shared"]` if the folder exists, otherwise `[]`.\n *\n * @example\n * ```json\n * {\n * "include": ["./credentials", "./config"]\n * }\n * ```\n */\n include?: string[];\n /**\n * Data contract definition (version 2+).\n * Entity → action keyed JSON Schema with additive inheritance.\n */\n contract?: Contract;\n /**\n * Shared variables for interpolation.\n * Resolution: destination/source > Settings > Config level\n * Syntax: $var.name\n */\n variables?: Variables;\n /**\n * Reusable configuration definitions.\n * Syntax: $def.name\n */\n definitions?: Definitions;\n /**\n * Named flow configurations.\n * If only one flow exists, it\'s auto-selected.\n */\n flows: Record<string, Settings$3>;\n}\n/**\n * Single flow configuration.\n * Represents one deployment target (e.g., web_prod, server_stage).\n *\n * @remarks\n * Platform is determined by presence of `web` or `server` key.\n * Exactly one must be present.\n *\n * Variables/definitions cascade: source/destination > settings > config\n */\ninterface Settings$3 {\n /**\n * Web platform configuration.\n * Presence indicates web platform (browser-based tracking).\n * Mutually exclusive with `server`.\n */\n web?: Web;\n /**\n * Server platform configuration.\n * Presence indicates server platform (Node.js).\n * Mutually exclusive with `web`.\n */\n server?: Server;\n /**\n * Store configurations (key-value storage).\n *\n * @remarks\n * Stores provide key-value storage consumed by sources, transformers,\n * and destinations via env injection. Referenced using $store:storeId\n * prefix in env values.\n *\n * Key = unique store identifier (arbitrary)\n * Value = store reference with package and config\n */\n stores?: Record<string, StoreReference>;\n /**\n * Source configurations (data capture).\n *\n * @remarks\n * Sources capture events from various origins:\n * - Browser DOM interactions (clicks, page views)\n * - DataLayer pushes\n * - HTTP requests (server-side)\n * - Cloud function triggers\n *\n * Key = unique source identifier (arbitrary)\n * Value = source reference with package and config\n *\n * @example\n * ```json\n * {\n * "sources": {\n * "browser": {\n * "package": "@walkeros/web-source-browser",\n * "config": {\n * "settings": {\n * "pageview": true,\n * "session": true\n * }\n * }\n * }\n * }\n * }\n * ```\n */\n sources?: Record<string, SourceReference>;\n /**\n * Destination configurations (data output).\n *\n * @remarks\n * Destinations send processed events to external services:\n * - Google Analytics (gtag)\n * - Meta Pixel (fbq)\n * - Custom APIs\n * - Data warehouses\n *\n * Key = unique destination identifier (arbitrary)\n * Value = destination reference with package and config\n *\n * @example\n * ```json\n * {\n * "destinations": {\n * "gtag": {\n * "package": "@walkeros/web-destination-gtag",\n * "config": {\n * "settings": {\n * "ga4": { "measurementId": "G-XXXXXXXXXX" }\n * }\n * }\n * }\n * }\n * }\n * ```\n */\n destinations?: Record<string, DestinationReference>;\n /**\n * Transformer configurations (event transformation).\n *\n * @remarks\n * Transformers transform events in the pipeline:\n * - Pre-collector: Between sources and collector\n * - Post-collector: Between collector and destinations\n *\n * Key = unique transformer identifier (referenced by source.next or destination.before)\n * Value = transformer reference with package and config\n *\n * @example\n * ```json\n * {\n * "transformers": {\n * "enrich": {\n * "package": "@walkeros/transformer-enricher",\n * "config": { "apiUrl": "https://api.example.com" },\n * "next": "validate"\n * },\n * "validate": {\n * "package": "@walkeros/transformer-validator"\n * }\n * }\n * }\n * ```\n */\n transformers?: Record<string, TransformerReference>;\n /**\n * Collector configuration (event processing).\n *\n * @remarks\n * The collector is the central event processing engine.\n * Configuration includes:\n * - Consent management\n * - Global properties\n * - User identification\n * - Processing rules\n *\n * @see {@link Collector.InitConfig} for complete options\n *\n * @example\n * ```json\n * {\n * "collector": {\n * "run": true,\n * "tagging": 1,\n * "consent": {\n * "functional": true,\n * "marketing": false\n * },\n * "globals": {\n * "currency": "USD",\n * "environment": "production"\n * }\n * }\n * }\n * ```\n */\n collector?: InitConfig;\n /**\n * NPM packages to bundle.\n */\n packages?: Packages;\n /**\n * Flow-level variables.\n * Override Config.variables, overridden by source/destination variables.\n */\n variables?: Variables;\n /**\n * Flow-level definitions.\n * Extend Config.definitions, overridden by source/destination definitions.\n */\n definitions?: Definitions;\n}\n/**\n * Named example pair for a step.\n * `in` is the input to the step, `out` is the expected output.\n * `out: false` indicates the step filters/drops this event.\n */\ninterface StepExample {\n description?: string;\n in?: unknown;\n mapping?: unknown;\n out?: unknown;\n}\n/**\n * Named step examples keyed by scenario name.\n */\ntype StepExamples = Record<string, StepExample>;\n/**\n * Source reference with inline package syntax.\n *\n * @remarks\n * References a source package and provides configuration.\n * The package is automatically downloaded and imported during build.\n * Alternatively, use `code: true` for inline code execution.\n */\ninterface SourceReference {\n /**\n * Package specifier with optional version.\n *\n * @remarks\n * Formats:\n * - `"@walkeros/web-source-browser"` - Latest version\n * - `"@walkeros/web-source-browser@2.0.0"` - Specific version\n * - `"@walkeros/web-source-browser@^2.0.0"` - Semver range\n *\n * The CLI will:\n * 1. Parse the package reference\n * 2. Download from npm\n * 3. Auto-detect default or named export\n * 4. Generate import statement\n *\n * Optional when `code: true` is used for inline code execution.\n *\n * @example\n * "package": "@walkeros/web-source-browser@latest"\n */\n package?: string;\n /**\n * Resolved import variable name or built-in code source.\n *\n * @remarks\n * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),\n * or provided explicitly for advanced use cases.\n * - InlineCode: Object with type, push, and optional init for inline code definition.\n *\n * @example\n * // Using inline code object\n * {\n * "code": {\n * "type": "logger",\n * "push": "$code:(event) => console.log(event)"\n * }\n * }\n */\n code?: string | InlineCode;\n /**\n * Source-specific configuration.\n *\n * @remarks\n * Structure depends on the source package.\n * Passed to the source\'s initialization function.\n *\n * @example\n * ```json\n * {\n * "config": {\n * "settings": {\n * "pageview": true,\n * "session": true,\n * "elb": "elb",\n * "prefix": "data-elb"\n * }\n * }\n * }\n * ```\n */\n config?: unknown;\n /**\n * Source environment configuration.\n *\n * @remarks\n * Environment-specific settings for the source.\n * Merged with default source environment.\n */\n env?: unknown;\n /**\n * Mark as primary source (provides main ELB).\n *\n * @remarks\n * The primary source\'s ELB function is returned by `startFlow()`.\n * Only one source should be marked as primary per flow.\n *\n * @default false\n */\n primary?: boolean;\n /**\n * Source-level variables (highest priority in cascade).\n * Overrides flow and setup variables.\n */\n variables?: Variables;\n /**\n * Source-level definitions (highest priority in cascade).\n * Overrides flow and setup definitions.\n */\n definitions?: Definitions;\n /**\n * First transformer in pre-collector chain.\n *\n * @remarks\n * Name of the transformer to execute after this source captures an event.\n * Creates a pre-collector transformer chain. Chain ends at the collector.\n * If omitted, events route directly to the collector.\n * Can be an array for explicit chain control (bypasses transformer.next resolution).\n */\n next?: string | string[];\n /**\n * Named examples for testing and documentation.\n * Stripped during flow resolution (not included in bundles).\n */\n examples?: StepExamples;\n}\n/**\n * Transformer reference with inline package syntax.\n *\n * @remarks\n * References a transformer package and provides configuration.\n * Transformers transform events in the pipeline between sources and destinations.\n * Alternatively, use `code: true` for inline code execution.\n */\ninterface TransformerReference {\n /**\n * Package specifier with optional version.\n *\n * @remarks\n * Same format as SourceReference.package\n * Optional when `code: true` is used for inline code execution.\n *\n * @example\n * "package": "@walkeros/transformer-enricher@1.0.0"\n */\n package?: string;\n /**\n * Resolved import variable name or built-in code transformer.\n *\n * @remarks\n * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),\n * or provided explicitly for advanced use cases.\n * - InlineCode: Object with type, push, and optional init for inline code definition.\n *\n * @example\n * // Using inline code object\n * {\n * "code": {\n * "type": "enricher",\n * "push": "$code:(event) => ({ ...event, data: { enriched: true } })"\n * }\n * }\n */\n code?: string | InlineCode;\n /**\n * Transformer-specific configuration.\n *\n * @remarks\n * Structure depends on the transformer package.\n * Passed to the transformer\'s initialization function.\n */\n config?: unknown;\n /**\n * Transformer environment configuration.\n *\n * @remarks\n * Environment-specific settings for the transformer.\n * Merged with default transformer environment.\n */\n env?: unknown;\n /**\n * Next transformer in chain.\n *\n * @remarks\n * Name of the next transformer to execute after this one.\n * When used in a pre-collector chain (source.next), terminates at the collector.\n * When used in a post-collector chain (destination.before), terminates at the destination.\n * If omitted, the chain ends and control passes to the next pipeline stage.\n * Array values define an explicit chain (no walking). Circular references\n * are safely detected at runtime by `walkChain()`.\n */\n next?: string | string[];\n /**\n * Transformer-level variables (highest priority in cascade).\n * Overrides flow and setup variables.\n */\n variables?: Variables;\n /**\n * Transformer-level definitions (highest priority in cascade).\n * Overrides flow and setup definitions.\n */\n definitions?: Definitions;\n /**\n * Named examples for testing and documentation.\n * Stripped during flow resolution (not included in bundles).\n */\n examples?: StepExamples;\n}\n/**\n * Store reference with inline package syntax.\n *\n * @remarks\n * References a store package and provides configuration.\n * Stores provide key-value storage consumed by other components via env.\n * Unlike sources/transformers/destinations, stores have no chain properties\n * (no `next` or `before`) — they are passive infrastructure.\n */\ninterface StoreReference {\n /**\n * Package specifier with optional version.\n * Optional when `code` is provided for inline code.\n */\n package?: string;\n /**\n * Resolved import variable name or inline code definition.\n */\n code?: string | InlineCode;\n /**\n * Store-specific configuration.\n */\n config?: unknown;\n /**\n * Store environment configuration.\n */\n env?: unknown;\n /**\n * Store-level variables (highest priority in cascade).\n */\n variables?: Variables;\n /**\n * Store-level definitions (highest priority in cascade).\n */\n definitions?: Definitions;\n /**\n * Named examples for testing and documentation.\n * Stripped during flow resolution.\n */\n examples?: StepExamples;\n}\n/**\n * Destination reference with inline package syntax.\n *\n * @remarks\n * References a destination package and provides configuration.\n * Structure mirrors SourceReference for consistency.\n */\ninterface DestinationReference {\n /**\n * Package specifier with optional version.\n *\n * @remarks\n * Same format as SourceReference.package\n * Optional when `code: true` is used for inline code execution.\n *\n * @example\n * "package": "@walkeros/web-destination-gtag@2.0.0"\n */\n package?: string;\n /**\n * Resolved import variable name or built-in code destination.\n *\n * @remarks\n * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),\n * or provided explicitly for advanced use cases.\n * - InlineCode: Object with type, push, and optional init for inline code definition.\n *\n * @example\n * // Using inline code object\n * {\n * "code": {\n * "type": "logger",\n * "push": "$code:(event) => console.log(\'Event:\', event.name)"\n * }\n * }\n */\n code?: string | InlineCode;\n /**\n * Destination-specific configuration.\n *\n * @remarks\n * Structure depends on the destination package.\n * Typically includes:\n * - settings: API keys, IDs, endpoints\n * - mapping: Event transformation rules\n * - consent: Required consent states\n * - policy: Processing rules\n *\n * @example\n * ```json\n * {\n * "config": {\n * "settings": {\n * "ga4": {\n * "measurementId": "G-XXXXXXXXXX"\n * }\n * },\n * "mapping": {\n * "page": {\n * "view": {\n * "name": "page_view",\n * "data": { ... }\n * }\n * }\n * }\n * }\n * }\n * ```\n */\n config?: unknown;\n /**\n * Destination environment configuration.\n *\n * @remarks\n * Environment-specific settings for the destination.\n * Merged with default destination environment.\n */\n env?: unknown;\n /**\n * Destination-level variables (highest priority in cascade).\n * Overrides flow and setup variables.\n */\n variables?: Variables;\n /**\n * Destination-level definitions (highest priority in cascade).\n * Overrides flow and setup definitions.\n */\n definitions?: Definitions;\n /**\n * First transformer in post-collector chain.\n *\n * @remarks\n * Name of the transformer to execute before sending events to this destination.\n * Creates a post-collector transformer chain. Chain ends at this destination.\n * If omitted, events are sent directly from the collector.\n * Can be an array for explicit chain control (bypasses transformer.next resolution).\n */\n before?: string | string[];\n /**\n * Named examples for testing and documentation.\n * Stripped during flow resolution (not included in bundles).\n */\n examples?: StepExamples;\n}\n\ntype flow_Contract = Contract;\ntype flow_ContractActions = ContractActions;\ntype flow_ContractEntry = ContractEntry;\ntype flow_ContractEvents = ContractEvents;\ntype flow_ContractSchema = ContractSchema;\ntype flow_Definitions = Definitions;\ntype flow_DestinationReference = DestinationReference;\ntype flow_InlineCode = InlineCode;\ntype flow_Packages = Packages;\ntype flow_Primitive = Primitive;\ntype flow_Server = Server;\ntype flow_SourceReference = SourceReference;\ntype flow_StepExample = StepExample;\ntype flow_StepExamples = StepExamples;\ntype flow_StoreReference = StoreReference;\ntype flow_TransformerReference = TransformerReference;\ntype flow_Variables = Variables;\ntype flow_Web = Web;\ndeclare namespace flow {\n export type { Config$6 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractEntry as ContractEntry, flow_ContractEvents as ContractEvents, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };\n}\n\ntype AnyFunction$1<P extends unknown[] = never[], R = unknown> = (...args: P) => R;\ntype Functions = {\n [key: string]: AnyFunction$1;\n};\ninterface Parameter<P extends unknown[], R> {\n fn: (...args: P) => R;\n result?: R;\n}\ntype HookFn<T extends AnyFunction$1> = (params: Parameter<Parameters<T>, ReturnType<T>>, ...args: Parameters<T>) => ReturnType<T>;\n\ntype hooks_Functions = Functions;\ntype hooks_HookFn<T extends AnyFunction$1> = HookFn<T>;\ndeclare namespace hooks {\n export type { AnyFunction$1 as AnyFunction, hooks_Functions as Functions, hooks_HookFn as HookFn };\n}\n\n/**\n * Log levels from most to least severe\n */\ndeclare enum Level {\n ERROR = 0,\n WARN = 1,\n INFO = 2,\n DEBUG = 3\n}\n/**\n * Normalized error context extracted from Error objects\n */\ninterface ErrorContext {\n message: string;\n name: string;\n stack?: string;\n cause?: unknown;\n}\n/**\n * Context passed to log handlers\n * If an Error was passed, it\'s normalized into the error property\n */\ninterface LogContext {\n [key: string]: unknown;\n error?: ErrorContext;\n}\n/**\n * Log message function signature\n * Accepts string or Error as message, with optional context\n */\ntype LogFn = (message: string | Error, context?: unknown | Error) => void;\n/**\n * Throw function signature - logs error then throws\n * Returns never as it always throws\n */\ntype ThrowFn = (message: string | Error, context?: unknown) => never;\n/**\n * Default handler function (passed to custom handlers for chaining)\n */\ntype DefaultHandler = (level: Level, message: string, context: LogContext, scope: string[]) => void;\n/**\n * Custom log handler function\n * Receives originalHandler to allow middleware-style chaining\n */\ntype Handler = (level: Level, message: string, context: LogContext, scope: string[], originalHandler: DefaultHandler) => void;\n/**\n * Logger instance with scoping support\n * All logs automatically include trace path from scoping\n */\ninterface Instance$3 {\n /**\n * Log an error message (always visible unless silenced)\n */\n error: LogFn;\n /**\n * Log a warning (degraded state, config issues, transient failures)\n */\n warn: LogFn;\n /**\n * Log an informational message\n */\n info: LogFn;\n /**\n * Log a debug message\n */\n debug: LogFn;\n /**\n * Log an error message and throw an Error\n * Combines logging and throwing in one call\n */\n throw: ThrowFn;\n /**\n * Output structured JSON data\n */\n json: (data: unknown) => void;\n /**\n * Create a scoped child logger with automatic trace path\n * @param name - Scope name (e.g., destination type, destination key)\n * @returns A new logger instance with the scope applied\n */\n scope: (name: string) => Instance$3;\n}\n/**\n * Logger configuration options\n */\ninterface Config$5 {\n /**\n * Minimum log level to display\n * @default Level.ERROR\n */\n level?: Level | keyof typeof Level;\n /**\n * Custom log handler function\n * Receives originalHandler to preserve default behavior\n */\n handler?: Handler;\n /** Custom handler for json() output. Default: console.log(JSON.stringify(data, null, 2)) */\n jsonHandler?: (data: unknown) => void;\n}\n/**\n * Internal config with resolved values and scope\n */\ninterface InternalConfig {\n level: Level;\n handler?: Handler;\n jsonHandler?: (data: unknown) => void;\n scope: string[];\n}\n/**\n * Logger factory function type\n */\ntype Factory = (config?: Config$5) => Instance$3;\n\ntype logger_DefaultHandler = DefaultHandler;\ntype logger_ErrorContext = ErrorContext;\ntype logger_Factory = Factory;\ntype logger_Handler = Handler;\ntype logger_InternalConfig = InternalConfig;\ntype logger_Level = Level;\ndeclare const logger_Level: typeof Level;\ntype logger_LogContext = LogContext;\ntype logger_LogFn = LogFn;\ntype logger_ThrowFn = ThrowFn;\ndeclare namespace logger {\n export { type Config$5 as Config, type logger_DefaultHandler as DefaultHandler, type logger_ErrorContext as ErrorContext, type logger_Factory as Factory, type logger_Handler as Handler, type Instance$3 as Instance, type logger_InternalConfig as InternalConfig, logger_Level as Level, type logger_LogContext as LogContext, type logger_LogFn as LogFn, type logger_ThrowFn as ThrowFn };\n}\n\n/**\n * Shared mapping configuration interface.\n * Used by both Source.Config and Destination.Config.\n */\ninterface Config$4<T = unknown> {\n consent?: Consent;\n data?: Value | Values;\n mapping?: Rules<Rule<T>>;\n policy?: Policy;\n}\ninterface Policy {\n [key: string]: Value;\n}\ninterface Rules<T = Rule> {\n [entity: string]: Record<string, T | Array<T>> | undefined;\n}\ninterface Rule<Settings = unknown> {\n batch?: number;\n batchFn?: (destination: Instance$4, collector: Instance$5) => void;\n batched?: Batch<Settings>;\n condition?: Condition;\n consent?: Consent;\n settings?: Settings;\n data?: Data;\n ignore?: boolean;\n name?: string;\n policy?: Policy;\n}\ninterface Result$2 {\n eventMapping?: Rule;\n mappingKey?: string;\n}\ntype Data = Value | Values;\ntype Value = ValueType | Array<ValueType>;\ntype Values = Array<Value>;\ntype ValueType = string | ValueConfig;\ninterface ValueConfig {\n condition?: Condition;\n consent?: Consent;\n fn?: Fn$1;\n key?: string;\n loop?: Loop;\n map?: Map;\n set?: Value[];\n validate?: Validate;\n value?: PropertyType;\n}\ntype Condition = (value: DeepPartialEvent | unknown, mapping?: Value, collector?: Instance$5) => PromiseOrValue<boolean>;\ntype Fn$1 = (value: DeepPartialEvent | unknown, mapping: Value, options: Options$1) => PromiseOrValue<Property | unknown>;\ntype Loop = [Value, Value];\ntype Map = {\n [key: string]: Value;\n};\ninterface Options$1 {\n consent?: Consent;\n collector?: Instance$5;\n props?: unknown;\n}\ntype Validate = (value?: unknown) => PromiseOrValue<boolean>;\n\ntype mapping_Condition = Condition;\ntype mapping_Data = Data;\ntype mapping_Loop = Loop;\ntype mapping_Map = Map;\ntype mapping_Policy = Policy;\ntype mapping_Rule<Settings = unknown> = Rule<Settings>;\ntype mapping_Rules<T = Rule> = Rules<T>;\ntype mapping_Validate = Validate;\ntype mapping_Value = Value;\ntype mapping_ValueConfig = ValueConfig;\ntype mapping_ValueType = ValueType;\ntype mapping_Values = Values;\ndeclare namespace mapping {\n export type { mapping_Condition as Condition, Config$4 as Config, mapping_Data as Data, Fn$1 as Fn, mapping_Loop as Loop, mapping_Map as Map, Options$1 as Options, mapping_Policy as Policy, Result$2 as Result, mapping_Rule as Rule, mapping_Rules as Rules, mapping_Validate as Validate, mapping_Value as Value, mapping_ValueConfig as ValueConfig, mapping_ValueType as ValueType, mapping_Values as Values };\n}\n\ntype Config$3 = {\n config?: Array<GenericConfig>;\n consent?: Array<ConsentConfig>;\n custom?: Array<GenericConfig>;\n globals?: Array<GenericConfig>;\n ready?: Array<ReadyConfig>;\n run?: Array<RunConfig>;\n session?: Array<SessionConfig>;\n user?: Array<UserConfig>;\n};\ntype Types$3 = keyof Config$3 | (string & {});\ninterface EventContextMap {\n config: Partial<Config$8>;\n consent: Consent;\n custom: Properties;\n globals: Properties;\n ready: undefined;\n run: undefined;\n session: SessionData;\n user: User;\n}\ntype EventContext<T extends keyof EventContextMap> = EventContextMap[T];\ntype AnyEventContext = EventContextMap[keyof EventContextMap];\ninterface Context$4 {\n consent?: Consent;\n session?: unknown;\n}\ntype Options = ConsentConfig | GenericConfig | ReadyConfig | RunConfig | SessionConfig | UserConfig;\ninterface ConsentConfig {\n [key: string]: ConsentFn;\n}\ntype ConsentFn = (collector: Instance$5, consent: Consent) => void;\ntype GenericConfig = GenericFn;\ntype GenericFn = (collector: Instance$5, data: unknown) => void;\ntype ReadyConfig = ReadyFn;\ntype ReadyFn = (collector: Instance$5) => void;\ntype RunConfig = RunFn;\ntype RunFn = (collector: Instance$5) => void;\ntype SessionConfig = SessionFn;\ntype SessionFn = (collector: Instance$5, session?: unknown) => void;\ntype UserConfig = UserFn;\ntype UserFn = (collector: Instance$5, user: User) => void;\ninterface OnConfig {\n config?: GenericConfig[];\n consent?: ConsentConfig[];\n custom?: GenericConfig[];\n globals?: GenericConfig[];\n ready?: ReadyConfig[];\n run?: RunConfig[];\n session?: SessionConfig[];\n user?: UserConfig[];\n [key: string]: ConsentConfig[] | GenericConfig[] | ReadyConfig[] | RunConfig[] | SessionConfig[] | UserConfig[] | undefined;\n}\ntype OnFn<T extends TypesGeneric$3 = Types$4> = (type: Types$3, context: Context$5<T>) => PromiseOrValue<void>;\ntype OnFnRuntime = (type: Types$3, context: Context$5) => PromiseOrValue<void>;\n\ntype on_AnyEventContext = AnyEventContext;\ntype on_ConsentConfig = ConsentConfig;\ntype on_ConsentFn = ConsentFn;\ntype on_EventContext<T extends keyof EventContextMap> = EventContext<T>;\ntype on_EventContextMap = EventContextMap;\ntype on_GenericConfig = GenericConfig;\ntype on_GenericFn = GenericFn;\ntype on_OnConfig = OnConfig;\ntype on_OnFn<T extends TypesGeneric$3 = Types$4> = OnFn<T>;\ntype on_OnFnRuntime = OnFnRuntime;\ntype on_Options = Options;\ntype on_ReadyConfig = ReadyConfig;\ntype on_ReadyFn = ReadyFn;\ntype on_RunConfig = RunConfig;\ntype on_RunFn = RunFn;\ntype on_SessionConfig = SessionConfig;\ntype on_SessionFn = SessionFn;\ntype on_UserConfig = UserConfig;\ntype on_UserFn = UserFn;\ndeclare namespace on {\n export type { on_AnyEventContext as AnyEventContext, Config$3 as Config, on_ConsentConfig as ConsentConfig, on_ConsentFn as ConsentFn, Context$4 as Context, on_EventContext as EventContext, on_EventContextMap as EventContextMap, on_GenericConfig as GenericConfig, on_GenericFn as GenericFn, on_OnConfig as OnConfig, on_OnFn as OnFn, on_OnFnRuntime as OnFnRuntime, on_Options as Options, on_ReadyConfig as ReadyConfig, on_ReadyFn as ReadyFn, on_RunConfig as RunConfig, on_RunFn as RunFn, on_SessionConfig as SessionConfig, on_SessionFn as SessionFn, Types$3 as Types, on_UserConfig as UserConfig, on_UserFn as UserFn };\n}\n\ntype Next = string | string[];\n/**\n * Base environment interface for walkerOS transformers.\n *\n * Minimal like Destination - just an extensible object.\n * Transformers receive dependencies through context, not env.\n */\ninterface BaseEnv$2 {\n [key: string]: unknown;\n}\n/**\n * Type bundle for transformer generics.\n * Groups Settings, InitSettings, and Env into a single type parameter.\n * Follows the Source/Destination pattern.\n *\n * @template S - Settings configuration type\n * @template E - Environment type\n * @template I - InitSettings configuration type (user input)\n */\ninterface Types$2<S = unknown, E = BaseEnv$2, I = S> {\n settings: S;\n initSettings: I;\n env: E;\n}\n/**\n * Generic constraint for Types - ensures T has required properties for indexed access.\n */\ntype TypesGeneric$2 = {\n settings: any;\n initSettings: any;\n env: any;\n};\n/**\n * Type extractors for consistent usage with Types bundle.\n */\ntype Settings$2<T extends TypesGeneric$2 = Types$2> = T[\'settings\'];\ntype InitSettings$2<T extends TypesGeneric$2 = Types$2> = T[\'initSettings\'];\ntype Env$2<T extends TypesGeneric$2 = Types$2> = T[\'env\'];\n/**\n * Inference helper: Extract Types from Instance.\n */\ntype TypesOf$2<I> = I extends Instance$2<infer T> ? T : never;\n/**\n * Transformer configuration.\n */\ninterface Config$2<T extends TypesGeneric$2 = Types$2> {\n settings?: InitSettings$2<T>;\n env?: Env$2<T>;\n id?: string;\n logger?: Config$5;\n next?: Next;\n init?: boolean;\n}\n/**\n * Context provided to transformer functions.\n * Extends base context with transformer-specific properties.\n */\ninterface Context$3<T extends TypesGeneric$2 = Types$2> extends Base<Config$2<T>, Env$2<T>> {\n id: string;\n ingest?: unknown;\n}\n/**\n * Unified result type for transformer functions.\n * Replaces the old union return type with a structured object.\n *\n * @field event - Modified event to continue with\n * @field respond - Wrapped respond function for downstream transformers\n * @field next - Branch to a different chain (replaces BranchResult)\n */\ninterface Result$1 {\n event?: DeepPartialEvent;\n respond?: RespondFn;\n next?: Next;\n}\n/**\n * The main transformer function.\n * Uses DeepPartialEvent for consistency across pre/post collector.\n *\n * @param event - The event to process\n * @param context - Transformer context with collector, config, env, logger\n * @returns Result - structured result with event, respond, next\n * @returns void - continue with current event unchanged (passthrough)\n * @returns false - stop chain, cancel further processing\n */\ntype Fn<T extends TypesGeneric$2 = Types$2> = (event: DeepPartialEvent, context: Context$3<T>) => PromiseOrValue<Result$1 | false | void>;\n/**\n * Optional initialization function.\n * Called once before first push.\n *\n * @param context - Transformer context\n * @returns void - initialization successful\n * @returns false - initialization failed, skip this transformer\n * @returns Config<T> - return updated config\n */\ntype InitFn$1<T extends TypesGeneric$2 = Types$2> = (context: Context$3<T>) => PromiseOrValue<void | false | Config$2<T>>;\n/**\n * Transformer instance returned by Init function.\n */\ninterface Instance$2<T extends TypesGeneric$2 = Types$2> {\n type: string;\n config: Config$2<T>;\n push: Fn<T>;\n init?: InitFn$1<T>;\n destroy?: DestroyFn<Config$2<T>, Env$2<T>>;\n}\n/**\n * Transformer initialization function.\n * Creates a transformer instance from context.\n */\ntype Init$2<T extends TypesGeneric$2 = Types$2> = (context: Context$3<Types$2<Partial<Settings$2<T>>, Env$2<T>, InitSettings$2<T>>>) => Instance$2<T> | Promise<Instance$2<T>>;\n/**\n * Configuration for initializing a transformer.\n * Used in collector registration.\n */\ntype InitTransformer<T extends TypesGeneric$2 = Types$2> = {\n code: Init$2<T>;\n config?: Partial<Config$2<T>>;\n env?: Partial<Env$2<T>>;\n next?: Next;\n};\n/**\n * Transformers configuration for collector.\n * Maps transformer IDs to their initialization configurations.\n */\ninterface InitTransformers {\n [transformerId: string]: InitTransformer<any>;\n}\n/**\n * Active transformer instances registry.\n */\ninterface Transformers {\n [transformerId: string]: Instance$2;\n}\n\ntype transformer_Fn<T extends TypesGeneric$2 = Types$2> = Fn<T>;\ntype transformer_InitTransformer<T extends TypesGeneric$2 = Types$2> = InitTransformer<T>;\ntype transformer_InitTransformers = InitTransformers;\ntype transformer_Next = Next;\ntype transformer_Transformers = Transformers;\ndeclare namespace transformer {\n export type { BaseEnv$2 as BaseEnv, Config$2 as Config, Context$3 as Context, Env$2 as Env, transformer_Fn as Fn, Init$2 as Init, InitFn$1 as InitFn, InitSettings$2 as InitSettings, transformer_InitTransformer as InitTransformer, transformer_InitTransformers as InitTransformers, Instance$2 as Instance, transformer_Next as Next, Result$1 as Result, Settings$2 as Settings, transformer_Transformers as Transformers, Types$2 as Types, TypesGeneric$2 as TypesGeneric, TypesOf$2 as TypesOf };\n}\n\ninterface Context$2 {\n city?: string;\n country?: string;\n encoding?: string;\n hash?: string;\n ip?: string;\n language?: string;\n origin?: string;\n region?: string;\n userAgent?: string;\n [key: string]: string | undefined;\n}\n\ndeclare namespace request {\n export type { Context$2 as Context };\n}\n\n/**\n * Base Env interface for dependency injection into sources.\n *\n * Sources receive all their dependencies through this environment object,\n * making them platform-agnostic and easily testable.\n */\ninterface BaseEnv$1 {\n [key: string]: unknown;\n push: PushFn$1;\n command: CommandFn;\n sources?: Sources;\n elb: Fn$2;\n logger: Instance$3;\n}\n/**\n * Type bundle for source generics.\n * Groups Settings, Mapping, Push, Env, and InitSettings into a single type parameter.\n *\n * @template S - Settings configuration type\n * @template M - Mapping configuration type\n * @template P - Push function signature (flexible to support HTTP handlers, etc.)\n * @template E - Environment dependencies type\n * @template I - InitSettings configuration type (user input)\n */\ninterface Types$1<S = unknown, M = unknown, P = Fn$2, E = BaseEnv$1, I = S> {\n settings: S;\n initSettings: I;\n mapping: M;\n push: P;\n env: E;\n}\n/**\n * Generic constraint for Types - ensures T has required properties for indexed access\n */\ntype TypesGeneric$1 = {\n settings: any;\n initSettings: any;\n mapping: any;\n push: any;\n env: any;\n};\n/**\n * Type extractors for consistent usage with Types bundle\n */\ntype Settings$1<T extends TypesGeneric$1 = Types$1> = T[\'settings\'];\ntype InitSettings$1<T extends TypesGeneric$1 = Types$1> = T[\'initSettings\'];\ntype Mapping<T extends TypesGeneric$1 = Types$1> = T[\'mapping\'];\ntype Push<T extends TypesGeneric$1 = Types$1> = T[\'push\'];\ntype Env$1<T extends TypesGeneric$1 = Types$1> = T[\'env\'];\n/**\n * Inference helper: Extract Types from Instance\n */\ntype TypesOf$1<I> = I extends Instance$1<infer T> ? T : never;\ninterface Config$1<T extends TypesGeneric$1 = Types$1> extends Config$4<Mapping<T>> {\n /** Implementation-specific configuration passed to the init function. */\n settings?: InitSettings$1<T>;\n /** Runtime dependencies injected by the collector (push, command, logger, etc.). */\n env?: Env$1<T>;\n /** Source identifier; defaults to the InitSources object key. */\n id?: string;\n /** Logger configuration (level, handler) to override the collector\'s defaults. */\n logger?: Config$5;\n /** Mark as primary source; its push function becomes the exported `elb` from startFlow. */\n primary?: boolean;\n /** Defer source initialization until these collector events fire (e.g., `[\'consent\']`). */\n require?: string[];\n /**\n * Ingest metadata extraction mapping.\n * Extracts values from raw request objects (Express req, Lambda event, etc.)\n * using walkerOS mapping syntax. Extracted data flows to transformers/destinations.\n *\n * @example\n * ingest: {\n * ip: \'req.ip\',\n * ua: \'req.headers.user-agent\',\n * origin: \'req.headers.origin\'\n * }\n */\n ingest?: Data;\n}\ntype PartialConfig<T extends TypesGeneric$1 = Types$1> = Config$1<Types$1<Partial<Settings$1<T>> | Settings$1<T>, Partial<Mapping<T>> | Mapping<T>, Push<T>, Env$1<T>>>;\ninterface Instance$1<T extends TypesGeneric$1 = Types$1> {\n type: string;\n config: Config$1<T>;\n push: Push<T>;\n destroy?: DestroyFn<Config$1<T>, Env$1<T>>;\n on?(event: Types$3, context?: unknown): void | boolean | Promise<void | boolean>;\n}\n/**\n * Context provided to source init function.\n * Extends base context with source-specific properties.\n */\ninterface Context$1<T extends TypesGeneric$1 = Types$1> extends Base<Partial<Config$1<T>>, Env$1<T>> {\n id: string;\n /**\n * Sets ingest metadata for the current request.\n * Extracts values from the raw request using config.ingest mapping.\n * The extracted data is passed through to transformers and destinations.\n *\n * @param value - Raw request object (Express req, Lambda event, etc.)\n */\n setIngest: (value: unknown) => Promise<void>;\n /** Sets respond function for the current request. Called by source per-request. */\n setRespond: (fn: RespondFn | undefined) => void;\n}\ntype Init$1<T extends TypesGeneric$1 = Types$1> = (context: Context$1<T>) => Instance$1<T> | Promise<Instance$1<T>>;\ntype InitSource<T extends TypesGeneric$1 = Types$1> = {\n code: Init$1<T>;\n config?: Partial<Config$1<T>>;\n env?: Partial<Env$1<T>>;\n primary?: boolean;\n next?: Next;\n};\n/**\n * Sources configuration for collector.\n * Maps source IDs to their initialization configurations.\n */\ninterface InitSources {\n [sourceId: string]: InitSource<any>;\n}\n/**\n * Renderer hint for source simulation UI.\n * - \'browser\': Source needs a real DOM (iframe with live preview)\n * - \'codebox\': Source uses a JSON/code editor (default)\n */\ntype Renderer = \'browser\' | \'codebox\';\n/**\n * Minimal environment contract for source simulation.\n * Both JSDOM and iframe satisfy this interface.\n */\ninterface SimulationEnv {\n window: Window & typeof globalThis;\n document: Document;\n localStorage: Storage;\n [key: string]: unknown;\n}\n/**\n * Setup function for source simulation.\n * Runs BEFORE startFlow() to prepare the environment\n * (dataLayer arrays, localStorage, window globals).\n *\n * Return void for sources that need no post-init action.\n * Return a () => void trigger for sources that dispatch\n * events AFTER startFlow() (e.g., usercentrics CustomEvent).\n */\ntype SetupFn = (input: unknown, env: SimulationEnv) => void | (() => void);\n\ntype source_InitSource<T extends TypesGeneric$1 = Types$1> = InitSource<T>;\ntype source_InitSources = InitSources;\ntype source_Mapping<T extends TypesGeneric$1 = Types$1> = Mapping<T>;\ntype source_PartialConfig<T extends TypesGeneric$1 = Types$1> = PartialConfig<T>;\ntype source_Push<T extends TypesGeneric$1 = Types$1> = Push<T>;\ntype source_Renderer = Renderer;\ntype source_SetupFn = SetupFn;\ntype source_SimulationEnv = SimulationEnv;\ndeclare namespace source {\n export type { BaseEnv$1 as BaseEnv, Config$1 as Config, Context$1 as Context, Env$1 as Env, Init$1 as Init, InitSettings$1 as InitSettings, source_InitSource as InitSource, source_InitSources as InitSources, Instance$1 as Instance, source_Mapping as Mapping, source_PartialConfig as PartialConfig, source_Push as Push, source_Renderer as Renderer, Settings$1 as Settings, source_SetupFn as SetupFn, source_SimulationEnv as SimulationEnv, Types$1 as Types, TypesGeneric$1 as TypesGeneric, TypesOf$1 as TypesOf };\n}\n\ninterface BaseEnv {\n [key: string]: unknown;\n}\ninterface Types<S = unknown, E = BaseEnv, I = S> {\n settings: S;\n initSettings: I;\n env: E;\n}\ntype TypesGeneric = {\n settings: any;\n initSettings: any;\n env: any;\n};\ntype Settings<T extends TypesGeneric = Types> = T[\'settings\'];\ntype InitSettings<T extends TypesGeneric = Types> = T[\'initSettings\'];\ntype Env<T extends TypesGeneric = Types> = T[\'env\'];\ntype TypesOf<I> = I extends Instance<infer T> ? T : never;\ninterface Config<T extends TypesGeneric = Types> {\n settings?: InitSettings<T>;\n env?: Env<T>;\n id?: string;\n logger?: Config$5;\n}\ninterface Context<T extends TypesGeneric = Types> extends Base<Config<T>, Env<T>> {\n id: string;\n}\ntype GetFn<T = unknown> = (key: string) => T | undefined | Promise<T | undefined>;\ntype SetFn<T = unknown> = (key: string, value: T, ttl?: number) => void | Promise<void>;\ntype DeleteFn = (key: string) => void | Promise<void>;\ninterface Instance<T extends TypesGeneric = Types> {\n type: string;\n config: Config<T>;\n get: GetFn;\n set: SetFn;\n delete: DeleteFn;\n destroy?: DestroyFn<Config<T>, Env<T>>;\n}\ntype Init<T extends TypesGeneric = Types> = (context: Context<Types<Partial<Settings<T>>, Env<T>, InitSettings<T>>>) => Instance<T> | Promise<Instance<T>>;\ntype InitFn<T extends TypesGeneric = Types> = (context: Context<T>) => PromiseOrValue<void | false | Config<T>>;\ntype InitStore<T extends TypesGeneric = Types> = {\n code: Init<T>;\n config?: Partial<Config<T>>;\n env?: Partial<Env<T>>;\n};\ninterface InitStores {\n [storeId: string]: InitStore<any>;\n}\ninterface Stores {\n [storeId: string]: Instance;\n}\n\ntype store_BaseEnv = BaseEnv;\ntype store_Config<T extends TypesGeneric = Types> = Config<T>;\ntype store_Context<T extends TypesGeneric = Types> = Context<T>;\ntype store_DeleteFn = DeleteFn;\ntype store_Env<T extends TypesGeneric = Types> = Env<T>;\ntype store_GetFn<T = unknown> = GetFn<T>;\ntype store_Init<T extends TypesGeneric = Types> = Init<T>;\ntype store_InitFn<T extends TypesGeneric = Types> = InitFn<T>;\ntype store_InitSettings<T extends TypesGeneric = Types> = InitSettings<T>;\ntype store_InitStore<T extends TypesGeneric = Types> = InitStore<T>;\ntype store_InitStores = InitStores;\ntype store_Instance<T extends TypesGeneric = Types> = Instance<T>;\ntype store_SetFn<T = unknown> = SetFn<T>;\ntype store_Settings<T extends TypesGeneric = Types> = Settings<T>;\ntype store_Stores = Stores;\ntype store_Types<S = unknown, E = BaseEnv, I = S> = Types<S, E, I>;\ntype store_TypesGeneric = TypesGeneric;\ntype store_TypesOf<I> = TypesOf<I>;\ndeclare namespace store {\n export type { store_BaseEnv as BaseEnv, store_Config as Config, store_Context as Context, store_DeleteFn as DeleteFn, store_Env as Env, store_GetFn as GetFn, store_Init as Init, store_InitFn as InitFn, store_InitSettings as InitSettings, store_InitStore as InitStore, store_InitStores as InitStores, store_Instance as Instance, store_SetFn as SetFn, store_Settings as Settings, store_Stores as Stores, store_Types as Types, store_TypesGeneric as TypesGeneric, store_TypesOf as TypesOf };\n}\n\ntype AnyObject<T = unknown> = Record<string, T>;\ntype Elb = Fn$2;\ntype AnyFunction = (...args: unknown[]) => unknown;\ntype SingleOrArray<T> = T | Array<T>;\ntype Events = Array<Event>;\ntype PartialEvent = Partial<Event>;\ntype DeepPartialEvent = DeepPartial<Event>;\ninterface Event {\n name: string;\n data: Properties;\n context: OrderedProperties;\n globals: Properties;\n custom: Properties;\n user: User;\n nested: Entities;\n consent: Consent;\n id: string;\n trigger: string;\n entity: string;\n action: string;\n timestamp: number;\n timing: number;\n group: string;\n count: number;\n version: Version;\n source: Source;\n}\ninterface Consent {\n [name: string]: boolean;\n}\ninterface User extends Properties {\n id?: string;\n device?: string;\n session?: string;\n hash?: string;\n address?: string;\n email?: string;\n phone?: string;\n userAgent?: string;\n browser?: string;\n browserVersion?: string;\n deviceType?: string;\n language?: string;\n country?: string;\n region?: string;\n city?: string;\n zip?: string;\n timezone?: string;\n os?: string;\n osVersion?: string;\n screenSize?: string;\n ip?: string;\n internal?: boolean;\n}\ninterface Version extends Properties {\n source: string;\n tagging: number;\n}\ninterface Source extends Properties {\n type: SourceType;\n id: string;\n previous_id: string;\n}\ntype SourceType = \'web\' | \'server\' | \'app\' | \'other\' | string;\ntype PropertyType = boolean | string | number | {\n [key: string]: Property;\n};\ntype Property = PropertyType | Array<PropertyType>;\ninterface Properties {\n [key: string]: Property | undefined;\n}\ninterface OrderedProperties {\n [key: string]: [Property, number] | undefined;\n}\ntype Entities = Array<Entity>;\ninterface Entity {\n entity: string;\n data: Properties;\n nested: Entities;\n context: OrderedProperties;\n}\ntype ConsentHandler = Record<string, AnyFunction>;\ntype ActionHandler = AnyFunction;\ntype DeepPartial<T> = {\n [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];\n};\ntype PromiseOrValue<T> = T | Promise<T>;\n\ntype walkeros_ActionHandler = ActionHandler;\ntype walkeros_AnyFunction = AnyFunction;\ntype walkeros_AnyObject<T = unknown> = AnyObject<T>;\ntype walkeros_Consent = Consent;\ntype walkeros_ConsentHandler = ConsentHandler;\ntype walkeros_DeepPartial<T> = DeepPartial<T>;\ntype walkeros_DeepPartialEvent = DeepPartialEvent;\ntype walkeros_Elb = Elb;\ntype walkeros_Entities = Entities;\ntype walkeros_Entity = Entity;\ntype walkeros_Event = Event;\ntype walkeros_Events = Events;\ntype walkeros_OrderedProperties = OrderedProperties;\ntype walkeros_PartialEvent = PartialEvent;\ntype walkeros_PromiseOrValue<T> = PromiseOrValue<T>;\ntype walkeros_Properties = Properties;\ntype walkeros_Property = Property;\ntype walkeros_PropertyType = PropertyType;\ntype walkeros_SingleOrArray<T> = SingleOrArray<T>;\ntype walkeros_Source = Source;\ntype walkeros_SourceType = SourceType;\ntype walkeros_User = User;\ntype walkeros_Version = Version;\ndeclare namespace walkeros {\n export type { walkeros_ActionHandler as ActionHandler, walkeros_AnyFunction as AnyFunction, walkeros_AnyObject as AnyObject, walkeros_Consent as Consent, walkeros_ConsentHandler as ConsentHandler, walkeros_DeepPartial as DeepPartial, walkeros_DeepPartialEvent as DeepPartialEvent, walkeros_Elb as Elb, walkeros_Entities as Entities, walkeros_Entity as Entity, walkeros_Event as Event, walkeros_Events as Events, walkeros_OrderedProperties as OrderedProperties, walkeros_PartialEvent as PartialEvent, walkeros_PromiseOrValue as PromiseOrValue, walkeros_Properties as Properties, walkeros_Property as Property, walkeros_PropertyType as PropertyType, walkeros_SingleOrArray as SingleOrArray, walkeros_Source as Source, walkeros_SourceType as SourceType, walkeros_User as User, walkeros_Version as Version };\n}\n\n/**\n * A recorded function call made during simulation.\n * Captures what a destination called on its env (e.g., window.gtag).\n */\ninterface Call {\n /** Dot-path of the function called: "window.gtag", "dataLayer.push" */\n fn: string;\n /** Arguments passed to the function */\n args: unknown[];\n /** Unix timestamp in ms */\n ts: number;\n}\n/**\n * Result of simulating a single step.\n * Same shape for source, transformer, and destination.\n */\ninterface Result {\n /** Which step type was simulated */\n step: \'source\' | \'transformer\' | \'destination\';\n /** Step name, e.g. "gtag", "dataLayer", "enricher" */\n name: string;\n /**\n * Output events:\n * - source: captured pre-collector events\n * - transformer: [transformed event] or [] if filtered\n * - destination: [] (destinations don\'t produce events)\n */\n events: DeepPartialEvent[];\n /** Intercepted env calls. Populated for destinations, empty [] for others. */\n calls: Call[];\n /** Execution time in ms */\n duration: number;\n /** Error if the step threw */\n error?: Error;\n}\n\ntype simulation_Call = Call;\ntype simulation_Result = Result;\ndeclare namespace simulation {\n export type { simulation_Call as Call, simulation_Result as Result };\n}\n\ntype MatchExpression = MatchCondition | {\n and: MatchExpression[];\n} | {\n or: MatchExpression[];\n};\ninterface MatchCondition {\n key: string;\n operator: MatchOperator;\n value: string;\n not?: boolean;\n}\ntype MatchOperator = \'eq\' | \'contains\' | \'prefix\' | \'suffix\' | \'regex\' | \'gt\' | \'lt\' | \'exists\';\ntype CompiledMatcher = (ingest: Record<string, unknown>) => boolean;\n\ntype matcher_CompiledMatcher = CompiledMatcher;\ntype matcher_MatchCondition = MatchCondition;\ntype matcher_MatchExpression = MatchExpression;\ntype matcher_MatchOperator = MatchOperator;\ndeclare namespace matcher {\n export type { matcher_CompiledMatcher as CompiledMatcher, matcher_MatchCondition as MatchCondition, matcher_MatchExpression as MatchExpression, matcher_MatchOperator as MatchOperator };\n}\n\ninterface Code {\n lang?: string;\n code: string;\n}\ninterface Hint {\n text: string;\n code?: Array<Code>;\n}\ntype Hints = Record<string, Hint>;\n\ntype hint_Code = Code;\ntype hint_Hint = Hint;\ntype hint_Hints = Hints;\ndeclare namespace hint {\n export type { hint_Code as Code, hint_Hint as Hint, hint_Hints as Hints };\n}\n\ntype StorageType = \'local\' | \'session\' | \'cookie\';\ndeclare const Const: {\n readonly Utils: {\n readonly Storage: {\n readonly Local: "local";\n readonly Session: "session";\n readonly Cookie: "cookie";\n };\n };\n};\n\ntype SendDataValue = Property | Properties;\ntype SendHeaders = {\n [key: string]: string;\n};\ninterface SendResponse {\n ok: boolean;\n data?: unknown;\n error?: string;\n}\n\n/**\n * Creates a TransformerResult for dynamic chain routing.\n * Use this in transformer push functions to redirect the chain.\n */\ndeclare function branch(event: DeepPartialEvent, next: Next): Result$1;\n\n/**\n * Anonymizes an IPv4 address by setting the last octet to 0.\n *\n * @param ip The IP address to anonymize.\n * @returns The anonymized IP address or an empty string if the IP is invalid.\n */\ndeclare function anonymizeIP(ip: string): string;\n\n/**\n * Flow Configuration Utilities\n *\n * Functions for resolving and processing Flow configurations.\n *\n * @packageDocumentation\n */\n\n/** Sentinel prefix for deferred $env resolution. Shared with CLI bundler. */\ndeclare const ENV_MARKER_PREFIX = "__WALKEROS_ENV:";\ninterface ResolveOptions {\n deferred?: boolean;\n}\n/**\n * Walk a dot-separated path into a value.\n * Throws if any intermediate segment is missing or not an object.\n */\ndeclare function walkPath(value: unknown, path: string, refPrefix: string): unknown;\n/**\n * Convert package name to valid JavaScript variable name.\n * Used for deterministic default import naming.\n * @example\n * packageNameToVariable(\'@walkeros/server-destination-api\')\n * // → \'_walkerosServerDestinationApi\'\n */\ndeclare function packageNameToVariable(packageName: string): string;\n/**\n * Get resolved flow settings for a named flow.\n *\n * @param config - The complete Flow.Config configuration\n * @param flowName - Flow name (auto-selected if only one exists)\n * @returns Resolved Settings with $var, $env, and $def patterns resolved\n * @throws Error if flow selection is required but not specified, or flow not found\n *\n * @example\n * ```typescript\n * import { getFlowSettings } from \'@walkeros/core\';\n *\n * const config = JSON.parse(fs.readFileSync(\'walkeros.config.json\', \'utf8\'));\n *\n * // Auto-select if only one flow\n * const settings = getFlowSettings(config);\n *\n * // Or specify flow\n * const prodSettings = getFlowSettings(config, \'production\');\n * ```\n */\ndeclare function getFlowSettings(config: Config$6, flowName?: string, options?: ResolveOptions): Settings$3;\n/**\n * Get platform from settings (web or server).\n *\n * @param settings - Flow settings\n * @returns "web" or "server"\n * @throws Error if neither web nor server is present\n *\n * @example\n * ```typescript\n * import { getPlatform } from \'@walkeros/core\';\n *\n * const platform = getPlatform(settings);\n * // Returns "web" or "server"\n * ```\n */\ndeclare function getPlatform(settings: Settings$3): \'web\' | \'server\';\n\n/**\n * @interface Assign\n * @description Options for the assign function.\n * @property merge - Merge array properties instead of overriding them.\n * @property shallow - Create a shallow copy instead of updating the target object.\n * @property extend - Extend the target with new properties instead of only updating existing ones.\n */\ninterface Assign {\n merge?: boolean;\n shallow?: boolean;\n extend?: boolean;\n}\n/**\n * Merges objects with advanced options.\n *\n * @template T, U\n * @param target - The target object to merge into.\n * @param obj - The source object to merge from.\n * @param options - Options for merging.\n * @returns The merged object.\n */\ndeclare function assign<T extends object, U extends object>(target: T, obj?: U, options?: Assign): T & U;\n\n/**\n * Gets a value from an object by a dot-notation string.\n * Supports wildcards for arrays.\n *\n * @example\n * getByPath({ data: { id: 1 } }, "data.id") // Returns 1\n *\n * @param event - The object to get the value from.\n * @param key - The dot-notation string.\n * @param defaultValue - The default value to return if the key is not found.\n * @returns The value from the object or the default value.\n */\ndeclare function getByPath(event: unknown, key?: string, defaultValue?: unknown): unknown;\n/**\n * Sets a value in an object by a dot-notation string.\n *\n * @param obj - The object to set the value in.\n * @param key - The dot-notation string.\n * @param value - The value to set.\n * @returns A new object with the updated value.\n */\ndeclare function setByPath<T = unknown>(obj: T, key: string, value: unknown): T;\n\n/**\n * Casts a value to a specific type.\n *\n * @param value The value to cast.\n * @returns The casted value.\n */\ndeclare function castValue(value: unknown): PropertyType;\n\n/**\n * Creates a deep clone of a value.\n * Supports primitive values, objects, arrays, dates, and regular expressions.\n * Handles circular references.\n *\n * @template T\n * @param org - The value to clone.\n * @param visited - A map of visited objects to handle circular references.\n * @returns The cloned value.\n */\ndeclare function clone<T>(org: T, visited?: WeakMap<object, unknown>): T;\n\n/**\n * Checks if the required consent is granted.\n *\n * @param required - The required consent states.\n * @param state - The current consent states.\n * @param individual - Individual consent states to prioritize.\n * @returns The granted consent states or false if not granted.\n */\ndeclare function getGrantedConsent(required: Consent | undefined, state?: Consent, individual?: Consent): false | Consent;\n\n/**\n * Creates a new destination instance by merging a base destination with additional configuration.\n *\n * This utility enables elegant destination configuration while avoiding config side-effects\n * that could occur when reusing destination objects across multiple collector instances.\n *\n * @param baseDestination - The base destination to extend\n * @param config - Additional configuration to merge with the base destination\'s config\n * @returns A new destination instance with merged configuration\n *\n * @example\n * ```typescript\n * // Types are inferred automatically from destinationGtag\n * elb(\'walker destination\', createDestination(destinationGtag, {\n * settings: { ga4: { measurementId: \'G-123\' } }\n * }));\n * ```\n */\ndeclare function createDestination<I extends Instance$4>(baseDestination: I, config: Partial<Config$7<TypesOf$3<I>>>): I;\n\n/**\n * Creates a complete event with default values.\n * Used for testing and debugging.\n *\n * @param props - Properties to override the default values.\n * @returns A complete event.\n */\ndeclare function createEvent(props?: DeepPartialEvent): Event;\n/**\n * Creates a complete event with default values based on the event name.\n * Used for testing and debugging.\n *\n * @param name - The name of the event to create.\n * @param props - Properties to override the default values.\n * @returns A complete event.\n */\ndeclare function getEvent(name?: string, props?: DeepPartialEvent): Event;\n\n/**\n * Generates a random string of a given length.\n *\n * @param length - The length of the random string.\n * @returns The random string.\n */\ndeclare function getId(length?: number): string;\n\ninterface MarketingParameters {\n [key: string]: string;\n}\n/**\n * Extracts marketing parameters from a URL.\n *\n * @param url - The URL to extract the parameters from.\n * @param custom - Custom marketing parameters to extract.\n * @returns The extracted marketing parameters.\n */\ndeclare function getMarketingParameters(url: URL, custom?: MarketingParameters): Properties;\n\n/**\n * Creates a debounced function that delays invoking `fn` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `fn` invocations and a `flush` method to immediately invoke them.\n *\n * @template P, R\n * @param fn The function to debounce.\n * @param wait The number of milliseconds to delay.\n * @param immediate Trigger the function on the leading edge, instead of the trailing.\n * @returns The new debounced function.\n */\ndeclare function debounce<P extends unknown[], R>(fn: (...args: P) => R, wait?: number, immediate?: boolean): (...args: P) => Promise<R>;\ndeclare function throttle<P extends unknown[], R>(fn: (...args: P) => R | undefined, delay?: number): (...args: P) => R | undefined;\n\n/**\n * Checks if a value is an arguments object.\n *\n * @param value The value to check.\n * @returns True if the value is an arguments object, false otherwise.\n */\ndeclare function isArguments(value: unknown): value is IArguments;\n/**\n * Checks if a value is an array.\n *\n * @param value The value to check.\n * @returns True if the value is an array, false otherwise.\n */\ndeclare function isArray<T>(value: unknown): value is T[];\n/**\n * Checks if a value is a boolean.\n *\n * @param value The value to check.\n * @returns True if the value is a boolean, false otherwise.\n */\ndeclare function isBoolean(value: unknown): value is boolean;\n/**\n * Checks if an entity is a walker command.\n *\n * @param entity The entity to check.\n * @returns True if the entity is a walker command, false otherwise.\n */\ndeclare function isCommand(entity: string): entity is "walker";\n/**\n * Checks if a value is defined.\n *\n * @param value The value to check.\n * @returns True if the value is defined, false otherwise.\n */\ndeclare function isDefined<T>(val: T | undefined): val is T;\n/**\n * Checks if a value is an element or the document.\n *\n * @param elem The value to check.\n * @returns True if the value is an element or the document, false otherwise.\n */\ndeclare function isElementOrDocument(elem: unknown): elem is Element;\n/**\n * Checks if a value is a function.\n *\n * @param value The value to check.\n * @returns True if the value is a function, false otherwise.\n */\ndeclare function isFunction(value: unknown): value is Function;\n/**\n * Checks if a value is a number.\n *\n * @param value The value to check.\n * @returns True if the value is a number, false otherwise.\n */\ndeclare function isNumber(value: unknown): value is number;\n/**\n * Checks if a value is an object.\n *\n * @param value The value to check.\n * @returns True if the value is an object, false otherwise.\n */\ndeclare function isObject(value: unknown): value is AnyObject;\n/**\n * Checks if two variables have the same type.\n *\n * @param variable The first variable.\n * @param type The second variable.\n * @returns True if the variables have the same type, false otherwise.\n */\ndeclare function isSameType<T>(variable: unknown, type: T): variable is typeof type;\n/**\n * Checks if a value is a string.\n *\n * @param value The value to check.\n * @returns True if the value is a string, false otherwise.\n */\ndeclare function isString(value: unknown): value is string;\n\n/**\n * Create a logger instance\n *\n * @param config - Logger configuration\n * @returns Logger instance with all log methods and scoping support\n *\n * @example\n * ```typescript\n * // Basic usage\n * const logger = createLogger({ level: \'DEBUG\' });\n * logger.info(\'Hello world\');\n *\n * // With scoping\n * const destLogger = logger.scope(\'gtag\').scope(\'myInstance\');\n * destLogger.debug(\'Processing event\'); // DEBUG [gtag:myInstance] Processing event\n *\n * // With custom handler\n * const logger = createLogger({\n * handler: (level, message, context, scope, originalHandler) => {\n * // Custom logic (e.g., send to Sentry)\n * originalHandler(level, message, context, scope);\n * }\n * });\n * ```\n *\n * // TODO: Consider compile-time stripping of debug logs in production builds\n * // e.g., if (__DEV__) { logger.debug(...) }\n */\ndeclare function createLogger(config?: Config$5): Instance$3;\n\n/**\n * Gets the mapping for an event.\n *\n * @param event The event to get the mapping for (can be partial or full).\n * @param mapping The mapping rules.\n * @returns The mapping result.\n */\ndeclare function getMappingEvent(event: DeepPartialEvent | PartialEvent | Event, mapping?: Rules): Promise<Result$2>;\n/**\n * Gets a value from a mapping.\n *\n * @param value The value to get the mapping from.\n * @param data The mapping data.\n * @param options The mapping options.\n * @returns The mapped value.\n */\ndeclare function getMappingValue(value: DeepPartialEvent | unknown | undefined, data?: Data, options?: Options$1): Promise<Property | undefined>;\n/**\n * Processes an event through mapping configuration.\n *\n * This is the unified mapping logic used by both sources and destinations.\n * It applies transformations in this order:\n * 1. Config-level policy - modifies the event itself (global rules)\n * 2. Mapping rules - finds matching rule based on entity-action\n * 3. Event-level policy - modifies the event based on specific mapping rule\n * 4. Data transformation - creates context data\n * 5. Ignore check and name override\n *\n * Sources can pass partial events, destinations pass full events.\n * getMappingValue works with both partial and full events.\n *\n * @param event - The event to process (can be partial or full, will be mutated by policies)\n * @param config - Mapping configuration (mapping, data, policy, consent)\n * @param collector - Collector instance for context\n * @returns Object with transformed event, data, mapping rule, and ignore flag\n */\ndeclare function processEventMapping<T extends DeepPartialEvent | Event>(event: T, config: Config$4, collector: Instance$5): Promise<{\n event: T;\n data?: Property;\n mapping?: Rule;\n mappingKey?: string;\n ignore: boolean;\n}>;\n\n/**\n * Environment mocking utilities for walkerOS destinations\n *\n * Provides standardized tools for intercepting function calls in environment objects,\n * enabling consistent testing patterns across all destinations.\n */\ntype InterceptorFn = (path: string[], args: unknown[], original?: Function) => unknown;\n/**\n * Creates a proxied environment that intercepts function calls\n *\n * Uses Proxy to wrap environment objects and capture all function calls,\n * allowing for call recording, mocking, or simulation.\n *\n * @param env - The environment object to wrap\n * @param interceptor - Function called for each intercepted call\n * @returns Proxied environment with interceptor applied\n *\n * @example\n * ```typescript\n * const calls: Array<{ path: string[]; args: unknown[] }> = [];\n *\n * const testEnv = mockEnv(env.push, (path, args) => {\n * calls.push({ path, args });\n * });\n *\n * // Use testEnv with destination\n * await destination.push(event, { env: testEnv });\n *\n * // Analyze captured calls\n * expect(calls).toContainEqual({\n * path: [\'window\', \'gtag\'],\n * args: [\'event\', \'purchase\', { value: 99.99 }]\n * });\n * ```\n */\ndeclare function mockEnv<T extends object>(env: T, interceptor: InterceptorFn): T;\n/**\n * Traverses environment object and replaces values using a replacer function\n *\n * Alternative to mockEnv for environments where Proxy is not suitable.\n * Performs deep traversal and allows value transformation at each level.\n *\n * @param env - The environment object to traverse\n * @param replacer - Function to transform values during traversal\n * @returns New environment object with transformed values\n *\n * @example\n * ```typescript\n * const recordedCalls: APICall[] = [];\n *\n * const recordingEnv = traverseEnv(originalEnv, (value, path) => {\n * if (typeof value === \'function\') {\n * return (...args: unknown[]) => {\n * recordedCalls.push({\n * path: path.join(\'.\'),\n * args: structuredClone(args)\n * });\n * return value(...args);\n * };\n * }\n * return value;\n * });\n * ```\n */\ndeclare function traverseEnv<T extends object>(env: T, replacer: (value: unknown, path: string[]) => unknown): T;\n\n/**\n * Mock logger instance for testing\n * Includes all logger methods as jest.fn() plus tracking of scoped loggers\n * Extends Instance to ensure type compatibility\n */\ninterface MockLogger extends Instance$3 {\n error: jest.Mock;\n warn: jest.Mock;\n info: jest.Mock;\n debug: jest.Mock;\n throw: jest.Mock<never, [string | Error, unknown?]>;\n json: jest.Mock;\n scope: jest.Mock<MockLogger, [string]>;\n /**\n * Array of all scoped loggers created by this logger\n * Useful for asserting on scoped logger calls in tests\n */\n scopedLoggers: MockLogger[];\n}\n/**\n * Create a mock logger for testing\n * All methods are jest.fn() that can be used for assertions\n *\n * @example\n * ```typescript\n * const mockLogger = createMockLogger();\n *\n * // Use in code under test\n * someFunction(mockLogger);\n *\n * // Assert on calls\n * expect(mockLogger.error).toHaveBeenCalledWith(\'error message\');\n *\n * // Assert on scoped logger\n * const scoped = mockLogger.scopedLoggers[0];\n * expect(scoped.debug).toHaveBeenCalledWith(\'debug in scope\');\n * ```\n */\ndeclare function createMockLogger(): MockLogger;\n\n/**\n * Checks if a value is a valid property type.\n *\n * @param value The value to check.\n * @returns True if the value is a valid property type, false otherwise.\n */\ndeclare function isPropertyType(value: unknown): value is PropertyType;\n/**\n * Filters a value to only include valid property types.\n *\n * @param value The value to filter.\n * @returns The filtered value or undefined.\n */\ndeclare function filterValues(value: unknown): Property | undefined;\n/**\n * Casts a value to a valid property type.\n *\n * @param value The value to cast.\n * @returns The casted value or undefined.\n */\ndeclare function castToProperty(value: unknown): Property | undefined;\n\n/**\n * Converts a request string to a data object.\n *\n * @param parameter The request string to convert.\n * @returns The data object or undefined.\n */\ndeclare function requestToData(parameter: unknown): AnyObject | undefined;\n/**\n * Converts a data object to a request string.\n *\n * @param data The data object to convert.\n * @returns The request string.\n */\ndeclare function requestToParameter(data: AnyObject | PropertyType): string;\n\n/**\n * Transforms data to a string.\n *\n * @param data The data to transform.\n * @returns The transformed data.\n */\ndeclare function transformData(data?: SendDataValue): string | undefined;\n/**\n * Gets the headers for a request.\n *\n * @param headers The headers to merge with the default headers.\n * @returns The merged headers.\n */\ndeclare function getHeaders(headers?: SendHeaders): SendHeaders;\n\n/**\n * Throws an error.\n *\n * @param error The error to throw.\n */\ndeclare function throwError(error: unknown): never;\n\n/**\n * Trims quotes and whitespaces from a string.\n *\n * @param str The string to trim.\n * @returns The trimmed string.\n */\ndeclare function trim(str: string): string;\n\n/**\n * A utility function that wraps a function in a try-catch block.\n *\n * @template P, R, S\n * @param fn The function to wrap.\n * @param onError A function to call when an error is caught.\n * @param onFinally A function to call in the finally block.\n * @returns The wrapped function.\n */\ndeclare function tryCatch<P extends unknown[], R, S>(fn: (...args: P) => R | undefined, onError: (err: unknown) => S, onFinally?: () => void): (...args: P) => R | S;\ndeclare function tryCatch<P extends unknown[], R>(fn: (...args: P) => R | undefined, onError?: undefined, onFinally?: () => void): (...args: P) => R | undefined;\n/**\n * A utility function that wraps an async function in a try-catch block.\n *\n * @template P, R, S\n * @param fn The async function to wrap.\n * @param onError A function to call when an error is caught.\n * @param onFinally A function to call in the finally block.\n * @returns The wrapped async function.\n */\ndeclare function tryCatchAsync<P extends unknown[], R, S>(fn: (...args: P) => R, onError: (err: unknown) => S, onFinally?: () => void | Promise<void>): (...args: P) => Promise<R | S>;\ndeclare function tryCatchAsync<P extends unknown[], R>(fn: (...args: P) => R, onError?: undefined, onFinally?: () => void | Promise<void>): (...args: P) => Promise<R | undefined>;\n\n/**\n * A utility function that wraps a function with hooks.\n *\n * @template P, R\n * @param fn The function to wrap.\n * @param name The name of the function.\n * @param hooks The hooks to use.\n * @returns The wrapped function.\n */\ndeclare function useHooks<P extends unknown[], R>(fn: (...args: P) => R, name: string, hooks: Functions): (...args: P) => R;\n\n/**\n * Parses a user agent string to extract browser, OS, and device information.\n *\n * @param userAgent The user agent string to parse.\n * @returns An object containing the parsed user agent information.\n */\ndeclare function parseUserAgent(userAgent?: string): User;\n/**\n * Gets the browser name from a user agent string.\n *\n * @param userAgent The user agent string.\n * @returns The browser name or undefined.\n */\ndeclare function getBrowser(userAgent: string): string | undefined;\n/**\n * Gets the browser version from a user agent string.\n *\n * @param userAgent The user agent string.\n * @returns The browser version or undefined.\n */\ndeclare function getBrowserVersion(userAgent: string): string | undefined;\n/**\n * Gets the OS name from a user agent string.\n *\n * @param userAgent The user agent string.\n * @returns The OS name or undefined.\n */\ndeclare function getOS(userAgent: string): string | undefined;\n/**\n * Gets the OS version from a user agent string.\n *\n * @param userAgent The user agent string.\n * @returns The OS version or undefined.\n */\ndeclare function getOSVersion(userAgent: string): string | undefined;\n/**\n * Gets the device type from a user agent string.\n *\n * @param userAgent The user agent string.\n * @returns The device type or undefined.\n */\ndeclare function getDeviceType(userAgent: string): string | undefined;\n\n/**\n * Inline Code Wrapping Utilities\n *\n * Converts inline code strings to executable functions.\n * Used for mapping properties: condition, fn, validate.\n *\n * @packageDocumentation\n */\n\n/**\n * Wrap inline code string as Condition function.\n *\n * @param code - Inline code string\n * @returns Condition function matching Mapping.Condition signature\n *\n * @remarks\n * Available parameters in code:\n * - `value` - The event or partial event being processed\n * - `mapping` - Current mapping configuration\n * - `collector` - Collector instance\n *\n * If code has no explicit return, it\'s auto-wrapped with `return`.\n *\n * @example\n * ```typescript\n * // One-liner (auto-wrapped)\n * const fn = wrapCondition(\'value.data.total > 100\');\n * fn(event, mapping, collector); // returns boolean\n *\n * // Multi-statement (explicit return)\n * const fn = wrapCondition(\'const threshold = 100; return value.data.total > threshold\');\n * ```\n */\ndeclare function wrapCondition(code: string): Condition;\n/**\n * Wrap inline code string as Fn function.\n *\n * @param code - Inline code string\n * @returns Fn function matching Mapping.Fn signature\n *\n * @remarks\n * Available parameters in code:\n * - `value` - The event or partial event being processed\n * - `mapping` - Current mapping configuration\n * - `options` - Options object with consent and collector\n *\n * If code has no explicit return, it\'s auto-wrapped with `return`.\n *\n * @example\n * ```typescript\n * // One-liner (auto-wrapped)\n * const fn = wrapFn(\'value.user.email.split("@")[1]\');\n * fn(event, mapping, options); // returns domain\n *\n * // Multi-statement (explicit return)\n * const fn = wrapFn(\'const parts = value.user.email.split("@"); return parts[1].toUpperCase()\');\n * ```\n */\ndeclare function wrapFn(code: string): Fn$1;\n/**\n * Wrap inline code string as Validate function.\n *\n * @param code - Inline code string\n * @returns Validate function matching Mapping.Validate signature\n *\n * @remarks\n * Available parameters in code:\n * - `value` - The current value being validated\n *\n * If code has no explicit return, it\'s auto-wrapped with `return`.\n *\n * @example\n * ```typescript\n * // One-liner (auto-wrapped)\n * const fn = wrapValidate(\'value && value.length > 0\');\n * fn(\'hello\'); // returns true\n *\n * // Multi-statement (explicit return)\n * const fn = wrapValidate(\'if (!value) return false; return value.length > 0\');\n * ```\n */\ndeclare function wrapValidate(code: string): Validate;\n\ninterface ExampleSummary {\n name: string;\n description?: string;\n}\ninterface WalkerOSPackageMeta {\n packageName: string;\n version: string;\n description?: string;\n type?: string;\n platform?: string;\n}\ninterface WalkerOSPackageInfo {\n packageName: string;\n version: string;\n type?: string;\n platform?: string;\n schemas: Record<string, unknown>;\n examples: Record<string, unknown>;\n hints?: Record<string, unknown>;\n}\ninterface WalkerOSPackage extends WalkerOSPackageInfo {\n description?: string;\n docs?: string;\n source?: string;\n hintKeys: string[];\n exampleSummaries: ExampleSummary[];\n}\ndeclare function fetchPackage(packageName: string, options?: {\n version?: string;\n timeout?: number;\n}): Promise<WalkerOSPackage>;\n/**\n * @deprecated Use fetchPackage instead.\n * Still used by: entry.ts (validator), package-schemas.ts (MCP resource).\n */\ndeclare function fetchPackageSchema(packageName: string, options?: {\n version?: string;\n timeout?: number;\n}): Promise<WalkerOSPackageInfo>;\n\n/**\n * Resolve all named contracts: process extends chains, expand wildcards,\n * strip annotations from event schemas.\n *\n * Returns a fully resolved map where each contract entry has inherited\n * properties merged in and wildcards expanded into concrete actions.\n */\ndeclare function resolveContracts(contracts: Contract): Record<string, ContractEntry>;\n/**\n * Deep merge two JSON Schema objects with additive semantics.\n * - `required` arrays: union (deduplicated)\n * - `properties`: deep merge (child wins on conflict for scalars)\n * - Scalars: child overrides parent\n */\ndeclare function mergeContractSchemas(parent: Record<string, unknown>, child: Record<string, unknown>): Record<string, unknown>;\n\ndeclare function mcpResult(result: unknown, summary?: string, hints?: {\n next?: string[];\n warnings?: string[];\n}): {\n content: {\n type: "text";\n text: string;\n }[];\n structuredContent: Record<string, unknown>;\n};\ndeclare function mcpError(error: unknown, hint?: string): {\n content: {\n type: "text";\n text: string;\n }[];\n structuredContent: Record<string, unknown>;\n isError: true;\n};\n\n/**\n * Compiles a match expression into a closure for fast runtime evaluation.\n * Regex patterns are compiled once. Numeric comparisons are parsed once.\n * Runtime evaluation is pure function calls with short-circuit logic.\n */\ndeclare function compileMatcher(expr: MatchExpression | \'*\'): CompiledMatcher;\n\nexport { collector as Collector, Const, context as Context, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, type ExampleSummary, flow as Flow, hint as Hint, hooks as Hooks, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, assign, branch, castToProperty, castValue, clone, compileMatcher, createDestination, createEvent, createLogger, createMockLogger, createRespond, debounce, fetchPackage, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isSameType, isString, mcpError, mcpResult, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContracts, setByPath, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, walkPath, wrapCondition, wrapFn, wrapValidate };\n'}}),y={};function b(e){e.languages.typescript.javascriptDefaults.setCompilerOptions({target:e.languages.typescript.ScriptTarget.ES2020,lib:["es2020"],allowNonTsExtensions:!0,moduleResolution:e.languages.typescript.ModuleResolutionKind.NodeJs,module:e.languages.typescript.ModuleKind.CommonJS,noEmit:!0,esModuleInterop:!0,jsx:e.languages.typescript.JsxEmit.React,allowJs:!0,checkJs:!1,strict:!1,noImplicitAny:!1,strictNullChecks:!1}),e.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[1108,1005]}),e.languages.typescript.typescriptDefaults.setCompilerOptions({target:e.languages.typescript.ScriptTarget.ES2020,lib:["es2020"],allowNonTsExtensions:!0,moduleResolution:e.languages.typescript.ModuleResolutionKind.NodeJs,module:e.languages.typescript.ModuleKind.CommonJS,noEmit:!0,esModuleInterop:!0,jsx:e.languages.typescript.JsxEmit.React,strict:!1})}function v(e,n,t){if(g.has(n))return!1;const r=e.languages.typescript.javascriptDefaults.addExtraLib(t,n),o=e.languages.typescript.typescriptDefaults.addExtraLib(t,n);return g.set(n,{uri:n,content:t,disposable:{dispose:()=>{r.dispose(),o.dispose()}}}),!0}function k(e){const n=g.get(e);return!!n&&(n.disposable?.dispose(),g.delete(e),!0)}function x(e,n,t){k(n),v(e,n,t)}async function w(e,n,t){try{const r=await fetch(n);if(!r.ok)return!1;const o=await r.text();return v(e,t||`file:///${n}`,o)}catch{return!1}}function T(e){let n=e.replace(/^import\s+(?:type\s+)?(?:\*\s+as\s+\w+|\{[^}]*\}|[\w$]+)(?:\s*,\s*(?:\{[^}]*\}|\*\s+as\s+\w+))?\s+from\s+['"][^'"]+['"];?\s*$/gm,"");return n=n.replace(/^import\s+(?:type\s+)?(?:\{[^}]*\}|\*\s+as\s+\w+|[\w$]+)\s+from\s+['"][^'"]+['"];?\s*$/gms,""),n=n.replace(/import\s*\(\s*['"][^'"]+['"]\s*\)/g,"any"),n=n.replace(/\n{3,}/g,"\n\n"),n}async function C(e,n){const{package:t,version:r="latest"}=n,o=`file:///node_modules/${t}/index.d.ts`;if(g.has(o))return!0;const i=`https://cdn.jsdelivr.net/npm/${t}@${r}/dist/index.d.ts`;try{const n=await fetch(i);if(!n.ok)return!1;let r=await n.text();r=T(r);const s=`declare module '${t}' {\n${r}\n}`;return v(e,o,s)}catch{return!1}}function S(e){const n="file:///node_modules/@walkeros/core/index.d.ts";if(g.has(n))return!0;return v(e,n,`declare module '@walkeros/core' {\n${T(f)}\n}`)}function $(r,o){x(r,`file:///context/${o.type}.d.ts`,function(r){switch(r){case"fn":return e;case"condition":return n;case"validate":return t;default:return""}}(o.type))}function j(e,n,t){x(e,`file:///destinations/${n}.d.ts`,t)}function E(e){k(`file:///destinations/${e}.d.ts`)}function P(e){b(e),S(e)}function _(e){b(e),S(e),$(e,{type:"condition"})}function R(){return Array.from(g.keys())}function I(){for(const[e,n]of g.entries())n.disposable?.dispose();g.clear()}d(y,{addDestinationType:()=>j,addFunctionContextTypes:()=>$,addTypeLibrary:()=>v,clearAllTypeLibraries:()=>I,configureMonacoTypeScript:()=>b,getLoadedTypeLibraries:()=>R,initializeMonacoTypes:()=>_,loadPackageTypes:()=>C,loadTypeLibraryFromURL:()=>w,loadWalkerOSCoreTypes:()=>S,registerWalkerOSTypes:()=>P,removeDestinationType:()=>E,removeTypeLibrary:()=>k,updateTypeLibrary:()=>x});var O,F=c({"src/utils/monaco-types.ts"(){m(),h(),g=new Map}}),D={};d(D,{ArchitectureFlow:()=>Io,Box:()=>J,BrowserBox:()=>Tn,Button:()=>vn,ButtonGroup:()=>xn,ButtonLink:()=>hi,Code:()=>We,CodeBox:()=>qe,CodeSnippet:()=>No,CollectorBox:()=>Hn,DestinationDemo:()=>nn,DestinationInit:()=>an,DestinationInitDemo:()=>an,DestinationPush:()=>nn,Dropdown:()=>di,DropdownDivider:()=>pi,DropdownItem:()=>ui,FlowMap:()=>oi,Footer:()=>gi,Grid:()=>Xe,Header:()=>G,Icon:()=>dr,LiveCode:()=>Wn,MDXCode:()=>Si,MDXProvider:()=>ji,Preview:()=>hn,PromotionPlayground:()=>Rn,PropertyTable:()=>li,REFERENCE_PATTERNS:()=>oe,Spinner:()=>bi,applyWalkerOSDecorations:()=>se,captureDestinationPush:()=>Ke,cn:()=>_o,createCaptureFn:()=>en,createFbqDestination:()=>Sn,createGtagDestination:()=>Cn,createPlausibleDestination:()=>$n,createRawCapture:()=>Qe,disposeWalkerOSProviders:()=>Se,enrichFlowConfigSchema:()=>Ii,enrichSchema:()=>_i,extractFlowIntelliSenseContext:()=>Ni,findWalkerOSReferences:()=>ie,formatCapturedCalls:()=>Ye,generateModelPath:()=>Ne,getEnrichedContractSchema:()=>Oi,getVariablesSchema:()=>Fi,initializeMonacoTypes:()=>_,lighthouseTheme:()=>ee,loadPackageTypes:()=>C,loadTypeLibraryFromURL:()=>w,palenightTheme:()=>Q,registerAllThemes:()=>te,registerJsonSchema:()=>Me,registerLighthouseTheme:()=>ne,registerPalenightTheme:()=>Z,registerWalkerOSDecorationStyles:()=>ae,registerWalkerOSProviders:()=>Ce,registerWalkerOSTypes:()=>P,removeIntelliSenseContext:()=>Te,setIntelliSenseContext:()=>we,unregisterJsonSchema:()=>Ae,useDropdown:()=>Pi,validateWalkerOSReferences:()=>Di}),module.exports=(O=D,u(o({},"__esModule",{value:!0}),O));var N=require("react"),M=require("@walkeros/core"),A=require("@walkeros/collector"),L=require("react"),V=require("@monaco-editor/react"),B=require("react"),W=require("react/jsx-runtime");function G({label:e,children:n}){return(0,W.jsxs)("div",{className:"elb-explorer-header",children:[(0,W.jsx)("span",{className:"elb-explorer-label",children:e}),n]})}var q=require("react"),z=(0,q.createContext)(null);function H(){return(0,q.useContext)(z)}var U=require("react/jsx-runtime");function X(){return(0,U.jsxs)("div",{className:"elb-explorer-traffic-lights",children:[(0,U.jsx)("span",{className:"elb-explorer-traffic-light elb-explorer-traffic-light--red"}),(0,U.jsx)("span",{className:"elb-explorer-traffic-light elb-explorer-traffic-light--yellow"}),(0,U.jsx)("span",{className:"elb-explorer-traffic-light elb-explorer-traffic-light--green"})]})}function J({header:e,headerActions:n,footer:t,children:r,className:o="",style:i,height:s,minHeight:a,maxHeight:l,tiny:c=!1,resizable:d=!1,showHeader:u=!0,tabs:p,activeTab:f,onTabChange:g,defaultTab:m,showTrafficLights:h=!1}){const y=H(),[b,v]=(0,B.useState)(m||(p?.[0]?.id??"")),k=void 0!==f,x=k?f:b,w={...i};void 0!==s?w.height="number"==typeof s?`${s}px`:s:y?.syncedHeight&&(w.height=`${y.syncedHeight}px`),c?(w.height="auto",w.minHeight=void 0!==a?"number"==typeof a?`${a}px`:a:"100px"):void 0!==a&&(w.minHeight="number"==typeof a?`${a}px`:a),void 0!==l&&(w.maxHeight="number"==typeof l?`${l}px`:l),d&&(w.resize="vertical",w.overflow="auto");const T=!!y?.enabled?"elb-box--auto-height":"",C=p?.find(e=>e.id===x)?.content,S=C??r,$=p&&p.length>0,j=u&&e&&!$;return(0,U.jsxs)("div",{className:`elb-explorer elb-explorer-box ${T} ${o}`.trim(),style:w,children:[$&&(0,U.jsxs)("div",{className:"elb-explorer-tabs",children:[h&&(0,U.jsx)(X,{}),p.map(e=>(0,U.jsx)("button",{type:"button",className:"elb-explorer-tab "+(x===e.id?"elb-explorer-tab--active":""),onClick:()=>{return n=e.id,g&&g(n),void(k||v(n));var n},children:e.label},e.id)),n&&(0,U.jsx)("div",{className:"elb-explorer-tab-actions",children:n})]}),j&&(0,U.jsx)(G,{label:e,children:n}),(0,U.jsx)("div",{className:"elb-explorer-content",children:S}),t&&(0,U.jsx)("div",{className:"elb-explorer-footer",children:t})]})}var Y=require("react"),K=require("@monaco-editor/react"),Q={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"697098",fontStyle:"italic"},{token:"comment.block",foreground:"697098",fontStyle:"italic"},{token:"comment.line",foreground:"697098",fontStyle:"italic"},{token:"string",foreground:"c3e88d"},{token:"string.quoted",foreground:"c3e88d"},{token:"string.template",foreground:"c3e88d"},{token:"string.regexp",foreground:"89ddff"},{token:"string.value.json",foreground:"c3e88d"},{token:"string.json",foreground:"c3e88d"},{token:"string.html",foreground:"c3e88d"},{token:"string.css",foreground:"c3e88d"},{token:"string.js",foreground:"c3e88d"},{token:"string.ts",foreground:"c3e88d"},{token:"number",foreground:"f78c6c"},{token:"number.hex",foreground:"f78c6c"},{token:"number.binary",foreground:"f78c6c"},{token:"number.octal",foreground:"f78c6c"},{token:"number.float",foreground:"f78c6c"},{token:"keyword",foreground:"c084fc",fontStyle:"italic"},{token:"keyword.control",foreground:"c084fc",fontStyle:"italic"},{token:"keyword.operator",foreground:"89ddff"},{token:"keyword.other",foreground:"c084fc"},{token:"operator",foreground:"89ddff"},{token:"operators",foreground:"89ddff"},{token:"function",foreground:"82aaff"},{token:"identifier.function",foreground:"82aaff"},{token:"support.function",foreground:"82aaff"},{token:"entity.name.function",foreground:"82aaff"},{token:"type",foreground:"ffcb6b"},{token:"type.identifier",foreground:"ffcb6b"},{token:"entity.name.type",foreground:"ffcb6b"},{token:"entity.name.class",foreground:"ffcb6b"},{token:"support.type",foreground:"ffcb6b"},{token:"support.class",foreground:"ffcb6b"},{token:"variable",foreground:"bfc7d5"},{token:"variable.name",foreground:"bfc7d5"},{token:"variable.parameter",foreground:"bfc7d5"},{token:"constant",foreground:"82aaff"},{token:"constant.language",foreground:"ff5874"},{token:"constant.numeric",foreground:"f78c6c"},{token:"constant.character",foreground:"82aaff"},{token:"support.constant",foreground:"82aaff"},{token:"constant.language.boolean",foreground:"ff5874"},{token:"keyword.constant.boolean",foreground:"ff5874"},{token:"delimiter",foreground:"c792ea"},{token:"delimiter.bracket",foreground:"c792ea"},{token:"delimiter.parenthesis",foreground:"c792ea"},{token:"delimiter.square",foreground:"c792ea"},{token:"punctuation",foreground:"c792ea"},{token:"tag",foreground:"ff5572"},{token:"meta.tag",foreground:"ff5572"},{token:"entity.name.tag",foreground:"ff5572"},{token:"attribute.name",foreground:"c3e88d"},{token:"entity.other.attribute-name",foreground:"c3e88d"},{token:"namespace",foreground:"b2ccd6"},{token:"entity.name.namespace",foreground:"b2ccd6"},{token:"markup.underline.link",foreground:"dddddd"},{token:"meta.tag.sgml.doctype",foreground:"c084fc",fontStyle:"italic"},{token:"support.type.property-name",foreground:"bfc7d5"},{token:"support.type.property-name.json",foreground:"bfc7d5"},{token:"string.key.json",foreground:"bfc7d5"},{token:"meta.object-literal.key",foreground:"bfc7d5"},{token:"variable.other.property",foreground:"bfc7d5"},{token:"identifier",foreground:"bfc7d5"},{token:"identifier.ts",foreground:"bfc7d5"},{token:"identifier.js",foreground:"bfc7d5"},{token:"markup.bold",fontStyle:"bold"},{token:"markup.italic",fontStyle:"italic"},{token:"markup.heading",foreground:"c084fc",fontStyle:"bold"},{token:"variable.parameter.ts",foreground:"bfc7d5"},{token:"variable.parameter.js",foreground:"bfc7d5"},{token:"support.type.primitive.ts",foreground:"ffcb6b"},{token:"support.type.primitive.js",foreground:"ffcb6b"},{token:"entity.name.type.ts",foreground:"ffcb6b"},{token:"entity.name.type.js",foreground:"ffcb6b"},{token:"meta.type.annotation.ts",foreground:"ffcb6b"},{token:"keyword.operator.type.ts",foreground:"89ddff"},{token:"entity.name.tag.html",foreground:"bfc7d5"},{token:"tag.html",foreground:"bfc7d5"},{token:"entity.other.attribute-name.html",foreground:"bfc7d5"},{token:"attribute.name.html",foreground:"bfc7d5"},{token:"attribute.value.html",foreground:"c3e88d"},{token:"delimiter.html",foreground:"c792ea"},{token:"comment.html",foreground:"697098",fontStyle:"italic"},{token:"meta.tag.html",foreground:"c792ea"},{token:"punctuation.definition.tag.html",foreground:"c792ea"},{token:"entity.name.tag.css",foreground:"ff5572"},{token:"entity.other.attribute-name.class.css",foreground:"ffcb6b"},{token:"entity.other.attribute-name.id.css",foreground:"82aaff"},{token:"support.type.property-name.css",foreground:"c084fc"},{token:"support.constant.property-value.css",foreground:"f78c6c"},{token:"keyword.other.unit.css",foreground:"f78c6c"},{token:"invalid",foreground:"ff5572"},{token:"invalid.illegal",foreground:"ff5572"},{token:"invalid.deprecated",foreground:"f78c6c"}],colors:{"editor.background":"#00000000","editor.foreground":"#bfc7d5","editor.lineHighlightBackground":"#00000000","editorLineNumber.foreground":"#676E95","editorLineNumber.activeForeground":"#c084fc","editorCursor.foreground":"#c084fc","editor.selectionBackground":"#717CB450","editor.inactiveSelectionBackground":"#717CB430","editor.selectionHighlightBackground":"#717CB420","editorGutter.background":"#00000000","editorGutter.modifiedBackground":"#82aaff","editorGutter.addedBackground":"#c3e88d","editorGutter.deletedBackground":"#ff5572","editorWidget.background":"#1e1e2e","editorWidget.border":"#676E95","editorSuggestWidget.background":"#1e1e2e","editorSuggestWidget.border":"#676E95","editorSuggestWidget.selectedBackground":"#717CB440","editorStickyScroll.background":"#292d3e","editorStickyScroll.border":"#676E9540","editorStickyScrollHover.background":"#292d3e","editorStickyScroll.shadow":"#00000000","editorStickyScrollGutter.background":"#292d3e","editorHoverWidget.background":"#1e1e2e","editorHoverWidget.border":"#676E95","editorHoverWidget.statusBarBackground":"#676E95","editorInlineHint.background":"#292d3e","editorInlineHint.foreground":"#676E95","editorCodeLens.foreground":"#697098","editorGhostText.foreground":"#676E9540","editorWhitespace.foreground":"#676E9540","editorIndentGuide.background":"#676E9520","editorIndentGuide.activeBackground":"#676E95","scrollbar.shadow":"#00000000","scrollbarSlider.background":"#676E9530","scrollbarSlider.hoverBackground":"#676E9550","scrollbarSlider.activeBackground":"#676E9570","editorBracketMatch.background":"#676E9540","editorBracketMatch.border":"#676E95","editor.findMatchBackground":"#717CB440","editor.findMatchHighlightBackground":"#676E9530","editor.findRangeHighlightBackground":"#676E9520","minimap.background":"#292d3e","minimap.selectionHighlight":"#717CB440","minimap.findMatchHighlight":"#717CB440","editorOverviewRuler.border":"#676E9520","editorOverviewRuler.modifiedForeground":"#82aaff","editorOverviewRuler.addedForeground":"#c3e88d","editorOverviewRuler.deletedForeground":"#ff5572","peekView.border":"#676E95","peekViewEditor.background":"#1e1e2e","peekViewResult.background":"#1e1e2e","peekViewTitle.background":"#1e1e2e","diffEditor.insertedTextBackground":"#c3e88d20","diffEditor.removedTextBackground":"#ff557220"}};function Z(e){e.editor.defineTheme("elbTheme-dark",Q)}var ee={base:"vs",inherit:!0,rules:[{token:"comment",foreground:"6A737D",fontStyle:"italic"},{token:"comment.block",foreground:"6A737D",fontStyle:"italic"},{token:"comment.line",foreground:"6A737D",fontStyle:"italic"},{token:"string",foreground:"22863A"},{token:"string.quoted",foreground:"22863A"},{token:"string.template",foreground:"22863A"},{token:"string.regexp",foreground:"032F62"},{token:"string.value.json",foreground:"22863A"},{token:"string.json",foreground:"22863A"},{token:"string.html",foreground:"22863A"},{token:"string.css",foreground:"22863A"},{token:"string.js",foreground:"22863A"},{token:"string.ts",foreground:"22863A"},{token:"number",foreground:"D73A49"},{token:"number.hex",foreground:"D73A49"},{token:"number.binary",foreground:"D73A49"},{token:"number.octal",foreground:"D73A49"},{token:"number.float",foreground:"D73A49"},{token:"keyword",foreground:"6F42C1",fontStyle:"italic"},{token:"keyword.control",foreground:"6F42C1",fontStyle:"italic"},{token:"keyword.operator",foreground:"0086B3"},{token:"keyword.other",foreground:"6F42C1"},{token:"operator",foreground:"01b5e2"},{token:"operators",foreground:"01b5e2"},{token:"function",foreground:"005CC5"},{token:"identifier.function",foreground:"005CC5"},{token:"support.function",foreground:"005CC5"},{token:"entity.name.function",foreground:"005CC5"},{token:"type",foreground:"B08800"},{token:"type.identifier",foreground:"B08800"},{token:"entity.name.type",foreground:"B08800"},{token:"entity.name.class",foreground:"B08800"},{token:"support.type",foreground:"B08800"},{token:"support.class",foreground:"B08800"},{token:"variable",foreground:"24292E"},{token:"variable.name",foreground:"24292E"},{token:"variable.parameter",foreground:"24292E"},{token:"constant",foreground:"005CC5"},{token:"constant.language",foreground:"ef4444"},{token:"constant.numeric",foreground:"fb923c"},{token:"constant.character",foreground:"005CC5"},{token:"support.constant",foreground:"005CC5"},{token:"constant.language.boolean",foreground:"ef4444"},{token:"keyword.constant.boolean",foreground:"ef4444"},{token:"delimiter",foreground:"24292E"},{token:"delimiter.bracket",foreground:"24292E"},{token:"delimiter.parenthesis",foreground:"24292E"},{token:"delimiter.square",foreground:"24292E"},{token:"punctuation",foreground:"24292E"},{token:"tag",foreground:"D73A49"},{token:"meta.tag",foreground:"D73A49"},{token:"entity.name.tag",foreground:"D73A49"},{token:"attribute.name",foreground:"22863A"},{token:"entity.other.attribute-name",foreground:"22863A"},{token:"namespace",foreground:"6F42C1"},{token:"entity.name.namespace",foreground:"6F42C1"},{token:"markup.underline.link",foreground:"005CC5"},{token:"meta.tag.sgml.doctype",foreground:"6A737D",fontStyle:"italic"},{token:"support.type.property-name",foreground:"24292E"},{token:"support.type.property-name.json",foreground:"24292E"},{token:"string.key.json",foreground:"24292E"},{token:"meta.object-literal.key",foreground:"24292E"},{token:"variable.other.property",foreground:"24292E"},{token:"identifier",foreground:"24292E"},{token:"identifier.ts",foreground:"24292E"},{token:"identifier.js",foreground:"24292E"},{token:"markup.bold",fontStyle:"bold"},{token:"markup.italic",fontStyle:"italic"},{token:"markup.heading",foreground:"6F42C1",fontStyle:"bold"},{token:"variable.parameter.ts",foreground:"24292E"},{token:"variable.parameter.js",foreground:"24292E"},{token:"support.type.primitive.ts",foreground:"B08800"},{token:"support.type.primitive.js",foreground:"B08800"},{token:"entity.name.type.ts",foreground:"B08800"},{token:"entity.name.type.js",foreground:"B08800"},{token:"meta.type.annotation.ts",foreground:"B08800"},{token:"keyword.operator.type.ts",foreground:"0086B3"},{token:"entity.name.tag.html",foreground:"24292E"},{token:"tag.html",foreground:"24292E"},{token:"entity.other.attribute-name.html",foreground:"24292E"},{token:"attribute.name.html",foreground:"24292E"},{token:"attribute.value.html",foreground:"22863A"},{token:"delimiter.html",foreground:"24292E"},{token:"comment.html",foreground:"6A737D",fontStyle:"italic"},{token:"meta.tag.html",foreground:"24292E"},{token:"punctuation.definition.tag.html",foreground:"24292E"},{token:"entity.name.tag.css",foreground:"D73A49"},{token:"entity.other.attribute-name.class.css",foreground:"B08800"},{token:"entity.other.attribute-name.id.css",foreground:"005CC5"},{token:"support.type.property-name.css",foreground:"6F42C1"},{token:"support.constant.property-value.css",foreground:"D73A49"},{token:"keyword.other.unit.css",foreground:"D73A49"},{token:"invalid",foreground:"CB2431"},{token:"invalid.illegal",foreground:"CB2431"},{token:"invalid.deprecated",foreground:"D73A49"}],colors:{"editor.background":"#00000000","editor.foreground":"#24292E","editor.lineHighlightBackground":"#00000000","editorLineNumber.foreground":"#1B1F2380","editorLineNumber.activeForeground":"#6F42C1","editorCursor.foreground":"#6F42C1","editor.selectionBackground":"#0366D630","editor.inactiveSelectionBackground":"#0366D620","editor.selectionHighlightBackground":"#0366D615","editorGutter.background":"#00000000","editorGutter.modifiedBackground":"#005CC5","editorGutter.addedBackground":"#28A745","editorGutter.deletedBackground":"#D73A49","editorWidget.background":"#F6F8FA","editorWidget.border":"#E1E4E8","editorSuggestWidget.background":"#F6F8FA","editorSuggestWidget.border":"#E1E4E8","editorSuggestWidget.selectedBackground":"#0366D625","editorStickyScroll.background":"#ffffff","editorStickyScroll.border":"#E1E4E8","editorStickyScrollHover.background":"#ffffff","editorStickyScroll.shadow":"#00000000","editorStickyScrollGutter.background":"#ffffff","editorHoverWidget.background":"#F6F8FA","editorHoverWidget.border":"#E1E4E8","editorHoverWidget.statusBarBackground":"#E1E4E8","editorInlineHint.background":"#F6F8FA","editorInlineHint.foreground":"#6A737D","editorCodeLens.foreground":"#6A737D","editorGhostText.foreground":"#1B1F2350","editorWhitespace.foreground":"#1B1F2340","editorIndentGuide.background":"#E1E4E820","editorIndentGuide.activeBackground":"#E1E4E8","scrollbar.shadow":"#00000000","scrollbarSlider.background":"#1B1F2330","scrollbarSlider.hoverBackground":"#1B1F2350","scrollbarSlider.activeBackground":"#1B1F2370","editorBracketMatch.background":"#34D05840","editorBracketMatch.border":"#34D058","editor.findMatchBackground":"#FFDF5D40","editor.findMatchHighlightBackground":"#FFDF5D30","editor.findRangeHighlightBackground":"#0366D620","minimap.background":"#FAFBFC","minimap.selectionHighlight":"#0366D625","minimap.findMatchHighlight":"#FFDF5D40","editorOverviewRuler.border":"#E1E4E820","editorOverviewRuler.modifiedForeground":"#005CC5","editorOverviewRuler.addedForeground":"#28A745","editorOverviewRuler.deletedForeground":"#D73A49","peekView.border":"#0366D6","peekViewEditor.background":"#F6F8FA","peekViewResult.background":"#FAFBFC","peekViewTitle.background":"#F6F8FA","diffEditor.insertedTextBackground":"#28A74520","diffEditor.removedTextBackground":"#D73A4920"}};function ne(e){e.editor.defineTheme("elbTheme-light",ee)}function te(e){Z(e),ne(e)}F();var re=[/\bdata-elb(?!-)\b/g,/\bdata-elbaction\b/g,/\bdata-elbactions\b/g,/\bdata-elbglobals\b/g,/\bdata-elbcontext\b/g,/\bdata-elblink\b/g,/\bdata-elb-[\w-]+\b/g];var oe=[{type:"variable",regex:/\$var\.(\w*)/g,className:"elb-ref-variable"},{type:"definition",regex:/\$def\.(\w*)/g,className:"elb-ref-definition"},{type:"secret",regex:/\$secret\.(\w*)/g,className:"elb-ref-secret"},{type:"env",regex:/\$env\.(\w*)/g,className:"elb-ref-env"},{type:"code",regex:/\$code:/g,className:"elb-ref-code"}];function ie(e){const n=[];for(const t of oe){const r=new RegExp(t.regex.source,t.regex.flags);let o;for(;null!==(o=r.exec(e));)n.push({type:t.type,name:"code"===t.type?"":o[1]||"",startIndex:o.index,endIndex:o.index+o[0].length})}return n}function se(e){let n=[];function t(){const t=e.getModel();if(!t)return;const r=ie(t.getValue()).map(e=>{const n=t.getPositionAt(e.startIndex),r=t.getPositionAt(e.endIndex),o=oe.find(n=>n.type===e.type);return{range:{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column},options:{inlineClassName:o.className}}});n=e.deltaDecorations(n,r)}t();const r=e.onDidChangeModelContent(()=>t());return()=>{r.dispose(),e.deltaDecorations(n,[])}}function ae(){if("undefined"==typeof document)return;if(document.getElementById("walkeros-ref-styles"))return;const e=document.createElement("style");e.id="walkeros-ref-styles",e.textContent="\n .monaco-editor .elb-ref-variable { color: #89ddff !important; font-style: italic; }\n .monaco-editor .elb-ref-definition { color: #c3e88d !important; font-style: italic; }\n .monaco-editor .elb-ref-secret { color: #ffcb6b !important; font-style: italic; }\n .monaco-editor .elb-ref-env { color: #ffcb6b !important; font-style: italic; }\n .monaco-editor .elb-ref-code { color: #c084fc !important; }\n ",document.head.appendChild(e)}var le=require("@walkeros/core"),ce="",de={};function ue(e){const n=e.properties;return n&&"object"==typeof n?Object.entries(n).map(([e,n])=>({key:e,type:"string"==typeof n?.type?n.type:void 0})):[]}function pe(e,n){if(!e||0===Object.keys(e).length)return[];const t=function(e){const n=JSON.stringify(e);if(n!==ce)try{de=(0,le.resolveContracts)(e),ce=n}catch{return{}}return de}(e);if(0===Object.keys(t).length)return[];if(0===n.length)return Object.keys(t).map(e=>({key:e,detail:t[e].description||"contract"}));const[r,...o]=n,i=t[r];if(!i)return[];if(0===o.length){const e=[];void 0!==i.tagging&&e.push({key:"tagging",type:"number"}),void 0!==i.description&&e.push({key:"description",type:"string"});for(const n of["globals","context","custom","user","consent"])i[n]&&e.push({key:n,detail:"schema"});return i.events&&e.push({key:"events",detail:"entity map"}),e}const s=o[0];if(["globals","context","custom","user","consent"].includes(s)){const e=i[s];return e&&"object"==typeof e?1===o.length?ue(e):fe(e,o.slice(1)):[]}if("events"===s){if(!i.events)return[];if(1===o.length)return Object.keys(i.events).filter(e=>"*"!==e).map(e=>({key:e,detail:"entity"}));const e=o[1],n=i.events[e];if(!n)return[];if(2===o.length)return Object.keys(n).filter(e=>"*"!==e).map(e=>({key:e,detail:"action"}));const t=n[o[2]];return t&&"object"==typeof t?3===o.length?ue(t):fe(t,o.slice(3)):[]}return[]}function fe(e,n){let t=e;for(const e of n){const n=t.properties;if(!n||!n[e])return[];t=n[e]}return ue(t)}function ge(e){return e&&0!==Object.keys(e).length?Object.entries(e).map(([e,n])=>({label:`$var.${e}`,insertText:`$var.${e}`,detail:`= ${JSON.stringify(n)}`,documentation:`Variable reference. Resolves to \`${JSON.stringify(n)}\` at runtime.`,kind:"variable",sortText:"0_var_"+e})):[]}function me(e){return e&&0!==Object.keys(e).length?Object.keys(e).map(e=>({label:`$def.${e}`,insertText:`$def.${e}`,detail:"(definition)",documentation:`Definition reference. Injects the reusable config fragment "${e}" at runtime.`,kind:"reference",sortText:"0_def_"+e})):[]}function he(e){return e&&0!==e.length?e.map(e=>({label:`$secret.${e}`,insertText:`$secret.${e}`,detail:"(secret)",documentation:"Secret reference. Value is securely injected at runtime. Never stored in config.",kind:"secret",sortText:"0_secret_"+e})):[]}var ye=[{label:"data",insertText:"data",detail:"(event data)",kind:"property",sortText:"0_event_data"},{label:"globals",insertText:"globals",detail:"(global properties)",kind:"property",sortText:"0_event_globals"},{label:"user",insertText:"user",detail:"(user properties)",kind:"property",sortText:"0_event_user"},{label:"context",insertText:"context",detail:"(context data)",kind:"property",sortText:"0_event_context"},{label:"custom",insertText:"custom",detail:"(custom properties)",kind:"property",sortText:"0_event_custom"},{label:"consent",insertText:"consent",detail:"(consent state)",kind:"property",sortText:"0_event_consent"},{label:"nested",insertText:"nested",detail:"(nested entities)",kind:"property",sortText:"0_event_nested"},{label:"entity",insertText:"entity",detail:"(string)",kind:"property",sortText:"1_event_entity"},{label:"action",insertText:"action",detail:"(string)",kind:"property",sortText:"1_event_action"},{label:"name",insertText:"name",detail:"(string)",kind:"property",sortText:"1_event_name"},{label:"trigger",insertText:"trigger",detail:"(string)",kind:"property",sortText:"1_event_trigger"},{label:"timestamp",insertText:"timestamp",detail:"(number)",kind:"property",sortText:"1_event_timestamp"},{label:"timing",insertText:"timing",detail:"(number)",kind:"property",sortText:"1_event_timing"},{label:"id",insertText:"id",detail:"(string)",kind:"property",sortText:"1_event_id"},{label:"group",insertText:"group",detail:"(string)",kind:"property",sortText:"1_event_group"},{label:"count",insertText:"count",detail:"(number)",kind:"property",sortText:"1_event_count"},{label:"source",insertText:"source",detail:"(source info)",kind:"property",sortText:"1_event_source"},{label:"version",insertText:"version",detail:"(version info)",kind:"property",sortText:"1_event_version"}];function be(e,n){if(!e||0===Object.keys(e).length)return[];const t=pe(e,n),r=n.length>0?`$contract.${n.join(".")}.`:"$contract.";return t.map(e=>({label:`${r}${e.key}`.replace(/\.$/,""),insertText:0===n.length?`$contract.${e.key}`:`$contract.${n.join(".")}.${e.key}`,detail:e.type?`(${e.type})`:e.detail?`(${e.detail})`:"(contract)",documentation:`Contract reference. Resolves to the ${e.key} ${e.detail||"value"} at runtime.`,kind:"property",sortText:"0_contract_"+n.concat(e.key).join("_")}))}var ve=new Map,ke=[],xe=!1;function we(e,n){ve.set(e,n)}function Te(e){ve.delete(e)}function Ce(e){xe||(xe=!0,ke.push(e.languages.registerCompletionItemProvider("json",{triggerCharacters:['"',".","$"],provideCompletionItems(n,t){const r=n.uri.toString(),o=ve.get(r);if(!o)return{suggestions:[]};const i=n.getLineContent(t.lineNumber).substring(0,t.column-1),s=[];if(i.includes("$var.")||i.endsWith('"$var'))s.push(...ge(o.variables));else if(i.includes("$def.")||i.endsWith('"$def'))s.push(...me(o.definitions));else if(i.includes("$secret.")||i.endsWith('"$secret'))s.push(...he(o.secrets));else if(i.includes("$contract.")||i.endsWith('"$contract')){const e=i.match(/\$contract\.([a-zA-Z0-9_.]*)?$/),n=e?.[1]||"",t=n?n.split(".").filter(Boolean):[];n&&!n.endsWith(".")&&t.length>0&&t.pop(),s.push(...be(o.contractRaw,t))}else if(je(n,t,"package"))s.push(...(a=o.packages,l=o.platform,a&&0!==a.length?(l?a.filter(e=>e.platform===l):a).map(e=>({label:e.package,insertText:e.package,detail:`${e.type} (${e.platform})`,documentation:`walkerOS ${e.type}: ${e.shortName}`,kind:"module",sortText:"1_pkg_"+e.shortName})):[]));else if(je(n,t,"next")||je(n,t,"before")){const e=je(n,t,"next")?"next":"before";s.push(...function(e,n){return e?(e.transformers||[]).map(e=>({label:e,insertText:e,detail:`transformer (${n} chain)`,documentation:`Reference to transformer step "${e}" in this flow config.`,kind:"reference",sortText:"0_step_"+e})):[]}(o.stepNames,e))}else(i.endsWith('"$')||i.endsWith('"'))&&(s.push(...ge(o.variables)),s.push(...me(o.definitions)),s.push(...he(o.secrets)),s.push(...be(o.contractRaw,[])));var a,l;if(0===s.length&&o.contractRaw){const e=function(e,n){const t=[];let r,o=0,i=!1,s=-1,a=!1;for(;o<e.length&&o<=n;){const n=e[o];if(a)a=!1,o++;else if("\\"===n&&i)a=!0,o++;else{if('"'===n)if(i){const n=e.substring(s,o);i=!1;let t=o+1;for(;t<e.length&&/\s/.test(e[t]);)t++;":"===e[t]&&(r=n)}else i=!0,s=o+1;else i||("{"===n?void 0!==r&&(t.push(r),r=void 0):"}"===n&&t.pop());o++}}return void 0!==r&&t.push(r),t}(n.getValue(),n.getOffsetAt(t)),r=function(e){const n=e.indexOf("mapping");if(-1===n)return null;const t=e[n+1],r=e[n+2];return t&&r?{entity:t,action:r}:null}(e);if(r){const e=i.match(/"([a-z_]*)\.?$/);if(e){const n=e[1],t=function(e,n,t,r){if(!r)return ye;if(!e||0===Object.keys(e).length)return[];const o={data:"events",globals:"globals",context:"context",custom:"custom",user:"user",consent:"consent"}[r];if(!o)return[];const i=[],s=new Set;for(const a of Object.keys(e)){const l=pe(e,"events"===o?[a,"events",n,t]:[a,o]);for(const e of l)s.has(e.key)||(s.add(e.key),i.push({label:`${r}.${e.key}`,insertText:`${r}.${e.key}`,detail:e.type?`(${e.type})`:"(property)",documentation:`Event property from contract. Maps to event.${r}.${e.key}.`,kind:"property",sortText:`0_mapping_${e.key}`}))}return i}(o.contractRaw,r.entity,r.action,n);t.length>0&&s.push(...t)}}}const c=i.match(/\$(?:var|def|secret|env|code|contract)[.:]?[\w.]*$/),d=c?null:i.match(/[a-z_][\w.]*$/i),u=n.getWordUntilPosition(t),p=c?t.column-c[0].length:d?t.column-d[0].length:u.startColumn,f={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:p,endColumn:t.column};return{suggestions:s.map(n=>({label:n.label,insertText:n.insertText,detail:n.detail,documentation:n.documentation,kind:$e(e,n.kind),sortText:n.sortText,range:f}))}}})),ke.push(e.languages.registerHoverProvider("json",{provideHover(e,n){const t=e.uri.toString(),r=ve.get(t);if(!r)return null;const o=e.getLineContent(n.lineNumber),i=n.column-1;function s(e){const n=new RegExp(e.source,"g");let t;for(;null!==(t=n.exec(o));)if(i>=t.index&&i<=t.index+t[0].length)return t;return null}const a=s(/\$var\.(\w+)/);if(a&&r.variables){const e=a[1];if(e in r.variables){const t=r.variables[e];return{range:{startLineNumber:n.lineNumber,startColumn:a.index+1,endLineNumber:n.lineNumber,endColumn:a.index+a[0].length+1},contents:[{value:`**Variable:** \`$var.${e}\`\n\n**Value:** \`${JSON.stringify(t)}\`\n\n*Resolved at runtime via variable interpolation*`}]}}return{contents:[{value:`**Unknown variable** \`$var.${e}\`\n\nDefined variables: ${Object.keys(r.variables).join(", ")||"none"}`}]}}const l=s(/\$def\.(\w+)/);if(l&&r.definitions){const e=l[1];return e in r.definitions?{range:{startLineNumber:n.lineNumber,startColumn:l.index+1,endLineNumber:n.lineNumber,endColumn:l.index+l[0].length+1},contents:[{value:`**Definition:** \`$def.${e}\`\n\n*Injects reusable config fragment at runtime*`}]}:{contents:[{value:`**Unknown definition** \`$def.${e}\`\n\nDefined: ${Object.keys(r.definitions).join(", ")||"none"}`}]}}const c=s(/\$secret\.(\w+)/);if(c){const e=c[1];return r.secrets?.includes(e)?{range:{startLineNumber:n.lineNumber,startColumn:c.index+1,endLineNumber:n.lineNumber,endColumn:c.index+c[0].length+1},contents:[{value:`**Secret:** \`$secret.${e}\`\n\n*Securely injected at runtime. Value not stored in config.*`}]}:{contents:[{value:`**Unknown secret** \`$secret.${e}\`\n\nAvailable secrets: ${r.secrets?.join(", ")||"none"}`}]}}const d=s(/\$contract\.[\w.]+/);if(d&&r.contractRaw){const e=d[0],t=e.replace("$contract.","").split("."),r=t[0],o=1===t.length?`**Contract:** \`${e}\`\n\nNamed contract entry "${r}".`:`**Contract reference:** \`${e}\`\n\nResolves path \`${t.slice(1).join(".")}\` in contract "${r}".`;return{range:{startLineNumber:n.lineNumber,startColumn:d.index+1,endLineNumber:n.lineNumber,endColumn:d.index+d[0].length+1},contents:[{value:o}]}}return null}})))}function Se(){for(const e of ke)e.dispose();ke.length=0,xe=!1,ve.clear()}function $e(e,n){switch(n){case"variable":return e.languages.CompletionItemKind.Variable;case"reference":return e.languages.CompletionItemKind.Reference;case"secret":return e.languages.CompletionItemKind.Constant;case"module":return e.languages.CompletionItemKind.Module;case"property":return e.languages.CompletionItemKind.Property;default:return e.languages.CompletionItemKind.Text}}function je(e,n,t){const r=e.getLineContent(n.lineNumber);return new RegExp(`"${t}"\\s*:\\s*"`).test(r)}var Ee=p(require("prettier/standalone"),1),Pe=p(require("prettier/plugins/babel"),1),_e=p(require("prettier/plugins/estree"),1),Re=p(require("prettier/plugins/typescript"),1),Ie=p(require("prettier/plugins/html"),1);var Oe,Fe=new Map,De=0;function Ne(){return`inmemory://walkeros/json-${++De}.json`}function Me(e,n){Fe.set(e,{uri:`schema://walkeros/${e}`,fileMatch:[e],schema:n}),Le()}function Ae(e){Fe.delete(e),Le()}function Le(){Oe&&Oe.jsonDefaults.setDiagnosticsOptions({validate:!0,schemaValidation:"error",schemaRequest:"ignore",enableSchemaRequest:!1,schemas:Array.from(Fe.values())})}var Ve=require("react");var Be=require("react/jsx-runtime");function We({code:e,language:n="javascript",onChange:t,disabled:r=!1,lineNumbers:o=!1,minimap:i=!1,folding:s=!1,wordWrap:a=!1,className:l,beforeMount:c,onMount:d,autoHeight:u,fontSize:p=13,packages:f,sticky:g=!0,ide:m=!1,jsonSchema:h,intellisenseContext:b,validate:v,onMarkerCounts:k}){const[x,w]=(0,Y.useState)(!1),[T,C]=(0,Y.useState)("vs-light"),S=(0,Y.useRef)([]),$=(0,Y.useRef)(null),j=(0,Y.useRef)(null),E=(0,Y.useRef)(null),_=H(),R=(0,Y.useRef)(null);_?.enabled&&null===R.current&&(R.current=_.getBoxId());const I=(0,Y.useCallback)(e=>{_?.enabled&&null!==R.current&&_.registerBox(R.current,e)},[_]);(0,Y.useEffect)(()=>()=>{_?.enabled&&null!==R.current&&_.unregisterBox(R.current)},[_]);const O="object"==typeof u?u:{},[D,N]=function({enabled:e=!1,minHeight:n=100,maxHeight:t=800,defaultHeight:r=400,onHeightChange:o}={}){const[i,s]=(0,Ve.useState)(e?n:r),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(e?n:r),c=(0,Ve.useRef)(null),d=(0,Ve.useCallback)(()=>{if(e&&a.current)try{const e=a.current.getContentHeight(),r=Math.max(n,Math.min(t,e));if(r===l.current)return;l.current=r,s(r),o&&o(r+36+2)}catch(e){}},[e,n,t,o]);return[i,(0,Ve.useCallback)(n=>{if(c.current&&(clearTimeout(c.current),c.current=null),a.current=n,!e||!n)return s(r),void(l.current=r);setTimeout(()=>d(),50);const t=n.onDidContentSizeChange(()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d(),c.current=null},150)});n.__heightDisposable=t},[e,r,d])]}({enabled:!!u||!!_?.enabled,minHeight:O.min??(_?.enabled?1:20),maxHeight:O.max??600,defaultHeight:_?.enabled?250:400,onHeightChange:I});(0,Y.useEffect)(()=>{!function(){if("undefined"==typeof document)return;const e="elb-monaco-data-attribute-styles";if(document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.textContent="\n .monaco-editor .elb-data-attribute {\n color: var(--color-highlight-primary, #01b5e2) !important;\n }\n ",document.head.appendChild(n)}()},[]);const M=(0,Y.useCallback)(()=>{if("undefined"==typeof document)return null;if(E.current){const e=E.current.closest("[data-theme]");if(e)return e.getAttribute("data-theme")}return document.documentElement.getAttribute("data-theme")},[]);(0,Y.useEffect)(()=>{w(!0)},[]),(0,Y.useEffect)(()=>{if(!x)return;const e=()=>{const e=M(),n="dark"===e||null===e&&window.matchMedia("(prefers-color-scheme: dark)").matches;C(n?"elbTheme-dark":"elbTheme-light")};e();const n=new MutationObserver(()=>{e()});n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const t=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{e()};return t.addEventListener("change",r),()=>{n.disconnect(),t.removeEventListener("change",r)}},[x,M]),(0,Y.useEffect)(()=>{const e=j.current,n=E.current;if(!e||!n)return;const t=new ResizeObserver(()=>{requestAnimationFrame(()=>{e.layout()})});return t.observe(n),()=>{t.disconnect()}},[]);const A=(0,Y.useRef)(null);(0,Y.useRef)(b).current=b;const L=(0,Y.useRef)(v);L.current=v;const V=(0,Y.useRef)(k);V.current=k,!h&&!b||A.current||(A.current=Ne()),(0,Y.useEffect)(()=>{if(h&&A.current)return Me(A.current,h),()=>{A.current&&Ae(A.current)}},[h]),(0,Y.useEffect)(()=>{if(b&&A.current)return we(A.current,b),()=>{A.current&&Te(A.current)}},[b]);const B=K.Editor;(0,Y.useEffect)(()=>()=>{for(const e of S.current)e();S.current=[]},[]);const W=u||_?.enabled?`${D}px`:"100%",G=`elb-code ${!!u||!!_?.enabled?"elb-code--auto-height":""} ${l||""}`.trim();return(0,Be.jsx)("div",{className:G,ref:E,children:(0,Be.jsx)(B,{height:W,language:n,value:e,onChange:e=>{t&&void 0!==e&&t(e)},beforeMount:async e=>{var t;if($.current=e,function(e){Oe||(Oe=e.json,Fe.size>0&&Le())}(e),te(e),(t=e).languages.registerDocumentFormattingEditProvider("javascript",{async provideDocumentFormattingEdits(e,n){try{const t=e.getValue(),r=await Ee.format(t,{parser:"babel",plugins:[Pe.default,_e.default],tabWidth:n.tabSize,useTabs:!n.insertSpaces,semi:!0,singleQuote:!0,trailingComma:"all"});return[{range:e.getFullModelRange(),text:r}]}catch(e){return[]}}}),t.languages.registerDocumentFormattingEditProvider("typescript",{async provideDocumentFormattingEdits(e,n){try{const t=e.getValue(),r=await Ee.format(t,{parser:"typescript",plugins:[Re.default,_e.default],tabWidth:n.tabSize,useTabs:!n.insertSpaces,semi:!0,singleQuote:!0,trailingComma:"all"});return[{range:e.getFullModelRange(),text:r}]}catch(e){return[]}}}),t.languages.registerDocumentFormattingEditProvider("json",{async provideDocumentFormattingEdits(e,n){try{const t=e.getValue(),r=JSON.parse(t),o=JSON.stringify(r,null,n.tabSize);return[{range:e.getFullModelRange(),text:o}]}catch(e){return[]}}}),t.languages.registerDocumentFormattingEditProvider("html",{async provideDocumentFormattingEdits(e,n){try{const t=e.getValue(),r=await Ee.format(t,{parser:"html",plugins:[Ie.default],tabWidth:n.tabSize,useTabs:!n.insertSpaces,htmlWhitespaceSensitivity:"css"});return[{range:e.getFullModelRange(),text:r}]}catch(e){return[]}}}),t.languages.registerDocumentFormattingEditProvider("css",{async provideDocumentFormattingEdits(e,n){try{const t=e.getValue(),r=await Ee.format(t,{parser:"css",plugins:[Ie.default],tabWidth:n.tabSize,useTabs:!n.insertSpaces});return[{range:e.getFullModelRange(),text:r}]}catch(e){return[]}}}),f&&f.length>0){P(e);const{loadPackageTypes:n}=await Promise.resolve().then(()=>(F(),y));for(const t of f)"@walkeros/core"!==t&&await n(e,{package:t}).catch(()=>{})}const r=M(),o="dark"===r||null===r&&window.matchMedia("(prefers-color-scheme: dark)").matches?"elbTheme-dark":"elbTheme-light";e.editor.setTheme(o),"json"===n&&Ce(e),c&&c(e)},onMount:e=>{if(j.current=e,(u||_?.enabled)&&N(e),"html"===n&&$.current&&S.current.push(function(e,n){const t=[],r=()=>{const r=e.getModel();if(!r)return;const o=r.getValue(),i=[];re.forEach(e=>{let t;for(;null!==(t=e.exec(o));){const e=r.getPositionAt(t.index),o=r.getPositionAt(t.index+t[0].length);i.push({range:new n.Range(e.lineNumber,e.column,o.lineNumber,o.column),options:{inlineClassName:"elb-data-attribute",inlineClassNameAffectsLetterSpacing:!0}})}});const s=e.deltaDecorations(t,i);t.length=0,t.push(...s)};r();const o=e.onDidChangeModelContent(()=>{r()});return()=>{o.dispose(),e.deltaDecorations(t,[])}}(e,$.current)),"json"===n&&(ae(),S.current.push(se(e))),L.current&&$.current){const n=$.current;let t;const r=()=>{const t=e.getModel();if(!t)return;const r=t.getValue(),o=L.current;if(!o)return;const i=o(r),s=[...i.errors,...i.warnings];n.editor.setModelMarkers(t,"validate",s.map(e=>({severity:"error"===e.severity?8:4,message:e.message,startLineNumber:e.line,startColumn:e.column,endLineNumber:e.endLine??e.line,endColumn:e.endColumn??e.column+1})))};r();const o=e.onDidChangeModelContent(()=>{clearTimeout(t),t=setTimeout(r,300)});S.current.push(()=>{clearTimeout(t),o.dispose()})}if(V.current&&$.current){const n=$.current,t=e.getModel(),r=!!L.current;if(t){const e=()=>{r&&n.editor.setModelMarkers(t,"json",[]);const e=n.editor.getModelMarkers({resource:t.uri});let o=0,i=0;const s=[];for(const n of e)8===n.severity?(o++,s.push({message:n.message,severity:"error",line:n.startLineNumber,column:n.startColumn})):4===n.severity&&(i++,s.push({message:n.message,severity:"warning",line:n.startLineNumber,column:n.startColumn}));V.current?.({errors:o,warnings:i,markers:s})},o=n.editor.onDidChangeMarkers(n=>{n.some(e=>e.toString()===t.uri.toString())&&e()});requestAnimationFrame(e),S.current.push(()=>{o.dispose()})}}requestAnimationFrame(()=>{e.layout()}),d&&d(e)},theme:T,path:A.current||void 0,options:{readOnly:r||!t,readOnlyMessage:{value:""},minimap:{enabled:i},fontSize:p,lineHeight:Math.round(1.5*p),padding:0,lineNumbers:o?"on":"off",lineNumbersMinChars:3,glyphMargin:!1,folding:s,lineDecorationsWidth:8,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,detectIndentation:!1,trimAutoWhitespace:!1,wordWrap:a?"on":"off",fixedOverflowWidgets:!0,overviewRulerLanes:0,renderLineHighlight:"none",renderValidationDecorations:m||h?"editable":"off",hover:{enabled:m||!!h||!!b},"semanticHighlighting.enabled":m,showDeprecated:m,showUnused:m,"bracketPairColorization.enabled":!1,guides:{bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveBracketPair:!1,indentation:!1},scrollbar:{vertical:"auto",horizontal:"auto",alwaysConsumeMouseWheel:!1},cursorBlinking:"blink",cursorStyle:"line",cursorWidth:2,cursorSmoothCaretAnimation:"off",selectionHighlight:!1,occurrencesHighlight:"off",selectOnLineNumbers:!1,wordBasedSuggestions:"off",quickSuggestions:!(!h&&!b)&&{strings:!0,other:!0,comments:!1},stickyScroll:{enabled:g}}})})}var Ge=require("react/jsx-runtime");function qe({code:e,language:n="javascript",onChange:t,disabled:r=!1,autoHeight:o,label:i,header:s,showHeader:a=!0,tabs:l,activeTab:c,onTabChange:d,defaultTab:u,showTrafficLights:p=!1,showCopy:f=!0,showFormat:g=!1,showSettings:m=!1,onValidationIssues:h,footer:y,height:b,style:v,className:k,...x}){const{onMount:w,...T}=x,[C,S]=((0,V.useMonaco)(),(0,L.useState)(!1)),[$,j]=(0,L.useState)(!1),[E,P]=(0,L.useState)({lineNumbers:!1,minimap:!1,wordWrap:!1,sticky:!0}),_=(0,L.useRef)(null),[R,I]=(0,L.useState)({errors:0,warnings:0}),[O,F]=(0,L.useState)([]),[D,N]=(0,L.useState)(null),M=(0,L.useRef)(null),A=(0,L.useRef)(null);(0,L.useEffect)(()=>{if(!$&&!D)return;const e=e=>{$&&_.current&&!_.current.contains(e.target)&&j(!1),D&&M.current&&!M.current.contains(e.target)&&N(null)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[$,D]);const[B,W]=(0,L.useState)(c??u??l?.[0]?.id??""),G=c??B,q=(0,L.useCallback)(e=>{W(e),d?.(e)},[d]),z=l?.find(e=>e.id===G),H=z?.code??e??"",U=z?.language??n,X=s??i??"Code",Y=(0,L.useCallback)(e=>{A.current=e,w?.(e)},[w]),K=(0,L.useCallback)(e=>{I({errors:e.errors,warnings:e.warnings}),F(e.markers),h?.({errors:e.errors,warnings:e.warnings})},[h]),Q=(0,L.useCallback)((e,n)=>{const t=A.current;t&&(t.revealLineInCenter(e),t.setPosition({lineNumber:e,column:n}),t.focus(),N(null))},[]),Z={lineNumbers:E.lineNumbers,minimap:E.minimap,wordWrap:E.wordWrap,sticky:E.sticky},ee=(0,Ge.jsxs)("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[R.errors>0&&(0,Ge.jsxs)("div",{ref:"error"===D?M:void 0,style:{position:"relative"},children:[(0,Ge.jsxs)("button",{className:"elb-codebox-marker-badge elb-codebox-marker-badge--error",onClick:()=>N("error"===D?null:"error"),children:[(0,Ge.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,Ge.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,Ge.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,Ge.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,Ge.jsx)("span",{children:R.errors})]}),"error"===D&&(0,Ge.jsx)(ze,{markers:O.filter(e=>"error"===e.severity),onJump:Q})]}),R.warnings>0&&(0,Ge.jsxs)("div",{ref:"warning"===D?M:void 0,style:{position:"relative"},children:[(0,Ge.jsxs)("button",{className:"elb-codebox-marker-badge elb-codebox-marker-badge--warning",onClick:()=>N("warning"===D?null:"warning"),children:[(0,Ge.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ge.jsx)("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),(0,Ge.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,Ge.jsx)("circle",{cx:"12",cy:"17",r:".5"})]}),(0,Ge.jsx)("span",{children:R.warnings})]}),"warning"===D&&(0,Ge.jsx)(ze,{markers:O.filter(e=>"warning"===e.severity),onJump:Q})]}),g&&!r&&"json"===U&&(0,Ge.jsx)("button",{className:"elb-explorer-btn",onClick:()=>{if(t&&!r&&"json"===U)try{const e=JSON.parse(H),n=JSON.stringify(e,null,2);t(n)}catch(e){}},title:"Format JSON",children:(0,Ge.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ge.jsx)("line",{x1:"3",y1:"5",x2:"16",y2:"5"}),(0,Ge.jsx)("line",{x1:"7",y1:"10",x2:"20",y2:"10"}),(0,Ge.jsx)("line",{x1:"7",y1:"15",x2:"18",y2:"15"}),(0,Ge.jsx)("line",{x1:"3",y1:"20",x2:"12",y2:"20"})]})}),f&&(0,Ge.jsx)("button",{className:"elb-explorer-btn",onClick:async()=>{try{await navigator.clipboard.writeText(H),S(!0),setTimeout(()=>S(!1),2e3)}catch{}},title:C?"Copied!":"Copy to clipboard",children:C?(0,Ge.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Ge.jsx)("polyline",{points:"20 6 9 17 4 12"})}):(0,Ge.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ge.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,Ge.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),m&&(0,Ge.jsxs)("div",{ref:_,style:{position:"relative"},children:[(0,Ge.jsx)("button",{className:"elb-explorer-btn"+($?" active":""),onClick:()=>j(!$),title:"Editor settings",children:(0,Ge.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ge.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,Ge.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),$&&(0,Ge.jsxs)("div",{className:"elb-codebox-settings",children:[(0,Ge.jsxs)("label",{className:"elb-codebox-settings-option",children:[(0,Ge.jsx)("input",{type:"checkbox",checked:E.lineNumbers,onChange:()=>P(e=>({...e,lineNumbers:!e.lineNumbers}))}),"Line numbers"]}),(0,Ge.jsxs)("label",{className:"elb-codebox-settings-option",children:[(0,Ge.jsx)("input",{type:"checkbox",checked:E.minimap,onChange:()=>P(e=>({...e,minimap:!e.minimap}))}),"Minimap"]}),(0,Ge.jsxs)("label",{className:"elb-codebox-settings-option",children:[(0,Ge.jsx)("input",{type:"checkbox",checked:E.wordWrap,onChange:()=>P(e=>({...e,wordWrap:!e.wordWrap}))}),"Word wrap"]}),(0,Ge.jsxs)("label",{className:"elb-codebox-settings-option",children:[(0,Ge.jsx)("input",{type:"checkbox",checked:E.sticky,onChange:()=>P(e=>({...e,sticky:!e.sticky}))}),"Sticky scroll"]})]})]})]}),ne=`${o?"elb-box--auto-height":""} ${k||""}`.trim(),te=l?.map(e=>({id:e.id,label:e.label,content:(0,Ge.jsx)(We,{code:e.code,language:e.language??n,onChange:t,disabled:r,autoHeight:o,onMount:Y,onMarkerCounts:K,...T,...Z})}));return(0,Ge.jsx)(J,{header:X,headerActions:ee,showHeader:a,tabs:te,defaultTab:u,activeTab:c,onTabChange:q,showTrafficLights:p,footer:y,height:b,style:v,className:ne,children:!l&&(0,Ge.jsx)(We,{code:e??"",language:n,onChange:t,disabled:r,autoHeight:o,onMount:Y,onMarkerCounts:K,...T,...Z})})}function ze({markers:e,onJump:n}){return(0,Ge.jsx)("div",{className:"elb-codebox-marker-menu",children:e.sort((e,n)=>e.line-n.line||e.column-n.column).map((e,t)=>(0,Ge.jsxs)("button",{className:"elb-codebox-marker-menu-item",onClick:()=>n(e.line,e.column),children:[(0,Ge.jsxs)("span",{className:"elb-codebox-marker-menu-line",children:["Ln ",e.line]}),(0,Ge.jsx)("span",{className:"elb-codebox-marker-menu-msg",children:e.message})]},t))})}var He=require("react"),Ue=require("react/jsx-runtime");function Xe({children:e,columns:n,minBoxWidth:t,gap:r,rowHeight:o="equal",maxRowHeight:i,showScrollButtons:s=!0,className:a=""}){const l=(0,He.useRef)(null),[c,d]=(0,He.useState)(!1),[u,p]=(0,He.useState)(!1),[f,g]=(0,He.useState)(new Map),m=(0,He.useRef)(0),h=(0,He.useCallback)(()=>m.current++,[]),y=(0,He.useCallback)((e,n)=>{g(t=>{const r=new Map(t);return r.set(e,n),r})},[]),b=(0,He.useCallback)(e=>{g(n=>{const t=new Map(n);return t.delete(e),t})},[]),v=(0,He.useMemo)(()=>"synced"!==o||0===f.size?null:Math.min(600,Math.max(...Array.from(f.values()))),[f,o]),k=(0,He.useMemo)(()=>({registerBox:y,unregisterBox:b,getBoxId:h,syncedHeight:v,enabled:"synced"===o}),[y,b,h,v,o]),x=["elb-explorer-grid"],w={};"auto"===o?x.push("elb-explorer-grid--row-auto"):"equal"===o?x.push("elb-explorer-grid--row-equal"):"synced"===o?x.push("elb-explorer-grid--row-synced"):"number"==typeof o&&(w["--grid-row-min-height"]=`${o}px`,w["--grid-row-max-height"]=`${o}px`),a&&x.push(a),void 0!==r&&(w.gap="number"==typeof r?`${r}px`:r),void 0!==t&&(w["--grid-min-box-width"]="number"==typeof t?`${t}px`:t),void 0!==i&&(w["--grid-row-max-height"]="none"===i?"none":"number"==typeof i?`${i}px`:i);const T=(0,He.useCallback)(()=>{const e=l.current;if(!e)return;const n=e.scrollWidth>e.clientWidth,t=e.scrollLeft<=1,r=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;d(n&&!t),p(n&&!r)},[]);return(0,He.useEffect)(()=>{const e=l.current;if(e&&s)return T(),e.addEventListener("scroll",T),window.addEventListener("resize",T),()=>{e.removeEventListener("scroll",T),window.removeEventListener("resize",T)}},[T,s]),(0,Ue.jsx)(z.Provider,{value:k,children:(0,Ue.jsxs)("div",{className:"elb-explorer elb-explorer-grid-wrapper",children:[s&&c&&(0,Ue.jsx)("button",{className:"elb-explorer-grid-scroll-button elb-explorer-grid-scroll-button--left",onClick:()=>{if(!l.current)return;const e=.8*l.current.clientWidth;l.current.scrollBy({left:-e,behavior:"smooth"})},"aria-label":"Scroll left",type:"button",children:"‹"}),(0,Ue.jsx)("div",{ref:l,className:x.join(" "),style:w,children:e}),s&&u&&(0,Ue.jsx)("button",{className:"elb-explorer-grid-scroll-button elb-explorer-grid-scroll-button--right",onClick:()=>{if(!l.current)return;const e=.8*l.current.clientWidth;l.current.scrollBy({left:e,behavior:"smooth"})},"aria-label":"Scroll right",type:"button",children:"›"})]})})}var Je=require("@walkeros/core");function Ye(e,n="No function calls captured"){return 0===e.length?n:e.map(({path:e,args:n})=>`${e[e.length-1]}(${n.map(e=>"string"==typeof e?`'${e}'`:"object"==typeof e&&null!==e?JSON.stringify(e,null,2):String(e)).join(", ")});`).join("\n\n")}function Ke(e,n){return async(t,r)=>{const o=[],i=(0,Je.mockEnv)(n||{},(e,n)=>{o.push({path:e,args:n})});return await e.push(t,{...r,env:i}),Ye(o)}}function Qe(e){const n=[];return{env:(0,Je.mockEnv)(e||{},(e,t)=>{n.push({path:e,args:t})}),getCalls:()=>n}}var Ze=require("react/jsx-runtime");function en(e,n){return(...t)=>{const r=t.map(e=>"string"==typeof e?`"${e}"`:JSON.stringify(e,null,2)).join(", ");n(`${e}(${r});`)}}function nn({destination:e,event:n,mapping:t={},settings:r,generic:o=!1,labelEvent:i="Event",labelMapping:s="Mapping",labelOutput:a="Result",fn:l}){const[c,d]=(0,N.useState)(JSON.stringify(n,null,2)),[u,p]=(0,N.useState)("string"==typeof t?t:JSON.stringify(t,null,2)),[f,g]=(0,N.useState)(""),m=(0,N.useCallback)(async()=>{await(0,M.tryCatchAsync)(async()=>{const n=JSON.parse(c),t=JSON.parse(u),i=(0,M.createEvent)(n),s={settings:r||{},mapping:o&&t?{"*":{"*":t}}:t},{collector:a}=await(0,A.startFlow)({}),d=await(0,M.processEventMapping)(i,s,a),p={id:"demo",collector:a,config:s,data:d.data,env:e.env||{},logger:a.logger};if(l){const e=await l(d.event,p);return void g(e)}const f=e.examples?.env?.push,m=Ke(e,f),h=await m(d.event,p);g(h)},e=>g(`Error: ${e}`))()},[c,u,e,r,o,l]);return(0,N.useEffect)(()=>{const e=setTimeout(m,500);return()=>clearTimeout(e)},[m]),(0,Ze.jsxs)(Xe,{columns:3,rowHeight:"synced",children:[(0,Ze.jsx)(qe,{label:i,code:c,onChange:d,language:"json",showFormat:!0,autoHeight:!0}),(0,Ze.jsx)(qe,{label:s,code:u,onChange:p,language:"json",showFormat:!0,autoHeight:!0}),(0,Ze.jsx)(qe,{label:a,code:f,disabled:!0,language:"javascript",autoHeight:!0})]})}var tn=require("react"),rn=require("@walkeros/core"),on=require("@walkeros/collector"),sn=require("react/jsx-runtime");function an({destination:e,settings:n={},labelSettings:t="Settings",labelOutput:r="Result"}){const[o,i]=(0,tn.useState)("string"==typeof n?n:JSON.stringify(n,null,2)),[s,a]=(0,tn.useState)(""),l=(0,tn.useCallback)(async()=>{await(0,rn.tryCatchAsync)(async()=>{const n={settings:JSON.parse(o)},{collector:t}=await(0,on.startFlow)({}),r={id:"demo",collector:t,config:n,env:e.env||{},logger:t.logger};if(!e.init)return void a("No init method defined for this destination");const i=e.examples?.env?.init,s=function(e,n){return async t=>{if(!e.init)return"No init method found";const r=[],o=(0,Je.mockEnv)(n||{},(e,n)=>{r.push({path:e,args:n})});return await e.init({...t,env:o}),Ye(r,"Destination initialized successfully")}}(e,i),l=await s(r);a(l)},e=>a(`Error: ${e}`))()},[o,e]);return(0,tn.useEffect)(()=>{const e=setTimeout(l,500);return()=>clearTimeout(e)},[l]),(0,sn.jsxs)(Xe,{columns:2,rowHeight:"synced",children:[(0,sn.jsx)(qe,{label:t,code:o,onChange:i,language:"json",showFormat:!0,autoHeight:!0}),(0,sn.jsx)(qe,{label:r,code:s,disabled:!0,language:"javascript",autoHeight:!0})]})}var ln=require("react"),cn=require("@walkeros/collector"),dn=require("react"),un=require("@walkeros/web-source-browser"),pn=require("react/jsx-runtime"),fn=[{type:"context",label:"Context",highlightClass:"highlight-context"},{type:"entity",label:"Entity",highlightClass:"highlight-entity"},{type:"property",label:"Property",highlightClass:"highlight-property"},{type:"action",label:"Action",highlightClass:"highlight-action"}];function gn({highlights:e,onToggle:n,buttons:t=fn}){return(0,pn.jsx)("div",{className:"elb-preview-footer",children:t.map(t=>(0,pn.jsx)("button",{className:`elb-preview-btn ${e.has(t.type)?t.highlightClass:""}`,onClick:()=>n(t.type),type:"button",children:t.label},t.type))})}var mn=require("react/jsx-runtime");function hn({html:e,css:n="",elb:t,label:r="Preview"}){const[o,i]=(0,dn.useState)(new Set),s=(0,dn.useRef)(null),a=(0,dn.useRef)(void 0),l=(0,dn.useRef)(t),c=(0,dn.useRef)(null);(0,dn.useEffect)(()=>{l.current=t},[t]);const d=(0,dn.useCallback)(e=>{e.querySelectorAll("[data-elb]").forEach(e=>{const n=e.getAttribute("data-elb");if(!n)return;const t=`[data-elb-${n}]`;e.querySelectorAll(t).forEach(e=>{e.setAttribute("data-elbproperty","")})})},[]);return(0,dn.useEffect)(()=>(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{const t=s.current;if(!t||!t.contentDocument)return;const r=t.contentDocument,i=Array.from(o).map(e=>`highlight-${e}`).join(" ");r.open(),r.write(`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8">\n <style>\n /* Reset */\n * { margin: 0; padding: 0; box-sizing: border-box; }\n body {\n padding: 1.5rem;\n background: #f9fafb;\n color: #111827;\n min-height: 100vh;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n background: #1f2937;\n color: #e5e7eb;\n }\n }\n\n /* User CSS */\n ${n}\n\n /* Highlight CSS - imported from highlight styles */\n :root {\n --highlight-globals: #4fc3f7cc;\n --highlight-context: #ffbd44cc;\n --highlight-entity: #00ca4ecc;\n --highlight-property: #ff605ccc;\n --highlight-action: #9900ffcc;\n }\n\n body.elb-highlight.highlight-entity [data-elb] {\n box-shadow: 0 0 0 2px var(--highlight-entity);\n }\n\n body.elb-highlight.highlight-context [data-elbcontext] {\n box-shadow: 0 0 0 2px var(--highlight-context);\n }\n\n body.elb-highlight.highlight-property [data-elbproperty] {\n box-shadow: 0 0 0 2px var(--highlight-property);\n }\n\n body.elb-highlight.highlight-action [data-elbaction] {\n box-shadow: 0 0 0 2px var(--highlight-action);\n }\n\n /* Combined highlights */\n body.elb-highlight.highlight-entity.highlight-action [data-elb][data-elbaction] {\n box-shadow: 0 0 0 2px var(--highlight-action), 0 0 0 4px var(--highlight-entity);\n }\n\n body.elb-highlight.highlight-entity.highlight-context [data-elb][data-elbcontext] {\n box-shadow: 0 0 0 2px var(--highlight-entity), 0 0 0 4px var(--highlight-context);\n }\n\n body.elb-highlight.highlight-action.highlight-context [data-elbaction][data-elbcontext] {\n box-shadow: 0 0 0 2px var(--highlight-action), 0 0 0 4px var(--highlight-context);\n }\n </style>\n </head>\n <body class="elb-highlight ${i}">\n ${e}\n </body>\n </html>\n `),r.close(),d(r),l.current&&t.contentWindow&&t.contentDocument&&setTimeout(async()=>{if(c.current)try{await(c.current.instance.destroy?.(c.current.destroyContext))}catch{}try{if(!t.contentWindow||!t.contentDocument||!l.current)return;const e=()=>({error:()=>{},warn:()=>{},info:()=>{},debug:()=>{},json:()=>{},throw:e=>{throw e instanceof Error?e:new Error(e)},scope:()=>e()}),n=e(),r=async()=>({ok:!0,destination:{}}),o={settings:{pageview:!1,prefix:"data-elb",elb:"elb",elbLayer:"elbLayer",scope:t.contentDocument.body}},i={elb:l.current,push:r,command:async()=>({ok:!0,destination:{}}),logger:n,window:t.contentWindow,document:t.contentDocument},s=await(0,un.sourceBrowser)({id:"preview",collector:{},logger:n,setIngest:async()=>{},setRespond:()=>{},config:o,env:i});c.current={instance:s,destroyContext:{id:"preview",config:o,env:i,logger:n}}}catch{}},50)},200),()=>{a.current&&clearTimeout(a.current),c.current&&c.current.instance.destroy?.(c.current.destroyContext)}),[e,n,o,d,t]),(0,mn.jsx)(J,{header:r,footer:(0,mn.jsx)(gn,{highlights:o,onToggle:e=>{i(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})}}),children:(0,mn.jsx)("div",{className:"elb-preview-content",children:(0,mn.jsx)("iframe",{ref:s,className:"elb-preview-iframe",title:"HTML Preview"})})})}var yn=require("react"),bn=require("react/jsx-runtime");function vn({active:e=!1,onClick:n,children:t,className:r=""}){return(0,bn.jsx)("button",{className:`elb-explorer-btn ${e?"active":""} ${r}`,onClick:n,type:"button",children:t})}var kn=require("react/jsx-runtime");function xn({buttons:e,onButtonClick:n,className:t=""}){return(0,kn.jsx)("div",{className:`elb-explorer-button-group ${t}`,children:e.map(e=>(0,kn.jsx)(vn,{active:e.active,onClick:()=>n(e.value),children:e.label},e.value))})}var wn=require("react/jsx-runtime");function Tn({html:e,css:n,js:t,onHtmlChange:r,onCssChange:o,onJsChange:i,showPreview:s=!0,label:a="Code",className:l="",initialTab:c,lineNumbers:d=!1,wordWrap:u=!1}){const p=(0,yn.useMemo)(()=>{const r=[];return s&&void 0!==e&&r.push({label:"Preview",value:"preview"}),void 0!==e&&r.push({label:"HTML",value:"html"}),void 0!==n&&r.push({label:"CSS",value:"css"}),void 0!==t&&r.push({label:"JS",value:"js"}),r},[e,n,t,s]),[f,g]=(0,yn.useState)(()=>c&&p.some(e=>e.value===c)?c:p[0]?.value||"preview"),{content:m,language:h,onChange:y}=(0,yn.useMemo)(()=>{switch(f){case"html":return{content:e||"",language:"html",onChange:r};case"css":return{content:n||"",language:"css",onChange:o};case"js":return{content:t||"",language:"javascript",onChange:i};default:return{content:"",language:"text",onChange:void 0}}},[f,e,n,t,r,o,i]),b=(0,yn.useMemo)(()=>p.map(e=>({label:e.label,value:e.value,active:f===e.value})),[p,f]);return(0,wn.jsx)(J,{header:a,headerActions:p.length>1?(0,wn.jsx)(xn,{buttons:b,onButtonClick:g}):null,className:l,children:"preview"===f?(0,wn.jsx)(hn,{html:e||"",css:n||""}):(0,wn.jsx)(We,{code:m,language:h,onChange:y,disabled:!y,lineNumbers:d,wordWrap:u})})}function Cn(){return{type:"gtag",config:{},push(e,n){const{data:t,env:r}=n,o=`gtag('event', '${e.name}', ${JSON.stringify(t,null,2)});`;r.elb(o)}}}function Sn(){return{type:"fbq",config:{},push(e,n){const{data:t,env:r}=n,o=`fbq('track', '${e.name}', ${JSON.stringify(t,null,2)});`;r.elb(o)}}}function $n(){return{type:"plausible",config:{},push(e,n){const{data:t,env:r}=n,o=`plausible('${e.name}', { props: ${JSON.stringify(t,null,2)} });`;r.elb(o)}}}var jn=require("react/jsx-runtime"),En='<div\n data-elb="product"\n data-elbaction="load:view"\n data-elbcontext="stage:inspire"\n class="product-card"\n>\n <figure class="product-figure">\n <div class="product-badge-container">\n <div data-elb-product="badge:delicious" class="product-badge">delicious</div>\n </div>\n </figure>\n <div class="product-body">\n <h3 data-elb-product="name:#innerText" class="product-title">\n Everyday Ruck Snack\n </h3>\n <div class="form-control">\n <label class="form-label">Taste</label>\n <select\n data-elb-product="taste:#value"\n class="form-select"\n >\n <option value="sweet">Sweet</option>\n <option value="spicy">Spicy</option>\n </select>\n </div>\n <p data-elb-product="price:2.50" class="product-price">\n € 2.50 <span data-elb-product="old_price:3.14" class="product-old-price">€ 3.14</span>\n </p>\n <div data-elbcontext="stage:hooked" class="product-actions">\n <button\n data-elbaction="click:save"\n class="btn btn-secondary"\n >\n Maybe later\n </button>\n <button\n data-elbaction="click:add"\n class="btn btn-primary"\n >\n Add to Cart\n </button>\n </div>\n </div>\n</div>',Pn="* {\n box-sizing: border-box;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n}\n\n.product-card {\n width: 100%;\n max-width: 400px;\n margin: 0 auto;\n background: #ffffff;\n border-radius: 16px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n overflow: hidden;\n}\n\n.product-figure {\n position: relative;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 160px;\n background:\n linear-gradient(135deg, rgba(243, 244, 246, 0.9) 0%, rgba(229, 231, 235, 0.9) 100%),\n repeating-linear-gradient(\n 45deg,\n #f9fafb,\n #f9fafb 10px,\n #f3f4f6 10px,\n #f3f4f6 20px\n );\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.product-figure::before {\n content: '🍟';\n font-size: 8rem;\n opacity: 0.8;\n}\n\n.product-badge-container {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n}\n\n.product-badge {\n background: #01b5e2;\n color: white;\n padding: 0.25rem 0.75rem;\n border-radius: 9999px;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.025em;\n}\n\n.product-body {\n padding: 1.5rem;\n}\n\n.product-title {\n font-size: 1.125rem;\n font-weight: 700;\n margin: 0 0 1rem 0;\n color: #111827;\n}\n\n.form-control {\n margin-bottom: 1rem;\n}\n\n.form-label {\n display: block;\n font-size: 0.875rem;\n font-weight: 500;\n color: #6b7280;\n margin-bottom: 0.5rem;\n}\n\n.form-select {\n width: 100%;\n padding: 0.5rem 0.75rem;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n font-size: 0.875rem;\n color: #111827;\n background: white;\n cursor: pointer;\n transition: border-color 0.2s;\n}\n\n.form-select:hover {\n border-color: #9ca3af;\n}\n\n.form-select:focus {\n outline: none;\n border-color: #01b5e2;\n box-shadow: 0 0 0 3px rgba(1, 181, 226, 0.1);\n}\n\n.product-price {\n font-size: 1.25rem;\n font-weight: 700;\n color: #111827;\n margin: 0 0 1rem 0;\n}\n\n.product-old-price {\n font-size: 1rem;\n font-weight: 400;\n color: #9ca3af;\n text-decoration: line-through;\n margin-left: 0.5rem;\n}\n\n.product-actions {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n}\n\n.btn {\n flex: 1;\n padding: 0.75rem 1rem;\n border: none;\n border-radius: 8px;\n font-size: 0.875rem;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s;\n text-align: center;\n}\n\n.btn:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n}\n\n.btn:active {\n transform: translateY(0);\n}\n\n.btn-primary {\n background: #01b5e2;\n color: white;\n}\n\n.btn-primary:hover {\n background: #0195b8;\n}\n\n.btn-secondary {\n background: #ffffff;\n color: #01b5e2;\n border: 1px solid #01b5e2;\n}\n\n.btn-secondary:hover {\n background: #01b5e2;\n color: #ffffff;\n}",_n='{\n "product": {\n "view": {\n "name": "view_item",\n "data": {\n "map": {\n "event": "name",\n "price": "data.price",\n "stage": "context.stage.0"\n }\n }\n },\n "add": {\n "name": "add_to_cart",\n "data": {\n "map": {\n "event": "event",\n "price": "data.price",\n "user": {\n "consent": { "marketing": true },\n "key": "user.session"\n },\n "isSale": {\n "fn": "(e) => !!e.data.old_price"\n }\n }\n }\n },\n "save": {\n "data": {\n "map": {\n "event": "event",\n "data": "data"\n }\n }\n }\n }\n}';function Rn({initialHtml:e=En,initialCss:n=Pn,initialJs:t="",initialMapping:r=_n,labelCode:o="Code",labelPreview:i="Preview",labelEvents:s="Events",labelMapping:a="Mapping",labelResult:l="Result",destination:c}){const d=(0,ln.useMemo)(()=>c??Cn(),[c]),[u,p]=(0,ln.useState)(e),[f,g]=(0,ln.useState)(n),[m,h]=(0,ln.useState)(t),[y,b]=(0,ln.useState)(r),[v,k]=(0,ln.useState)("// Click elements in the preview to see events"),[x,w]=(0,ln.useState)("// Click elements in the preview to see function call"),T=(0,ln.useRef)(null),C=(0,ln.useRef)(null),S=(0,ln.useRef)(null),[$,j]=(0,ln.useState)(!1);(0,ln.useEffect)(()=>{let e=!0;return(async()=>{try{const n=JSON.parse(r),{collector:t,elb:o}=await(0,cn.startFlow)({destinations:{rawCapture:{code:{type:"rawCapture",config:{},push:async n=>{e&&(S.current=n,k(JSON.stringify(n,null,2)))}}},gtag:{code:d,config:{mapping:n},env:{elb:n=>{e&&w(n)}}}},consent:{functional:!0,marketing:!0},user:{session:"playground"}});if(!e)return;T.current=t,C.current=o,j(!0)}catch{}})(),()=>{e=!1,T.current}},[r,d]);const E=(0,ln.useCallback)(e=>{b(e);const n=setTimeout(()=>{try{const n=JSON.parse(e);T.current?.destinations?.gtag?.config&&(T.current.destinations.gtag.config.mapping=n),S.current&&T.current&&T.current.push(S.current)}catch{}},500);return()=>clearTimeout(n)},[]);return(0,jn.jsxs)(Xe,{columns:5,rowHeight:600,children:[(0,jn.jsx)(Tn,{label:o,html:u,css:f,js:m,onHtmlChange:p,onCssChange:g,onJsChange:h,showPreview:!1,initialTab:"html",lineNumbers:!1,wordWrap:!0}),(0,jn.jsx)(hn,{label:i,html:u,css:f,elb:$?C.current??void 0:void 0}),(0,jn.jsx)(qe,{label:s,code:v,onChange:k,language:"json",wordWrap:!0}),(0,jn.jsx)(qe,{label:a,code:y,onChange:E,language:"json",wordWrap:!0}),(0,jn.jsx)(qe,{label:l,code:x,language:"javascript",disabled:!0,wordWrap:!0})]})}var In=require("react"),On=require("@walkeros/core"),Fn=p(require("prettier/standalone"),1),Dn=p(require("prettier/plugins/babel"),1),Nn=p(require("prettier/plugins/estree"),1),Mn=p(require("prettier/plugins/typescript"),1),An=p(require("prettier/plugins/html"),1);async function Ln(e,n){try{let t;switch(n){case"javascript":case"js":{const n=e.trimStart().startsWith("{")&&e.includes("\n"),r=n?`(${e})`:e;t=await Fn.format(r,{parser:"babel",plugins:[Dn.default,Nn.default],semi:!0,singleQuote:!0,trailingComma:"all"}),n&&(t=t.replace(/^\(/,"").replace(/\);?\s*$/,""));break}case"typescript":case"ts":case"tsx":t=await Fn.format(e,{parser:"typescript",plugins:[Mn.default,Nn.default],semi:!0,singleQuote:!0,trailingComma:"all"});break;case"json":const n=JSON.parse(e);t=JSON.stringify(n,null,2);break;case"html":t=await Fn.format(e,{parser:"html",plugins:[An.default],htmlWhitespaceSensitivity:"css"});break;case"css":case"scss":t=await Fn.format(e,{parser:"css",plugins:[An.default]});break;default:return e}return t.trim()}catch(n){return e}}var Vn=require("react/jsx-runtime");function Bn(e,n={}){if(void 0===e)return"";const t=(0,On.isString)(e)?e.trim():JSON.stringify(e,null,2);return n.quotes&&(0,On.isString)(e)?`"${t}"`:t}function Wn({input:e,config:n,output:t="",options:r,fn:o,fnName:i,labelInput:s="Event",labelConfig:a="Config",labelOutput:l="Result",emptyText:c="No event yet.",disableInput:d=!1,disableConfig:u=!1,showQuotes:p=!0,className:f,language:g="json",format:m=!0,rowHeight:h}){const[y,b]=(0,In.useState)(Bn(e)),[v,k]=(0,In.useState)(Bn(n)),[x,w]=(0,In.useState)([Bn(t)]);(0,In.useEffect)(()=>{if(m&&e){Ln(Bn(e),g).then(b)}},[e,g,m]),(0,In.useEffect)(()=>{if(m&&n){Ln(Bn(n),g).then(k)}},[n,g,m]);const T=(0,In.useCallback)((...e)=>{const n=e.map(e=>Bn(e,{quotes:p})).join(", ");w([i?`${i}(${n})`:n])},[i,p]),C=(0,In.useCallback)((0,On.debounce)(async(e,n,t)=>{o&&(w([]),await(0,On.tryCatchAsync)(o,e=>{w([`Error: ${String(e)}`])})(e,n,T,t))},500,!0),[o,T]);return(0,In.useEffect)(()=>{C(y,v,r||{})},[y,v,r,C]),(0,Vn.jsxs)(Xe,{columns:3,className:f,rowHeight:h,children:[(0,Vn.jsx)(qe,{label:s,code:y,onChange:d?void 0:b,disabled:d,language:g,showFormat:!d&&"json"===g}),v&&(0,Vn.jsx)(qe,{label:a,code:v,onChange:u?void 0:k,disabled:u,language:g,showFormat:!u&&"json"===g}),(0,Vn.jsx)(qe,{label:l,code:x[0]||c,disabled:!0,language:g})]})}var Gn=require("react"),qn=require("@walkeros/collector"),zn=require("react/jsx-runtime");function Hn({event:e,mapping:n,destination:t,label:r="Result",wordWrap:o=!1}){const[i,s]=(0,Gn.useState)("// Click elements in the preview to see function call");return(0,Gn.useEffect)(()=>{(async()=>{try{const r=JSON.parse(e),o=JSON.parse(n),{collector:i}=await(0,qn.startFlow)({destinations:{demo:{code:t,config:{mapping:o},env:{elb:s}}}});await i.push(r)}catch(e){e instanceof Error?s(`// Error: ${e.message}`):s(`// Error: ${String(e)}`)}})()},[e,n,t]),(0,zn.jsx)(qe,{code:i,language:"javascript",disabled:!0,label:r,wordWrap:o})}var Un=require("react");var Xn=Object.freeze({left:0,top:0,width:16,height:16}),Jn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yn=Object.freeze({...Xn,...Jn}),Kn=Object.freeze({...Yn,body:"",hidden:!1});function Qn(e,n){const t=function(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}(e,n);for(const r in Kn)r in Jn?r in e&&!(r in t)&&(t[r]=Jn[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function Zn(e,n,t){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(e){i=Qn(r[e]||o[e],i)}return s(n),t.forEach(s),Qn(e,i)}function et(e,n){const t=[];if("object"!=typeof e||"object"!=typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach(e=>{n(e,null),t.push(e)});const r=function(e){const n=e.icons,t=e.aliases||Object.create(null),r=Object.create(null);return Object.keys(n).concat(Object.keys(t)).forEach(function e(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const n=t[o]&&t[o].parent,i=n&&e(n);i&&(r[o]=[n].concat(i))}return r[o]}),r}(e);for(const o in r){const i=r[o];i&&(n(o,Zn(e,o,i)),t.push(o))}return t}var nt={provider:"",aliases:{},not_found:{},...Xn};function tt(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function rt(e){if("object"!=typeof e||null===e)return null;const n=e;if("string"!=typeof n.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!tt(e,nt))return null;const t=n.icons;for(const e in t){const n=t[e];if(!e||"string"!=typeof n.body||!tt(n,Kn))return null}const r=n.aliases||Object.create(null);for(const e in r){const n=r[e],o=n.parent;if(!e||"string"!=typeof o||!t[o]&&!r[o]||!tt(n,Kn))return null}return n}var ot=Object.create(null);function it(e,n){const t=ot[e]||(ot[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function st(e,n){return rt(n)?et(n,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}var at=/^[a-z0-9]+(-[a-z0-9]+)*$/,lt=(e,n,t,r="")=>{const o=e.split(":");if("@"===e.slice(0,1)){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const e=o.pop(),t=o.pop(),i={provider:o.length>0?o[0]:r,prefix:t,name:e};return n&&!ct(i)?null:i}const i=o[0],s=i.split("-");if(s.length>1){const e={provider:r,prefix:s.shift(),name:s.join("-")};return n&&!ct(e)?null:e}if(t&&""===r){const e={provider:r,prefix:"",name:i};return n&&!ct(e,t)?null:e}return null},ct=(e,n)=>!!e&&!(!(n&&""===e.prefix||e.prefix)||!e.name),dt=!1;function ut(e){return"boolean"==typeof e&&(dt=e),dt}function pt(e){const n="string"==typeof e?lt(e,!0,dt):e;if(n){const e=it(n.provider,n.prefix),t=n.name;return e.icons[t]||(e.missing.has(t)?null:void 0)}}function ft(e,n){const t=lt(e,!0,dt);if(!t)return!1;const r=it(t.provider,t.prefix);return n?function(e,n,t){try{if("string"==typeof t.body)return e.icons[n]={...t},!0}catch(e){}return!1}(r,t.name,n):(r.missing.add(t.name),!0)}var gt=Object.freeze({width:null,height:null}),mt=Object.freeze({...gt,...Jn}),ht=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function bt(e,n,t){if(1===n)return e;if(t=t||100,"number"==typeof e)return Math.ceil(e*n*t)/t;if("string"!=typeof e)return e;const r=e.split(ht);if(null===r||!r.length)return e;const o=[];let i=r.shift(),s=yt.test(i);for(;;){if(s){const e=parseFloat(i);isNaN(e)?o.push(i):o.push(Math.ceil(e*n*t)/t)}else o.push(i);if(i=r.shift(),void 0===i)return o.join("");s=!s}}var vt=/\sid="(\S+)"/g,kt="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),xt=0;function wt(e,n=kt){const t=[];let r;for(;r=vt.exec(e);)t.push(r[1]);if(!t.length)return e;const o="suffix"+(16777216*Math.random()|Date.now()).toString(16);return t.forEach(t=>{const r="function"==typeof n?n(t):n+(xt++).toString(),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+o+"$3")}),e=e.replace(new RegExp(o,"g"),"")}var Tt=Object.create(null);function Ct(e){return Tt[e]||Tt[""]}function St(e){let n;if("string"==typeof e.resources)n=[e.resources];else if(n=e.resources,!(n instanceof Array&&n.length))return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}for(var $t=Object.create(null),jt=["https://api.simplesvg.com","https://api.unisvg.com"],Et=[];jt.length>0;)1===jt.length||Math.random()>.5?Et.push(jt.shift()):Et.push(jt.pop());function Pt(e,n){const t=St(n);return null!==t&&($t[e]=t,!0)}function _t(e){return $t[e]}$t[""]=St({resources:["https://api.iconify.design"].concat(Et)});var Rt=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(e){}})();var It={prepare:(e,n,t)=>{const r=[],o=function(e,n){const t=_t(e);if(!t)return 0;let r;if(t.maxURL){let e=0;t.resources.forEach(n=>{const t=n;e=Math.max(e,t.length)});const o=n+".json?icons=";r=t.maxURL-e-t.path.length-o.length}else r=0;return r}(e,n),i="icons";let s={type:i,provider:e,prefix:n,icons:[]},a=0;return t.forEach((t,l)=>{a+=t.length+1,a>=o&&l>0&&(r.push(s),s={type:i,provider:e,prefix:n,icons:[]},a=t.length),s.icons.push(t)}),r.push(s),r},send:(e,n,t)=>{if(!Rt)return void t("abort",424);let r=function(e){if("string"==typeof e){const n=_t(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":{const e=n.prefix,t=n.icons.join(",");r+=e+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const e=n.uri;r+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void t("abort",400)}let o=503;Rt(e+r).then(e=>{const n=e.status;if(200===n)return o=501,e.json();setTimeout(()=>{t(function(e){return 404===e}(n)?"abort":"next",n)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{t("success",e)}):setTimeout(()=>{404===e?t("abort",e):t("next",o)})}).catch(()=>{t("next",o)})}};function Ot(e,n){e.forEach(e=>{const t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter(e=>e.id!==n))})}var Ft=0;var Dt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Nt(e,n,t,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let n=e.resources.slice(0);for(s=[];n.length>1;){const e=Math.floor(Math.random()*n.length);s.push(n[e]),n=n.slice(0,e).concat(n.slice(e+1))}s=s.concat(n)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l,c="pending",d=0,u=null,p=[],f=[];function g(){u&&(clearTimeout(u),u=null)}function m(){"pending"===c&&(c="aborted"),g(),p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function h(e,n){n&&(f=[]),"function"==typeof e&&f.push(e)}function y(){c="failed",f.forEach(e=>{e(void 0,l)})}function b(){p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function v(){if("pending"!==c)return;g();const r=s.shift();if(void 0===r)return p.length?void(u=setTimeout(()=>{g(),"pending"===c&&(b(),y())},e.timeout)):void y();const o={status:"pending",resource:r,callback:(n,t)=>{!function(n,t,r){const o="success"!==t;switch(p=p.filter(e=>e!==n),c){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return l=r,void y();if(o)return l=r,void(p.length||(s.length?v():y()));if(g(),b(),!e.random){const t=e.resources.indexOf(n.resource);-1!==t&&t!==e.index&&(e.index=t)}c="completed",f.forEach(e=>{e(r)})}(o,n,t)}};p.push(o),d++,u=setTimeout(v,e.rotate),t(r,n,o.callback)}return"function"==typeof r&&f.push(r),setTimeout(v),function(){return{startTime:a,payload:n,status:c,queriesSent:d,queriesPending:p.length,subscribe:h,abort:m}}}function Mt(e){const n={...Dt,...e};let t=[];function r(){t=t.filter(e=>"pending"===e().status)}return{query:function(e,o,i){const s=Nt(n,e,o,(e,n)=>{r(),i&&i(e,n)});return t.push(s),s},find:function(e){return t.find(n=>e(n))||null},setIndex:e=>{n.index=e},getIndex:()=>n.index,cleanup:r}}function At(){}var Lt=Object.create(null);function Vt(e,n,t){let r,o;if("string"==typeof e){const n=Ct(e);if(!n)return t(void 0,424),At;o=n.send;const i=function(e){if(!Lt[e]){const n=_t(e);if(!n)return;const t={config:n,redundancy:Mt(n)};Lt[e]=t}return Lt[e]}(e);i&&(r=i.redundancy)}else{const n=St(e);if(n){r=Mt(n);const t=Ct(e.resources?e.resources[0]:"");t&&(o=t.send)}}return r&&o?r.query(n,o,t)().abort:(t(void 0,424),At)}function Bt(){}function Wt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const r=e.provider,o=e.prefix;n.forEach(n=>{const i=n.icons,s=i.pending.length;i.pending=i.pending.filter(n=>{if(n.prefix!==o)return!0;const s=n.name;if(e.icons[s])i.loaded.push({provider:r,prefix:o,name:s});else{if(!e.missing.has(s))return t=!0,!0;i.missing.push({provider:r,prefix:o,name:s})}return!1}),i.pending.length!==s&&(t||Ot([e],n.id),n.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),n.abort))})}))}(e)}))}function Gt(e,n,t){function r(){const t=e.pendingIcons;n.forEach(n=>{t&&t.delete(n),e.icons[n]||e.missing.add(n)})}if(t&&"object"==typeof t)try{if(!st(e,t).length)return void r()}catch(e){console.error(e)}r(),Wt(e)}function qt(e,n){e instanceof Promise?e.then(e=>{n(e)}).catch(()=>{n(null)}):n(e)}function zt(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const o=e.loadIcon;if(e.loadIcons&&(r.length>1||!o))return void qt(e.loadIcons(r,t,n),n=>{Gt(e,r,n)});if(o)return void r.forEach(r=>{qt(o(r,t,n),n=>{Gt(e,[r],n?{prefix:t,icons:{[r]:n}}:null)})});const{valid:i,invalid:s}=function(e){const n=[],t=[];return e.forEach(e=>{(e.match(at)?n:t).push(e)}),{valid:n,invalid:t}}(r);if(s.length&&Gt(e,s,null),!i.length)return;const a=t.match(at)?Ct(n):null;if(!a)return void Gt(e,i,null);a.prepare(n,t,i).forEach(t=>{Vt(n,t,n=>{Gt(e,t.icons,n)})})}))}var Ht=(e,n)=>{const t=function(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((e,n)=>e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name));let r={provider:"",prefix:"",name:""};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;const o=e.provider,i=e.prefix,s=e.name,a=t[o]||(t[o]=Object.create(null)),l=a[i]||(a[i]=it(o,i));let c;c=s in l.icons?n.loaded:""===i||l.missing.has(s)?n.missing:n.pending;const d={provider:o,prefix:i,name:s};c.push(d)}),n}(function(e,n=!0,t=!1){const r=[];return e.forEach(e=>{const o="string"==typeof e?lt(e,n,t):e;o&&r.push(o)}),r}(e,!0,ut()));if(!t.pending.length){let e=!0;return n&&setTimeout(()=>{e&&n(t.loaded,t.missing,t.pending,Bt)}),()=>{e=!1}}const r=Object.create(null),o=[];let i,s;return t.pending.forEach(e=>{const{provider:n,prefix:t}=e;if(t===s&&n===i)return;i=n,s=t,o.push(it(n,t));const a=r[n]||(r[n]=Object.create(null));a[t]||(a[t]=[])}),t.pending.forEach(e=>{const{provider:n,prefix:t,name:o}=e,i=it(n,t),s=i.pendingIcons||(i.pendingIcons=new Set);s.has(o)||(s.add(o),r[n][t].push(o))}),o.forEach(e=>{const n=r[e.provider][e.prefix];n.length&&zt(e,n)}),n?function(e,n,t){const r=Ft++,o=Ot.bind(null,t,r);if(!n.pending.length)return o;const i={id:r,icons:n,callback:e,abort:o};return t.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),o}(n,t,o):Bt};var Ut,Xt=/[\s,]+/;function Jt(e,n){n.split(Xt).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function Yt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){const n=parseInt(e);return isNaN(n)?0:r(n)}if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let o=parseFloat(e.slice(0,e.length-t.length));return isNaN(o)?0:(o/=n,o%1==0?r(o):0)}}return n}function Kt(e){return void 0===Ut&&function(){try{Ut=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){Ut=null}}(),Ut?Ut.createHTML(e):e}var Qt={...mt,inline:!1},Zt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},er={display:"inline-block"},nr={backgroundColor:"currentColor"},tr={backgroundColor:"transparent"},rr={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},or={WebkitMask:nr,mask:nr,background:tr};for(const e in or){const n=or[e];for(const t in rr)n[e+t]=rr[t]}var ir={...Qt,inline:!0};function sr(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}var ar,lr=(e,n,t)=>{const r=n.inline?ir:Qt,o=function(e,n){const t={...e};for(const e in n){const r=n[e],o=typeof r;e in gt?(null===r||r&&("string"===o||"number"===o))&&(t[e]=r):o===typeof t[e]&&(t[e]="rotate"===e?r%4:r)}return t}(r,n),i=n.mode||"svg",s={},a=n.style||{},l={..."svg"===i?Zt:{}};if(t){const e=lt(t,!1,!0);if(e){const n=["iconify"],t=["provider","prefix"];for(const r of t)e[r]&&n.push("iconify--"+e[r]);l.className=n.join(" ")}}for(let e in n){const t=n[e];if(void 0!==t)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=t;break;case"className":l[e]=(l[e]?l[e]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":o[e]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&Jt(o,t);break;case"color":s.color=t;break;case"rotate":"string"==typeof t?o[e]=Yt(t):"number"==typeof t&&(o[e]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete l["aria-hidden"];break;default:void 0===r[e]&&(l[e]=t)}}const c=function(e,n){const t={...Yn,...e},r={...mt,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,r].forEach(e=>{const n=[],t=e.hFlip,r=e.vFlip;let s,a=e.rotate;switch(t?r?a+=2:(n.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),n.push("scale(-1 1)"),o.top=o.left=0):r&&(n.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),n.push("scale(1 -1)"),o.top=o.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:s=o.height/2+o.top,n.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:n.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,n.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}a%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),n.length&&(i=function(e,n,t){const r=function(e,n="defs"){let t="";const r=e.indexOf("<"+n);for(;r>=0;){const o=e.indexOf(">",r),i=e.indexOf("</"+n);if(-1===o||-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;t+=e.slice(o+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:t,content:e}}(e);return o=r.defs,i=n+r.content+t,o?"<defs>"+o+"</defs>"+i:i;var o,i}(i,'<g transform="'+n.join(" ")+'">',"</g>"))});const s=r.width,a=r.height,l=o.width,c=o.height;let d,u;null===s?(u=null===a?"1em":"auto"===a?c:a,d=bt(u,l/c)):(d="auto"===s?l:s,u=null===a?bt(d,c/l):"auto"===a?c:a);const p={},f=(e,n)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(n)||(p[e]=n.toString())};f("width",d),f("height",u);const g=[o.left,o.top,l,c];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}(e,o),d=c.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),"svg"===i){l.style={...s,...a},Object.assign(l,d);let e=0,t=n.id;return"string"==typeof t&&(t=t.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Kt(wt(c.body,t?()=>t+"ID"+e++:"iconifyReact"))},(0,Un.createElement)("svg",l)}const{body:u,width:p,height:f}=e,g="mask"===i||"bg"!==i&&-1!==u.indexOf("currentColor"),m=function(e,n){let t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const e in n)t+=" "+e+'="'+n[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}(u,{...d,width:p+"",height:f+""});var h;return l.style={...s,"--svg":(h=m,'url("'+function(e){return"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(e)}(h)+'")'),width:sr(d.width),height:sr(d.height),...er,...g?nr:tr,...a},(0,Un.createElement)("span",l)};if(ut(!0),ar=It,Tt[""]=ar,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"==typeof n&&null!==n&&(n instanceof Array?n:[n]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,n){if("object"!=typeof e)return!1;if("string"!=typeof n&&(n=e.provider||""),dt&&!n&&!e.prefix){let n=!1;return rt(e)&&(e.prefix="",et(e,(e,t)=>{ft(e,t)&&(n=!0)})),n}const t=e.prefix;return!!ct({prefix:t,name:"a"})&&!!st(it(n,t),e)}(e))&&console.error(t)}catch(e){console.error(t)}})}if(void 0!==e.IconifyProviders){const n=e.IconifyProviders;if("object"==typeof n&&null!==n)for(let e in n){const t="IconifyProviders["+e+"] is invalid.";try{const r=n[e];if("object"!=typeof r||!r||void 0===r.resources)continue;Pt(e,r)||console.error(t)}catch(e){console.error(t)}}}}function cr(e){const[n,t]=(0,Un.useState)(!!e.ssr),[r,o]=(0,Un.useState)({});const[i,s]=(0,Un.useState)(function(n){if(n){const n=e.icon;if("object"==typeof n)return{name:"",data:n};const t=pt(n);if(t)return{name:n,data:t}}return{name:""}}(!!e.ssr));function a(){const e=r.callback;e&&(e(),o({}))}function l(e){if(JSON.stringify(i)!==JSON.stringify(e))return a(),s(e),!0}function c(){var n;const t=e.icon;if("object"==typeof t)return void l({name:"",data:t});const r=pt(t);if(l({name:t,data:r}))if(void 0===r){const e=Ht([t],c);o({callback:e})}else r&&(null===(n=e.onLoad)||void 0===n||n.call(e,t))}(0,Un.useEffect)(()=>(t(!0),a),[]),(0,Un.useEffect)(()=>{n&&c()},[e.icon,n]);const{name:d,data:u}=i;return u?lr({...Yn,...u},e,d):e.children?e.children:e.fallback?e.fallback:(0,Un.createElement)("span",{})}var dr=(0,Un.forwardRef)((e,n)=>cr({...e,_ref:n}));(0,Un.forwardRef)((e,n)=>cr({inline:!0,...e,_ref:n}));function ur(e){var n,t,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=ur(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var pr=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),fr="-",gr=[],mr=e=>{const n=br(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return yr(e);const t=e.split(fr),r=""===t[0]&&t.length>1?1:0;return hr(t,r,n)},getConflictingClassGroupIds:(e,n)=>{if(n){const n=r[e],o=t[e];return n?o?((e,n)=>{const t=new Array(e.length+n.length);for(let n=0;n<e.length;n++)t[n]=e[n];for(let r=0;r<n.length;r++)t[e.length+r]=n[r];return t})(o,n):n:o||gr}return t[e]||gr}}},hr=(e,n,t)=>{if(0===e.length-n)return t.classGroupId;const r=e[n],o=t.nextPart.get(r);if(o){const t=hr(e,n+1,o);if(t)return t}const i=t.validators;if(null===i)return;const s=0===n?e.join(fr):e.slice(n).join(fr),a=i.length;for(let e=0;e<a;e++){const n=i[e];if(n.validator(s))return n.classGroupId}},yr=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?"arbitrary.."+r:void 0})(),br=e=>{const{theme:n,classGroups:t}=e;return vr(t,n)},vr=(e,n)=>{const t=pr();for(const r in e){const o=e[r];kr(o,t,r,n)}return t},kr=(e,n,t,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];xr(o,n,t,r)}},xr=(e,n,t,r)=>{"string"!=typeof e?"function"!=typeof e?Cr(e,n,t,r):Tr(e,n,t,r):wr(e,n,t)},wr=(e,n,t)=>{(""===e?n:Sr(n,e)).classGroupId=t},Tr=(e,n,t,r)=>{$r(e)?kr(e(r),n,t,r):(null===n.validators&&(n.validators=[]),n.validators.push(((e,n)=>({classGroupId:e,validator:n}))(t,e)))},Cr=(e,n,t,r)=>{const o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){const[i,s]=o[e];kr(s,Sr(n,i),t,r)}},Sr=(e,n)=>{let t=e;const r=n.split(fr),o=r.length;for(let e=0;e<o;e++){const n=r[e];let o=t.nextPart.get(n);o||(o=pr(),t.nextPart.set(n,o)),t=o}return t},$r=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,jr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const o=(o,i)=>{t[o]=i,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(e){let n=t[e];return void 0!==n?n:void 0!==(n=r[e])?(o(e,n),n):void 0},set(e,n){e in t?t[e]=n:o(e,n)}}},Er=[],Pr=(e,n,t,r,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:o}),_r=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=e=>{const n=[];let t,r=0,o=0,i=0;const s=e.length;for(let a=0;a<s;a++){const s=e[a];if(0===r&&0===o){if(":"===s){n.push(e.slice(i,a)),i=a+1;continue}if("/"===s){t=a;continue}}"["===s?r++:"]"===s?r--:"("===s?o++:")"===s&&o--}const a=0===n.length?e:e.slice(i);let l=a,c=!1;a.endsWith("!")?(l=a.slice(0,-1),c=!0):a.startsWith("!")&&(l=a.slice(1),c=!0);return Pr(n,c,l,t&&t>i?t-i:void 0)};if(n){const e=n+":",t=r;r=n=>n.startsWith(e)?t(n.slice(e.length)):Pr(Er,!1,n,void 0,!0)}if(t){const e=r;r=n=>t({className:n,parseClassName:e})}return r},Rr=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((e,t)=>{n.set(e,1e6+t)}),e=>{const t=[];let r=[];for(let o=0;o<e.length;o++){const i=e[o],s="["===i[0],a=n.has(i);s||a?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(i)):r.push(i)}return r.length>0&&(r.sort(),t.push(...r)),t}},Ir=/\s+/,Or=e=>{if("string"==typeof e)return e;let n,t="";for(let r=0;r<e.length;r++)e[r]&&(n=Or(e[r]))&&(t&&(t+=" "),t+=n);return t},Fr=[],Dr=e=>{const n=n=>n[e]||Fr;return n.isThemeGetter=!0,n},Nr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ar=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Lr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Br=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qr=e=>Ar.test(e),zr=e=>!!e&&!Number.isNaN(Number(e)),Hr=e=>!!e&&Number.isInteger(Number(e)),Ur=e=>e.endsWith("%")&&zr(e.slice(0,-1)),Xr=e=>Lr.test(e),Jr=()=>!0,Yr=e=>Vr.test(e)&&!Br.test(e),Kr=()=>!1,Qr=e=>Wr.test(e),Zr=e=>Gr.test(e),eo=e=>!to(e)&&!uo(e),no=e=>vo(e,To,Kr),to=e=>Nr.test(e),ro=e=>vo(e,Co,Yr),oo=e=>vo(e,So,zr),io=e=>vo(e,jo,Jr),so=e=>vo(e,$o,Kr),ao=e=>vo(e,xo,Kr),lo=e=>vo(e,wo,Zr),co=e=>vo(e,Eo,Qr),uo=e=>Mr.test(e),po=e=>ko(e,Co),fo=e=>ko(e,$o),go=e=>ko(e,xo),mo=e=>ko(e,To),ho=e=>ko(e,wo),yo=e=>ko(e,Eo,!0),bo=e=>ko(e,jo,!0),vo=(e,n,t)=>{const r=Nr.exec(e);return!!r&&(r[1]?n(r[1]):t(r[2]))},ko=(e,n,t=!1)=>{const r=Mr.exec(e);return!!r&&(r[1]?n(r[1]):t)},xo=e=>"position"===e||"percentage"===e,wo=e=>"image"===e||"url"===e,To=e=>"length"===e||"size"===e||"bg-size"===e,Co=e=>"length"===e,So=e=>"number"===e,$o=e=>"family-name"===e,jo=e=>"number"===e||"weight"===e,Eo=e=>"shadow"===e,Po=((e,...n)=>{let t,r,o,i;const s=e=>{const n=r(e);if(n)return n;const i=((e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=n,s=[],a=e.trim().split(Ir);let l="";for(let e=a.length-1;e>=0;e-=1){const n=a[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:f}=t(n);if(c){l=n+(l.length>0?" "+l:l);continue}let g=!!f,m=r(g?p.substring(0,f):p);if(!m){if(!g){l=n+(l.length>0?" "+l:l);continue}if(m=r(p),!m){l=n+(l.length>0?" "+l:l);continue}g=!1}const h=0===d.length?"":1===d.length?d[0]:i(d).join(":"),y=u?h+"!":h,b=y+m;if(s.indexOf(b)>-1)continue;s.push(b);const v=o(m,g);for(let e=0;e<v.length;++e){const n=v[e];s.push(y+n)}l=n+(l.length>0?" "+l:l)}return l})(e,t);return o(e,i),i};return i=a=>{const l=n.reduce((e,n)=>n(e),e());return t=(e=>({cache:jr(e.cacheSize),parseClassName:_r(e),sortModifiers:Rr(e),...mr(e)}))(l),r=t.cache.get,o=t.cache.set,i=s,s(a)},(...e)=>i(((...e)=>{let n,t,r=0,o="";for(;r<e.length;)(n=e[r++])&&(t=Or(n))&&(o&&(o+=" "),o+=t);return o})(...e))})(()=>{const e=Dr("color"),n=Dr("font"),t=Dr("text"),r=Dr("font-weight"),o=Dr("tracking"),i=Dr("leading"),s=Dr("breakpoint"),a=Dr("container"),l=Dr("spacing"),c=Dr("radius"),d=Dr("shadow"),u=Dr("inset-shadow"),p=Dr("text-shadow"),f=Dr("drop-shadow"),g=Dr("blur"),m=Dr("perspective"),h=Dr("aspect"),y=Dr("ease"),b=Dr("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",uo,to],k=()=>[uo,to,l],x=()=>[qr,"full","auto",...k()],w=()=>[Hr,"none","subgrid",uo,to],T=()=>["auto",{span:["full",Hr,uo,to]},Hr,uo,to],C=()=>[Hr,"auto",uo,to],S=()=>["auto","min","max","fr",uo,to],$=()=>["auto",...k()],j=()=>[qr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],E=()=>[qr,"screen","full","dvw","lvw","svw","min","max","fit",...k()],P=()=>[qr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],_=()=>[e,uo,to],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",go,ao,{position:[uo,to]}],I=()=>["auto","cover","contain",mo,no,{size:[uo,to]}],O=()=>[Ur,po,ro],F=()=>["","none","full",c,uo,to],D=()=>["",zr,po,ro],N=()=>[zr,Ur,go,ao],M=()=>["","none",g,uo,to],A=()=>["none",zr,uo,to],L=()=>["none",zr,uo,to],V=()=>[zr,uo,to],B=()=>[qr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xr],breakpoint:[Xr],color:[Jr],container:[Xr],"drop-shadow":[Xr],ease:["in","out","in-out"],font:[eo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xr],shadow:[Xr],spacing:["px",zr],text:[Xr],"text-shadow":[Xr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qr,to,uo,h]}],container:["container"],columns:[{columns:[zr,to,uo,a]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{"inset-s":x(),start:x()}],end:[{"inset-e":x(),end:x()}],"inset-bs":[{"inset-bs":x()}],"inset-be":[{"inset-be":x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[Hr,"auto",uo,to]}],basis:[{basis:[qr,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[zr,qr,"auto","initial","none",to]}],grow:[{grow:["",zr,uo,to]}],shrink:[{shrink:["",zr,uo,to]}],order:[{order:[Hr,"first","last","none",uo,to]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mbs:[{mbs:$()}],mbe:[{mbe:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...E()]}],"min-inline-size":[{"min-inline":["auto",...E()]}],"max-inline-size":[{"max-inline":["none",...E()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",t,po,ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,bo,io]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ur,to]}],"font-family":[{font:[fo,so,n]}],"font-features":[{"font-features":[to]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,uo,to]}],"line-clamp":[{"line-clamp":[zr,"none",uo,oo]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",uo,to]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",uo,to]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[zr,"from-font","auto",uo,ro]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[zr,"auto",uo,to]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",uo,to]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",uo,to]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hr,uo,to],radial:["",uo,to],conic:[Hr,uo,to]},ho,lo]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-bs":[{"border-bs":_()}],"border-color-be":[{"border-be":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[zr,uo,to]}],"outline-w":[{outline:["",zr,po,ro]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",d,yo,co]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",u,yo,co]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[zr,ro]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",p,yo,co]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[zr,uo,to]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[zr]}],"mask-image-linear-from-pos":[{"mask-linear-from":N()}],"mask-image-linear-to-pos":[{"mask-linear-to":N()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":N()}],"mask-image-t-to-pos":[{"mask-t-to":N()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":N()}],"mask-image-r-to-pos":[{"mask-r-to":N()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":N()}],"mask-image-b-to-pos":[{"mask-b-to":N()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":N()}],"mask-image-l-to-pos":[{"mask-l-to":N()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":N()}],"mask-image-x-to-pos":[{"mask-x-to":N()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":N()}],"mask-image-y-to-pos":[{"mask-y-to":N()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[uo,to]}],"mask-image-radial-from-pos":[{"mask-radial-from":N()}],"mask-image-radial-to-pos":[{"mask-radial-to":N()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[zr]}],"mask-image-conic-from-pos":[{"mask-conic-from":N()}],"mask-image-conic-to-pos":[{"mask-conic-to":N()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",uo,to]}],filter:[{filter:["","none",uo,to]}],blur:[{blur:M()}],brightness:[{brightness:[zr,uo,to]}],contrast:[{contrast:[zr,uo,to]}],"drop-shadow":[{"drop-shadow":["","none",f,yo,co]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",zr,uo,to]}],"hue-rotate":[{"hue-rotate":[zr,uo,to]}],invert:[{invert:["",zr,uo,to]}],saturate:[{saturate:[zr,uo,to]}],sepia:[{sepia:["",zr,uo,to]}],"backdrop-filter":[{"backdrop-filter":["","none",uo,to]}],"backdrop-blur":[{"backdrop-blur":M()}],"backdrop-brightness":[{"backdrop-brightness":[zr,uo,to]}],"backdrop-contrast":[{"backdrop-contrast":[zr,uo,to]}],"backdrop-grayscale":[{"backdrop-grayscale":["",zr,uo,to]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[zr,uo,to]}],"backdrop-invert":[{"backdrop-invert":["",zr,uo,to]}],"backdrop-opacity":[{"backdrop-opacity":[zr,uo,to]}],"backdrop-saturate":[{"backdrop-saturate":[zr,uo,to]}],"backdrop-sepia":[{"backdrop-sepia":["",zr,uo,to]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",uo,to]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[zr,"initial",uo,to]}],ease:[{ease:["linear","initial",y,uo,to]}],delay:[{delay:[zr,uo,to]}],animate:[{animate:["none",b,uo,to]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,uo,to]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:A()}],"rotate-x":[{"rotate-x":A()}],"rotate-y":[{"rotate-y":A()}],"rotate-z":[{"rotate-z":A()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[uo,to,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",uo,to]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",uo,to]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[zr,po,ro,oo]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _o(...e){return Po(function(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=ur(e))&&(r&&(r+=" "),r+=n);return r}(e))}var Ro=require("react/jsx-runtime");function Io({sources:e,center:n,centerTitle:t,destinations:r,arrowRight:o=(0,Ro.jsx)(dr,{icon:"mdi:arrow-right"}),arrowDown:i=(0,Ro.jsx)(dr,{icon:"mdi:arrow-down"}),className:s}){return(0,Ro.jsx)("div",{className:_o("elb-architecture-flow",s),children:(0,Ro.jsxs)("div",{className:"elb-architecture-flow__grid",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--desktop",children:e.title}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__spacer"}),(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--desktop",children:t}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__spacer"}),(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--desktop",children:r.title}),(0,Ro.jsxs)("div",{className:"elb-architecture-flow__column",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--mobile",children:e.title}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__sections",children:e.sections.map(e=>(0,Ro.jsx)(Oo,{section:e},e.title))})]}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__arrow elb-architecture-flow__arrow--desktop",children:o}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__arrow elb-architecture-flow__arrow--mobile",children:i}),(0,Ro.jsxs)("div",{className:"elb-architecture-flow__center",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--mobile",children:t}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__center-content",children:n})]}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__arrow elb-architecture-flow__arrow--desktop",children:o}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__arrow elb-architecture-flow__arrow--mobile",children:i}),(0,Ro.jsxs)("div",{className:"elb-architecture-flow__column",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__title elb-architecture-flow__title--mobile",children:r.title}),(0,Ro.jsx)("div",{className:"elb-architecture-flow__sections",children:r.sections.map(e=>(0,Ro.jsx)(Oo,{section:e},e.title))})]})]})})}function Oo({section:e}){return(0,Ro.jsxs)("div",{className:"elb-architecture-flow__section",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__section-title",children:e.title}),(0,Ro.jsxs)("div",{className:"elb-architecture-flow__items",children:[e.items.map(e=>(0,Ro.jsxs)("div",{className:"elb-architecture-flow__item",children:[(0,Ro.jsx)("span",{className:"elb-architecture-flow__item-icon",children:e.icon}),(0,Ro.jsx)("span",{className:"elb-architecture-flow__item-label",children:e.label})]},e.label)),(0,Ro.jsx)("span",{className:"elb-architecture-flow__more",children:"and more…"})]})]})}var Fo=require("react"),Do=require("react/jsx-runtime");function No(e){const{code:n,language:t="javascript",className:r,disabled:o=!0,showCopy:i=!0,autoHeight:s={min:20,max:600},fontSize:a=15,format:l=!0,...c}=e,d=`elb-code-snippet ${r||""}`.trim(),[u,p]=(0,Fo.useState)(n);return(0,Fo.useEffect)(()=>{l&&n?Ln(n,t).then(p):p(n)},[n,t,l]),(0,Do.jsx)(qe,{...c,code:u,language:t,className:d,showHeader:!1,disabled:o,showCopy:i,autoHeight:s,fontSize:a})}var Mo=p(require("react"),1),Ao=p(require("roughjs"),1),Lo=require("react/jsx-runtime");function Vo({x:e,y:n,width:t,height:r,fill:o,stroke:i}){const s=(0,Mo.useRef)(null);return(0,Mo.useEffect)(()=>{if(!s.current)return;const a=s.current.ownerSVGElement;if(!a)return;s.current.replaceChildren();const l=Ao.default.svg(a),c=`M ${e+8} ${n}\n L ${e+t-8} ${n}\n Q ${e+t} ${n} ${e+t} ${n+8}\n L ${e+t} ${n+r-8}\n Q ${e+t} ${n+r} ${e+t-8} ${n+r}\n L ${e+8} ${n+r}\n Q ${e} ${n+r} ${e} ${n+r-8}\n L ${e} ${n+8}\n Q ${e} ${n} ${e+8} ${n}\n Z`,d=l.path(c,{fill:o,fillStyle:"solid",stroke:i,strokeWidth:1.5,roughness:1.2,bowing:1});return s.current.appendChild(d),()=>{s.current?.replaceChildren()}},[e,n,t,r,o,i]),(0,Lo.jsx)("g",{ref:s})}function Bo({cx:e,cy:n,diameter:t,fill:r,stroke:o}){const i=(0,Mo.useRef)(null);return(0,Mo.useEffect)(()=>{if(!i.current)return;const s=i.current.ownerSVGElement;if(!s)return;i.current.replaceChildren();const a=Ao.default.svg(s).circle(e,n,t,{fill:r,fillStyle:"solid",stroke:o,strokeWidth:1.5,roughness:.8});return i.current.appendChild(a),()=>{i.current?.replaceChildren()}},[e,n,t,r,o]),(0,Lo.jsx)("g",{ref:i})}function Wo({x:e,y:n,text:t}){return(0,Lo.jsxs)("g",{children:[(0,Lo.jsx)(Bo,{cx:e,cy:n,diameter:ti,fill:"var(--flow-marker-fill, #dc2626)",stroke:"var(--flow-marker-stroke, #991b1b)"}),(0,Lo.jsx)("text",{x:e,y:n,textAnchor:"middle",dominantBaseline:"central",fill:"var(--flow-marker-text, #ffffff)",fontSize:10,fontWeight:600,fontFamily:"system-ui, -apple-system, sans-serif",children:t})]})}function Go({fromX:e,fromY:n,toX:t,toY:r,stroke:o,arrowSize:i=8,centerY:s}){const a=(0,Mo.useRef)(null);return(0,Mo.useEffect)(()=>{if(!a.current)return;const l=a.current.ownerSVGElement;if(!l)return;a.current.replaceChildren();const c=Ao.default.svg(l),d=o,u=t-e,p=r-n,f=Math.sqrt(u*u+p*p),g=(e+t)/2,m=(n+r)/2;let h,y;if(Math.abs(p)<2)h=g,y=m-Math.min(.08*f,12);else if(void 0!==s){const t=Math.abs(n-s),o=Math.abs(r-s);h=e+.5*u,y=t>=o?n<s?m-.3*Math.abs(p):m+.3*Math.abs(p):r<s?m-.3*Math.abs(p):m+.3*Math.abs(p)}else h=e+.5*u,y=p>0?n-.3*Math.abs(p):n+.3*Math.abs(p);const b=t-h,v=r-y,k=Math.atan2(v,b),x=t-Math.cos(k)*i,w=r-Math.sin(k)*i,T=`M ${e} ${n} Q ${h} ${y} ${x} ${w}`,C=c.path(T,{stroke:d,strokeWidth:1.5,roughness:.8,fill:"none"});a.current.appendChild(C);const S=Math.PI/6,$=x-8*Math.cos(k-S),j=w-8*Math.sin(k-S),E=c.line(x,w,$,j,{stroke:d,strokeWidth:1.5,roughness:.5});a.current.appendChild(E);const P=x-8*Math.cos(k+S),_=w-8*Math.sin(k+S),R=c.line(x,w,P,_,{stroke:d,strokeWidth:1.5,roughness:.5});return a.current.appendChild(R),()=>{a.current?.replaceChildren()}},[e,n,t,r,o,i,s]),(0,Lo.jsx)("g",{ref:a})}var qo={labelSize:13,labelWeight:"600",textSize:12,textWeight:"normal",boxHeight:50,descriptionSize:13},zo=120,Ho=50,Uo=12,Xo=8,Jo=8,Yo=25,Ko=30,Qo=6;function Zo(e,n){if(!e||!n)return[];const t=[],r=new Set;let o=n;for(;o;){if(r.has(o))throw new Error(`FlowMap: Circular reference detected in transformer chain at "${o}"`);const n=e[o];if(!n)throw new Error(`FlowMap: Invalid transformer reference "${o}". Available transformers: ${Object.keys(e).join(", ")||"none"}`);r.add(o),t.push({name:o,config:n}),o=n.next}return t}function ei(e,n){if(!e)return[];const t=new Set;for(const r of n){if(!r||!e[r])continue;Zo(e,r).forEach(e=>t.add(e.name))}if(0===t.size)return[];const r=new Set;for(const n of t){const o=e[n]?.next;o&&t.has(o)&&r.add(o)}let o;for(const e of t)if(!r.has(e)){o=e;break}return o||(o=[...t][0]),Zo(e,o)}function ni(e,n){if(!e)return n.length;const t=n.findIndex(n=>n.name===e);return t>=0?t:n.length}var ti=16,ri=4;function oi({stageBefore:e,sources:n,preTransformers:t,collector:r,postTransformers:o,destinations:i,stageAfter:s,title:a,layout:l=qo,boxHeight:c,descriptionHeight:d,markers:u,className:p,withReturn:f}){const g=Object.entries(n??{default:{}}),m=Object.entries(i??{default:{}}),h=g.map(([,e])=>e.next),y=ei(t,h),b=m.map(([,e])=>e.before),v=ei(o,b),k=[...g].sort(([,e],[,n])=>ni(e.next,y)-ni(n.next,y)),x=[...m].sort(([,e],[,n])=>ni(e.before,v)-ni(n.before,v)),w=(0,Mo.useRef)(null),T=e?.description||g.some(([,e])=>e.description)||y.some(e=>e.config.description)||r?.description||v.some(e=>e.config.description)||m.some(([,e])=>e.description)||s?.description||m.some(([,e])=>e.after?.description),C=!1!==e?.link||g.some(([,e])=>!1!==e.link)||y.some(e=>!1!==e.config.link)||!1!==r?.link||v.some(e=>!1!==e.config.link)||m.some(([,e])=>!1!==e.link)||!1!==s?.link||m.some(([,e])=>!1!==e.after?.link),S=["stage-before","stage-before-right","source","source-left","source-right","collector","collector-left","collector-right","destination","destination-left","destination-right","stage-after","stage-after-left"],$=u?.some(e=>{return n=e.position,!!S.includes(n)||/^(source|destination|pre|post)-[^-]+(-left|-right)?$/.test(n);var n})??!1?ti/2+ri:0,j=u?.filter(e=>e.text)??[],E=j.reduce((e,n)=>e+(n.text?.length??0),0),P=Math.max(1,Math.ceil(E/70)),_=j.length>0?18*P+8:0,R=c??l.boxHeight,I=d??30,O=T||C?I+10:0,F=Math.max(g.length,m.length,1),D=R*F+Uo*(F-1),N=s||m.some(([,e])=>e.after),M=function(e,n,t){return(n?0:Yo)+zo*e+Ho*(e-1)+(t?0:Yo)}(1+(e?1:0)+y.length+1+v.length+1+(N?1:0),!!e,!!N),A=2*Jo+D+O+$+_,L=a?A+Ko:A,V=(a?Ko:0)+Jo+$,B=V+D/2,W=(e,n)=>B-(R*n+Uo*(n-1))/2+e*(R+Uo);let G=e?0:Yo;const q={},z=[],H=[];e&&(q.before={x:G,y:B-R/2,width:zo,height:R},G+=zo+Ho);const U=G;k.forEach(([e],n)=>{const t={x:U,y:W(n,k.length),width:zo,height:R};z.push({name:e,pos:t}),q[`source-${e}`]=t}),z.length>0&&(q.source=z[0].pos),G+=zo+Ho;const X=[],J=new Map;k.forEach(([e,n])=>{const t=n.next;if(t){const n=J.get(t)??[];n.push(e),J.set(t,n)}}),y.forEach(({name:e,config:n})=>{if(n.next){J.get(e);const t=J.get(n.next)??[];J.set(n.next,[...new Set([...t,`chain:${e}`])])}}),y.forEach(({name:e})=>{const n=J.get(e)??[],t=n.filter(e=>!e.startsWith("chain:")),r=n.some(e=>e.startsWith("chain:"));let o;if(1!==t.length||r)o=B-R/2;else{const e=q[`source-${t[0]}`];o=e?e.y:B-R/2}const i={x:G,y:o,width:zo,height:R};X.push({name:e,pos:i}),q[`pre-${e}`]=i,G+=zo+Ho}),q.collector={x:G,y:B-R/2,width:zo,height:R},G+=zo+Ho;const Y=[],K=new Map;x.forEach(([e,n])=>{const t=n.before;if(t){const n=K.get(t)??[];n.push(e),K.set(t,n)}});for(let e=v.length-1;e>=0;e--){const{name:n,config:t}=v[e];if(t.next){K.get(t.next);const e=K.get(n)??[];K.set(n,[...new Set([...e,`chain:${t.next}`])])}}const Q=G+v.length*(zo+Ho);x.forEach(([e],n)=>{const t={x:Q,y:W(n,x.length),width:zo,height:R};H.push({name:e,pos:t}),q[`destination-${e}`]=t}),H.length>0&&(q.destination=H[0].pos),v.forEach(({name:e})=>{const n=K.get(e)??[],t=n.filter(e=>!e.startsWith("chain:")),r=n.some(e=>e.startsWith("chain:"));let o;if(1!==t.length||r)if(t.length>1&&!r){const e=t.map(e=>q[`destination-${e}`]?.y).filter(e=>void 0!==e);if(e.length>0){o=e.reduce((e,n)=>e+n,0)/e.length}else o=B-R/2}else o=B-R/2;else{const e=q[`destination-${t[0]}`];o=e?e.y:B-R/2}const i={x:G,y:o,width:zo,height:R};Y.push({name:e,pos:i}),q[`post-${e}`]=i,G+=zo+Ho});const Z=[];if(N){const e=G+zo+Ho;x.forEach(([n,t],r)=>{const o=t.after??s;if(o){const t={x:e,y:W(r,x.length),width:zo,height:R};Z.push({name:n,pos:t,config:o}),q[`after-${n}`]=t}}),Z.length>0&&(q.after=Z[0].pos)}const ee=B,ne=[...e?[{key:"before",config:e,fillVar:"--flow-before-fill",strokeVar:"--flow-before-stroke",defaultLabel:"Before",defaultLink:void 0}]:[],...k.map(([e,n])=>({key:`source-${e}`,config:n,fillVar:"--flow-source-fill",strokeVar:"--flow-source-stroke",defaultLabel:"Source",defaultLink:"/docs/sources"})),...y.map(({name:e,config:n})=>({key:`pre-${e}`,config:n,fillVar:"--flow-transformer-fill",strokeVar:"--flow-transformer-stroke",defaultLabel:e.charAt(0).toUpperCase()+e.slice(1),defaultLink:"/docs/transformers"})),{key:"collector",config:r,fillVar:"--flow-collector-fill",strokeVar:"--flow-collector-stroke",defaultLabel:"Collector",defaultLink:"/docs/collectors"},...v.map(({name:e,config:n})=>({key:`post-${e}`,config:n,fillVar:"--flow-transformer-fill",strokeVar:"--flow-transformer-stroke",defaultLabel:e.charAt(0).toUpperCase()+e.slice(1),defaultLink:"/docs/transformers"})),...x.map(([e,n])=>({key:`destination-${e}`,config:n,fillVar:"--flow-destination-fill",strokeVar:"--flow-destination-stroke",defaultLabel:"Destination",defaultLink:"/docs/destinations"})),...Z.map(({name:e,config:n})=>({key:`after-${e}`,config:n,fillVar:"--flow-after-fill",strokeVar:"--flow-after-stroke",defaultLabel:"External",defaultLink:void 0}))];return(0,Lo.jsx)("div",{ref:w,className:`elb-explorer elb-flow-map ${p||""}`,style:{width:"100%",maxWidth:M},children:(0,Lo.jsxs)("svg",{viewBox:`0 0 ${M} ${L}`,style:{width:"100%",height:"auto",display:"block"},children:[a&&(0,Lo.jsx)("text",{x:M/2,y:18,textAnchor:"middle",dominantBaseline:"middle",fill:"var(--color-text, #f3f4f6)",fontSize:14,fontWeight:600,fontFamily:"system-ui, -apple-system, sans-serif",children:a}),(()=>{const r=q.collector,s=r.y+R/2;return(0,Lo.jsxs)(Lo.Fragment,{children:[!e&&1===g.length&&(0,Lo.jsx)(Go,{fromX:0,fromY:ee,toX:q.source.x,toY:ee,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),e&&(0,Lo.jsx)(Go,{fromX:q.before.x+zo,fromY:ee,toX:q.source.x,toY:q.source.y+R/2,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),(()=>{const e=new Map;return z.forEach(({name:t,pos:r},o)=>{const i=n?.[t]??{},s=i.next?`pre-${i.next}`:y.length>0?`pre-${y[0].name}`:"collector",a=e.get(s)??[];a.push({name:t,pos:r,sortIndex:o}),e.set(s,a)}),z.map(({name:o,pos:i})=>{const s=n?.[o]??{},a=((e,n)=>n.next&&t?.[n.next]?q[`pre-${n.next}`]:y.length>0?q[`pre-${y[0].name}`]:r)(0,s),l=i.y+R/2,c=a.y+R/2,d=s.next?`pre-${s.next}`:y.length>0?`pre-${y[0].name}`:"collector",u=e.get(d)??[],p=((e,n,t)=>{if(n<=1)return t;const r=Math.min(.6*R,12*(n-1));return t-r/2+e*(r/(n-1))})(u.findIndex(e=>e.name===o),u.length,c),g=f?Qo:0;return(0,Lo.jsxs)(Mo.default.Fragment,{children:[(0,Lo.jsx)(Go,{fromX:i.x+zo,fromY:l-g,toX:a.x,toY:p-g,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),f&&(0,Lo.jsx)(Go,{fromX:a.x,fromY:p+g,toX:i.x+zo,toY:l+g,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]},`source-${o}-arrows`)})})(),X.map(({name:e,pos:n},o)=>{const i=t?.[e]??{};let s;s=i.next&&t?.[i.next]?q[`pre-${i.next}`]:r;const a=n.y+R/2,l=s.y+R/2,c=f?Qo:0;return(0,Lo.jsxs)(Mo.default.Fragment,{children:[(0,Lo.jsx)(Go,{fromX:n.x+zo,fromY:a-c,toX:s.x,toY:l-c,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),f&&(0,Lo.jsx)(Go,{fromX:s.x,fromY:l+c,toX:n.x+zo,toY:a+c,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]},`pre-${e}-chain`)}),H.map(({name:e,pos:n})=>{const t=((e,n)=>n.before&&o?.[n.before]?q[`post-${n.before}`]:r)(0,i?.[e]??{}),s=n.y+R/2,a=t.y+R/2,l=f?Qo:0;return(0,Lo.jsxs)(Mo.default.Fragment,{children:[(0,Lo.jsx)(Go,{fromX:t.x+zo,fromY:a-l,toX:n.x,toY:s-l,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),f&&(0,Lo.jsx)(Go,{fromX:n.x,fromY:s+l,toX:t.x+zo,toY:a+l,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]},`destination-${e}-arrows`)}),Y.slice(0,-1).map(({name:e,pos:n},t)=>{const r=Y[t+1];if(!r)return null;const o=r.pos,i=n.y+R/2,s=o.y+R/2,a=f?Qo:0;return(0,Lo.jsxs)(Mo.default.Fragment,{children:[(0,Lo.jsx)(Go,{fromX:n.x+zo,fromY:i-a,toX:o.x,toY:s-a,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),f&&(0,Lo.jsx)(Go,{fromX:o.x,fromY:s+a,toX:n.x+zo,toY:i+a,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]},`post-${e}-chain`)}),v.length>0&&(()=>{const e=q[`post-${v[0].name}`],n=s,t=e.y+R/2,o=f?Qo:0;return(0,Lo.jsxs)(Lo.Fragment,{children:[(0,Lo.jsx)(Go,{fromX:r.x+zo,fromY:n-o,toX:e.x,toY:t-o,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee}),f&&(0,Lo.jsx)(Go,{fromX:e.x,fromY:t+o,toX:r.x+zo,toY:n+o,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]})})(),Z.map(({name:e,pos:n})=>{const t=q[`destination-${e}`];if(!t)return null;const r=t.y+R/2,o=n.y+R/2;return(0,Lo.jsx)(Go,{fromX:t.x+zo,fromY:r,toX:n.x,toY:o,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee},`dest-${e}-after`)}),!N&&1===m.length&&(0,Lo.jsx)(Go,{fromX:q.destination.x+zo,fromY:ee,toX:M,toY:ee,stroke:"var(--flow-edge-stroke, #9ca3af)",centerY:ee})]})})(),ne.map(({key:e,config:n,fillVar:t,strokeVar:r,defaultLabel:o,defaultLink:i})=>{const s=q[e],a=n?.icon,c=n?.label||o,d=n?.text,u=n?.description,p=n?.link,f=!1!==n?.highlight,g=d?s.y+.28*s.height:s.y+s.height/2,m=!1===p?null:"string"==typeof p?p:i,h=(0,Lo.jsxs)(Lo.Fragment,{children:[(0,Lo.jsx)(Vo,{x:s.x,y:s.y,width:s.width,height:s.height,fill:`var(${t}, #6b7280)`,stroke:f?`var(${r}, #6b7280)`:"var(--flow-edge-stroke, #9ca3af)"}),(0,Lo.jsx)("foreignObject",{x:s.x+4,y:g-l.labelSize/2-2,width:s.width-8,height:l.labelSize+4,children:(0,Lo.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",height:"100%",fontSize:l.labelSize,fontWeight:l.labelWeight,fontFamily:"system-ui, -apple-system, sans-serif",color:"var(--color-text)"},children:[a&&(0,Lo.jsx)(dr,{icon:a,width:14,height:14}),(0,Lo.jsx)("span",{children:c})]})}),d&&(0,Lo.jsx)("foreignObject",{x:s.x+4,y:s.y+.34*s.height,width:s.width-8,height:.62*s.height,children:(0,Lo.jsx)("div",{style:{fontSize:l.textSize,fontWeight:l.textWeight,color:"var(--color-text)",textAlign:"center",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:1.3,height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:d})}),u&&(0,Lo.jsx)("foreignObject",{x:s.x,y:s.y+s.height+8,width:zo,height:I,children:(0,Lo.jsx)("div",{style:{fontSize:l.descriptionSize,color:"var(--color-text-muted)",textAlign:"center",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:1.3},children:u})})]});return m?(0,Lo.jsx)("a",{href:m,style:{cursor:"pointer",textDecoration:"none"},children:h},e):(0,Lo.jsx)("g",{children:h},e)}),u?.map((e,n)=>{const t=function(e,n,t,r){const o=n.source,i=n.collector,s=n.destination,a=n.before,l=n.after,c=(e,n)=>e?"-left"===n?{x:e.x+ri,y:e.y-ri}:{x:e.x+e.width-ri,y:e.y-ri}:null,d=e=>{if(!e)return null;const n=e.y+e.height/2;return{x:e.x+e.width+Ho/2-6,y:n+ti/2+4}};switch(e){case"stage-before":case"stage-before-right":return c(a);case"source":case"source-right":return c(o);case"source-left":return c(o,"-left");case"collector":case"collector-right":return c(i);case"collector-left":return c(i,"-left");case"destination":case"destination-right":return c(s);case"destination-left":return c(s,"-left");case"stage-after":case"stage-after-left":return c(l,"-left");case"incoming":return{x:Yo/2,y:t+ti/2+8};case"outgoing":return{x:r-Yo/2,y:t+ti/2+8};case"before-source":return d(a);case"source-collector":return d(o);case"collector-destination":case"collector-post":return d(i);case"destination-after":return d(s);case"pre-collector":const u=Object.keys(n).filter(e=>e.startsWith("pre-"));return 0===u.length?null:d(n[u[u.length-1]]);default:{const t=e.match(/^source-([^-]+)(-left|-right)?$/);if(t){const e=t[1],r=t[2];return c(n[`source-${e}`],r)}const r=e.match(/^destination-([^-]+)(-left|-right)?$/);if(r){const e=r[1],t=r[2];return c(n[`destination-${e}`],t)}const o=e.match(/^pre-([^-]+)(-left|-right)?$/);if(o){const e=o[1],t=o[2];return"collector"===e?null:c(n[`pre-${e}`],t)}const s=e.match(/^post-([^-]+)(-left|-right)?$/);if(s){const e=s[1],t=s[2];return c(n[`post-${e}`],t)}const a=e.match(/^source-([^-]+)-pre$/);if(a)return d(n[`source-${a[1]}`]);const l=e.match(/^source-([^-]+)-collector$/);if(l)return d(n[`source-${l[1]}`]);const u=e.match(/^pre-([^-]+)-next$/);if(u)return d(n[`pre-${u[1]}`]);const p=e.match(/^post-([^-]+)-next$/);if(p)return d(n[`post-${p[1]}`]);const f=e.match(/^post-destination-([^-]+)$/);if(f){f[1];const e=Object.keys(n).filter(e=>e.startsWith("post-"));return 0===e.length?d(i):d(n[e[e.length-1]])}return null}}}(e.position,q,ee,M);if(!t)return null;const r=e.id??String(n+1);return(0,Lo.jsx)(Wo,{x:t.x,y:t.y,text:r},`marker-${n}`)}),j.length>0&&(0,Lo.jsx)("foreignObject",{x:Xo,y:V+D+O+4,width:M-2*Xo,height:18*P,children:(0,Lo.jsx)("div",{style:{fontSize:11,fontFamily:"system-ui, -apple-system, sans-serif",color:"var(--color-text-muted)",lineHeight:1.6},children:j.map((e,n)=>{const t=e.id??String((u?.indexOf(e)??n)+1);return(0,Lo.jsxs)("span",{children:[(0,Lo.jsx)("span",{style:{width:12,height:12,borderRadius:"50%",background:"var(--flow-marker-fill, #dc2626)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:600,color:"var(--flow-marker-text, #ffffff)",verticalAlign:"middle",marginRight:4,position:"relative",top:-1},children:t}),(0,Lo.jsx)("span",{style:{marginRight:10},children:e.text})]},`legend-${n}`)})})})]})})}var ii=require("react"),si=require("react/jsx-runtime");function ai({property:e,isOpen:n,onClose:t}){if(!n||!e)return null;return(0,si.jsx)("div",{className:"elb-property-table__modal-backdrop",onClick:e=>{e.target===e.currentTarget&&t()},children:(0,si.jsxs)("div",{className:"elb-property-table__modal-content",children:[(0,si.jsxs)("div",{className:"elb-property-table__modal-header",children:[(0,si.jsxs)("h3",{className:"elb-property-table__modal-title",children:[(0,si.jsx)("code",{className:"elb-property-table__modal-property-name",children:e.name}),e.required&&(0,si.jsx)("span",{className:"elb-property-table__required-icon",children:"*"})]}),(0,si.jsx)("button",{className:"elb-property-table__close-button",onClick:t,"aria-label":"Close",children:(0,si.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,si.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,si.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),(0,si.jsxs)("div",{className:"elb-property-table__modal-body",children:[(0,si.jsxs)("div",{className:"elb-property-table__modal-row",children:[(0,si.jsx)("span",{className:"elb-property-table__modal-label",children:"Type:"}),(0,si.jsx)("code",{className:"elb-property-table__modal-type elb-property-table__modal-type--wrap",children:e.type})]}),e.description&&(0,si.jsxs)("div",{className:"elb-property-table__modal-row",children:[(0,si.jsx)("span",{className:"elb-property-table__modal-label",children:"Description:"}),(0,si.jsx)("p",{className:"elb-property-table__modal-description",children:e.description})]}),e.default&&(0,si.jsxs)("div",{className:"elb-property-table__modal-row",children:[(0,si.jsx)("span",{className:"elb-property-table__modal-label",children:"Default:"}),(0,si.jsx)("code",{className:"elb-property-table__modal-default",children:e.default})]}),e.example&&(0,si.jsxs)("div",{className:"elb-property-table__modal-row",children:[(0,si.jsx)("span",{className:"elb-property-table__modal-label",children:"Example:"}),(0,si.jsx)("code",{className:"elb-property-table__modal-example",children:e.example})]})]})]})})}function li({schema:e,className:n}){const[t,r]=(0,ii.useState)(null),[o,i]=(0,ii.useState)(!1),s=function(e){const n=[],t=e.required||[];if(!e.properties)return n;for(const[r,o]of Object.entries(e.properties)){const e=o;let i=e.type||"any";if(e.enum&&(i=e.enum.map(e=>`'${e}'`).join(" | ")),"array"===i&&e.items){const n=e.items;i=n.enum?`Array<${n.enum.map(e=>`'${e}'`).join(" | ")}>`:`Array<${n.type||"any"}>`}"object"===i&&e.additionalProperties&&(i=`Record<string, ${e.additionalProperties.type||"any"}>`),(e.anyOf||e.oneOf)&&(i=(e.anyOf||e.oneOf).map(e=>e.type||"any").join(" | "));let s,a=e.description||"";const l=a.match(/\(like\s+(.+?)\)$/);l&&(s=l[1],a=a.replace(/\s*\(like\s+.+?\)$/,"")),"any"===i&&a.toLowerCase().includes("function")&&(i="function"),n.push({name:r,type:i,description:a,required:t.includes(r),default:void 0!==e.default?String(e.default):void 0,example:s})}return n}(e),a=s.some(e=>e.required),l=e=>e.length<=30?e:e.slice(0,30),c=e=>{r(e),i(!0)};return(0,si.jsxs)("div",{className:`elb-explorer ${n||""}`,children:[(0,si.jsx)("div",{className:"elb-property-table__container",children:(0,si.jsxs)("table",{className:"elb-property-table",children:[(0,si.jsx)("thead",{children:(0,si.jsxs)("tr",{children:[(0,si.jsx)("th",{children:"Property"}),(0,si.jsx)("th",{children:"Type"}),(0,si.jsx)("th",{children:"Description"}),(0,si.jsx)("th",{children:"More"})]})}),(0,si.jsx)("tbody",{children:s.map((e,n)=>{return(0,si.jsxs)("tr",{children:[(0,si.jsx)("td",{className:"elb-property-table__property-cell","data-label":"Property",children:(0,si.jsxs)("code",{className:"elb-property-table__property-name",children:[e.name,e.required&&(0,si.jsx)("span",{className:"elb-property-table__required-icon",children:"*"})]})}),(0,si.jsx)("td",{className:"elb-property-table__type-cell","data-label":"Type",children:(t=e.type,t.length>30?(0,si.jsx)("button",{className:"elb-property-table__type-button",onClick:()=>c(e),"aria-label":`View full type for ${e.name}`,children:(0,si.jsx)("code",{className:"elb-property-table__property-type elb-property-table__property-type--truncated",children:l(e.type)})}):(0,si.jsx)("code",{className:"elb-property-table__property-type",children:e.type}))}),(0,si.jsx)("td",{className:"elb-property-table__description","data-label":"Description",children:e.description}),(0,si.jsx)("td",{className:"elb-property-table__action-cell","data-label":"More",children:(0,si.jsx)("button",{className:"elb-property-table__more-button",onClick:()=>c(e),"aria-label":`More info about ${e.name}`,children:(0,si.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,si.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,si.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,si.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})})})]},n);var t})})]})}),a&&(0,si.jsxs)("div",{className:"elb-property-table__required-notice",children:[(0,si.jsx)("span",{className:"elb-property-table__required-icon",children:"*"})," Required fields"]}),(0,si.jsx)(ai,{property:t,isOpen:o,onClose:()=>{i(!1),r(null)}})]})}var ci=require("react/jsx-runtime");function di({trigger:e,isOpen:n,onToggle:t,children:r,align:o="left",ariaLabel:i,className:s=""}){return(0,ci.jsxs)("div",{className:`elb-dropdown ${s}`.trim(),children:[(0,ci.jsx)("div",{className:"elb-dropdown__trigger",onClick:t,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":n,"aria-label":i,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())},children:e}),n&&(0,ci.jsx)("div",{className:`elb-dropdown__panel elb-dropdown__panel--${o}`,role:"menu",children:r})]})}function ui({children:e,onClick:n,disabled:t=!1,variant:r="default",className:o=""}){return(0,ci.jsx)("button",{type:"button",role:"menuitem",className:`elb-dropdown__item elb-dropdown__item--${r} ${t?"elb-dropdown__item--disabled":""} ${o}`.trim(),onClick:n,disabled:t,children:e})}function pi({className:e=""}){return(0,ci.jsx)("div",{className:`elb-dropdown__divider ${e}`.trim(),role:"separator"})}var fi=require("react/jsx-runtime");function gi({children:e,className:n=""}){return(0,fi.jsx)("div",{className:`elb-explorer-footer ${n}`,children:e})}var mi=require("react/jsx-runtime");function hi({variant:e="default",size:n="md",href:t,onClick:r,children:o,className:i="",disabled:s=!1}){const a="elb-button-link",l=`${a} ${a}-${e} ${a}-${n} ${i}`.trim();return t&&!s?(0,mi.jsx)("a",{href:t,className:l,children:o}):(0,mi.jsx)("button",{type:"button",className:l,onClick:r,disabled:s,children:o})}var yi=require("react/jsx-runtime");function bi({size:e="md",className:n=""}){return(0,yi.jsx)("span",{className:`elb-spinner elb-spinner--${e} ${n}`.trim(),role:"status","aria-label":"Loading"})}ft("walkeros:piwik-pro",{body:'<g fill="none" fill-rule="evenodd"><path fill="#231F20" d="M0 0h90v90H0z"/><path d="M50.792 57.21v.044H37.99v8.675c0 3.38-2.652 6.07-6.006 6.07a5.917 5.917 0 0 1-4.243-1.77 6.073 6.073 0 0 1-1.74-4.3v-38.88C26 23.67 28.65 21 31.983 21H50.79v.022c9.58.4 17.209 8.341 17.209 18.104 0 9.764-7.628 17.704-17.209 18.083h.001Zm-2.148-25.29H37.99v14.57h10.872c3.88-.112 6.993-3.337 6.993-7.274a7.347 7.347 0 0 0-2.114-5.16 7.16 7.16 0 0 0-5.098-2.134Z" fill="#FFF" fill-rule="nonzero"/></g>',width:90,height:90});var vi=p(require("react"),1),ki={},xi=vi.default.createContext(ki);function wi(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(ki):e.components||ki:function(e){const n=vi.default.useContext(xi);return vi.default.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}(e.components),vi.default.createElement(xi.Provider,{value:n},e.children)}var Ti=require("react"),Ci=require("react/jsx-runtime"),Si=({className:e,children:n})=>{const t=Ti.Children.toArray(n),r="string"==typeof e,o=t.some(e=>"string"==typeof e&&e.match(/[\n\r]/g));if(!r||!o)return(0,Ci.jsx)("code",{className:"elb-code-inline",children:n});const i=e.replace(/^language-/,""),s={js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",bash:"shell",sh:"shell",yml:"yaml",md:"markdown"}[i]||i,a=t.map(e=>"string"==typeof e?e:"").join("").trim();return(0,Ci.jsx)(qe,{code:a,language:s,disabled:!0,showCopy:!0,showHeader:!1,autoHeight:{min:100,max:600}})},$i=require("react/jsx-runtime"),ji=({children:e})=>{const n={code:Si,CodeBox:qe,PropertyTable:li,DestinationInitDemo:an,DestinationDemo:nn};return(0,$i.jsx)(wi,{components:n,children:e})},Ei=require("react");function Pi(){const[e,n]=(0,Ei.useState)(!1),t=(0,Ei.useRef)(null),r=(0,Ei.useCallback)(()=>{n(e=>!e)},[]),o=(0,Ei.useCallback)(()=>{n(!0)},[]),i=(0,Ei.useCallback)(()=>{n(!1)},[]);return(0,Ei.useEffect)(()=>{if(e)return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r);function r(e){t.current&&!t.current.contains(e.target)&&n(!1)}},[e]),(0,Ei.useEffect)(()=>{if(e)return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t);function t(e){"Escape"===e.key&&n(!1)}},[e]),{isOpen:e,toggle:r,open:o,close:i,containerRef:t}}function _i(e,n){const t=JSON.parse(JSON.stringify(e));for(const[e,r]of Object.entries(n)){const n=""===e?t:Ri(t,e);n&&"object"==typeof n&&Object.assign(n,r)}return t}function Ri(e,n){const t=n.split(".");let r=e;for(const e of t){if(!r||"object"!=typeof r||!(e in r))return;r=r[e]}return r}function Ii(e){const n=JSON.parse(JSON.stringify(e));if(!n.anyOf?.[0]?.properties)return n;const t=n.anyOf[0].properties,r=t.flows?.additionalProperties?.properties;return t.version&&(t.version.markdownDescription='Schema version number. Use `3` for the current format.\n\n```json\n"version": 3\n```'),t.$schema&&(t.$schema.markdownDescription='JSON Schema URI for IDE validation.\n\n```json\n"$schema": "https://walkeros.io/schema/flow/v3.json"\n```'),t.include&&(t.include.markdownDescription='Folders to include in the bundle output.\n\n```json\n"include": ["./src", "./lib"]\n```'),t.variables&&(t.variables.markdownDescription='Shared variables for `$var.name` interpolation across all flows.\n\n```json\n"variables": {\n "measurementId": "G-XXXXXXXXXX",\n "debug": false\n}\n```\n\nReference in any config value: `"$var.measurementId"`',t.variables.defaultSnippets=[{label:"Add variable",description:"New key-value variable",body:{"${1:name}":"${2:value}"}}]),t.definitions&&(t.definitions.markdownDescription='Reusable configuration fragments for `$def.name` references.\n\n```json\n"definitions": {\n "gaConfig": {\n "measurementId": "$var.trackingId"\n }\n}\n```\n\nReference in any config: `"$def.gaConfig"`',t.definitions.defaultSnippets=[{label:"Add definition",description:"New reusable config fragment",body:{"${1:name}":{"${2:key}":"${3:value}"}}}]),t.flows&&(t.flows.markdownDescription='Flow configurations keyed by name. Each flow defines a complete event pipeline.\n\n```json\n"flows": {\n "myFlow": {\n "web": {},\n "sources": { ... },\n "destinations": { ... }\n }\n}\n```',t.flows.defaultSnippets=[{label:"Web flow (basic)",description:"Minimal web flow with browser source",body:{"${1:myFlow}":{web:{},sources:{browser:{package:"@walkeros/web-source-browser"}},destinations:{}}}},{label:"Server flow (basic)",description:"Minimal server flow with Express source",body:{"${1:myFlow}":{server:{},sources:{express:{package:"@walkeros/server-source-express"}},destinations:{}}}},{label:"Web + GA4 flow",description:"Web flow with browser source and GA4 destination",body:{"${1:myFlow}":{web:{},sources:{browser:{package:"@walkeros/web-source-browser"}},destinations:{ga4:{package:"@walkeros/web-destination-ga4",config:{measurementId:"$var.${2:measurementId}"}}}}}}]),r&&(r.sources&&(r.sources.markdownDescription='Source configurations for data capture, keyed by step name.\n\n```json\n"sources": {\n "browser": { "package": "@walkeros/web-source-browser" }\n}\n```',r.sources.defaultSnippets=[{label:"Add web source",description:"Browser source for web tracking",body:{"${1:browser}":{package:"@walkeros/web-source-browser"}}},{label:"Add server source",description:"Express source for server tracking",body:{"${1:express}":{package:"@walkeros/server-source-express"}}}]),r.destinations&&(r.destinations.markdownDescription='Destination configurations for data output, keyed by step name.\n\n```json\n"destinations": {\n "ga4": {\n "package": "@walkeros/web-destination-ga4",\n "config": { "measurementId": "$var.trackingId" }\n }\n}\n```',r.destinations.defaultSnippets=[{label:"Add GA4 destination",description:"Google Analytics 4 destination",body:{"${1:ga4}":{package:"@walkeros/web-destination-ga4",config:{measurementId:"$var.${2:measurementId}"}}}},{label:"Add custom destination",description:"Custom destination with inline code",body:{"${1:custom}":{code:{push:"$code:(event) => { ${2:// handle event} }"}}}}]),r.transformers&&(r.transformers.markdownDescription='Transformer configurations for event transformation, keyed by step name.\n\n```json\n"transformers": {\n "validator": {\n "code": { "push": "$code:(event) => event" }\n }\n}\n```',r.transformers.defaultSnippets=[{label:"Add transformer",description:"Inline transformer with code",body:{"${1:transformer}":{code:{push:"$code:(event) => { ${2:return event;} }"}}}}]),r.web&&(r.web.markdownDescription='Web platform configuration (browser-based). Mutually exclusive with `server`.\n\n```json\n"web": {\n "windowCollector": "collector",\n "windowElb": "elb"\n}\n```'),r.server&&(r.server.markdownDescription='Server platform configuration (Node.js). Mutually exclusive with `web`.\n\n```json\n"server": {}\n```')),n}function Oi(){return{type:"object",markdownDescription:'walkerOS Data Contract. Defines entity→action schemas for event validation.\n\n```json\n{\n "$tagging": 1,\n "page": {\n "view": {\n "type": "object",\n "properties": {\n "title": { "type": "string" }\n }\n }\n }\n}\n```',properties:{$tagging:{type:"number",markdownDescription:'Contract version number. Increment when making breaking changes.\n\n```json\n"$tagging": 1\n```'}},additionalProperties:{type:"object",markdownDescription:"Entity name. Contains action→schema mappings.",additionalProperties:{type:"object",markdownDescription:'Action schema (JSON Schema). Defines valid event data for this entity+action.\n\n```json\n{\n "type": "object",\n "properties": {\n "name": { "type": "string" },\n "price": { "type": "number" }\n },\n "required": ["name"]\n}\n```',defaultSnippets:[{label:"Object schema",description:"Schema with typed properties",body:{type:"object",properties:{"${1:name}":{type:"${2:string}"}}}}]},defaultSnippets:[{label:"Add action",description:"Action with event data schema",body:{"${1:action}":{type:"object",properties:{"${2:property}":{type:"${3:string}"}}}}}]},defaultSnippets:[{label:"Entity with action",description:"New entity with one action and properties",body:{"${1:entity}":{"${2:action}":{type:"object",properties:{"${3:property}":{type:"${4:string}"}}}}}}]}}function Fi(){return{type:"object",markdownDescription:'Flow variables for `$var.name` interpolation. Values must be string, number, or boolean.\n\n```json\n{\n "measurementId": "G-XXXXXXXXXX",\n "debug": false,\n "batchSize": 10\n}\n```\n\nReference in any config value: `"$var.measurementId"`',additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"}]},defaultSnippets:[{label:"Add string variable",body:{"${1:name}":"${2:value}"}},{label:"Add boolean variable",body:{"${1:name}":"${2|true,false|}"}},{label:"Add number variable",body:{"${1:name}":0}}]}}function Di(e,n){const t=[];if(n.variables){const r=/\$var\.(\w+)/g;let o;for(;null!==(o=r.exec(e));)o[1]in n.variables||t.push({message:`Unknown variable "$var.${o[1]}". Defined variables: ${Object.keys(n.variables).join(", ")||"none"}`,severity:"warning",startIndex:o.index,endIndex:o.index+o[0].length})}if(n.definitions){const r=/\$def\.(\w+)/g;let o;for(;null!==(o=r.exec(e));)o[1]in n.definitions||t.push({message:`Unknown definition "$def.${o[1]}". Defined: ${Object.keys(n.definitions).join(", ")||"none"}`,severity:"warning",startIndex:o.index,endIndex:o.index+o[0].length})}if(n.secrets){const r=/\$secret\.(\w+)/g;let o;for(;null!==(o=r.exec(e));)n.secrets.includes(o[1])||t.push({message:`Unknown secret "$secret.${o[1]}". Available: ${n.secrets.join(", ")||"none"}`,severity:"warning",startIndex:o.index,endIndex:o.index+o[0].length})}if(n.stepNames?.transformers){const r=/"(?:next|before)"\s*:\s*"(\w+)"/g;let o;for(;null!==(o=r.exec(e));)n.stepNames.transformers.includes(o[1])||t.push({message:`Unknown transformer "${o[1]}". Available: ${n.stepNames.transformers.join(", ")||"none"}`,severity:"warning",startIndex:o.index,endIndex:o.index+o[0].length})}return t}function Ni(e){let n;try{n=JSON.parse(e)}catch{return{}}if(!(Mi(t=n)&&"version"in t&&"flows"in t&&Mi(t.flows)))return{};var t;const r={},o={},i=[],s=[],a=[],l=[],c=[],d={};let u;Li(r,n.variables),Vi(o,n.definitions),Bi(c,n.contract),Mi(n.contract)&&Object.assign(d,n.contract);for(const e of Object.values(n.flows))if(Mi(e)){if(u||("web"in e?u="web":"server"in e&&(u="server")),Li(r,e.variables),Vi(o,e.definitions),Bi(c,e.contract),Mi(e.contract)&&Object.assign(d,e.contract),Mi(e.sources))for(const[n,t]of Object.entries(e.sources))i.push(n),Mi(t)&&(Li(r,t.variables),Vi(o,t.definitions),"string"==typeof t.package&&l.push({package:t.package,shortName:n,type:"source",platform:u||"web"}));if(Mi(e.destinations))for(const[n,t]of Object.entries(e.destinations))s.push(n),Mi(t)&&(Li(r,t.variables),Vi(o,t.definitions),"string"==typeof t.package&&l.push({package:t.package,shortName:n,type:"destination",platform:u||"web"}));if(Mi(e.transformers))for(const[n,t]of Object.entries(e.transformers))a.push(n),Mi(t)&&(Li(r,t.variables),Vi(o,t.definitions),"string"==typeof t.package&&l.push({package:t.package,shortName:n,type:"transformer",platform:u||"web"}))}const p={variables:r,definitions:o,stepNames:{sources:i,destinations:s,transformers:a}};return u&&(p.platform=u),l.length>0&&(p.packages=l),c.length>0&&(p.contract=c),Object.keys(d).length>0&&(p.contractRaw=d),p}function Mi(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ai(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function Li(e,n){if(Mi(n))for(const[t,r]of Object.entries(n))Ai(r)&&(e[t]=r)}function Vi(e,n){if(Mi(n))for(const[t,r]of Object.entries(n))e[t]=r}function Bi(e,n){if(Mi(n))for(const[t,r]of Object.entries(n)){if(t.startsWith("$")||!Mi(r))continue;const n=e.find(e=>e.entity===t),o=Object.keys(r);if(n)for(const e of o)n.actions.includes(e)||n.actions.push(e);else e.push({entity:t,actions:o})}}F();//# sourceMappingURL=index.js.map
|
|
1
|
+
// Ready-to-use demos
|
|
2
|
+
export { DestinationDemo, createCaptureFn, } from './components/demos/DestinationDemo';
|
|
3
|
+
export { DestinationInitDemo } from './components/demos/DestinationInitDemo';
|
|
4
|
+
export { PromotionPlayground } from './components/demos/PromotionPlayground';
|
|
5
|
+
// Alias for backward compatibility with website
|
|
6
|
+
export { DestinationDemo as DestinationPush } from './components/demos/DestinationDemo';
|
|
7
|
+
export { DestinationInitDemo as DestinationInit } from './components/demos/DestinationInitDemo';
|
|
8
|
+
// Organisms
|
|
9
|
+
export { LiveCode } from './components/organisms/live-code';
|
|
10
|
+
export { CollectorBox } from './components/organisms/collector-box';
|
|
11
|
+
export { BrowserBox } from './components/organisms/browser-box';
|
|
12
|
+
// Molecules
|
|
13
|
+
export { ArchitectureFlow } from './components/molecules/architecture-flow';
|
|
14
|
+
export { CodeBox } from './components/molecules/code-box';
|
|
15
|
+
export { CodeSnippet } from './components/molecules/code-snippet';
|
|
16
|
+
export { FlowMap } from './components/molecules/flow-map';
|
|
17
|
+
export { PropertyTable } from './components/molecules/property-table';
|
|
18
|
+
export { Dropdown, DropdownItem, DropdownDivider, } from './components/molecules/dropdown';
|
|
19
|
+
export { Preview } from './components/molecules/preview';
|
|
20
|
+
// Atoms
|
|
21
|
+
export { Code } from './components/atoms/code';
|
|
22
|
+
export { Box } from './components/atoms/box';
|
|
23
|
+
export { Grid } from './components/atoms/grid';
|
|
24
|
+
export { Header } from './components/atoms/header';
|
|
25
|
+
export { Footer } from './components/atoms/footer';
|
|
26
|
+
export { Button } from './components/atoms/button';
|
|
27
|
+
export { ButtonGroup } from './components/atoms/button-group';
|
|
28
|
+
export { ButtonLink } from './components/atoms/button-link';
|
|
29
|
+
export { Spinner } from './components/atoms/spinner';
|
|
30
|
+
export { Icon } from './components/atoms/icons';
|
|
31
|
+
// MDX Integration
|
|
32
|
+
export { MDXProvider } from './providers/MDXProvider';
|
|
33
|
+
export { MDXCode } from './components/atoms/mdx-code';
|
|
34
|
+
// Utility
|
|
35
|
+
export { cn } from './lib/utils';
|
|
36
|
+
// Hooks
|
|
37
|
+
export { useDropdown } from './hooks/useDropdown';
|
|
38
|
+
// Monaco Editor themes
|
|
39
|
+
export { palenightTheme, lighthouseTheme, registerPalenightTheme, registerLighthouseTheme, registerAllThemes, } from './themes';
|
|
40
|
+
// Monaco Editor type registration
|
|
41
|
+
export { registerWalkerOSTypes, initializeMonacoTypes, loadPackageTypes, loadTypeLibraryFromURL, } from './utils/monaco-types';
|
|
42
|
+
// Monaco JSON Schema registry
|
|
43
|
+
export { registerJsonSchema, unregisterJsonSchema, generateModelPath, } from './utils/monaco-json-schema';
|
|
44
|
+
// Schema enrichment
|
|
45
|
+
export { enrichSchema, } from './utils/monaco-schema-enrichment';
|
|
46
|
+
export { enrichFlowConfigSchema } from './utils/monaco-schema-flow-config';
|
|
47
|
+
export { getEnrichedContractSchema } from './utils/monaco-schema-contract';
|
|
48
|
+
export { getVariablesSchema } from './utils/monaco-schema-variables';
|
|
49
|
+
// walkerOS reference decorations
|
|
50
|
+
export { findWalkerOSReferences, applyWalkerOSDecorations, registerWalkerOSDecorationStyles, REFERENCE_PATTERNS, } from './utils/monaco-walkeros-decorations';
|
|
51
|
+
// IntelliSense providers
|
|
52
|
+
export { registerWalkerOSProviders, disposeWalkerOSProviders, setIntelliSenseContext, removeIntelliSenseContext, } from './utils/monaco-walkeros-providers';
|
|
53
|
+
export { validateWalkerOSReferences } from './utils/monaco-walkeros-markers';
|
|
54
|
+
export { extractFlowIntelliSenseContext } from './utils/monaco-intellisense-flow-extractor';
|
|
55
|
+
// Destination helpers
|
|
56
|
+
export { createGtagDestination, createFbqDestination, createPlausibleDestination, } from './helpers/destinations';
|
|
57
|
+
// Capture utilities for destination demos (captureDestinationPush still exported for DestinationDemo)
|
|
58
|
+
export { captureDestinationPush, formatCapturedCalls, createRawCapture, } from './helpers/capture';
|
|
59
|
+
//# sourceMappingURL=index.js.map
|