????

Your IP : 18.216.130.198


Current Path : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/
Upload File :
Current File : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/plugin-data-export-753cb28231788afbcb24.js

/*! For license information please see ../license.txt */
"use strict";(self.webpackChunk_cloudbeaver_product_default=self.webpackChunk_cloudbeaver_product_default||[]).push([[25466],{23651:(e,t,s)=>{s.r(t),s.d(t,{Bootstrap:()=>n});var r=s(1118),i=s(82103),o=s(5576),a=s(77113);let n=class Bootstrap extends i.j{constructor(e){super(),this.dataExportMenuService=e}register(){this.dataExportMenuService.register()}load(){}};n=(0,r.Cg)([(0,o._)(),(0,r.Sn)("design:paramtypes",[a.DataExportMenuService])],n)},77113:(e,t,s)=>{s.r(t),s.d(t,{DataExportMenuService:()=>k});var r=s(1118),i=s(50420),o=s(91135),a=s(49690),n=s(5576),c=s(71635),l=s(34227),d=s(14841),p=s(3942),u=s(72755),h=s(19462),g=s(19617),x=s(44531),S=s(77495),f=s(79023),v=s(72877),m=s(33399),_=s(84823),E=s(26500),P=s(49418),y=s(6335);const C=(0,i.j)((()=>Promise.all([s.e(11502),s.e(7542),s.e(97493),s.e(67557),s.e(25466),s.e(11116),s.e(62570),s.e(95860),s.e(76776)]).then(s.bind(s,86073)).then((e=>e.DataExportDialog))));let k=class DataExportMenuService{constructor(e,t,s,r,i,o){this.commonDialogService=e,this.dataExportSettingsService=t,this.actionService=s,this.menuService=r,this.sessionPermissionsResource=i,this.localizationService=o}register(){this.menuService.addCreator({menus:[m.N],contexts:[_.i,E.$],isApplicable:e=>{const t=e.get(P.$);return!(this.isExportDisabled()||t&&t.type!==P.N.Data)},getItems:(e,t)=>[...t,x.g],orderItems(e,t){const s=(0,S.H)(t,[x.g]);return[...t,...s]}}),this.actionService.addHandler({id:"data-export-base-handler",menus:[m.N],contexts:[_.i,E.$],actions:[x.g],isDisabled(e){const t=e.get(_.i),s=e.get(E.$);return t.isLoading()||t.isDisabled(s)||!t.getResult(s)},getActionInfo:(e,t)=>t===x.g?{...t.info,icon:"table-export"}:t.info,handler:(e,t)=>{const s=e.get(_.i),r=e.get(E.$);if(t===x.g){const e=s.getResult(r);if(!e)throw new Error("Result must be provided");const t=s.source;if(!t.options)throw new Error("Source options must be provided");this.commonDialogService.open(C,{connectionKey:t.options.connectionKey,contextId:t.executionContext?.context?.id,containerNodePath:t.options.containerNodePath,resultId:e.id,name:s.name??void 0,fileName:(0,g.h)(s.name??this.localizationService.translate("data_transfer_dialog_title")),query:t.options.query,filter:{constraints:t.options.constraints,where:t.options.whereFilter}})}}}),this.menuService.addCreator({root:!0,contexts:[d.G],isApplicable:e=>!!e.get(d.G).objectFeatures.includes(p.v.dataContainer)&&(!this.isExportDisabled()&&e.has(o.A)),getItems:(e,t)=>[...t,x.g]}),this.actionService.addHandler({id:"data-export",actions:[x.g],contexts:[o.A,d.G],handler:async e=>{const t=e.get(d.G),s=e.get(o.A),r=(0,g.h)(`${s.name}${t.name?` - ${t.name}`:""}`);this.commonDialogService.open(C,{connectionKey:(0,a.createConnectionParam)(s),name:t.name,fileName:r,containerNodePath:t.id})}})}isExportDisabled(){return!this.sessionPermissionsResource.has(u.y.admin)&&this.dataExportSettingsService.disabled}};k=(0,r.Cg)([(0,n._)(),(0,r.Sn)("design:paramtypes",[c.CommonDialogService,y.DataExportSettingsService,f.ActionService,v.MenuService,h.SessionPermissionsResource,l.LocalizationService])],k)},4809:(e,t,s)=>{s.r(t),s.d(t,{DataExportProcessService:()=>u});var r=s(1118),i=s(5576),o=s(14452),a=s(83336),n=s(10752),c=s(56191),l=s(86718),d=s(77726),p=s(98988);class ExportFromContainerProcess extends d.cY{constructor(e,t){super(),this.graphQLService=e,this.notificationService=t,this.isCancelConfirmed=!1}async start(e,t,s){try{const{taskInfo:r}=await this.graphQLService.sdk.exportDataFromContainer({projectId:e.projectId,connectionId:e.connectionId,containerNodePath:t,parameters:s});return await this.applyResult(r),this.taskId=r.id,this.getState()===d._W.CANCELLING&&await this.cancelAsync(this.taskId),this.statusUpdateProcess(),this.taskId}catch(e){throw this.onError(e),e}}cancel(){this.getState()===d._W.PENDING&&(this.toCancelling(),this.timeout&&this.timeout.cancel())}async statusUpdateProcess(){if(!this.isFinished&&this.taskId)for(;this.isInProgress;){this.getState()===d._W.CANCELLING&&await this.cancelAsync(this.taskId);try{const{taskInfo:e}=await this.graphQLService.sdk.getAsyncTaskInfo({taskId:this.taskId,removeOnFinish:!1});if(await this.applyResult(e),this.isFinished)return}catch(e){this.notificationService.logException(e,"Failed to check async task status")}try{this.timeout=(0,p.S)(1e3),await this.timeout}catch{}}}async cancelAsync(e){if(!this.isCancelConfirmed)try{await this.graphQLService.sdk.asyncTaskCancel({taskId:e}),this.isCancelConfirmed=!0}catch(e){this.getState()===d._W.CANCELLING&&(this.toPending(),this.notificationService.logException(e,"Failed to cancel async task"))}}async applyResult(e){if(!e.running)if(e.error){const t=new l.B(e.error);this.onError(t,e.status)}else e.taskResult?(this.toResolved(e.taskResult),await this.graphQLService.sdk.getAsyncTaskInfo({taskId:e.id,removeOnFinish:!0})):this.onError(new Error("Tasks execution returns no taskResult"),e.status)}onError(e,t){this.getState()===d._W.CANCELLING?this.toCancelled(e):this.toRejected(e)}}class ExportFromResultsProcess extends d.cY{constructor(e,t){super(),this.graphQLService=e,this.notificationService=t,this.isCancelConfirmed=!1}async start(e,t,s,r){try{const{taskInfo:i}=await this.graphQLService.sdk.exportDataFromResults({projectId:e.projectId,connectionId:e.connectionId,contextId:t,resultsId:s,parameters:r});return await this.applyResult(i),this.taskId=i.id,this.getState()===d._W.CANCELLING&&await this.cancelAsync(this.taskId),this.statusUpdateProcess(),this.taskId}catch(e){throw this.onError(e),e}}cancel(){this.getState()===d._W.PENDING&&(this.toCancelling(),this.timeout&&this.timeout.cancel())}async statusUpdateProcess(){if(!this.isFinished&&this.taskId)for(;this.isInProgress;){this.getState()===d._W.CANCELLING&&await this.cancelAsync(this.taskId);try{const{taskInfo:e}=await this.graphQLService.sdk.getAsyncTaskInfo({taskId:this.taskId,removeOnFinish:!1});if(await this.applyResult(e),this.isFinished)return}catch(e){this.notificationService.logException(e,"Failed to check async task status")}try{this.timeout=(0,p.S)(1e3),await this.timeout}catch{}}}async cancelAsync(e){if(!this.isCancelConfirmed)try{await this.graphQLService.sdk.asyncTaskCancel({taskId:e}),this.isCancelConfirmed=!0}catch(e){this.getState()===d._W.CANCELLING&&(this.toPending(),this.notificationService.logException(e,"Failed to cancel async task"))}}async applyResult(e){if(!e.running)if(e.error){const t=new l.B(e.error);this.onError(t,e.status)}else e.taskResult?(this.toResolved(e.taskResult),await this.graphQLService.sdk.getAsyncTaskInfo({taskId:e.id,removeOnFinish:!0})):this.onError(new Error("Tasks execution returns no taskResult"),e.status)}onError(e,t){this.getState()===d._W.CANCELLING?this.toCancelled(e):this.toRejected(e)}}let u=class DataExportProcessService{constructor(e,t){this.graphQLService=e,this.notificationService=t,this.exportProcesses=new n.u((e=>e.taskId))}async cancel(e){const t=this.exportProcesses.get(e);t&&t.process.cancel()}async delete(e){const t=this.exportProcesses.get(e);if(t)try{const e=t.process.getPayload();e&&await this.graphQLService.sdk.removeDataTransferFile({dataFileId:e})}catch(e){this.notificationService.logException(e,"Error occurred while deleting file")}finally{this.exportProcesses.remove(e)}}download(e){const t=this.exportProcesses.get(e);if(!t)return;t.process.getPayload()&&this.exportProcesses.remove(e)}downloadUrl(e){const t=this.exportProcesses.get(e);if(!t)return;const s=t.process.getPayload();return s?c.b.absoluteServiceUrl("/data/",s):void 0}async exportData(e,t){let s;if(e.contextId&&e.resultId?s=await this.exportFromResults(e.connectionKey,e.contextId,e.resultId,t):e.containerNodePath&&(s=await this.exportFromContainer(e.connectionKey,e.containerNodePath,t)),!s)throw new Error("Context data must be provided");return this.exportProcesses.addValue({...s,context:e,parameters:t}),s.taskId}async exportFromContainer(e,t,s){const r=new ExportFromContainerProcess(this.graphQLService,this.notificationService);return{taskId:await r.start(e,t,s),process:r}}async exportFromResults(e,t,s,r){const i=new ExportFromResultsProcess(this.graphQLService,this.notificationService);return{taskId:await i.start(e,t,s,r),process:i}}};u=(0,r.Cg)([(0,i._)(),(0,r.Sn)("design:paramtypes",[a.GraphQLService,o.NotificationService])],u)},53312:(e,t,s)=>{s.r(t),s.d(t,{DataExportService:()=>b});var r=s(1118),i=s(5576),o=s(14452),a=s(4809),n=s(41773),c=s(7838),l=s(17675),d=s(64928),p=s(90447),u=s(80317),h=s(12827),g=s(82614),x=s(9083),S=s(7167),f=s(60738),v=s(89232),m=s(19395),_=s(77726);const E={message:"message___jzuvP theme-typography--body1",sourceName:"sourceName___CzdNB theme-typography--body2",pre:"pre___Un7Rr"};var P=s(94866),y=s(28347),C=s(18699),k=s(34227),I=s(86718),w=s(87518);const N=(0,c.PA)((function ExportNotification({notification:e}){const t=(0,l.W)(),s=(0,d.d)(E),r=function useExportNotification(e){const t=(0,C.h)(a.DataExportProcessService),s=(0,C.h)(k.LocalizationService);return(0,y.G)((()=>({get task(){return this.dataExportProcessService.exportProcesses.get(this.notification.extraProps.source)},get resolved(){return this.task?.process.getState()===_._W.RESOLVED},get sourceName(){return this.task?this.task.context.name?this.task.context.name:this.localizationService.translate("data_transfer_exporting_sql"):""},get downloadUrl(){return this.dataExportProcessService.downloadUrl(this.notification.extraProps.source)},get status(){const e=this.task?.process;switch(e?.getState()){case _._W.PENDING:return{title:"data_transfer_notification_preparation",status:m.R.Loading};case _._W.CANCELLING:return{title:"ui_processing_canceling",status:m.R.Loading};case _._W.RESOLVED:return{title:"data_transfer_notification_ready",status:m.R.Info};case _._W.CANCELLED:return{title:"data_transfer_notification_cancelled",status:m.R.Info};default:{const t=e?.getRejectionReason(),s=(0,w.M)(t,I.B);let r="data_transfer_notification_error",i=m.R.Error,o="";return s&&s.errorType===I.i.QUOTE_EXCEEDED&&(r="app_root_quota_exceeded",i=m.R.Info,o=s.message),{title:r,status:i,message:o}}}},delete(){this.dataExportProcessService.delete(this.notification.extraProps.source),this.notification.close(!1)},download(){this.dataExportProcessService.download(this.notification.extraProps.source),this.notification.close(!1)},cancel(){this.dataExportProcessService.cancel(this.notification.extraProps.source)}})),{resolved:P.EW,task:P.EW,sourceName:P.EW,status:P.EW,delete:P.XI.bound,download:P.XI.bound,cancel:P.XI.bound},{notification:e,dataExportProcessService:t,localizationService:s})}(e),i=(0,p.s)(r.task?.process.getRejectionReason()??null),{title:o,status:c,message:N}=r.status;return(0,n.jsxs)(u.f,{persistent:c===m.R.Loading,onClose:r.delete,children:[(0,n.jsx)(h.Q,{status:c}),(0,n.jsxs)(g.Z,{children:[(0,n.jsxs)(x.Q,{title:t(o),children:[N&&(0,n.jsx)("div",{className:(0,S.s)(s,{message:!0}),children:N}),(0,n.jsxs)("div",{className:(0,S.s)(s,{sourceName:!0}),children:[r.sourceName,r.task?.context.query&&(0,n.jsx)("pre",{className:(0,S.s)(s,{pre:!0}),title:r.task.context.query,children:r.task.context.query})]})]}),(0,n.jsxs)(f.J,{timestamp:e.timestamp,children:[c===m.R.Info&&r.downloadUrl&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.$,{type:"button",mod:["outlined"],onClick:r.delete,children:t("ui_processing_cancel")}),(0,n.jsx)(v.$,{tag:"a",href:r.downloadUrl,mod:["unelevated"],download:!0,onClick:r.download,children:t("data_transfer_notification_download")})]}),c===m.R.Error&&(0,n.jsx)(v.$,{type:"button",mod:["outlined"],disabled:i.isOpen,onClick:i.open,children:t("ui_errors_details")}),c===m.R.Loading&&(0,n.jsx)(v.$,{type:"button",mod:["outlined"],disabled:r.task?.process.getState()===_._W.CANCELLING,onClick:r.cancel,children:t("ui_processing_cancel")})]})]})]})}));let b=class DataExportService{constructor(e,t){this.notificationService=e,this.dataExportProcessService=t}async cancel(e){await this.dataExportProcessService.cancel(e)}async delete(e){await this.dataExportProcessService.delete(e)}download(e){this.dataExportProcessService.download(e)}async exportData(e,t){const s=await this.dataExportProcessService.exportData(e,t);return this.notificationService.customNotification((()=>N),{source:s}),s}};b=(0,r.Cg)([(0,i._)(),(0,r.Sn)("design:paramtypes",[o.NotificationService,a.DataExportProcessService])],b)},6335:(e,t,s)=>{s.r(t),s.d(t,{DataExportSettingsService:()=>g});var r=s(1118),i=s(63716),o=s(5576),a=s(76761),n=s(70446),c=s(83916),l=s(80625),d=s(82607),p=s(3065),u=s(31038);const h=p.Ik({"plugin.data-export.disabled":u.W.stringedBoolean().default(!1)});let g=class DataExportSettingsService extends i.O{get disabled(){return this.settings.getValue("plugin.data-export.disabled")}constructor(e,t,s){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settingsResolverService=s,this.settings=this.settingsProviderService.createSettings(h),this.settingsResolverService.addResolver(a.T,(0,n.q)(this.settingsResolverService,this.settings,{"plugin.data-export.disabled":"plugin_data_export.disabled"})),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};g=(0,r.Cg)([(0,o._)(),(0,r.Sn)("design:paramtypes",[c.SettingsProviderService,l.SettingsManagerService,d.SettingsResolverService])],g)},72191:(e,t,s)=>{s.r(t),s.d(t,{DataTransferProcessorsResource:()=>l});var r=s(1118),i=s(5576),o=s(40813),a=s(7278),n=s(40601),c=s(83336);let l=class DataTransferProcessorsResource extends o.nG{constructor(e,t){super((()=>new Map)),this.graphQLService=e,this.sync(t,(()=>{}),(()=>o.fZ))}async loader(){const{processors:e}=await this.graphQLService.sdk.getDataTransferProcessors();return this.replace((0,a.OU)(e.map((e=>e.id))),e),this.data}validateKey(e){return"string"==typeof e}};l=(0,r.Cg)([(0,i._)(),(0,r.Sn)("design:paramtypes",[c.GraphQLService,n.ServerConfigResource])],l)},86073:(e,t,s)=>{s.r(t),s.d(t,{DataExportDialog:()=>ee});var r,i=s(41773),o=s(7838),a=s(84383),n=s(69737);!function(e){e[e.DataTransferProcessor=0]="DataTransferProcessor",e[e.Configure=1]="Configure"}(r||(r={}));var c=s(15993),l=s(17675),d=s(64928),p=s(90447),u=s(51477),h=s(7167),g=s(62204),x=s(92659),S=s(44483),f=s(20272),v=s(9428),m=s(22321),_=s(44451),E=s(43659),P=s(19259),y=s(69519),C=s(76652),k=s(86795),I=s(15380);const w=(0,o.PA)((function OutputOptionsForm(e){const t=(0,l.W)(),s=(0,a.q)(OutputOptionsForm,n.DefaultExportOutputSettingsResource,void 0);return(0,i.jsx)(y.a,{state:s,children:()=>{const r=s.data;return r?(0,i.jsx)(C.m,{gap:!0,parent:!0,children:(0,i.jsxs)(C.m,{wrap:!0,gap:!0,flexEnd:!0,children:[(0,i.jsx)(k.G,{name:"encoding",state:e.outputSettings,items:r.supportedEncodings,tiny:!0,searchable:!0,children:"Encoding"}),(0,i.jsxs)(C.m,{vertical:!0,gap:!0,children:[(0,i.jsx)(I.G,{name:"insertBom",state:e.outputSettings,small:!0,children:"Insert BOM"}),(0,i.jsx)(I.G,{name:"compress",state:e.outputSettings,small:!0,children:t("data_transfer_output_settings_compress")})]})]})}):null}})})),N={container:"container___a6Yv0",propertiesTable:"propertiesTable___mylnO",errorMessage:"errorMessage___CG8yv theme-background-secondary theme-text-on-secondary",tabList:"tabList___k1e4b"};var b=s(89232),j=s(68426);const D={controls:"controls____4Qm1"},R=(0,o.PA)((function ProcessorConfigureDialogFooter({isExporting:e,isFinalStep:t,onCancel:s,onExport:r,onBack:o,onNext:a}){const n=(0,l.W)(),c=(0,d.d)(D);return(0,i.jsxs)("div",{className:(0,h.s)(c,{controls:!0}),children:[(0,i.jsx)(b.$,{type:"button",mod:["outlined"],disabled:e,onClick:o,children:n("ui_stepper_back")}),(0,i.jsx)(j.S,{}),(0,i.jsx)(b.$,{type:"button",mod:["outlined"],disabled:e,onClick:s,children:n("ui_processing_cancel")}),t?(0,i.jsx)(b.$,{type:"button",mod:["unelevated"],disabled:e,onClick:r,children:n("data_transfer_dialog_export")}):(0,i.jsx)(b.$,{type:"button",mod:["unelevated"],disabled:e,onClick:a,children:n("ui_stepper_next")})]})}));var L;!function(e){e.EXTRACTION="EXTRACTION",e.OUTPUT="OUTPUT"}(L||(L={}));const T=(0,o.PA)((function ProcessorConfigureDialog({processor:e,properties:t,processorProperties:s,outputSettings:r,error:o,isExporting:a,onClose:n,onBack:y,onExport:C}){const k=(0,l.W)(),I=(0,d.d)(N),b=`${k("data_transfer_dialog_configuration_title")} (${e.name})`,[j,D]=(0,c.useState)(L.EXTRACTION),T=(0,p.s)(o);return(0,i.jsxs)(u.n,{className:(0,h.s)(I,{container:!0}),size:"large",fixedSize:!0,children:[(0,i.jsx)(g.D,{title:b,onReject:n}),(0,i.jsxs)(x.a,{noOverflow:!0,noBodyPadding:!0,children:[e.isBinary?null:(0,i.jsx)(m._,{currentTabId:j,onChange:function handleTabChange(e){D(e.tabId)},children:(0,i.jsxs)(_.w,{className:(0,h.s)(I,{tabList:!0}),"aria-label":"Export Settings tabs",underline:!0,children:[(0,i.jsx)(E.o,{tabId:L.EXTRACTION,children:(0,i.jsx)(P.I,{children:k("data_transfer_format_settings")})}),(0,i.jsx)(E.o,{tabId:L.OUTPUT,children:(0,i.jsx)(P.I,{children:k("data_transfer_output_settings")})})]})}),j===L.EXTRACTION?(0,i.jsx)(S.k,{className:(0,h.s)(I,{propertiesTable:!0}),properties:t,propertiesState:s}):(0,i.jsx)(w,{outputSettings:r}),o&&(0,i.jsx)(f.K,{className:(0,h.s)(I,{errorMessage:!0}),text:T.message??k("core_blocks_exception_message_error_message"),hasDetails:T.hasDetails,onShowDetails:T.open})]}),(0,i.jsx)(v.Z,{children:(0,i.jsx)(R,{isExporting:a,isFinalStep:j===L.OUTPUT||!!e.isBinary,onExport:C,onBack:function handleBackClick(){j===L.OUTPUT?D(L.EXTRACTION):y()},onCancel:n,onNext:function handleNextClick(){D(L.OUTPUT)}})})]})}));var A=s(40813),O=s(72191),F=s(23089),G=s(10041),W=s(44880),U=s(7994),Q=s(60233),z=s(66079);const B="staticImage___nYiHY",$=(0,o.PA)((function ProcessorItem({processor:e,onSelect:t}){const s=(0,c.useCallback)((()=>t(e.id)),[e]);return(0,i.jsxs)(G.c,{onClick:s,children:[(0,i.jsx)(W.L,{children:(0,i.jsx)(U.i,{className:B,icon:e.icon})}),(0,i.jsx)(Q.z,{children:e.name}),(0,i.jsx)(z.U,{title:e.description,children:e.description})]})})),M=(0,o.PA)((function ExportProcessorList({processors:e,onSelect:t,className:s}){return(0,i.jsx)(F.k,{className:s,children:e.map((e=>(0,i.jsx)($,{processor:e,onSelect:t},e.id)))})})),q={exportProcessorList:"exportProcessorList___JFv3W",exportObject:"exportObject___IsPBj theme-typography--body2",pre:"pre___jJL59 theme-typography--caption"},X=(0,o.PA)((function ProcessorSelectDialog({context:e,onSelect:t,onClose:s}){const r=(0,d.d)(q),o=(0,a.q)(ProcessorSelectDialog,O.DataTransferProcessorsResource,A.fZ,{forceSuspense:!0}).resource.values.slice().sort(sortProcessors);return(0,i.jsxs)(u.n,{size:"large",fixedSize:!0,children:[(0,i.jsx)(g.D,{title:"data_transfer_dialog_title",subTitle:e.name,onReject:s}),(0,i.jsxs)(x.a,{noBodyPadding:!0,noOverflow:!0,children:[e.query&&(0,i.jsx)("div",{className:(0,h.s)(r,{exportObject:!0}),children:(0,i.jsx)("pre",{className:(0,h.s)(r,{pre:!0}),title:e.query,children:e.query})}),(0,i.jsx)(M,{className:(0,h.s)(r,{exportProcessorList:!0}),processors:o,onSelect:t})]})]})}));function sortProcessors(e,t){return e.order===t.order?(e.name||"").localeCompare(t.name||""):e.order-t.order}var H=s(94866),V=s(28347),K=s(18699),Y=s(14452),Z=s(34227),J=s(53312);const ee=(0,o.PA)((function DataExportDialog({payload:e,rejectDialog:t}){(0,a.q)(DataExportDialog,n.DefaultExportOutputSettingsResource,void 0,{forceSuspense:!0});const s=function useDataExportDialog(e,t){const s=(0,K.h)(Y.NotificationService),i=(0,K.h)(Z.LocalizationService),o=(0,K.h)(J.DataExportService),a=(0,K.h)(n.DefaultExportOutputSettingsResource),c=(0,K.h)(O.DataTransferProcessorsResource);return(0,V.G)((()=>({get properties(){return this.processor?.properties?this.processor.properties.map((e=>({id:e.id,key:e.id,displayName:e.displayName,description:e.description,validValues:e.validValues,defaultValue:e.defaultValue,valuePlaceholder:e.defaultValue}))):[]},step:r.DataTransferProcessor,processing:!1,processor:null,processorProperties:{},outputSettings:{},exception:null,setStep(e){this.step=e},async selectProcessor(e){try{this.processor=await this.dataTransferProcessorsResource.load(e);const t=await this.defaultExportOutputSettingsResource.load();t&&(this.outputSettings=(0,H.HO)(t.outputSettings)),this.processorProperties={},this.setStep(r.Configure),this.exception=null}catch(e){this.notificationService.logException(e,this.localizationService.translate("data_transfer_dialog_select_processor_fail"))}},async export(){if(this.processor&&!this.processing){this.processing=!0,this.exception=null;try{await this.dataExportService.exportData(this.context,{processorId:this.processor.id,processorProperties:this.processorProperties,filter:this.context.filter,outputSettings:{...this.outputSettings,fileName:this.context.fileName}}),this.onExport?.()}catch(e){this.exception=e}finally{this.processing=!1}}}})),{processorProperties:H.sH,outputSettings:H.sH,processor:H.sH.ref,step:H.sH.ref,exception:H.sH.ref,processing:H.sH.ref,properties:H.EW,setStep:H.XI.bound,export:H.XI.bound,selectProcessor:H.XI.bound},{context:e,onExport:t,notificationService:s,dataExportService:o,localizationService:i,defaultExportOutputSettingsResource:a,dataTransferProcessorsResource:c})}(e,t);return s.step===r.Configure&&s.processor?(0,i.jsx)(T,{processor:s.processor,properties:s.properties,processorProperties:s.processorProperties,error:s.exception,isExporting:s.processing,outputSettings:s.outputSettings,onBack:()=>s.setStep(r.DataTransferProcessor),onClose:t,onExport:s.export}):(0,i.jsx)(X,{context:e,onSelect:s.selectProcessor,onClose:t})}))},69737:(e,t,s)=>{s.r(t),s.d(t,{DefaultExportOutputSettingsResource:()=>n});var r=s(1118),i=s(5576),o=s(20839),a=s(83336);let n=class DefaultExportOutputSettingsResource extends o.V{constructor(e){super((()=>null)),this.graphQLService=e}async loader(){return(await this.graphQLService.sdk.getDataTransferDefaultParameters()).settings}};n=(0,r.Cg)([(0,i._)(),(0,r.Sn)("design:paramtypes",[a.GraphQLService])],n)},98944:(e,t,s)=>{s.r(t),s.d(t,{LocaleService:()=>n});var r=s(1118),i=s(82103),o=s(5576),a=s(34227);let n=class LocaleService extends i.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([s.e(92436),s.e(20109)]).then(s.bind(s,94676))).default;case"it":return(await Promise.all([s.e(32756),s.e(42490)]).then(s.bind(s,19108))).default;case"zh":return(await Promise.all([s.e(52041),s.e(64871)]).then(s.bind(s,41199))).default;case"fr":return(await Promise.all([s.e(29671),s.e(87252)]).then(s.bind(s,89909))).default;default:return(await Promise.all([s.e(41114),s.e(88681)]).then(s.bind(s,99162))).default}}};n=(0,r.Cg)([(0,o._)(),(0,r.Sn)("design:paramtypes",[a.LocalizationService])],n)}}]);