@magic-xpa/engine 4.1100.0-dev4110.99 → 4.1101.0-dev4111.271
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- 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 +421 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
- 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/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- 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 +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- 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 +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
- 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/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
- 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/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
- package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
- 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/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
- 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/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
- 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/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
- 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/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
- 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/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
- 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/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
- package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
- 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/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
- package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
- 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/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
- package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
- 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/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
- 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 +9 -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 +11 -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 +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -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 +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -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 +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -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 +4 -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 +157 -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/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/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- 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/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- 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/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/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/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- 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/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 -4208
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- 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/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/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/ServerError.mjs +0 -40
- 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/DataviewHeaderBase.mjs +0 -96
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- 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/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/Task.mjs +0 -2496
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- 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/fesm2015/magic-xpa-engine.mjs +0 -30837
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,265 @@
|
|
1
|
+
import { ApplicationException, NNumber } from '@magic-xpa/mscorelib';
|
2
|
+
import { Logger, StorageAttribute, StorageAttributeCheck } from '@magic-xpa/utils';
|
3
|
+
import { BlobType, ExpVal, FieldDef } from '@magic-xpa/gui';
|
4
|
+
import { ConstInterface } from '../ConstInterface';
|
5
|
+
import { FieldBase } from '../data/FieldBase';
|
6
|
+
export class Argument {
|
7
|
+
_exp = null;
|
8
|
+
_fld = null;
|
9
|
+
_skip = false;
|
10
|
+
_type = '\0';
|
11
|
+
_val = null;
|
12
|
+
_valueAttr = StorageAttribute.NONE;
|
13
|
+
_valueIsNull = false;
|
14
|
+
constructor(fieldOrExpValOrSrcArg) {
|
15
|
+
if (arguments.length === 0) {
|
16
|
+
this.constructor_0();
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
if (arguments.length === 1 && (fieldOrExpValOrSrcArg === null || fieldOrExpValOrSrcArg instanceof FieldBase)) {
|
20
|
+
this.constructor_1(fieldOrExpValOrSrcArg);
|
21
|
+
return;
|
22
|
+
}
|
23
|
+
if (arguments.length === 1 && (fieldOrExpValOrSrcArg === null || fieldOrExpValOrSrcArg instanceof ExpVal)) {
|
24
|
+
this.constructor_2(fieldOrExpValOrSrcArg);
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
this.constructor_3(fieldOrExpValOrSrcArg);
|
28
|
+
}
|
29
|
+
constructor_0() {
|
30
|
+
this._type = '\0';
|
31
|
+
this._fld = null;
|
32
|
+
this._exp = null;
|
33
|
+
this._skip = false;
|
34
|
+
}
|
35
|
+
constructor_1(field) {
|
36
|
+
this._fld = field;
|
37
|
+
this._type = ConstInterface.ARG_TYPE_FIELD;
|
38
|
+
this._exp = null;
|
39
|
+
this._skip = false;
|
40
|
+
}
|
41
|
+
constructor_2(expVal) {
|
42
|
+
this._type = ConstInterface.ARG_TYPE_VALUE;
|
43
|
+
this._fld = null;
|
44
|
+
this._exp = null;
|
45
|
+
this._skip = false;
|
46
|
+
if (expVal.IsNull)
|
47
|
+
this._val = null;
|
48
|
+
else
|
49
|
+
this._val = expVal.ToMgVal();
|
50
|
+
this._valueIsNull = (this._val === null);
|
51
|
+
this._valueAttr = expVal.Attr;
|
52
|
+
}
|
53
|
+
constructor_3(srcArg) {
|
54
|
+
this._type = ConstInterface.ARG_TYPE_VALUE;
|
55
|
+
switch (srcArg._type) {
|
56
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
57
|
+
this._valueAttr = srcArg._fld.getType();
|
58
|
+
break;
|
59
|
+
case ConstInterface.ARG_TYPE_EXP:
|
60
|
+
break;
|
61
|
+
case ConstInterface.ARG_TYPE_SKIP:
|
62
|
+
this._skip = true;
|
63
|
+
break;
|
64
|
+
default:
|
65
|
+
throw new ApplicationException("in Argument.Argument(): illegal source Argument type!");
|
66
|
+
}
|
67
|
+
}
|
68
|
+
async Initialize(srcArg) {
|
69
|
+
switch (srcArg._type) {
|
70
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
71
|
+
this._val = srcArg._fld.getValue(true);
|
72
|
+
this._valueIsNull = srcArg._fld.isNull();
|
73
|
+
break;
|
74
|
+
case ConstInterface.ARG_TYPE_EXP:
|
75
|
+
let retVal = await srcArg._exp.evaluateWithResLength(255);
|
76
|
+
this._val = retVal.mgVal;
|
77
|
+
this._valueAttr = retVal.type;
|
78
|
+
this._valueIsNull = (this._val == null);
|
79
|
+
if (this._valueIsNull)
|
80
|
+
this._val = Argument.getEmptyValue((retVal.type === StorageAttribute.BLOB ||
|
81
|
+
retVal.type === StorageAttribute.BLOB_VECTOR));
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
fillData(arg, srcTask) {
|
86
|
+
this._type = arg[0];
|
87
|
+
let argElements = arg.substr(2);
|
88
|
+
switch (this._type) {
|
89
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
90
|
+
{
|
91
|
+
let fieldId = argElements.split(',');
|
92
|
+
let parent = NNumber.Parse(fieldId[0]);
|
93
|
+
let fldIdx = NNumber.Parse(fieldId[1]);
|
94
|
+
this._fld = srcTask.getFieldDef(parent, fldIdx);
|
95
|
+
}
|
96
|
+
break;
|
97
|
+
case ConstInterface.ARG_TYPE_EXP:
|
98
|
+
let expNum = NNumber.Parse(argElements);
|
99
|
+
this._exp = srcTask.getExpById(expNum);
|
100
|
+
break;
|
101
|
+
case ConstInterface.ARG_TYPE_SKIP:
|
102
|
+
this._skip = true;
|
103
|
+
break;
|
104
|
+
default:
|
105
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in Argument.FillData() illegal type: " + arg);
|
106
|
+
break;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
buildXML(message) {
|
110
|
+
switch (this._type) {
|
111
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
112
|
+
message.Append("F:" + this._fld.getTask().getTaskTag() + "," + this._fld.getId());
|
113
|
+
break;
|
114
|
+
case ConstInterface.ARG_TYPE_EXP:
|
115
|
+
message.Append("E:" + this._exp.getId());
|
116
|
+
break;
|
117
|
+
case ConstInterface.ARG_TYPE_SKIP:
|
118
|
+
message.Append("X:0");
|
119
|
+
break;
|
120
|
+
default:
|
121
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in Argument.buildXML() illegal type: " + this._type);
|
122
|
+
break;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
getType() {
|
126
|
+
return this._type;
|
127
|
+
}
|
128
|
+
getField() {
|
129
|
+
if (this._type === ConstInterface.ARG_TYPE_FIELD)
|
130
|
+
return this._fld;
|
131
|
+
return null;
|
132
|
+
}
|
133
|
+
getExp() {
|
134
|
+
if (this._type === ConstInterface.ARG_TYPE_EXP)
|
135
|
+
return this._exp;
|
136
|
+
return null;
|
137
|
+
}
|
138
|
+
async setValueToField(destFld) {
|
139
|
+
let val;
|
140
|
+
let isNull;
|
141
|
+
switch (this._type) {
|
142
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
143
|
+
val = this._fld.getValue(true);
|
144
|
+
val = Argument.convertArgs(val, this._fld.getType(), destFld.getType());
|
145
|
+
isNull = this._fld.isNull() || val == null;
|
146
|
+
break;
|
147
|
+
case ConstInterface.ARG_TYPE_EXP:
|
148
|
+
val = await this._exp.evaluateWithResultTypeAndLength(destFld.getType(), destFld.getSize());
|
149
|
+
isNull = (val == null);
|
150
|
+
if (isNull)
|
151
|
+
val = Argument.getEmptyValue((destFld.getType() === StorageAttribute.BLOB ||
|
152
|
+
destFld.getType() === StorageAttribute.BLOB_VECTOR));
|
153
|
+
break;
|
154
|
+
case ConstInterface.ARG_TYPE_VALUE:
|
155
|
+
val = Argument.convertArgs(this._val, this._valueAttr, destFld.getType());
|
156
|
+
isNull = this._valueIsNull || val == null;
|
157
|
+
break;
|
158
|
+
default:
|
159
|
+
return;
|
160
|
+
}
|
161
|
+
destFld.takeValFromRec();
|
162
|
+
await destFld.setValueAndStartRecompute(val, isNull, destFld.getTask().DataViewWasRetrieved, false, true);
|
163
|
+
}
|
164
|
+
static convertArgs(value, srcAttr, expectedType) {
|
165
|
+
let invalidArg = false;
|
166
|
+
switch (expectedType) {
|
167
|
+
case StorageAttribute.ALPHA:
|
168
|
+
case StorageAttribute.UNICODE:
|
169
|
+
if (srcAttr === StorageAttribute.BLOB) {
|
170
|
+
if (BlobType.isValidBlob(value))
|
171
|
+
value = BlobType.getString(value);
|
172
|
+
}
|
173
|
+
else if (!StorageAttributeCheck.IsTypeAlphaOrUnicode(srcAttr))
|
174
|
+
invalidArg = true;
|
175
|
+
break;
|
176
|
+
case StorageAttribute.NUMERIC:
|
177
|
+
case StorageAttribute.DATE:
|
178
|
+
case StorageAttribute.TIME:
|
179
|
+
if (!StorageAttributeCheck.isTypeNumeric(srcAttr))
|
180
|
+
invalidArg = true;
|
181
|
+
break;
|
182
|
+
case StorageAttribute.BLOB:
|
183
|
+
if (StorageAttributeCheck.IsTypeAlphaOrUnicode(srcAttr)) {
|
184
|
+
let contentType = srcAttr === StorageAttribute.ALPHA
|
185
|
+
? BlobType.CONTENT_TYPE_ANSI
|
186
|
+
: BlobType.CONTENT_TYPE_UNICODE;
|
187
|
+
value = BlobType.createFromString(value, contentType);
|
188
|
+
}
|
189
|
+
else if (!StorageAttributeCheck.isTypeBlob(srcAttr))
|
190
|
+
invalidArg = true;
|
191
|
+
break;
|
192
|
+
}
|
193
|
+
if (invalidArg)
|
194
|
+
value = FieldDef.getMagicDefaultValue(expectedType);
|
195
|
+
return value;
|
196
|
+
}
|
197
|
+
async getValue(expType, expSize) {
|
198
|
+
switch (this._type) {
|
199
|
+
case ConstInterface.ARG_TYPE_EXP:
|
200
|
+
this._val = await this._exp.evaluateWithResultTypeAndLength(expType, expSize);
|
201
|
+
if (this._val == null)
|
202
|
+
this._val = Argument.getEmptyValue(expType === StorageAttribute.BLOB
|
203
|
+
|| expType === StorageAttribute.BLOB_VECTOR);
|
204
|
+
break;
|
205
|
+
case ConstInterface.ARG_TYPE_FIELD:
|
206
|
+
this._val = this._fld.getValue(true);
|
207
|
+
break;
|
208
|
+
case ConstInterface.ARG_TYPE_VALUE:
|
209
|
+
break;
|
210
|
+
default:
|
211
|
+
return null;
|
212
|
+
}
|
213
|
+
return this._val;
|
214
|
+
}
|
215
|
+
skipArg() {
|
216
|
+
return this._skip;
|
217
|
+
}
|
218
|
+
fillDataByParams(paramValueAttr, paramValue, paramNull) {
|
219
|
+
this._valueAttr = paramValueAttr;
|
220
|
+
this._val = paramValue;
|
221
|
+
this._valueIsNull = paramNull;
|
222
|
+
if (this._valueAttr === StorageAttribute.SKIP) {
|
223
|
+
this._type = ConstInterface.ARG_TYPE_SKIP;
|
224
|
+
this._skip = true;
|
225
|
+
}
|
226
|
+
else {
|
227
|
+
this._type = ConstInterface.ARG_TYPE_VALUE;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
static getEmptyValue(isBlob) {
|
231
|
+
return isBlob ? (BlobType.getEmptyBlobPrefix('\0') + ";") : "";
|
232
|
+
}
|
233
|
+
FillFromString(argStr) {
|
234
|
+
this._type = ConstInterface.ARG_TYPE_VALUE;
|
235
|
+
let argType = null;
|
236
|
+
if (argStr.length > 2)
|
237
|
+
argType = argStr.substr(0, 2);
|
238
|
+
switch (argType) {
|
239
|
+
case ConstInterface.REQ_ARG_ALPHA:
|
240
|
+
this._valueAttr = StorageAttribute.ALPHA;
|
241
|
+
break;
|
242
|
+
case ConstInterface.REQ_ARG_UNICODE:
|
243
|
+
this._valueAttr = StorageAttribute.UNICODE;
|
244
|
+
break;
|
245
|
+
case ConstInterface.REQ_ARG_NUMERIC:
|
246
|
+
this._valueAttr = StorageAttribute.NUMERIC;
|
247
|
+
break;
|
248
|
+
case ConstInterface.REQ_ARG_DOUBLE:
|
249
|
+
this._valueAttr = StorageAttribute.NUMERIC;
|
250
|
+
break;
|
251
|
+
case ConstInterface.REQ_ARG_LOGICAL:
|
252
|
+
this._valueAttr = StorageAttribute.BOOLEAN;
|
253
|
+
break;
|
254
|
+
case ConstInterface.REQ_ARG_NULL:
|
255
|
+
this._valueAttr = StorageAttribute.NONE;
|
256
|
+
break;
|
257
|
+
default:
|
258
|
+
this._valueAttr = StorageAttribute.ALPHA;
|
259
|
+
this._val = argStr;
|
260
|
+
return;
|
261
|
+
}
|
262
|
+
this._val = argStr.substr(2);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJndW1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L0FyZ3VtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxPQUFPLEVBQWlCLE1BQU0sc0JBQXNCLENBQUM7QUFDcEYsT0FBTyxFQUFFLE1BQU0sRUFBRSxnQkFBZ0IsRUFBRSxxQkFBcUIsRUFBQyxNQUFNLGtCQUFrQixDQUFDO0FBQ2xGLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRzVELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFHOUMsTUFBTSxPQUFPLFFBQVE7SUFDWCxJQUFJLEdBQWUsSUFBSSxDQUFDO0lBQ3hCLElBQUksR0FBYyxJQUFJLENBQUM7SUFDdkIsS0FBSyxHQUFZLEtBQUssQ0FBQztJQUN2QixLQUFLLEdBQVcsSUFBSSxDQUFDO0lBQ3JCLElBQUksR0FBVyxJQUFJLENBQUM7SUFDcEIsVUFBVSxHQUFxQix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icmVhaztcclxuICAgICAgZGVmYXVsdDpcclxuICAgICAgICAvLyBpZiBzdG9yYWdlIHR5cGUgaXMgbm90IGRlZmluZWQsIGFzc3VtZSBhbHBoYSBzdHJpbmcgYW5kIHRoZSBlbnRpcmUgc3RyaW5nIGlzIHRoZSB2YWx1ZVxyXG4gICAgICAgIHRoaXMuX3ZhbHVlQXR0ciA9IFN0b3JhZ2VBdHRyaWJ1dGUuQUxQSEE7XHJcbiAgICAgICAgdGhpcy5fdmFsID0gYXJnU3RyO1xyXG4gICAgICAgIHJldHVybjtcclxuICAgIH1cclxuICAgIC8vIHRoZSBjYXNlIHRoZSBzdHJpbmcgaXMgdG9vIHNob3J0IHdhcyBkZWFsdCB3aXRoIGVhcmxpZXIgLSBpdCB3aWxsIGdldCB0byB0aGUgZGVmYXVsdCBjYXNlIGluIHRoZSBzd2l0Y2hcclxuICAgIC8vIGFuZCByZXR1cm4gZnJvbSB0aGVyZVxyXG4gICAgdGhpcy5fdmFsID0gYXJnU3RyLnN1YnN0cigyKTtcclxuICB9XHJcblxyXG5cclxufVxyXG4iXX0=
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { List } from '@magic-xpa/mscorelib';
|
2
|
+
import { Argument } from './Argument';
|
3
|
+
import { StrUtil } from '@magic-xpa/utils';
|
4
|
+
export class ArgumentsList {
|
5
|
+
_list = null;
|
6
|
+
RefreshOnString = null;
|
7
|
+
constructor(srcArgsOrExp_paramsOrArgument) {
|
8
|
+
if (arguments.length === 0) {
|
9
|
+
this.constructor_0();
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
if (arguments.length === 1 && (srcArgsOrExp_paramsOrArgument === null || srcArgsOrExp_paramsOrArgument instanceof Array)) {
|
13
|
+
this.constructor_2(srcArgsOrExp_paramsOrArgument);
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
this.constructor_3(srcArgsOrExp_paramsOrArgument);
|
17
|
+
}
|
18
|
+
constructor_0() {
|
19
|
+
}
|
20
|
+
async Initialize(srcArgs) {
|
21
|
+
this.constructor_0();
|
22
|
+
if (srcArgs === null)
|
23
|
+
this._list = null;
|
24
|
+
else {
|
25
|
+
this._list = new List();
|
26
|
+
for (let i = 0; i < srcArgs.getSize(); i = i + 1) {
|
27
|
+
let arg = new Argument(srcArgs.getArg(i));
|
28
|
+
await arg.Initialize(srcArgs.getArg(i));
|
29
|
+
this._list.push(arg);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
constructor_2(Exp_params) {
|
34
|
+
this.constructor_0();
|
35
|
+
let argCnt = Exp_params.length;
|
36
|
+
if (argCnt === 0)
|
37
|
+
this._list = null;
|
38
|
+
else {
|
39
|
+
this._list = new List();
|
40
|
+
for (let i = 0; i < argCnt; i = i + 1) {
|
41
|
+
this._list.push(new Argument(Exp_params[i]));
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
constructor_3(argument) {
|
46
|
+
this.Add(argument);
|
47
|
+
}
|
48
|
+
fillList(valueStr, srcTask) {
|
49
|
+
let tok = StrUtil.tokenize(valueStr, "$");
|
50
|
+
let size = tok.length;
|
51
|
+
this._list = new List();
|
52
|
+
for (let i = 0; i < size; i = i + 1) {
|
53
|
+
let argument = new Argument();
|
54
|
+
argument.fillData(tok[i], srcTask);
|
55
|
+
this._list.push(argument);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
buildListFromParams(size, attrs, vals, nulls) {
|
59
|
+
this._list = new List();
|
60
|
+
for (let i = 0; i < size; i = i + 1) {
|
61
|
+
let argument = new Argument();
|
62
|
+
argument.fillDataByParams(attrs.charAt(i), vals[i], nulls.charAt(i) !== '0');
|
63
|
+
this._list.push(argument);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
buildXML(message) {
|
67
|
+
for (let i = 0; i < this._list.length; i = i + 1) {
|
68
|
+
if (i > 0)
|
69
|
+
message.Append('$');
|
70
|
+
this._list.get_Item(i).buildXML(message);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
getSize() {
|
74
|
+
return (this._list === null) ? 0 : this._list.length;
|
75
|
+
}
|
76
|
+
getArg(idx) {
|
77
|
+
if (idx < 0 || idx >= this._list.length)
|
78
|
+
return null;
|
79
|
+
return this._list.get_Item(idx);
|
80
|
+
}
|
81
|
+
async getArgValue(idx, expType, expSize) {
|
82
|
+
let arg = this.getArg(idx);
|
83
|
+
if (arg === null)
|
84
|
+
return null;
|
85
|
+
return await arg.getValue(expType, expSize);
|
86
|
+
}
|
87
|
+
FillListFromString(argsString) {
|
88
|
+
let pattern = new RegExp("(?<!\\\\),");
|
89
|
+
let array = argsString.split(pattern);
|
90
|
+
this._list = new List();
|
91
|
+
for (let i = 0; i < array.length; i = i + 1) {
|
92
|
+
let argument = new Argument();
|
93
|
+
argument.FillFromString(array[i]);
|
94
|
+
this._list.push(argument);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
Add(argument) {
|
98
|
+
if (this._list === null)
|
99
|
+
this._list = new List();
|
100
|
+
this._list.push(argument);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJndW1lbnRzTGlzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvQXJndW1lbnRzTGlzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLHNCQUFzQixDQUFDO0FBQzNELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFHdEMsT0FBTyxFQUFvQixPQUFPLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUU3RCxNQUFNLE9BQU8sYUFBYTtJQUNoQixLQUFLLEdBQW1CLElBQUksQ0FBQztJQUlyQyxlQUFlLEdBQVcsSUFBSSxDQUFDO0lBSy9CLFlBQVksNkJBQW1DO1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ycmF5Lmxlbmd0aDsgaSA9IGkgKyAxKSB7XHJcbiAgICAgIGxldCBhcmd1bWVudDogQXJndW1lbnQgPSBuZXcgQXJndW1lbnQoKTtcclxuICAgICAgYXJndW1lbnQuRmlsbEZyb21TdHJpbmcoYXJyYXlbaV0pO1xyXG4gICAgICB0aGlzLl9saXN0LnB1c2goYXJndW1lbnQpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vLyBhZGQgYW4gYXJndW1lbnQgdG8gdGhlIGxpc3RcclxuICAvLy8gPC9zdW1tYXJ5PlxyXG4gIC8vLyA8cGFyYW0gbmFtZT1cImFyZ3VtZW50XCI+PC9wYXJhbT5cclxuICBBZGQoYXJndW1lbnQ6IEFyZ3VtZW50KTogdm9pZCB7XHJcbiAgICBpZiAodGhpcy5fbGlzdCA9PT0gbnVsbClcclxuICAgICAgdGhpcy5fbGlzdCA9IG5ldyBMaXN0PEFyZ3VtZW50PigpO1xyXG4gICAgdGhpcy5fbGlzdC5wdXNoKGFyZ3VtZW50KTtcclxuICB9XHJcbn1cclxuIl19
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { ExpressionEvaluator, NullValueException } from "../exp/ExpressionEvaluator";
|
2
|
+
import { DisplayConvertor, ExpVal } from "@magic-xpa/gui";
|
3
|
+
import { StorageAttribute, StrUtil } from "@magic-xpa/utils";
|
4
|
+
import { Char, NString } from "@magic-xpa/mscorelib";
|
5
|
+
export class Boundary {
|
6
|
+
_cacheTableFldId = 0;
|
7
|
+
_max = null;
|
8
|
+
_min = null;
|
9
|
+
_retType = StorageAttribute.NONE;
|
10
|
+
_size = 0;
|
11
|
+
_maxExpVal = null;
|
12
|
+
_minExpVal = null;
|
13
|
+
DiscardMin = false;
|
14
|
+
DiscardMax = false;
|
15
|
+
MaxEqualsMin = false;
|
16
|
+
constructor(task, minIdx, maxIdx, returnType, size, cacheTableId) {
|
17
|
+
if (arguments.length === 5)
|
18
|
+
this.constructor_0(task, minIdx, maxIdx, returnType, size);
|
19
|
+
else
|
20
|
+
this.constructor_1(task, minIdx, maxIdx, returnType, size, cacheTableId);
|
21
|
+
}
|
22
|
+
constructor_0(task, minIdx, maxIdx, returnType, size) {
|
23
|
+
this.constructor_1(task, minIdx, maxIdx, returnType, size, -1);
|
24
|
+
}
|
25
|
+
constructor_1(task, minIdx, maxIdx, returnType, size, cacheTableId) {
|
26
|
+
this._retType = returnType;
|
27
|
+
this._size = size;
|
28
|
+
this._cacheTableFldId = cacheTableId;
|
29
|
+
if (minIdx !== -1)
|
30
|
+
this._min = task.getExpById(minIdx);
|
31
|
+
if (maxIdx !== -1)
|
32
|
+
this._max = task.getExpById(maxIdx);
|
33
|
+
}
|
34
|
+
hasMinExp() {
|
35
|
+
return this._min !== null;
|
36
|
+
}
|
37
|
+
hasMaxExp() {
|
38
|
+
return this._max !== null;
|
39
|
+
}
|
40
|
+
getExpType() {
|
41
|
+
return this._retType;
|
42
|
+
}
|
43
|
+
getCacheTableFldId() {
|
44
|
+
return this._cacheTableFldId;
|
45
|
+
}
|
46
|
+
async compute(padValueWithMinMaxCharacters) {
|
47
|
+
if (this.hasMinExp()) {
|
48
|
+
let minVal = await this._min.evaluateWithResultTypeAndLength(this.getExpType(), this._size);
|
49
|
+
if (minVal !== null) {
|
50
|
+
minVal = NString.TrimEnd(minVal, new Array(0));
|
51
|
+
}
|
52
|
+
this._minExpVal = new ExpVal(this.getExpType(), minVal === null, minVal);
|
53
|
+
this.MaxEqualsMin = this.IsMaxEqualsMin();
|
54
|
+
if (!this._minExpVal.IsNull && (this._minExpVal.Attr === StorageAttribute.ALPHA || this._minExpVal.Attr === StorageAttribute.UNICODE)) {
|
55
|
+
if (padValueWithMinMaxCharacters) {
|
56
|
+
this._minExpVal.StrVal = DisplayConvertor.StringValueToMgValue(this._minExpVal.StrVal, this._minExpVal.Attr, Char.MinValue, this._size).toString();
|
57
|
+
this.MaxEqualsMin = false;
|
58
|
+
}
|
59
|
+
this._minExpVal.StrVal = StrUtil.SearchAndReplaceWildChars(this._minExpVal.StrVal, this._size, Char.MinValue);
|
60
|
+
}
|
61
|
+
this.DiscardMin = await this._min.DiscardCndRangeResult();
|
62
|
+
}
|
63
|
+
if (this.hasMaxExp()) {
|
64
|
+
let maxVal = await this._max.evaluateWithResultTypeAndLength(this.getExpType(), this._size);
|
65
|
+
this._maxExpVal = new ExpVal(this.getExpType(), maxVal === null, maxVal);
|
66
|
+
if (!this._maxExpVal.IsNull && (this._maxExpVal.Attr === StorageAttribute.ALPHA || this._maxExpVal.Attr === StorageAttribute.UNICODE)) {
|
67
|
+
if (padValueWithMinMaxCharacters) {
|
68
|
+
this._maxExpVal.StrVal = DisplayConvertor.StringValueToMgValue(this._maxExpVal.StrVal, this._maxExpVal.Attr, Char.MaxValue, this._size);
|
69
|
+
}
|
70
|
+
this._maxExpVal.StrVal = StrUtil.SearchAndReplaceWildChars(this._maxExpVal.StrVal, this._size, Char.MaxValue);
|
71
|
+
}
|
72
|
+
this.DiscardMax = await this._max.DiscardCndRangeResult();
|
73
|
+
}
|
74
|
+
}
|
75
|
+
checkRange(val, IsNull) {
|
76
|
+
let res = true;
|
77
|
+
let cmpVal = new ExpVal(this.getExpType(), IsNull, val);
|
78
|
+
if (cmpVal.IsNull && ((this.hasMinExp() && this._minExpVal.IsNull) || (this.hasMaxExp() && this._maxExpVal.IsNull))) {
|
79
|
+
res = true;
|
80
|
+
}
|
81
|
+
else {
|
82
|
+
if (this.hasMinExp()) {
|
83
|
+
if (!this._minExpVal.IsNull && !cmpVal.IsNull) {
|
84
|
+
try {
|
85
|
+
if (ExpressionEvaluator.val_cmp_any(cmpVal, this._minExpVal) < 0)
|
86
|
+
res = false;
|
87
|
+
}
|
88
|
+
catch (exception) {
|
89
|
+
if (exception instanceof NullValueException) {
|
90
|
+
res = false;
|
91
|
+
}
|
92
|
+
else
|
93
|
+
throw exception;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
else {
|
97
|
+
if (cmpVal.IsNull !== this._minExpVal.IsNull)
|
98
|
+
res = false;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
if (this.hasMaxExp() && res) {
|
102
|
+
if (!this._maxExpVal.IsNull && !cmpVal.IsNull) {
|
103
|
+
try {
|
104
|
+
if (ExpressionEvaluator.val_cmp_any(cmpVal, this._maxExpVal) > 0)
|
105
|
+
res = false;
|
106
|
+
}
|
107
|
+
catch (exception) {
|
108
|
+
if (exception instanceof NullValueException)
|
109
|
+
res = false;
|
110
|
+
else
|
111
|
+
throw exception;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
else if (cmpVal.IsNull !== this._maxExpVal.IsNull)
|
115
|
+
res = false;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return res;
|
119
|
+
}
|
120
|
+
IsMaxEqualsMin() {
|
121
|
+
let result = false;
|
122
|
+
if (this.hasMaxExp() && this.hasMinExp()) {
|
123
|
+
if (this._min.getId() === this._max.getId()) {
|
124
|
+
if (this._retType === StorageAttribute.ALPHA || this._retType === StorageAttribute.UNICODE)
|
125
|
+
result = !this.WildCharExist();
|
126
|
+
else
|
127
|
+
result = true;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
return result;
|
131
|
+
}
|
132
|
+
WildCharExist() {
|
133
|
+
let wildChars = ["*", "?"];
|
134
|
+
let result = false;
|
135
|
+
if (!this._minExpVal.IsNull) {
|
136
|
+
let stringValue = this._minExpVal.StrVal;
|
137
|
+
for (let i = 0; i < wildChars.length; i = i + 1) {
|
138
|
+
if (stringValue.endsWith(wildChars[i])) {
|
139
|
+
result = true;
|
140
|
+
break;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
return result;
|
145
|
+
}
|
146
|
+
toString() {
|
147
|
+
return NString.Format("{{Boundary: {0}-{1}, {2}, {3}}}", [
|
148
|
+
this._max, this._max, this._retType, this._size
|
149
|
+
]);
|
150
|
+
}
|
151
|
+
}
|
152
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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lIGNvbXBhcmVkIHZhbHVlIG11c3QgYmUgZXF1YWwgb3IgZ3JlYXRlciB0byB0aGUgbWluIHZhbHVlXHJcbiAgICAgICAgICAgIGlmIChFeHByZXNzaW9uRXZhbHVhdG9yLnZhbF9jbXBfYW55KGNtcFZhbCwgdGhpcy5fbWluRXhwVmFsKSA8IDApXHJcbiAgICAgICAgICAgICAgcmVzID0gZmFsc2U7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjYXRjaCAoZXhjZXB0aW9uKSB7XHJcbiAgICAgICAgICAgIGlmIChleGNlcHRpb24gaW5zdGFuY2VvZiBOdWxsVmFsdWVFeGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgIGlmIChjbXBWYWwuSXNOdWxsICE9PSB0aGlzLl9taW5FeHBWYWwuSXNOdWxsKVxyXG4gICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgLy8gY2hlY2sgbWF4IGV4cHJlc3Npb24gQ29tcGxpYW5jZVxyXG4gICAgICBpZiAodGhpcy5oYXNNYXhFeHAoKSAmJiByZXMpIHtcclxuICAgICAgICAvLyBpZiBib3RoIG9mIHRoZSBjb21wYXJlZCB2YWx1ZXMgYXJlIG5vdCBudWxsXHJcbiAgICAgICAgaWYgKCF0aGlzLl9tYXhFeHBWYWwuSXNOdWxsICYmICFjbXBWYWwuSXNOdWxsKSB7XHJcbiAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAvLyB0aGUgY29tcGFyZWQgdmFsdWUgbXVzdCBiZSBlcXVhbCBvciBncmVhdGVyIHRvIHRoZSBtaW4gdmFsdWVcclxuICAgICAgICA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