@magic-xpa/engine 4.1100.0-dev4110.24 → 4.1100.0-dev4110.241
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +416 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/esm2022/src/CommandsProcessorManager.mjs +26 -0
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +37 -0
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +866 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/esm2022/src/env/MirrorString.mjs +65 -0
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +880 -0
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
- package/esm2022/src/rt/ExecutionStack.mjs +94 -0
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/esm2022/src/rt/HandlersTable.mjs +96 -0
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/esm2022/src/rt/RecomputeTable.mjs +63 -0
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
- package/esm2022/src/util/ConstUtils.mjs +14 -0
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/esm2022/src/util/HeapSort.mjs +70 -0
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/esm2022/src/util/cookie.service.mjs +92 -0
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29797 -29693
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +15 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +3 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +156 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsProcessorManager.mjs +0 -26
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
- package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Key.mjs +0 -88
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/env/MirrorString.mjs +0 -65
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
- package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
- package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
- package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
- package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
- package/esm2020/src/rt/ExecutionStack.mjs +0 -94
- package/esm2020/src/rt/HandlersTable.mjs +0 -96
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/RecomputeTable.mjs +0 -63
- package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
- package/esm2020/src/tasks/Task.mjs +0 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,16 +1,16 @@
|
|
1
|
-
import { ApplicationException } from "@magic-xpa/mscorelib";
|
2
|
-
export var RecordOutOfDataViewException_ExceptionType;
|
3
|
-
(function (RecordOutOfDataViewException_ExceptionType) {
|
4
|
-
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["TOP"] = 0] = "TOP";
|
5
|
-
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["BOTTOM"] = 1] = "BOTTOM";
|
6
|
-
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["REC_SUFFIX_FAILED"] = 2] = "REC_SUFFIX_FAILED";
|
7
|
-
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["NONE"] = 3] = "NONE";
|
8
|
-
})(RecordOutOfDataViewException_ExceptionType || (RecordOutOfDataViewException_ExceptionType = {}));
|
9
|
-
export class RecordOutOfDataViewException extends ApplicationException {
|
10
|
-
constructor(type) {
|
11
|
-
super((type === RecordOutOfDataViewException_ExceptionType.REC_SUFFIX_FAILED) ? "Record Suffix Failed" :
|
12
|
-
("Record out of the " + ((type === RecordOutOfDataViewException_ExceptionType.TOP) ? "top" : "bottom") + " bound of the Data View"));
|
13
|
-
this.name = "RecordOutOfDataViewException";
|
14
|
-
}
|
15
|
-
}
|
1
|
+
import { ApplicationException } from "@magic-xpa/mscorelib";
|
2
|
+
export var RecordOutOfDataViewException_ExceptionType;
|
3
|
+
(function (RecordOutOfDataViewException_ExceptionType) {
|
4
|
+
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["TOP"] = 0] = "TOP";
|
5
|
+
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["BOTTOM"] = 1] = "BOTTOM";
|
6
|
+
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["REC_SUFFIX_FAILED"] = 2] = "REC_SUFFIX_FAILED";
|
7
|
+
RecordOutOfDataViewException_ExceptionType[RecordOutOfDataViewException_ExceptionType["NONE"] = 3] = "NONE";
|
8
|
+
})(RecordOutOfDataViewException_ExceptionType || (RecordOutOfDataViewException_ExceptionType = {}));
|
9
|
+
export class RecordOutOfDataViewException extends ApplicationException {
|
10
|
+
constructor(type) {
|
11
|
+
super((type === RecordOutOfDataViewException_ExceptionType.REC_SUFFIX_FAILED) ? "Record Suffix Failed" :
|
12
|
+
("Record out of the " + ((type === RecordOutOfDataViewException_ExceptionType.TOP) ? "top" : "bottom") + " bound of the Data View"));
|
13
|
+
this.name = "RecordOutOfDataViewException";
|
14
|
+
}
|
15
|
+
}
|
16
16
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb3JkT3V0T2ZEYXRhVmlld0V4Y2VwdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvZGF0YS9SZWNvcmRPdXRPZkRhdGFWaWV3RXhjZXB0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxvQkFBb0IsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBRTFELE1BQU0sQ0FBTixJQUFZLDBDQUtYO0FBTEQsV0FBWSwwQ0FBMEM7SUFDcEQseUdBQUcsQ0FBQTtJQUNILCtHQUFNLENBQUE7SUFDTixxSUFBaUIsQ0FBQTtJQUNqQiwyR0FBSSxDQUFBO0FBQ04sQ0FB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2VwdGlvblR5cGUpIHtcclxuICAgIHN1cGVyKCh0eXBlID09PSBSZWNvcmRPdXRPZkRhdGFWaWV3RXhjZXB0aW9uX0V4Y2VwdGlvblR5cGUuUkVDX1NVRkZJWF9GQUlMRUQpID8gXCJSZWNvcmQgU3VmZml4IEZhaWxlZFwiIDpcclxuICAgICAgKFwiUmVjb3JkIG91dCBvZiB0aGUgXCIgKyAoKHR5cGUgPT09IFJlY29yZE91dE9mRGF0YVZpZXdFeGNlcHRpb25fRXhjZXB0aW9uVHlwZS5UT1ApID8gXCJ0b3BcIiA6IFwiYm90dG9tXCIpICsgXCIgYm91bmQgb2YgdGhlIERhdGEgVmlld1wiKSk7XHJcbiAgICB0aGlzLm5hbWUgPSBcIlJlY29yZE91dE9mRGF0YVZpZXdFeGNlcHRpb25cIjtcclxuICB9XHJcbn1cclxuIl19
|
@@ -0,0 +1,267 @@
|
|
1
|
+
import { Record } from "./Record";
|
2
|
+
import { DataModificationTypes } from "@magic-xpa/gui";
|
3
|
+
import { ApplicationException, Hashtable, Int32, List } from "@magic-xpa/mscorelib";
|
4
|
+
import { Logger } from "@magic-xpa/utils";
|
5
|
+
export class RecordsTable {
|
6
|
+
static REC_NOT_FOUND = -1;
|
7
|
+
_useLinkedList = false;
|
8
|
+
_hashTab = null;
|
9
|
+
_initialCurrRecId = Int32.MinValue;
|
10
|
+
_records = null;
|
11
|
+
_serverCurrRec = null;
|
12
|
+
InsertedRecordsCount = 0;
|
13
|
+
constructor(withLinkedListOrRecordTable) {
|
14
|
+
if (withLinkedListOrRecordTable.constructor === Boolean) {
|
15
|
+
this._records = new List();
|
16
|
+
this._hashTab = new Hashtable(100, 0.7);
|
17
|
+
this._useLinkedList = withLinkedListOrRecordTable;
|
18
|
+
this.InsertedRecordsCount = Int32.MinValue;
|
19
|
+
}
|
20
|
+
else
|
21
|
+
Object.assign(this, withLinkedListOrRecordTable);
|
22
|
+
}
|
23
|
+
fillData(dataview, insertAt, parser) {
|
24
|
+
let c = 'N';
|
25
|
+
let record = null;
|
26
|
+
let flag = false;
|
27
|
+
this.InsertedRecordsCount = 0;
|
28
|
+
this._initialCurrRecId = Int32.MinValue;
|
29
|
+
let nextTag = parser.getNextTag();
|
30
|
+
while (nextTag !== null && nextTag === "rec") {
|
31
|
+
let record2 = new Record(dataview);
|
32
|
+
record2.Initialize();
|
33
|
+
let isCurrRec = record2.fillData(parser);
|
34
|
+
if (isCurrRec && !dataview.HasMainTable) {
|
35
|
+
let dcRefs2;
|
36
|
+
let dcRefs = dcRefs2 = record2.getDcRefs();
|
37
|
+
try {
|
38
|
+
for (let i = 0; i < this.getSize(); i = i + 1) {
|
39
|
+
this.getRecByIdx(i).setDcRefs(dcRefs);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
finally {
|
43
|
+
if (dcRefs2 !== null) {
|
44
|
+
(dcRefs2).Dispose();
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
if (isCurrRec) {
|
49
|
+
if (dataview.getTask().getMode() !== 'C') {
|
50
|
+
record2.setOldRec();
|
51
|
+
}
|
52
|
+
this._initialCurrRecId = record2.getId();
|
53
|
+
this._serverCurrRec = record2.replicate();
|
54
|
+
if (c === 'N') {
|
55
|
+
c = 'C';
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
c = 'F';
|
59
|
+
}
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
record2.setOldRec();
|
63
|
+
c = 'T';
|
64
|
+
}
|
65
|
+
let foundRec = this.getRecord(record2.getId());
|
66
|
+
if (foundRec !== null) {
|
67
|
+
let updated = foundRec.Updated;
|
68
|
+
let modified = foundRec.Modified;
|
69
|
+
let computed = foundRec.isComputed();
|
70
|
+
let prevRec = foundRec.getPrevRec();
|
71
|
+
let nextRec = foundRec.getNextRec();
|
72
|
+
foundRec.setSameAs(record2, false);
|
73
|
+
foundRec.setPrevRec(prevRec);
|
74
|
+
foundRec.setNextRec(nextRec);
|
75
|
+
foundRec.setComputed(computed);
|
76
|
+
if (modified)
|
77
|
+
foundRec.setModified();
|
78
|
+
if (updated)
|
79
|
+
foundRec.setUpdated();
|
80
|
+
}
|
81
|
+
else {
|
82
|
+
this.InsertRecord(insertAt, record2);
|
83
|
+
if (dataview.getTask().isTableWithAbsolutesScrollbar()) {
|
84
|
+
if (dataview.TotalRecordsCount === 0 && dataview.RecordsBeforeCurrentView == 0)
|
85
|
+
dataview.TotalRecordsCount = dataview.TotalRecordsCount + 1;
|
86
|
+
if (dataview.RecordsBeforeCurrentView > 0 && insertAt === 'B')
|
87
|
+
dataview.RecordsBeforeCurrentView = dataview.RecordsBeforeCurrentView - 1;
|
88
|
+
}
|
89
|
+
if (isCurrRec && dataview.getTask().getMode() === 'C')
|
90
|
+
record2.setMode(DataModificationTypes.Insert);
|
91
|
+
record2.setComputed(true);
|
92
|
+
}
|
93
|
+
nextTag = parser.getNextTag();
|
94
|
+
if (!isCurrRec)
|
95
|
+
record = record2;
|
96
|
+
flag = true;
|
97
|
+
}
|
98
|
+
let num = 0;
|
99
|
+
while (!dataview.HasMainTable && record !== null && num < dataview.getChunkSize() - 1) {
|
100
|
+
let record4 = new Record(dataview);
|
101
|
+
record4.Initialize();
|
102
|
+
record4.setSameAs(record, false, record.getId() + num + 1);
|
103
|
+
record4.setOldRec();
|
104
|
+
this.addRec(record4);
|
105
|
+
num = num + 1;
|
106
|
+
}
|
107
|
+
if (this._initialCurrRecId === Int32.MinValue) {
|
108
|
+
if (flag)
|
109
|
+
this._serverCurrRec = null;
|
110
|
+
else {
|
111
|
+
if (dataview.getCurrRec() !== null)
|
112
|
+
this._serverCurrRec = (dataview.getCurrRec()).replicate();
|
113
|
+
else
|
114
|
+
this._serverCurrRec = null;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
return c;
|
118
|
+
}
|
119
|
+
InsertRecord(insertAt, record) {
|
120
|
+
if (insertAt === 'B') {
|
121
|
+
let insertedRecordsCount = this.InsertedRecordsCount;
|
122
|
+
this.InsertedRecordsCount = insertedRecordsCount + 1;
|
123
|
+
this.insertRecord(record, 0);
|
124
|
+
}
|
125
|
+
else
|
126
|
+
this.addRec(record);
|
127
|
+
}
|
128
|
+
buildXML(message, skipCurrRec, currRecId) {
|
129
|
+
for (let i = 0; i < this._records.length; i = i + 1) {
|
130
|
+
let record = this._records.get_Item(i);
|
131
|
+
if (!record.SendToServer || (skipCurrRec && record.getId() === currRecId))
|
132
|
+
continue;
|
133
|
+
let prevRec;
|
134
|
+
let record2 = prevRec = record.getPrevRec();
|
135
|
+
let recIdx;
|
136
|
+
while (prevRec !== null && typeof prevRec !== "undefined" &&
|
137
|
+
(prevRec.getMode() === DataModificationTypes.Insert || !prevRec.SendToServer) &&
|
138
|
+
record.getMode() === DataModificationTypes.Insert &&
|
139
|
+
((recIdx = this.getRecIdx(prevRec.getId())) > i || recIdx === RecordsTable.REC_NOT_FOUND || !prevRec.SendToServer)) {
|
140
|
+
prevRec = prevRec.getPrevRec();
|
141
|
+
record.setPrevRec(prevRec);
|
142
|
+
}
|
143
|
+
record.buildXML(message, false);
|
144
|
+
if (prevRec !== record2) {
|
145
|
+
record.setPrevRec(record2);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
getRecord(id) {
|
150
|
+
return this._hashTab.get_Item(id);
|
151
|
+
}
|
152
|
+
getRecIdx(id) {
|
153
|
+
let result = RecordsTable.REC_NOT_FOUND;
|
154
|
+
let record = this.getRecord(id);
|
155
|
+
if (record !== null) {
|
156
|
+
result = this._records.indexOf(record);
|
157
|
+
}
|
158
|
+
return result;
|
159
|
+
}
|
160
|
+
getRecByIdx(idx) {
|
161
|
+
if (idx < 0 || idx >= this._records.length) {
|
162
|
+
Logger.Instance.WriteDevToLog("in RecordsTable.getRecByIdx() index out of bounds: " + idx);
|
163
|
+
return null;
|
164
|
+
}
|
165
|
+
return this._records.get_Item(idx);
|
166
|
+
}
|
167
|
+
removeAll() {
|
168
|
+
this._records.Clear();
|
169
|
+
this._hashTab.Clear();
|
170
|
+
}
|
171
|
+
getSize() {
|
172
|
+
return this._records.length;
|
173
|
+
}
|
174
|
+
getInitialCurrRecId() {
|
175
|
+
return this._initialCurrRecId;
|
176
|
+
}
|
177
|
+
addRecord(rec) {
|
178
|
+
if (this._records.indexOf(rec) < 0) {
|
179
|
+
this.addRec(rec);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
addRec(rec) {
|
183
|
+
if (this._useLinkedList && this._records.length > 0) {
|
184
|
+
let record = this._records.get_Item(this._records.length - 1);
|
185
|
+
record.setNextRec(rec);
|
186
|
+
rec.setPrevRec(record);
|
187
|
+
}
|
188
|
+
this._records.push(rec);
|
189
|
+
this._hashTab.set_Item(rec.getHashKey(), rec);
|
190
|
+
}
|
191
|
+
insertRecord(rec, idx) {
|
192
|
+
if (this._useLinkedList) {
|
193
|
+
if (idx > 0) {
|
194
|
+
let record = this._records.get_Item(idx - 1);
|
195
|
+
rec.setPrevRec(record);
|
196
|
+
record.setNextRec(rec);
|
197
|
+
}
|
198
|
+
if (idx !== this._records.length) {
|
199
|
+
let record2 = this._records.get_Item(idx);
|
200
|
+
rec.setNextRec(record2);
|
201
|
+
record2.setPrevRec(rec);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
this._records.Insert(idx, rec);
|
205
|
+
this._hashTab.set_Item(rec.getHashKey(), rec);
|
206
|
+
}
|
207
|
+
removeRecord(recIdxOrRec) {
|
208
|
+
if (arguments.length === 1 && (recIdxOrRec === null || recIdxOrRec.constructor === Number)) {
|
209
|
+
this.removeRecord_0(recIdxOrRec);
|
210
|
+
return;
|
211
|
+
}
|
212
|
+
this.removeRecord_1(recIdxOrRec);
|
213
|
+
}
|
214
|
+
removeRecord_0(recIdx) {
|
215
|
+
if (recIdx >= 0 && recIdx < this._records.length) {
|
216
|
+
let record = this._records.get_Item(recIdx);
|
217
|
+
let useLinkedList = this._useLinkedList;
|
218
|
+
if (useLinkedList) {
|
219
|
+
if (recIdx > 0) {
|
220
|
+
let record2 = this._records.get_Item(recIdx - 1);
|
221
|
+
record2.setNextRec(record.getNextRec());
|
222
|
+
}
|
223
|
+
if (recIdx + 1 < this._records.length) {
|
224
|
+
let record2 = this._records.get_Item(recIdx + 1);
|
225
|
+
record2.setPrevRec(record.getPrevRec());
|
226
|
+
}
|
227
|
+
}
|
228
|
+
this._hashTab.Remove(record.getHashKey());
|
229
|
+
this._records.RemoveAt(recIdx);
|
230
|
+
return;
|
231
|
+
}
|
232
|
+
throw new ApplicationException("in RecordsTable.removeRecord(): invalid index: " + recIdx);
|
233
|
+
}
|
234
|
+
removeRecord_1(rec) {
|
235
|
+
let num = this._records.indexOf(rec);
|
236
|
+
if (num >= 0) {
|
237
|
+
this.removeRecord(num);
|
238
|
+
}
|
239
|
+
}
|
240
|
+
replicate() {
|
241
|
+
let recordsTable = new RecordsTable(this);
|
242
|
+
recordsTable._records = new List();
|
243
|
+
recordsTable._hashTab = new Hashtable(100, 0.7);
|
244
|
+
for (let i = 0; i < this._records.length; i = i + 1) {
|
245
|
+
let record = this._records.get_Item(i).replicate();
|
246
|
+
recordsTable._records.push(record);
|
247
|
+
recordsTable._hashTab.set_Item(record.getHashKey(), record);
|
248
|
+
}
|
249
|
+
return recordsTable;
|
250
|
+
}
|
251
|
+
getServerCurrRec() {
|
252
|
+
return this._serverCurrRec;
|
253
|
+
}
|
254
|
+
zeroServerCurrRec() {
|
255
|
+
this._serverCurrRec = null;
|
256
|
+
}
|
257
|
+
GetSize() {
|
258
|
+
return this.getSize();
|
259
|
+
}
|
260
|
+
GetRecByIdx(idx) {
|
261
|
+
return this.getRecByIdx(idx);
|
262
|
+
}
|
263
|
+
RemoveAll() {
|
264
|
+
this.removeAll();
|
265
|
+
}
|
266
|
+
}
|
267
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb3Jkc1RhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9kY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lkIHtcclxuICAgIHRoaXMuX3NlcnZlckN1cnJSZWMgPSBudWxsO1xyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vL1xyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgLy8vIDxyZXR1cm5zPjwvcmV0dXJucz5cclxuICBHZXRTaXplKCk6IG51bWJlciB7XHJcbiAgICByZXR1cm4gdGhpcy5nZXRTaXplKCk7XHJcbiAgfVxyXG5cclxuICBHZXRSZWNCeUlkeChpZHg6IG51bWJlcik6IFJlY29yZCB7XHJcbiAgICByZXR1cm4gdGhpcy5nZXRSZWNCeUlkeChpZHgpO1xyXG4gIH1cclxuXHJcbiAgUmVtb3ZlQWxsKCk6IHZvaWQge1xyXG4gICAgdGhpcy5yZW1vdmVBbGwoKTtcclxuICB9XHJcbn1cclxuIl19
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { PropInterface } from "@magic-xpa/gui";
|
2
|
+
import { Transaction } from "../rt/Transaction";
|
3
|
+
import { ReturnResult } from "../util/ReturnResult";
|
4
|
+
import { DataViewCommandType } from "../commands/ClientToServer/DataviewCommand";
|
5
|
+
import { CommandsProcessorBase_SendingInstruction } from "../CommandsProcessorBase";
|
6
|
+
import { CommandFactory } from "../commands/ClientToServer/CommandFactory";
|
7
|
+
import { ConstInterface } from "../ConstInterface";
|
8
|
+
import { RefParam } from "@magic-xpa/mscorelib";
|
9
|
+
import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
|
10
|
+
import { MGDataCollection } from "../tasks/MGDataCollection";
|
11
|
+
export class TaskTransactionManager {
|
12
|
+
task = null;
|
13
|
+
get isClosingTopmostTask() {
|
14
|
+
return MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask;
|
15
|
+
}
|
16
|
+
constructor(task) {
|
17
|
+
this.task = task;
|
18
|
+
}
|
19
|
+
AllowTransaction(transBegin, forLocal) {
|
20
|
+
let result;
|
21
|
+
if (forLocal)
|
22
|
+
result = (transBegin === ConstInterface.TRANS_TASK_PREFIX || transBegin === ConstInterface.TRANS_RECORD_PREFIX);
|
23
|
+
else
|
24
|
+
result = (transBegin === ConstInterface.TRANS_TASK_PREFIX || transBegin === ConstInterface.TRANS_RECORD_PREFIX || transBegin === ConstInterface.TRANS_NONE);
|
25
|
+
return result;
|
26
|
+
}
|
27
|
+
PrepareTransactionProperties(transaction, forLocal) {
|
28
|
+
let transactionBeginValue = this.GetTransactionBeginValue(forLocal);
|
29
|
+
let flag = transaction !== null && this.AllowTransaction(transactionBeginValue, forLocal);
|
30
|
+
if (flag)
|
31
|
+
transaction.setTransBegin(transactionBeginValue);
|
32
|
+
}
|
33
|
+
GetTransactionBeginValue(forLocal) {
|
34
|
+
let result = ConstInterface.TRANS_NONE;
|
35
|
+
let prop = this.task.getProp(PropInterface.PROP_TYPE_TRASACTION_BEGIN);
|
36
|
+
if (prop !== null) {
|
37
|
+
let propgetValue = forLocal ? prop.StudioValue : prop.GetComputedValue();
|
38
|
+
if (propgetValue !== null) {
|
39
|
+
result = propgetValue.charAt(0);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return result;
|
43
|
+
}
|
44
|
+
async checkAndCommit(reversibleExit, level, isAbort) {
|
45
|
+
let oper = isAbort ? ConstInterface.TRANS_ABORT : ConstInterface.TRANS_COMMIT;
|
46
|
+
let result = await this.ExecuteLocalUpdatesCommand();
|
47
|
+
if (!result.Success) {
|
48
|
+
if (!this.task.IsInteractive)
|
49
|
+
this.task.abort();
|
50
|
+
return false;
|
51
|
+
}
|
52
|
+
let refResult = new RefParam(result);
|
53
|
+
let ret = await this.checkAndCommitPerDataview(this.task.DataviewManager.RemoteDataviewManager, reversibleExit, level, oper, refResult);
|
54
|
+
result = refResult.value;
|
55
|
+
if (!ret) {
|
56
|
+
if (level === ConstInterface.TRANS_RECORD_PREFIX && this.task.DataView.modifiedRecordsNumber() > 0 && this.task.DataView.FlushUpdates) {
|
57
|
+
try {
|
58
|
+
this.task.TryingToCommit = true;
|
59
|
+
await RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
|
60
|
+
}
|
61
|
+
finally {
|
62
|
+
this.task.TryingToCommit = false;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
return false;
|
67
|
+
}
|
68
|
+
async ExecuteLocalUpdatesCommand() {
|
69
|
+
let command = CommandFactory.CreateDataViewCommand(this.task.getTaskTag(), DataViewCommandType.ExecuteLocalUpdates);
|
70
|
+
return await this.task.DataviewManager.Execute(command);
|
71
|
+
}
|
72
|
+
async checkAndCommitPerDataview(dataviewmanager, reversibleExit, level, oper, refResult) {
|
73
|
+
refResult.value = new ReturnResult();
|
74
|
+
let returnValue = false;
|
75
|
+
let currentTransaction = dataviewmanager.Transaction;
|
76
|
+
if (currentTransaction !== null && !this.task.isAborting() &&
|
77
|
+
currentTransaction.isOpened() && currentTransaction.isOwner(this.task) &&
|
78
|
+
currentTransaction.getLevel() === level) {
|
79
|
+
let cmd = CommandFactory.CreateTransactionCommand(oper, this.task.getTaskTag(), reversibleExit, level);
|
80
|
+
if (this.isClosingTopmostTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI)
|
81
|
+
this.task.getMGData().CmdsToServer.Add(cmd);
|
82
|
+
try {
|
83
|
+
this.task.TryingToCommit = true;
|
84
|
+
if (!(this.isClosingTopmostTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI))
|
85
|
+
refResult.value = await dataviewmanager.Execute(cmd);
|
86
|
+
}
|
87
|
+
finally {
|
88
|
+
this.task.TryingToCommit = false;
|
89
|
+
}
|
90
|
+
returnValue = true;
|
91
|
+
}
|
92
|
+
return returnValue;
|
93
|
+
}
|
94
|
+
HandelTransactionErrorHandlingsRetry(transBegin) {
|
95
|
+
let task = this.task;
|
96
|
+
if (task.Transaction === null && transBegin[0] === ConstInterface.TRANS_NONE) {
|
97
|
+
task.TransactionErrorHandlingsRetry = new Transaction(task, task.getTaskTag());
|
98
|
+
task.TransactionErrorHandlingsRetry.setTransBegin(ConstInterface.TRANS_RECORD_PREFIX);
|
99
|
+
transBegin[0] = ConstInterface.TRANS_RECORD_PREFIX;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFza1RyYW5zYWN0aW9uTWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvZGF0YS9UYXNrVHJhbnNhY3Rpb25NYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxhQUFhLEVBQVcsTUFBTSxnQkFBZ0IsQ0FBQztBQUN2RCxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDOUMsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLDRDQUE0QyxDQUFDO0FBQy9FLE9BQU8sRUFBQyx3Q0FBd0MsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBR2xGLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSwyQ0FBMkMsQ0FBQztBQUd6RSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDakQsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBRTlDLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQzVFLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLDJCQUEyQixDQUFDO0FBRzNELE1BQU0sT0FBTyxzQkFBc0I7SUFDakMsSUFBSSxHQUFTLElBQUksQ0FBQztJ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
|
+
import { Logger, StorageAttribute, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
3
|
+
import { ConstInterface } from "../ConstInterface";
|
4
|
+
import { Environment } from "../env/Environment";
|
5
|
+
export class XMLBasedDcValuesBuilder extends DcValuesBuilderBase {
|
6
|
+
dcv = null;
|
7
|
+
parser = null;
|
8
|
+
set SerializedDCVals(value) {
|
9
|
+
this.parser.setXMLdata(value);
|
10
|
+
this.parser.setCurrIndex(0);
|
11
|
+
}
|
12
|
+
constructor() {
|
13
|
+
super();
|
14
|
+
this.parser = new XmlParser();
|
15
|
+
}
|
16
|
+
Build() {
|
17
|
+
this.dcv = null;
|
18
|
+
let endContext = this.parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, this.parser.getCurrIndex());
|
19
|
+
if (endContext !== -1 && endContext < this.parser.getXMLdata().length) {
|
20
|
+
let tag = this.parser.getXMLsubstring(endContext);
|
21
|
+
this.parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_DC_VALS) + ConstInterface.MG_TAG_DC_VALS.length);
|
22
|
+
let tokensVector = XmlParser.getTokens(this.parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
23
|
+
this.dcv = this.CreateDcValues();
|
24
|
+
this.InitDCValues(this.dcv, tokensVector);
|
25
|
+
}
|
26
|
+
return this.dcv;
|
27
|
+
}
|
28
|
+
InitDCValues(dcv, tokensVector) {
|
29
|
+
let type = StorageAttribute.NONE;
|
30
|
+
let displayValues = null;
|
31
|
+
let serializedLinkValues = null;
|
32
|
+
for (let j = 0; j < tokensVector.length; j += 2) {
|
33
|
+
let attribute = (tokensVector.get_Item(j));
|
34
|
+
let valueStr = (tokensVector.get_Item(j + 1));
|
35
|
+
switch (attribute) {
|
36
|
+
case XMLConstants.MG_ATTR_ID:
|
37
|
+
this.SetId(dcv, XmlParser.getInt(valueStr));
|
38
|
+
break;
|
39
|
+
case XMLConstants.MG_ATTR_TYPE:
|
40
|
+
type = valueStr[0];
|
41
|
+
this.SetType(dcv, type);
|
42
|
+
break;
|
43
|
+
case ConstInterface.MG_ATTR_DISP:
|
44
|
+
valueStr = XmlParser.unescape(valueStr);
|
45
|
+
displayValues = this.ParseValues(valueStr, StorageAttribute.UNICODE);
|
46
|
+
break;
|
47
|
+
case ConstInterface.MG_ATTR_LINKED:
|
48
|
+
valueStr = XmlParser.unescape(valueStr);
|
49
|
+
serializedLinkValues = valueStr;
|
50
|
+
break;
|
51
|
+
case ConstInterface.MG_ATTR_NULL_FLAGS:
|
52
|
+
this.SetNullFlags(dcv, valueStr);
|
53
|
+
break;
|
54
|
+
default:
|
55
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in DcValues.initElements() unknown attribute: " + attribute);
|
56
|
+
break;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
this.SetDisplayValues(dcv, displayValues);
|
60
|
+
if (serializedLinkValues == null)
|
61
|
+
this.SetLinkValues(dcv, displayValues);
|
62
|
+
else
|
63
|
+
this.SetLinkValues(dcv, this.ParseValues(serializedLinkValues, type));
|
64
|
+
}
|
65
|
+
ParseValues(valueStr, dataType) {
|
66
|
+
let useHex = false;
|
67
|
+
if (Environment.Instance.GetDebugLevel() > 1 ||
|
68
|
+
dataType === StorageAttribute.ALPHA || dataType === StorageAttribute.UNICODE || dataType === StorageAttribute.BOOLEAN) {
|
69
|
+
useHex = true;
|
70
|
+
}
|
71
|
+
return super.ParseValues(valueStr, dataType, useHex);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWE1MQmFzZWREY1ZhbHVlc0J1aWxkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2RhdGEvWE1MQmFzZWREY1ZhbHVlc0J1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFXLG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