{"version":3,"sources":["webpack:///./src/lib/components/DownloadConfig/DownloadConfig.less?4c48","../../node_modules/.pnpm/@ant-design+icons@4.7.0_react-dom@17.0.2_react@17.0.2/node_modules/@ant-design/icons/lib/icons/CloudDownloadOutlined.js","../../node_modules/.pnpm/@ant-design+icons-svg@4.2.1/node_modules/@ant-design/icons-svg/lib/asn/CloudDownloadOutlined.js","lib/components/DownloadConfig/DownloadConfig.tsx"],"names":["_interopRequireWildcard","require","_interopRequireDefault","Object","defineProperty","exports","value","default","_objectSpread2","React","_CloudDownloadOutlined","_AntdIcon","CloudDownloadOutlined","props","ref","createElement","icon","displayName","_default","forwardRef","download","filename","text","element","document","setAttribute","encodeURIComponent","style","display","body","appendChild","click","removeChild","DownloadConfig","context","services","ApplicationServices","get","backendApiClient","getRaw","activeProject","id","code","state","LoadableComponent","withPermissionRequirement","ProjectPermission","MODIFY_CONFIG"],"mappings":";;;;;AAAA,uC;;;;;;;;ACAa;;AAEb,IAAIA,uBAAuB,GAAGC,mBAAO,CAAC,EAAD,CAArC;;AAEA,IAAIC,sBAAsB,GAAGD,mBAAO,CAAC,CAAD,CAApC;;AAEAE,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;EAC3CC,KAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAACE,OAAR,GAAkB,KAAK,CAAvB;;AAEA,IAAIC,cAAc,GAAGN,sBAAsB,CAACD,mBAAO,CAAC,EAAD,CAAR,CAA3C;;AAEA,IAAIQ,KAAK,GAAGT,uBAAuB,CAACC,mBAAO,CAAC,CAAD,CAAR,CAAnC;;AAEA,IAAIS,sBAAsB,GAAGR,sBAAsB,CAACD,mBAAO,CAAC,IAAD,CAAR,CAAnD;;AAEA,IAAIU,SAAS,GAAGT,sBAAsB,CAACD,mBAAO,CAAC,EAAD,CAAR,CAAtC,C,CAEA;AACA;;;AACA,IAAIW,qBAAqB,GAAG,SAASA,qBAAT,CAA+BC,KAA/B,EAAsCC,GAAtC,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kFAAiB,CAACC,aAAnC,CAAxC,E","file":"static/js/126.59839fc8.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _CloudDownloadOutlined = _interopRequireDefault(require(\"@ant-design/icons-svg/lib/asn/CloudDownloadOutlined\"));\n\nvar _AntdIcon = _interopRequireDefault(require(\"../components/AntdIcon\"));\n\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nvar CloudDownloadOutlined = function CloudDownloadOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {\n ref: ref,\n icon: _CloudDownloadOutlined.default\n }));\n};\n\nCloudDownloadOutlined.displayName = 'CloudDownloadOutlined';\n\nvar _default = /*#__PURE__*/React.forwardRef(CloudDownloadOutlined);\n\nexports.default = _default;","\"use strict\";\n// This icon file is generated automatically.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CloudDownloadOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z\" } }] }, \"name\": \"cloud-download\", \"theme\": \"outlined\" };\nexports.default = CloudDownloadOutlined;\n","import React, { ReactElement, ReactNode, useEffect, useState } from \"react\"\nimport { CodeSnippet, LoadableComponent } from \"../components\"\nimport ApplicationServices from \"../../services/ApplicationServices\"\nimport \"./DownloadConfig.less\"\nimport CloudDownloadOutlined from \"@ant-design/icons/lib/icons/CloudDownloadOutlined\"\nimport { withPermissionRequirement } from \"../../services/permissions\"\nimport { ProjectPermission } from \"../../../generated/conf-openapi\"\n\ntype State = {\n code: string\n}\n\nfunction download(filename, text) {\n let element = document.createElement(\"a\")\n element.setAttribute(\"href\", \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text))\n element.setAttribute(\"download\", filename)\n\n element.style.display = \"none\"\n document.body.appendChild(element)\n\n element.click()\n\n document.body.removeChild(element)\n}\n\nclass DownloadConfig extends LoadableComponent<{}, State> {\n private readonly services: ApplicationServices = ApplicationServices.get()\n\n constructor(props: Readonly<{}>, context) {\n super(props, context)\n }\n\n protected async load(): Promise {\n return {\n code: await this.services.backendApiClient.getRaw(\n `/jitsu/configuration?project_id=${this.services.activeProject.id}`\n ),\n }\n }\n\n protected renderReady(): React.ReactNode {\n return (\n <>\n
\n If you want to host your own instance of{\" \"}\n \n Jitsu Server\n {\" \"}\n you can use this configuration file. Note: although it includes all your keys, destinations, sources you\n should add your{\" \"}\n \n meta.storage (Redis) configuration\n {\" \"}\n by yourself.{\" \"}\n \n Jitsu can be deployed just in a few clicks!\n \n
\n {\n download(\"eventnative.yaml\", this.state.code)\n }}\n >\n ./eventnative.yaml \n \n }\n >\n {this.state.code}\n \n \n )\n }\n}\n\nexport default withPermissionRequirement(DownloadConfig, ProjectPermission.MODIFY_CONFIG)\n"],"sourceRoot":""}