@sassoftware/restaflib 5.5.1-0 → 5.5.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/restaflib.js +26 -4
- package/dist/restaflib.min.js +1 -1
- package/lib/restaflib.js +26 -4
- package/package.json +1 -1
package/dist/restaflib.js
CHANGED
|
@@ -587,7 +587,7 @@ eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK
|
|
|
587
587
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
588
588
|
|
|
589
589
|
"use strict";
|
|
590
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ casActionRun: function() { return /* reexport safe */ _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ casAppendTable: function() { return /* reexport safe */ _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ casFetchData: function() { return /* reexport safe */ _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ casFetchRows: function() { return /* reexport safe */ _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; },\n/* harmony export */ casLoadTable: function() { return /* reexport safe */ _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; },\n/* harmony export */ casSaveTable: function() { return /* reexport safe */ _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ casSetup: function() { return /* reexport safe */ _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ casTableToJson: function() { return /* reexport safe */ _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ casUpdateData: function() { return /* reexport safe */ _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ casUpload: function() { return /* reexport safe */ _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ caslDescribe: function() { return /* reexport safe */ _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ caslRun: function() { return /* reexport safe */ _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; },\n/* harmony export */ caslRunBase: function() { return /* reexport safe */ _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */ caslScore: function() { return /* reexport safe */ _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */ computeAppendTable: function() { return /* reexport safe */ _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; },\n/* harmony export */ computeFetchData: function() { return /* reexport safe */ _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; },\n/* harmony export */ computeFileContent: function() { return /* reexport safe */ _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; },\n/* harmony export */ computeResults: function() { return /* reexport safe */ _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; },\n/* harmony export */ computeRun: function() { return /* reexport safe */ _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; },\n/* harmony export */ computeSetup: function() { return /* reexport safe */ _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; },\n/* harmony export */ computeSetupTables: function() { return /* reexport safe */ _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; },\n/* harmony export */ computeSummary: function() { return /* reexport safe */ _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; },\n/* harmony export */ computeUpdateData: function() { return /* reexport safe */ _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; },\n/* harmony export */ computeUpload: function() { return /* reexport safe */ _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; },\n/* harmony export */ findReport: function() { return /* reexport safe */ _findReport__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; },\n/* harmony export */ getReportImage: function() { return /* reexport safe */ _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; },\n/* harmony export */ getReportUri: function() { return /* reexport safe */ _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; },\n/* harmony export */ getSasTableRows: function() { return /* reexport safe */ _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; },\n/* harmony export */ jesRun: function() { return /* reexport safe */ _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; },\n/* harmony export */ jesSetup: function() { return /* reexport safe */ _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; },\n/* harmony export */ jesSummary: function() { return /* reexport safe */ _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; },\n/* harmony export */ jsonToDict: function() { return /* reexport safe */ _jsonToDict__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; },\n/* harmony export */ lib: function() { return /* binding */ lib; },\n/* harmony export */ masAddModel: function() { return /* reexport safe */ _masAddModel__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; },\n/* harmony export */ masDescribe: function() { return /* reexport safe */ _masDescribe__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; },\n/* harmony export */ masRun: function() { return /* reexport safe */ _masRun__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; },\n/* harmony export */ masScore: function() { return /* reexport safe */ _masScore__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; },\n/* harmony export */ masSetup: function() { return /* reexport safe */ _masSetup__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = (0,_lib__WEBPACK_IMPORTED_MODULE_37__[\"default\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?\n}");
|
|
590
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ casActionRun: function() { return /* reexport safe */ _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ casAppendTable: function() { return /* reexport safe */ _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ casFetchData: function() { return /* reexport safe */ _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ casFetchRows: function() { return /* reexport safe */ _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; },\n/* harmony export */ casLoadTable: function() { return /* reexport safe */ _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; },\n/* harmony export */ casSaveTable: function() { return /* reexport safe */ _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ casSetup: function() { return /* reexport safe */ _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ casTableToJson: function() { return /* reexport safe */ _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ casUpdateData: function() { return /* reexport safe */ _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ casUpload: function() { return /* reexport safe */ _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ caslDescribe: function() { return /* reexport safe */ _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ caslRun: function() { return /* reexport safe */ _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; },\n/* harmony export */ caslRunBase: function() { return /* reexport safe */ _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */ caslScore: function() { return /* reexport safe */ _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */ computeAppendTable: function() { return /* reexport safe */ _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; },\n/* harmony export */ computeFetchData: function() { return /* reexport safe */ _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; },\n/* harmony export */ computeFileContent: function() { return /* reexport safe */ _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; },\n/* harmony export */ computeResults: function() { return /* reexport safe */ _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; },\n/* harmony export */ computeRun: function() { return /* reexport safe */ _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; },\n/* harmony export */ computeSetup: function() { return /* reexport safe */ _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; },\n/* harmony export */ computeSetupTables: function() { return /* reexport safe */ _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; },\n/* harmony export */ computeSummary: function() { return /* reexport safe */ _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; },\n/* harmony export */ computeUpdateData: function() { return /* reexport safe */ _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; },\n/* harmony export */ computeUpload: function() { return /* reexport safe */ _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; },\n/* harmony export */ findReport: function() { return /* reexport safe */ _findReport__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; },\n/* harmony export */ getReportImage: function() { return /* reexport safe */ _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; },\n/* harmony export */ getReportUri: function() { return /* reexport safe */ _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; },\n/* harmony export */ getSasTableRows: function() { return /* reexport safe */ _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; },\n/* harmony export */ jesRun: function() { return /* reexport safe */ _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; },\n/* harmony export */ jesSetup: function() { return /* reexport safe */ _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; },\n/* harmony export */ jesSummary: function() { return /* reexport safe */ _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; },\n/* harmony export */ jobRun: function() { return /* reexport safe */ _jobRun__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; },\n/* harmony export */ jsonToDict: function() { return /* reexport safe */ _jsonToDict__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; },\n/* harmony export */ lib: function() { return /* binding */ lib; },\n/* harmony export */ masAddModel: function() { return /* reexport safe */ _masAddModel__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; },\n/* harmony export */ masDescribe: function() { return /* reexport safe */ _masDescribe__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; },\n/* harmony export */ masRun: function() { return /* reexport safe */ _masRun__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; },\n/* harmony export */ masScore: function() { return /* reexport safe */ _masScore__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; },\n/* harmony export */ masSetup: function() { return /* reexport safe */ _masSetup__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jobRun__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jobRun */ \"./jobRun.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = (0,_lib__WEBPACK_IMPORTED_MODULE_38__[\"default\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?\n}");
|
|
591
591
|
|
|
592
592
|
/***/ }),
|
|
593
593
|
|
|
@@ -598,7 +598,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
598
598
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
599
599
|
|
|
600
600
|
"use strict";
|
|
601
|
-
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {
|
|
601
|
+
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string jobDefinition - jogdefinition name\r\n * @param {object} args - arguments to pass to the job definition\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4) {\n return _jesRun.apply(this, arguments);\n}\nfunction _jesRun() {\n _jesRun = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, jobDefinitionName, args, jobDef) {\n var jobRequest, jobDefinition, payload, jobResult, _t;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // generate macro variables\n jobRequest = {}; //jobRequest.type = 'Compute';\n jobDefinition = {};\n if (!(jobDef != null)) {\n _context.next = 1;\n break;\n }\n _t = jobDef;\n _context.next = 3;\n break;\n case 1:\n _context.next = 2;\n return jobDefUri(store, jobDefinitionName);\n case 2:\n _t = _context.sent;\n case 3:\n jobRequest.jobDefinitionUri = _t;\n // jobDefinition.type ='Compute';\n jobRequest.arguments = args;\n payload = {\n data: jobRequest\n }; // run code and get results\n debugger;\n _context.next = 4;\n return (0,_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, payload);\n case 4:\n jobResult = _context.sent;\n return _context.abrupt(\"return\", jobResult);\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRun.apply(this, arguments);\n}\nfunction jobDefUri(_x5, _x6) {\n return _jobDefUri.apply(this, arguments);\n}\nfunction _jobDefUri() {\n _jobDefUri = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, name) {\n var _yield$store$addServi, jobDefinitions, uri, payload, rafLink, jdefList, _t2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 1;\n return store.addServices('jobDefinitions');\n case 1:\n _yield$store$addServi = _context2.sent;\n jobDefinitions = _yield$store$addServi.jobDefinitions;\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n rafLink = jobDefinitions.links('job-definitions');\n _context2.prev = 2;\n _context2.next = 3;\n return store.apiCall(rafLink, payload);\n case 3:\n jdefList = _context2.sent;\n if (!(jdefList.itemsList().size === 0)) {\n _context2.next = 4;\n break;\n }\n throw \"Error: \".concat(name, \" not found in the system\");\n case 4:\n uri = jdefList.itemsCmd(name, 'self', 'link', 'uri');\n case 5:\n return _context2.abrupt(\"return\", uri);\n case 6:\n _context2.prev = 6;\n _t2 = _context2[\"catch\"](2);\n throw \"Error: \".concat(name, \" not found in the system\");\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[2, 6]]);\n }));\n return _jobDefUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (jesRun);\n\n//# sourceURL=webpack://restaflib/./jesRun.js?\n}");
|
|
602
602
|
|
|
603
603
|
/***/ }),
|
|
604
604
|
|
|
@@ -609,7 +609,7 @@ eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK
|
|
|
609
609
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
610
610
|
|
|
611
611
|
"use strict";
|
|
612
|
-
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run
|
|
612
|
+
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run jobExecution service\n//\n/** \r\n * @description Reduce jobExecution service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - payload for the jobExecution service\r\n * \r\n * @returns {object} results from a sas jobExecution job in a consumable form\r\n * \r\n */\nfunction jesRunBase(_x, _x2) {\n return _jesRunBase.apply(this, arguments);\n}\nfunction _jesRunBase() {\n _jesRunBase = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, payload) {\n var _yield$store$addServi, jobExecution, job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n debugger;\n _context.next = 2;\n return store.apiCall(jobExecution.links('create'), payload);\n case 2:\n job = _context.sent;\n _context.next = 3;\n return store.jobState(job, null, 5, 2);\n case 3:\n status = _context.sent;\n if (!(status.data === 'running')) {\n _context.next = 4;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 4:\n if (!(status.data === 'failed')) {\n _context.next = 5;\n break;\n }\n throw JSON.stringify(status);\n case 5:\n _context.next = 6;\n return (0,_jesSummary__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, status.job);\n case 6:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (jesRunBase);\n\n//# sourceURL=webpack://restaflib/./jesRunBase.js?\n}");
|
|
613
613
|
|
|
614
614
|
/***/ }),
|
|
615
615
|
|
|
@@ -631,7 +631,29 @@ eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK
|
|
|
631
631
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
632
632
|
|
|
633
633
|
"use strict";
|
|
634
|
-
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\",
|
|
634
|
+
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return jobResults(store, job);\n case 1:\n return _context.abrupt(\"return\", _context.sent);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSummary.apply(this, arguments);\n}\nfunction jobResults(_x3, _x4) {\n return _jobResults.apply(this, arguments);\n}\nfunction _jobResults() {\n _jobResults = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee3(store, job) {\n var jobjs, cResult, p, pa, key, l, la, id, getContent, _getContent;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n _getContent = function _getContent3() {\n _getContent = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, id) {\n var _yield$store$addServi, files, payload, f, contentRaf, text;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 1;\n return store.addServices(\"files\");\n case 1:\n _yield$store$addServi = _context2.sent;\n files = _yield$store$addServi.files;\n payload = {\n qs: {\n filter: \"eq(id,'\".concat(id, \"')\")\n }\n };\n _context2.next = 2;\n return store.apiCall(files.links(\"files\"), payload);\n case 2:\n f = _context2.sent;\n contentRaf = f.itemsCmd(f.itemsList(0), 'content');\n _context2.next = 3;\n return store.apiCall(contentRaf);\n case 3:\n text = _context2.sent;\n return _context2.abrupt(\"return\", text.items());\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _getContent.apply(this, arguments);\n };\n getContent = function _getContent2(_x5, _x6) {\n return _getContent.apply(this, arguments);\n };\n jobjs = job.items().toJS();\n cResult = {\n session: job.session,\n log: null,\n listing: null,\n ods: null,\n job: job /*null*/,\n tables: {},\n files: {},\n results: jobjs.results\n }; // extract fileid in the files service.\n for (p in jobjs.results) {\n if (!(p === 'COMPUTE_CONTEXT' || p === 'COMPUTE_JOB' || p === 'COMPUTE_SESSION')) {\n pa = p.split('.');\n key = pa[1];\n ;\n if (pa.length === 3) {\n key = pa[1] + '.' + pa[2];\n }\n cResult.files[key] = id;\n l = jobjs.results[p];\n la = l.split('/');\n id = l.split('/')[la.length - 1];\n cResult.files[key] = id;\n }\n }\n\n // get the log and listing for ease of use\n _context3.next = 1;\n return getContent(store, cResult.files['log.txt']);\n case 1:\n cResult.log = _context3.sent;\n _context3.next = 2;\n return getContent(store, cResult.files['listing.txt']);\n case 2:\n cResult.listing = _context3.sent;\n return _context3.abrupt(\"return\", cResult);\n case 3:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _jobResults.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (jesSummary);\n\n//# sourceURL=webpack://restaflib/./jesSummary.js?\n}");
|
|
635
|
+
|
|
636
|
+
/***/ }),
|
|
637
|
+
|
|
638
|
+
/***/ "./jobRun.js":
|
|
639
|
+
/*!*******************!*\
|
|
640
|
+
!*** ./jobRun.js ***!
|
|
641
|
+
\*******************/
|
|
642
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
643
|
+
|
|
644
|
+
"use strict";
|
|
645
|
+
eval("{/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jobRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jobRunBase */ \"./jobRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} jobDefinition - jogdefinition name\r\n * @param {object} args - arguments to pass to the job definition\r\n * @param {string} src - source code to run\r\n * @param {string} jobDefUri - job definition URI to use(overrides jobDefinition name)\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jobrun(_x, _x2, _x3) {\n return _jobrun.apply(this, arguments);\n}\nfunction _jobrun() {\n _jobrun = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, jobName, args) {\n var _yield$store$addServi, jobExecution, jobDefinitionUri, jobRequest, payload, jobSummary, _t;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n _context.prev = 2;\n _context.next = 3;\n return findJobDefinition(store, jobExecution, jobName);\n case 3:\n jobDefinitionUri = _context.sent;\n jobRequest = {\n jobDefinitionUri: jobDefinitionUri,\n arguments: args\n };\n payload = {\n data: jobRequest\n }; // jesRun will ignore the jobName and use thejobDefinitionUri\n debugger;\n _context.next = 4;\n return (0,_jobRunBase__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, payload);\n case 4:\n jobSummary = _context.sent;\n return _context.abrupt(\"return\", jobSummary);\n case 5:\n _context.prev = 5;\n _t = _context[\"catch\"](2);\n throw _t;\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[2, 5]]);\n }));\n return _jobrun.apply(this, arguments);\n}\nfunction findJobDefinition(_x4, _x5, _x6) {\n return _findJobDefinition.apply(this, arguments);\n}\nfunction _findJobDefinition() {\n _findJobDefinition = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, jobExecution, jobName) {\n var uri, payload, rafLink, jobList, id, _uri, _t2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(jobName, \"')\")\n }\n };\n rafLink = jobExecution.links('jobs');\n debugger;\n _context2.prev = 1;\n _context2.next = 2;\n return store.apiCall(rafLink, payload);\n case 2:\n jobList = _context2.sent;\n id = jobList.itemsList(0);\n _uri = jobList.items(id, 'data', 'jobRequest', 'jobDefinitionUri');\n return _context2.abrupt(\"return\", _uri);\n case 3:\n _context2.prev = 3;\n _t2 = _context2[\"catch\"](1);\n throw \"Error: \".concat(name, \" not found in the system\");\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[1, 3]]);\n }));\n return _findJobDefinition.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (jobrun);\n\n//# sourceURL=webpack://restaflib/./jobRun.js?\n}");
|
|
646
|
+
|
|
647
|
+
/***/ }),
|
|
648
|
+
|
|
649
|
+
/***/ "./jobRunBase.js":
|
|
650
|
+
/*!***********************!*\
|
|
651
|
+
!*** ./jobRunBase.js ***!
|
|
652
|
+
\***********************/
|
|
653
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
654
|
+
|
|
655
|
+
"use strict";
|
|
656
|
+
eval("{/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n//\n// Notes: Run jobExecution service\n//\n/** \r\n * @description Reduce jobExecution service to an consummable form(async)\r\n * @private\r\n * @module jobRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - payload for the jobExecution service\r\n * \r\n * @returns {object} results from a sas jobExecution job in a consumable form\r\n * \r\n */\nfunction jobRunBase(_x, _x2) {\n return _jobRunBase.apply(this, arguments);\n}\nfunction _jobRunBase() {\n _jobRunBase = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark(function _callee(store, payload) {\n var _yield$store$addServi, jobExecution, jobRequestList, jobRequest, job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n debugger;\n // create a job request\n _context.next = 2;\n return store.apiCall(jobExecution.links('jobRequests'));\n case 2:\n jobRequestList = _context.sent;\n _context.next = 3;\n return store.apiCall(jobRequestList.links('createJobRequest'), _objectSpread({}, payload));\n case 3:\n jobRequest = _context.sent;\n debugger;\n _context.next = 4;\n return store.apiCall(jobRequest.links('submitJob'), payload);\n case 4:\n job = _context.sent;\n debugger;\n _context.next = 5;\n return store.jobState(job, null, 5, 2);\n case 5:\n status = _context.sent;\n console.log(status);\n\n // Now submit this job\n if (!(status.data === 'running')) {\n _context.next = 6;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 6:\n if (!(status.data === 'failed')) {\n _context.next = 7;\n break;\n }\n throw JSON.stringify(status);\n case 7:\n _context.next = 8;\n return (0,_jesSummary__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(store, status.job);\n case 8:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jobRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (jobRunBase);\n\n//# sourceURL=webpack://restaflib/./jobRunBase.js?\n}");
|
|
635
657
|
|
|
636
658
|
/***/ }),
|
|
637
659
|
|
package/dist/restaflib.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see restaflib.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("restaflib",[],t):"object"==typeof exports?exports.restaflib=t():e.restaflib=t()}(self,function(){return function(){var e={125:function(e,t,n){var r=n(590);function a(){var t,n,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",c=s.toStringTag||"@@toStringTag";function u(e,a,s,o){var c=a&&a.prototype instanceof l?a:l,u=Object.create(c.prototype);return r(u,"_invoke",function(e,r,a){var s,o,c,u=0,l=a||[],p=!1,f={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return s=e,o=0,c=t,f.n=n,i}};function d(e,r){for(o=e,c=r,n=0;!p&&u&&!a&&n<l.length;n++){var a,s=l[n],d=f.p,b=s[2];e>3?(a=b===r)&&(c=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=t):s[0]<=d&&((a=e<2&&d<s[1])?(o=0,f.v=r,f.n=s[1]):d<b&&(a=e<3||s[0]>r||r>b)&&(s[4]=e,s[5]=r,f.n=b,o=0))}if(a||e>1)return i;throw p=!0,r}return function(a,l,b){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&d(l,b),o=l,c=b;(n=o<2?t:c)||!p;){s||(o?o<3?(o>1&&(f.n=-1),d(o,c)):f.n=c:f.v=c);try{if(u=2,s){if(o||(a="next"),n=s[a]){if(!(n=n.call(s,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,o<2&&(o=0)}else 1===o&&(n=s.return)&&n.call(s),o<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),o=1);s=t}else if((n=(p=f.n<0)?c:e.call(r,f))!==i)break}catch(e){s=t,o=1,c=e}finally{u=1}}return{value:n,done:p}}}(e,s,o),!0),u}var i={};function l(){}function p(){}function f(){}n=Object.getPrototypeOf;var d=[][o]?n(n([][o]())):(r(n={},o,function(){return this}),n),b=f.prototype=l.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e}return p.prototype=f,r(b,"constructor",f),r(f,"constructor",p),p.displayName="GeneratorFunction",r(f,c,"GeneratorFunction"),r(b),r(b,c,"Generator"),r(b,o,function(){return this}),r(b,"toString",function(){return"[object Generator]"}),(e.exports=a=function(){return{w:u,m:m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},192:function(e,t,n){var r=n(541)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},203:function(e){e.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},251:function(e,t,n){var r=n(632),a=n(590);e.exports=function e(t,n){function s(e,a,o,c){try{var u=t[e](a),i=u.value;return i instanceof r?n.resolve(i.v).then(function(e){s("next",e,o,c)},function(e){s("throw",e,o,c)}):n.resolve(i).then(function(e){u.value=e,o(u)},function(e){return s("throw",e,o,c)})}catch(e){c(e)}}var o;this.next||(a(e.prototype),a(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),a(this,"_invoke",function(e,t,r){function a(){return new n(function(t,n){s(e,r,t,n)})}return o=o?o.then(a,a):a()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},423:function(e,t,n){var r=n(998).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},541:function(e,t,n){var r=n(632),a=n(125),s=n(857),o=n(691),c=n(251),u=n(769),i=n(423);function l(){"use strict";var t=a(),n=t.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function b(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,d[e],t)},delegateYield:function(e,a,s){return t.resultName=a,n(r.d,i(e),s)},finish:function(e){return n(r.f,e)}},n=function(e,n,a){r.p=t.prev,r.n=t.next;try{return e(n,a)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,a){return t.w(b(e),n,r,a&&a.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:c,async:function(e,t,n,r,a){return(f(t)?o:s)(b(e),t,n,r,a)},keys:u,values:i}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},590:function(e){function t(n,r,a,s){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}e.exports=t=function(e,n,r,a){function s(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?o?o(e,n,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[n]=r:(s("next",0),s("throw",1),s("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,a,s)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},632:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},691:function(e,t,n){var r=n(125),a=n(251);e.exports=function(e,t,n,s,o){return new a(r().w(e,t,n,s),o||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},769:function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},857:function(e,t,n){var r=n(691);e.exports=function(e,t,n,a,s){var o=r(e,t,n,a,s);return o.next().then(function(e){return e.done?e.value:o.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},998:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";function e(e,t,n,r,a,s,o){try{var c=e[s](o),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(a,s){var o=t.apply(n,r);function c(t){e(o,a,s,c,u,"next",t)}function u(t){e(o,a,s,c,u,"throw",t)}c(void 0)})}}n.r(r),n.d(r,{casActionRun:function(){return R},casAppendTable:function(){return M},casFetchData:function(){return q},casFetchRows:function(){return L},casLoadTable:function(){return ee},casSaveTable:function(){return J},casSetup:function(){return O},casTableToJson:function(){return Q},casUpdateData:function(){return N},casUpload:function(){return $},caslDescribe:function(){return C},caslRun:function(){return h},caslRunBase:function(){return p},caslScore:function(){return g},computeAppendTable:function(){return Ce},computeFetchData:function(){return ge},computeFileContent:function(){return _e},computeResults:function(){return be},computeRun:function(){return le},computeSetup:function(){return fe},computeSetupTables:function(){return he},computeSummary:function(){return oe},computeUpdateData:function(){return je},computeUpload:function(){return Ee},findReport:function(){return Ae},getReportImage:function(){return Pe},getReportUri:function(){return Ie},getSasTableRows:function(){return Fe},jesRun:function(){return Ve},jesSetup:function(){return Ue},jesSummary:function(){return Qe},jsonToDict:function(){return i},lib:function(){return ot},masAddModel:function(){return Ke},masDescribe:function(){return tt},masRun:function(){return rt},masScore:function(){return st},masSetup:function(){return et}});var a=n(192),s=n.n(a);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e){var t="{ ",n=" ";for(var r in e){if(!0===Array.isArray(e[r])){var a=u(e[r]);t=t+n+"".concat(r,"=")+a}else{var s=o(e[r]);if("object"===s){var i=c(e[r]);t=t+n+"".concat(r,"=")+i}else t=t+n+"".concat(r,"=")+("string"===s?' "'.concat(e[r],'" '):"".concat(e[r]," "))}n=","}return t+"} "}function u(e){for(var t="{",n=" ",r=e.length,a=0;a<r;a++)if(!0===Array.isArray(e[a])){var s=u(e[a]);t=t+n+"".concat(a,"=")+s}else{var i=o(e[a]);t="object"===i?t+n+c(e[a]):t+n+("string"===i?' "'.concat(e[a],'" '):"".concat(e[a]," ")),n=","}return t+"}"}var i=function(e,t){var n;return n=null===e?"{}":!0===Array.isArray(e)?u(e):c(e),"".concat(t," = ").concat(n,";")};function l(){return l=t(s().mark(function e(t,n,r,a){var o,c,u,l,p,f,d,b=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(o=i(null!==a?a:{},"_args_"),c=(c=o+" "+r).replace(/\r?\n|\r/g,""),u={action:"sccasl.runcasl",data:{code:c}},l=b.length,p=new Array(l>4?l-4:0),f=4;f<l;f++)p[f-4]=b[f];return e.next=1,t.runAction.apply(t,[n,u].concat(p));case 1:return d=e.sent,e.abrupt("return",d);case 2:case"end":return e.stop()}},e)})),l.apply(this,arguments)}var p=function(e,t,n,r){return l.apply(this,arguments)},f=n(203),d=function(){return"\n print _args_;\n\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.start + 1, _args_.limit, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get tableoinfo to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows'];\n to = from + count - 1;\n\n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n\n rows = {};\n if (from <= rowCount) then do;\n action table.fetch r = result status=rcx/ \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n if (rcx.severity eq 2) then do;\n exit(rcx);\n end;\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n end;\n\n currentCount = DIM(rows);\n pagination = {}; \n table = {caslib=caslib, name=name};\n\n pagination = setPagination(from, count, format, where, currentCount, rowCount, table);\n \n lastRequest={start=from-1, limit=count, format=format, currentCount=currentCount, \n rowCount=rowCount, where=where, table=table, version='3'};\n scrollOptions = getKeys(pagination);\n return( \n {pagination = pagination, data = {schema=columns, rows=rows , scrollOptions=scrollOptions}, lasRequest=lastRequest}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function setPagination(from, count, format, where, currentCount, rowCount, table);\n\n\n prevStart = max(from - count - 1, 0);\n\n if (currentCount lt count) then do; \n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n currentStart = from -1;\n if (currentStart eq 0) then do;\n pagination.next = {start=count, limit=count, format=format, where=' ', table=table};\n return pagination;\n end;\n\n nextStart = currentStart + count;\n pagination.next = {start=nextStart, limit=count, format=format, where=' ', table=table};\n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n\n\n\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},b={commonCasl:function(){return"\n function checkAndLoadTable(caslib, name); \n \n /* verify caslib is there */\n table.queryCaslib status=status result=result/\n caslib = caslib;\n do k,v over result; /* to handle casuser[user] */ \n rc = v;\n end;\n if ( rc eq false ) then \n return -1;\n /* \n * Check to see if table is already loaded \n */ \n action table.tableExists r=result/ \n caslib = caslib \n name = name; \n /* \n * if not loaded then try to load it \n */ \n rc = true;\n if (result.exists eq 0 or result.exists eq 2) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n action table.loadTable status=status/ \n caslib = caslib \n source = path \n casout={caslib= caslib name=name}; \n if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n \n function saveAndLoadTable(caslib, source, targetlib, targetname,promote);\n \n /* load source */\n r = checkAndLoadTable(caslib, source);\n \n sashdat = target||\".sashdat\";\n table.save /\n caslib= targetlib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.droptable /\n caslib=targetlib name=target quiet=true;\n \n table.loadtable result=r status=rc/\n caslib=targetlib casout={caslib=targetlib name=target replace=TRUE}\n path=sashdat;\n \n if (promote eq true) then do;\n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n end;\n if (rc.severity eq 2) then do;\n print rc;\n print 'Ignoring error';\n end;\n r = 0;\n return r;\n \n end;\n \n function lookupPath(caslib, name ) ; \n table.fileInfo r = result/\n caslib=caslib; \n \n names = result.fileInfo[,4]; \n nameu = upcase(name)||'.SASHDAT'; \n cpath = '*'; \n count = 0; \n \n do n over names; \n if (upcase(n) eq nameu) then do; \n count = count + 1; \n if ( cpath eq '*') then do; \n cpath = n; \n end; \n end; \n end; \n \n if (count GT 1 ) then do; \n print 'Warning: ' count 'Files with names only different in case exist - First one chosen';\n print 'Path: ' cpath ' will be used****'; \n end; \n r = cpath; \n return r; \n end; \n /*-----------------------------------------*/ \n /* isModel: is it model table */ \n /*-----------------------------------------*/ \n \n function isModel(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n validTable = false; \n mtype = 'bad'; \n do c over result.columninfo; \n cu = upCase(c.Column); \n if ( cu eq 'DATASTEPSRC') then do; \n mtype = 'ds'; \n end; \n else if ( cu eq '_STATE_' ) then do; \n mtype = 'astore'; \n end; \n else if (cu eq 'MODELMETADATA') then do; \n mtype = 'ds2'; \n end; \n end; \n print 'Specified model type: ' || mtype; \n return mtype; \n end; \n \n /*-----------------------------------------*/ \n /* Returns contents of the specified table */ \n /*-----------------------------------------*/ \n \n function contents(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n /* columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}}; */ \n i = 1; \n columns = {}; \n do c over result.columninfo; \n columns[i] = c; \n i = i + 1; \n end; \n return {describe = columns, table = {}}; \n end; \n \n /*------------------------------------------*/ \n /* Returns unique values */ \n /*-----------------------------------------*/ \n \n function selectionLists(idvars,caslib, name, where); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name, statusCode = s}; \n \n end; \n print idvars;\n do k over idvars; \n r = _getValues(k, caslib, name, where); \n results[k] = r; \n end; \n return { data=results, statusCode=0}; \n end; \n function _getValues(id, caslib, name, where) ; \n \n action table.dropTable/ \n caslib='casuser' name='dtemp1' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= 'dtemp1.sashdat' quiet=TRUE; \n \n action simple.groupby result=r status=rc/ \n aggregator = 'N' \n inputs = {id} \n table = {caslib=caslib name=name, where=where} \n casout = {caslib='casuser' name='dtemp1'} \n ; \n action table.fetch result=r/ \n table={caslib='casuser' name='dtemp1'} \n sortby={{name=id, order='ascending'}}; \n result = r.Fetch[,2]; \n return result; \n end; \n /*------------------------------------------*/ \n /* get a record */ \n /*------------------------------------------*/ \n \n function _fetchData(filter, table); \n s = checkAndLoadTable(table.caslib, table.name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||table.caslib||'.'||table.name}; \n return results; \n end; \n wherex = dictTowhere(filter); \n /* wherex = table.caslib||'.'||table.name||'(where=('||wherex||'));'; \n \n destroyTable('casuser', 'input'); \n \n action datastep.runCode r=result status=rc/ \n single='yes' \n code = 'data casuser.input; set ' || wherex||'run;'; \n */ \n \n action table.fetch r = result / \n table={caslib=table.caslib name=table.name where=wherex}; \n \n rows = resultsToDict(result.Fetch); \n return {scenario = rows, table = result.Fetch}; \n \n end; \n function destroyTable(caslib,name); \n action table.dropTable/ \n caslib=caslib name=name quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib=caslib source= name||'.sashdat' quiet=TRUE; \n \n return true; \n end; \n \n \n function dictToWhere(filter); \n where =''; \n andbit=' '; \n do k,v over filter; \n if (isString(v) ) then do; \n where = where || andbit || k || ' eq ' || '\"'||v||'\"'; \n end; \n else do; \n where = where || andbit || k || ' eq ' || v ; \n end; \n andbit =' and '; \n end; \n return where; \n end; \n \n function resultsToDict(r); \n casResults = {}; \n i = 1; \n do row over r; \n casResults[i] = row; \n i = i + 1; \n end; \n return casResults; \n end; \n \n function argsToTable(_arg_, caslib, name ); \n action table.droptable/ \n caslib=caslib name=name quiet=TRUE; \n i = 1; \n do key,obj over _arg_; \n columns[i] = key; \n row[i] = obj; \n if ( isString(obj) ) then \n type[i] = 'varchar'; \n else if ( isInteger(obj) ) then \n type[i] = 'int'; \n else type[i] = 'double'; \n i = i + 1; \n end; \n \n data1 = newTable('data1', columns, type, row ); \n \n saveresult data1 casout=name caslib=caslib replace; \n end; \n \n function saveAndPromoteTable(caslib, target, source);\n sashdat = target||\".sashdat\";\n rc = checkAndLoadTable(caslib, source);\n table.droptable /\n caslib=caslib name=target quiet=true;\n \n table.save /\n caslib= caslib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.loadtable result=r/\n caslib=caslib casout={caslib=caslib name=target replace=TRUE}\n path=sashdat;\n \n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n print rc;\n r = rc.severity;\n if (rc.severity gt 0) then do;\n print rc;\n print 'Ignoring error';\n rc = 0;\n end;\n \n return r;\n end; \n \n "},casFetchData:d,casFetchRows:function(){return"\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get all table to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows']; \n \n to = from + count - 1; \n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n /* wherex = dictTowhere(where); let user send in the where clause */\n print where;\n\n action table.fetch r = result / \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n\n pagePrev = max(from - count, 1);\n \n if ( to eq rowCount ) then do; \n pageNext = -1; \n end; \n else do ; \n pageNext = min(to + 1, rowCount); \n end; \n table = {caslib=caslib, name=name};\n pagination = {next= {from=pageNext, count=count, format=format, where=where table=table}, prev={from=pagePrev, count=count, format=format, where=where, table=table}};\n pagination.current = {from = from, to=to, rowCount=rowCount, version=1};\n return( \n {pagination = pagination, data = {schema=columns, rows=rows }}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},scoreCasl:n.n(f)(),casAppendTable:function(){return"\n rc = checkAndLoadTable(_args_.masterTable.caslib, _args_.masterTable.name);\n\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.masterTable.caslib||'.'||_args_.masterTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n \n rc = checkAndLoadTable(_args_.setTable.caslib, _args_.setTable.name);\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.setTable.caslib||'.'||_args_.setTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n return rx;\n end;\n\n\n setdata = _args_.setTable.caslib ||'.'||_args_.setTable.name;\n masterdata = _args_.masterTable.caslib ||'.'||_args_.masterTable.name;\n\n action datastep.runCode r=result status=rc/\n code='data ' ||masterdata||'(append=YES);set ' || setdata ||'; run;';\n\n if (rc.statusCode ne 0) then do;\n exit(rc);\n end; \n else do;\n results = {msg= 'Append succeeded', statusCode=true};\n end;\n \n send_response({casResults = results});\n "},casRowSets:d};function m(){return m=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,f,d=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(c=r,!1!==o&&(c=b.commonCasl()+" "+r),u=d.length,i=new Array(u>5?u-5:0),l=5;l<u;l++)i[l-5]=d[l];return e.next=1,p.apply(void 0,[t,n,c,a].concat(i));case 1:return f=e.sent,e.abrupt("return",f.items().toJS());case 2:case"end":return e.stop()}},e)})),m.apply(this,arguments)}var h=function(e,t,n,r,a){return m.apply(this,arguments)};function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(){return(w=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=b.commonCasl()+" "+b.scoreCasl(),o=x({path:"/score"},r),e.next=1,p(t,n,a,o);case 1:return c=e.sent,u=c.items("results","casResults").toJS()[0],e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(e,t,n){return w.apply(this,arguments)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(){return(S=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=b.commonCasl()+" "+b.scoreCasl(),o=_({path:"/describe"},r),e.next=1,p(t,n,a,o);case 1:return c=e.sent,u=c.items("results").toJS(),e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var C=function(e,t,n){return S.apply(this,arguments)};function T(){return(T=t(s().mark(function e(t,n,r,a){var c,u,i,l,p,f,d,b,m,h;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=2;break}return e.next=1,t.logon(n);case 1:e.sent;case 2:return e.next=3,t.addServices("casManagement");case 3:return c=e.sent,u=c.casManagement,e.next=4,t.apiCall(u.links("servers"));case 4:if(0!==(i=e.sent).itemsList().size){e.next=5;break}throw{Error:"No cas servers were found"};case 5:if(l=null,null!=a){e.next=6;break}l=i.itemsList(0),e.next=8;break;case 6:if(p=i.itemsList().toJS(),-1!==(f=p.findIndex(function(e){return e===a}))){e.next=7;break}throw{Error:"server with name of ".concat(a," was not found")};case 7:l=i.itemsList(f);case 8:if(d=null,null!=r){e.next=10;break}return e.next=9,t.apiCall(i.itemsCmd(l,"createSession"));case 9:d=e.sent,e.next=15;break;case 10:if("object"!==o(r)){e.next=11;break}d=r,e.next=15;break;case 11:return b={qs:{filter:"eq( id,'".concat(r,"')")}},e.next=12,t.apiCall(i.itemsCmd(l,"sessions"),b);case 12:if(0!==(m=e.sent).items().size){e.next=13;break}throw"ERROR: The sessionID ".concat(r," was not found.");case 13:return h=m.itemsCmd(m.itemsList(0),"self"),e.next=14,t.apiCall(h);case 14:d=e.sent;case 15:return e.abrupt("return",{servers:i,session:d});case 16:case"end":return e.stop()}},e)}))).apply(this,arguments)}var O=function(e,t,n,r){return T.apply(this,arguments)};function j(){return j=t(s().mark(function e(t){var n,r,a,o,c=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=c.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=c[a];return e.next=1,t.runAction.apply(t,r);case 1:return o=e.sent,e.abrupt("return",o.items().toJS());case 2:case"end":return e.stop()}},e)})),j.apply(this,arguments)}var R=function(e){return j.apply(this,arguments)};function E(){return(E=t(s().mark(function e(t,n,r){var a,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=b.commonCasl()+" "+b.casFetchData(),e.next=1,p(t,n,a,r);case 1:return o=e.sent,e.abrupt("return",o.items("results","casResults").toJS());case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var q=function(e,t,n){return E.apply(this,arguments)};function A(){return(A=t(s().mark(function e(t,n,r){var a,o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==r.where&&(r.where=" "),a=b.commonCasl()+" "+b.casFetchRows(),e.next=1,p(t,n,a,r);case 1:return o=e.sent,null==(c=o.items("results","casResults").toJS()).data&&(c.data={rows:[]}),e.abrupt("return",c);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var L=function(e,t,n){return A.apply(this,arguments)};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I(){return(I=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,d,b,m,h,y,v,x,w,g;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l in a=r.data,o=r.where,c=r.table,u="",i=" ",o)p=o[l],f="string"==typeof p?"'".concat(p.toString(),"'"):p,u=u+i+l+"= ".concat(f," "),i=" AND ";for(b in d=[],a)m=a[b],void 0,h=null==m?".":"string"==typeof m?JSON.stringify(m):m.toString(),d.push({var:b,value:h});return y=D(D({},c),{},{where:"".concat(u)}),v={action:"table.update",data:{table:y,set:d}},e.next=1,t.runAction(n,v);case 1:return x=e.sent,w={msg:"Update completed",statusCode:0},0!==(g=x.items().toJS().disposition).statusCode&&(w.statusCode=g.statusCode,w.msg=g.reason),e.abrupt("return",w);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var N=function(e,t,n){return I.apply(this,arguments)};function F(){return(F=t(s().mark(function e(t,n,r,a,o){var c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=r.caslib,u=r.name,'\n table.save /\n replace=true\n table = {caslib="'.concat(c,'" name="').concat(u,'"}\n caslib="').concat(c,'" name="').concat(u,'.sashdat";\n\n /* clean up before promoting the table */\n table.droptable /\n caslib="').concat(c,'" name="').concat(u,'" ;\n\n /* promote the table to make it available for further analysis */\n table.loadTable status=status r=rc/\n caslib="').concat(c,'",\n path="').concat(u,'.sashdat",\n casout={name="').concat(u,'", caslib="').concat(c,'" promote=True};\n run;\n\t'),e.abrupt("return",{msg:"".concat(c,".").concat(u," saved}"),statusCode:0});case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var J=function(e,t,n,r,a){return F.apply(this,arguments)};function U(){return(U=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=b.commonCasl()+" "+b.casAppendTable(),i={masterTable:a,setTable:r,save:null==o||o,promote:null!=c&&c},e.next=1,p(t,n,u,i);case 1:if(l=e.sent,f=l.items("results","casResults").toJS(),!0!==o){e.next=2;break}return e.next=2,J(t,n,a);case 2:return e.abrupt("return",f);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var M=function(e,t,n,r,a,s){return U.apply(this,arguments)},Q=function(e,t){var n=e.items("tables",t),r=n.get("rows"),a=[];n.get("schema").map(function(e){a.push(e.get("name"))});var s=[];return r.map(function(e){var t={};e.map(function(e,n){t[a[n]]=e}),s.push(t)}),s};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G(){return(G=t(s().mark(function e(t,n,r,a){var o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a.output,c=o.caslib,null!=(u=o.name)){e.next=1;break}throw"Please specify table as caslib.name";case 1:return u=u.toLowerCase(u),i="\n action table.droptable /\n caslib= '".concat(c,"' name= '").concat(u,"' quiet=true;\n\n action table.deleteSource/\n caslib= '").concat(c,"' source= '").concat(u,".sashdat' quiet=true; \n "),l={action:"sccasl.runcasl",data:{code:i}},e.next=2,t.runAction(n,l);case 2:return l={action:"astore.upload",data:{rstore:{name:"".concat(u),caslib:"".concat(c),replace:!0},store:r}},e.next=3,t.runAction(n,l);case 3:return e.sent,e.abrupt("return","Upload of ".concat(a.source," to ").concat(c,".").concat(u," completed"));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var B=function(e,t,n,r){return G.apply(this,arguments)};function H(){return(H=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,p,f,d;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a.output,u=c.caslib,null!=(i=c.name)){e.next=1;break}throw"Please specify table as caslib.name";case 1:return e.next=2,Y(t,n,u,i);case 2:return e.sent,l={casout:{caslib:u,name:i},importOptions:{fileType:a.fileType}},"sas"!==a.fileExt&&"ds2"!==a.fileExt||(l.importOptions.delimiter="\\"),p={headers:{"JSON-Parameters":l,"Content-Type":"binary/octet-stream"},data:r,action:"table.upload"},e.next=3,t.runAction(n,p);case 3:if(f=e.sent,!0!==o){e.next=5;break}return d="\n\t\t\n\t\t\taction table.save r = result / \n\t\t\t\ttable = {caslib='".concat(u,"' name='").concat(i,"'} \n\t\t\t\tcaslib='").concat(u,"' name='").concat(i,"' replace=true;\n\t\t\t\n\t\t\taction table.loadTable r = result2 /\n\t\t\t\tcaslib='").concat(u,"' casout={caslib='").concat(u,"' name='").concat(i,"' replace=true} \n\t\t\t\tpath='").concat(i,".sashdat' ;\n\n\t\t\n\t\t send_response({status=result2});\n\t\t\t"),e.next=4,h(t,n,d,null,!0);case 4:e.sent;case 5:return null==a.source||a.source,e.abrupt("return",f);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Y(e,t,n,r){return V.apply(this,arguments)}function V(){return(V=t(s().mark(function e(t,n,r,a){var o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"".concat(r,".").concat(a),o="\n\t\taction table.dropTable/ \n caslib='".concat(r,"' name='").concat(a,"' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= '").concat(a,".sashdat' quiet=TRUE; \n\t\tsend_response({casResults = {status=src, results= 'data deleted'}})\n\t\t"),e.next=1,h(t,n,o);case 1:return c=e.sent,e.abrupt("return",c);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var W=function(e,t,n,r,a){return H.apply(this,arguments)},K=function(e,t){var n,r,a=null,s=W,o=function(e){return e};switch(r=null==e?"csv":e.split(".").pop().toLowerCase()){case"sas7bdat":n="basesas";break;case"sashdat":n="hdat";break;case"csv":n=r,a="UTF8";break;case"xslx":case"xsl":n=r;break;case"astore":case"sasast":n=r,s=B,o=function(e){return new Buffer.from(e).toString("base64")};break;case"ds2":case"sas":n="csv",a="UTF8",s=W,o=function(e,t){var n=e.replace(/[^\x00-\x7F]/g,"").replace(/\r?\n/g,""),r=t.fileExt;return"modelName\\"+("sas"===r?"dataStepSrc":"ds2"===r?"ds2Src":"casl"===r?"caslSrc":"dataStepsrc")+"\n"+t.output.name+"\\ "+n+"\n"};break;default:throw"Currently file type of ".concat(r," is not supported")}var c,u,i=(c=t.split("."),u=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s,o,c=[],u=!0,i=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){i=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(i)throw a}}return c}}(c,u)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return{source:e,output:{caslib:i[0],name:i[1].toLowerCase()},fileType:n,fileExt:r,fileOptions:a,transform:o,contentType:"binary/octet-stream",handler:s}};function X(){return(X=t(s().mark(function e(t,n,r,a,c,u){var i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=a,"object"===o(a)&&(i="".concat(a.caslib,".").concat(a.name)),l=K(r,i),p=u,e.next=1,l.handler(t,n,p,l,c);case 1:return f=e.sent,e.abrupt("return",f);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var $=function(e,t,n,r,a,s){return X.apply(this,arguments)};function Z(){return(Z=t(s().mark(function e(t,n,r,a){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,h(t,n,"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",r,!0);case 1:return e.sent,e.abrupt("return",{msg:"".concat(r.caslib,".").concat(r.name," loaded}"),statusCode:0});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ee=function(e,t,n,r){return Z.apply(this,arguments)};function te(){return(te=t(s().mark(function e(t,n,r,a){var o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r||null!=a){e.next=2;break}return e.next=1,ne(t,n,r);case 1:o=e.sent,e.next=4;break;case 2:return e.next=3,ae(t,n,a);case 3:o=e.sent;case 4:return e.abrupt("return",o);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ne(e,t,n){return re.apply(this,arguments)}function re(){return(re=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,d,b;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((a={session:n,log:null,listing:null,ods:null,job:r,tables:{},files:{}}).log=r.links("log"),a.listing=r.links("listing"),null===(o=r.links("results"))){e.next=2;break}return e.next=1,t.apiCall(o);case 1:if(c=e.sent,(u=c.itemsList().size)>0)for(i=0;i<u;i++)l=c.itemsList(i),"ods"===(p=c.items(l,"data","type").toLowerCase())?a.ods=c.itemsCmd(l,"self"):"table"===p?(f={self:c.itemsCmd(l,"self"),current:null},a.tables[l.toUpperCase()]=f):"file"===p?(d={self:l,current:null,data:null},a.files[l]=d):(b={self:l,current:null,data:null},a[p]=b);case 2:return e.abrupt("return",a);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ae(e,t,n){return se.apply(this,arguments)}function se(){return(se=t(s().mark(function e(t,n,r){var a,c,u,i,l,p,f,d,b,m,h,y,v;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},c="object"===o(r)?[r]:r,u=0;case 1:if(!(u<c.length)){e.next=8;break}return i=c[u],l=i.libref.toUpperCase(),p=i.name.toUpperCase(),f={qs:{filter:"eq(name,'".concat(l,"')")}},e.next=2,t.apiCall(n.links("librefs"),f);case 2:if(0!==(d=e.sent).itemsList().size){e.next=3;break}throw"ERROR: Libref ".concat(l," not found");case 3:return b=d.itemsCmd(l,"self"),e.next=4,t.apiCall(b);case 4:return m=e.sent,f={qs:{filter:"eq(name,'".concat(p,"')")}},e.next=5,t.apiCall(m.links("tables"),f);case 5:if(0!==(h=e.sent).itemsList().size){e.next=6;break}throw"ERROR: Table ".concat(p," not found");case 6:y="".concat(l,".").concat(p).toLowerCase(),v={self:h.itemsCmd(p,"self"),current:null},a.tables[y.toUpperCase()]=v;case 7:u++,e.next=1;break;case 8:return e.abrupt("return",a);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var oe=function(e,t,n,r){return te.apply(this,arguments)};function ce(){return(ce=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={data:{code:r}},e.next=1,t.apiCall(n.links("execute"),u);case 1:return i=e.sent,l={qs:{wait:null!=a?a:5},headers:{"If-None-Match":i.headers("etag")}},e.next=2,t.jobState(i,l,"longpoll",0,o,c);case 2:return p=e.sent,e.next=3,oe(t,n,p.job);case 3:return(f=e.sent).SASJobStatus=p.data,f.jobStateStatus=p,e.abrupt("return",f);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ue=function(e,t,n,r,a,s){return ce.apply(this,arguments)};function ie(){return(ie=t(s().mark(function e(t,n,r,a,o,c,u){var i,l,p,f,d;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("number"==typeof c&&(c=null),i=["options NOSYNTAXCHECK OBS=MAX;%let syscc=0;"],null!=a)for(l in a)p="%let ".concat(l,"=").concat(a[l],";"),i.push(p);return f=(f=r.replace(/\t/g," ")).split(/\r?\n/),i=i.concat(f).concat(";"),e.next=1,ue(t,n,i,o,c,u);case 1:return d=e.sent,e.abrupt("return",d);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var le=function(e,t,n,r,a,s,o){return ie.apply(this,arguments)};function pe(){return(pe=t(s().mark(function e(t,n,r,a,c){var u,i,l,p,f,d,b,m,h,y,v,x;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==c||"object"!==o(c)){e.next=1;break}return e.abrupt("return",c);case 1:if(null==r){e.next=3;break}return e.next=2,t.logon(r);case 2:e.sent;case 3:return e.next=4,t.addServices("compute");case 4:if(u=e.sent,i=u.compute,l=null,null==c){e.next=8;break}return p={start:0,limit:100,qs:{filter:"eq(id,'".concat(c,"')")}},e.next=5,t.apiCall(i.links("sessions"),p);case 5:if(f=e.sent,!((d=f.itemsList().toJS().indexOf(c))<0)){e.next=6;break}throw"ERROR: The sessionID ".concat(c," was not found.");case 6:return b=f.itemsCmd(f.itemsList(d),"self"),e.next=7,t.apiCall(b);case 7:return l=e.sent,e.abrupt("return",l);case 8:if(null==t.store.config.options.computeServerId){e.next=10;break}return console.log("NOTE: Detected Workbench"),e.next=9,t.apiCall(i.links("createSession"));case 9:return l=e.sent,e.abrupt("return",l);case 10:return null==n&&(n="SAS Job Execution compute context"),m={qs:{filter:"contains(name,'".concat(n,"')")}},h=null,e.prev=11,e.next=12,t.apiCall(i.links("contexts"),m);case 12:if(0!==(h=e.sent).itemsList().size){e.next=13;break}throw"Context ".concat(n," not found");case 13:e.next=15;break;case 14:throw e.prev=14,x=e.catch(11),console.log("Error: Not able to get context"),x;case 15:if(y=h.itemsList(0),null!=c){e.next=17;break}return m=null==a?null:a,v=h.itemsCmd(y,"createSession"),e.next=16,t.apiCall(v,a);case 16:l=e.sent;case 17:return e.abrupt("return",l);case 18:case"end":return e.stop()}},e,null,[[11,14]])}))).apply(this,arguments)}var fe=function(e,t,n,r,a){return pe.apply(this,arguments)};function de(){return(de=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("log"!==r&&"listing"!==r){e.next=7;break}if(a=[],null===n[r]){e.next=5;break}return e.next=1,t.apiCall(n[r]);case 1:o=e.sent,a=a.concat(o.items().toJS());case 2:if(null===(c=o.scrollCmds("next"))){e.next=4;break}return e.next=3,t.apiCall(c);case 3:o=e.sent,a=a.concat(o.items().toJS()),e.next=2;break;case 4:e.next=6;break;case 5:a[0]="Note: No ".concat(r);case 6:return e.abrupt("return",a);case 7:if("ods"!==r){e.next=11;break}if(null===n.ods){e.next=9;break}return e.next=8,t.apiCall(n.ods);case 8:return u=e.sent,e.abrupt("return",u.items());case 9:return e.abrupt("return","<h2> No ODS output </h2>");case 10:e.next=14;break;case 11:if("tables"!==r){e.next=12;break}return e.abrupt("return",Object.keys(n.tables));case 12:if("files"!==r){e.next=13;break}return e.abrupt("return",Object.keys(n.files));case 13:throw"Error: Invalid type ".concat(r);case 14:case"end":return e.stop()}},e)}))).apply(this,arguments)}var be=function(e,t,n){return de.apply(this,arguments)};function me(){return(me=t(s().mark(function e(t,n,r,a){var o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==a){e.next=2;break}return e.next=1,le(t,n,a);case 1:if("completed"===(o=e.sent).SASJobStatus){e.next=2;break}throw"Error: Preamble failed with completion code of ".concat(o.SASJobStatus);case 2:return e.next=3,oe(t,n,null,r);case 3:return c=e.sent,e.abrupt("return",c);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var he=function(e,t,n,r){return me.apply(this,arguments)};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xe(){return(xe=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f,d,b,m,h,y,v,x,w,g,k,_,S,C,T,O,j,R,E;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=null,i=(i="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),(l=null!=o?ve({},o):{qs:{}}).qs.includeIndex=!0,p=l.qs.format,f=null==c?"rows":c,d=null!=o&&null==a,null==(b=n.tables[i])){e.next=6;break}if(!0===d&&(b.current=null),null!==b.current&&null!=a&&"first"!==a){e.next=4;break}return e.next=1,t.apiCall(b.self);case 1:return m=e.sent,h=m.items().toJS().columnCount,y={qs:{start:0,limit:h}},e.next=2,t.apiCall(m.links("columns"),y);case 2:for(g in v=e.sent,x=[],w=v.items().toJS(),"rows"===f&&x.push({name:"_index_",Column:"_Index_",Label:"Index",length:8,type:"FLOAT",format:"BEST",informat:"BEST",custom:!1,isFormat:!1}),w)k=w[g],_={name:k.name.toLowerCase(),Column:k.name.toLowerCase(),Label:k.data.label,length:k.data.length,type:k.data.type,format:null!=k.data.format?k.data.format.name:null,informat:null!=k.data.informat?k.data.informat.name:null,custom:!1,isFormat:p},S=!0===l.qs.includeIndex?1:0,x[k.data.index+S]=_;return e.next=3,t.apiCall(m.links(f),l);case 3:C=e.sent,T="rowSet"===f?C.items("rows").toJS():we(C),b.current=C,b.schema=x,b.columns=v,u={columns:v,schema:x,rows:T,scrollOptions:C.scrollCmds().keySeq().toJS()},e.next=6;break;case 4:if(O=b.current,j=a,"next"===a&&null===O.scrollCmds("next")&&(j=null!==O.links("last")?"last":null),"prev"===a&&null===O.scrollCmds("prev")&&(j=null!==O.links("first")?"first":null),u={schema:b.schema,columns:b.columns,currentColumns:b.currentColumns,rows:[],scrollOptions:O.scrollCmds().keySeq().toJS()},null===j||null===O.scrollCmds(j)){e.next=6;break}return e.next=5,t.apiCall(O.scrollCmds(j),l);case 5:R=e.sent,b.current=R,E="rows"!==f?R.items("rows").toJS():we(R),u={schema:b.schema,columns:b.schema,rows:E,scrollOptions:R.scrollCmds().keySeq().toJS()};case 6:return e.abrupt("return",u);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function we(e){return e.items().toJS().map(function(e){return e.cells})}var ge=function(e,t,n,r,a,s){return xe.apply(this,arguments)};function ke(){return(ke=t(s().mark(function e(t,n,r,a){var o,c,u,i,l,p;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(o=n.files[r])){e.next=1;break}throw"Invalid fileref ".concat(r);case 1:if(null!==o.current){e.next=4;break}return c={qs:{filter:"eq(name,'".concat(r,"')")}},e.next=2,t.apiCall(n.session.links("files"),c);case 2:return u=e.sent,e.next=3,t.apiCall(u.itemsCmd(r,"self"));case 3:u=e.sent,o.current=u;case 4:if(!0!==a){e.next=5;break}return i="".concat(n.session.host).concat(o.current.links("content","link","uri")),e.abrupt("return",i);case 5:if(null!==o.data){e.next=7;break}return e.next=6,t.apiCall(o.current.links("content"));case 6:return l=e.sent,p=l.items(),o.data=p,e.abrupt("return",p);case 7:return e.abrupt("return",o.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var _e=function(e,t,n,r){return ke.apply(this,arguments)};function Se(){return(Se=t(s().mark(function e(t,n,r,a){var o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o="\n proc append base=".concat(a.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),e.next=1,le(t,n,o);case 1:return c=e.sent,u="completed"===c.SASJobStatus?0:1,e.abrupt("return",{msg:"Append Completed. Status is: ".concat(c.SASJobStatus),statusCode:u});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ce=function(e,t,n,r){return Se.apply(this,arguments)};function Te(){return(Te=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,d,b,m,h,y,v,x,w,g,k;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(p in a=r.data,o=r.table,c=r.where,u="proc sql; update ".concat(o.libref,".").concat(o.name),i="SET ",l=" ",a)i=i+l+p+"="+Oe(a[p]),l=", ";if(u=u+" "+i,f=" WHERE ",d=" ","string"==typeof c)f+=c;else for(b in c)m=c[b],h=Oe(m),f=f+d+b+"= ".concat(h," "),d=" AND ";return y=(u=u+" "+f+";run;").split(/\r?\n/),v={data:{code:y}},e.next=1,t.apiCall(n.links("execute"),v);case 1:return x=e.sent,w={qs:{newState:"Completed",timeout:1}},e.next=2,t.jobState(x,w);case 2:return g=e.sent,k="completed"===g.data?0:1,e.abrupt("return",{statusCode:k,msg:g.data});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Oe(e){return null==e?".":"string"==typeof e?JSON.stringify(e):e.toString()}var je=function(e,t,n){return Te.apply(this,arguments)};function Re(){return(Re=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l in c="data ".concat(r.libref,".").concat(r.name,"; INFILE datalines delimiter=',' ;\n"),u="",i="INPUT ",o)p=o[l],i=i+p.Column+" ","CHAR"===p.Type&&(f=" ".concat(p.Column," $ ").concat(p.length," \n"),u=u+" "+f);return u.length>0&&(u="LENGTH "+u+";\n"),c=c+";\n"+u+(i+=";\n")+"datalines;\n"+a+"\n; run; proc print;run;\n",e.next=1,le(t,n,c);case 1:return e.abrupt("return",{msg:"done",statusCode:0});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ee=function(e,t,n,r,a){return Re.apply(this,arguments)};function qe(){return(qe=t(s().mark(function e(t,n){var r,a,o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("reports");case 1:return r=e.sent,a=r.reports,console.log(a),o=null,null!==n&&(o={qs:{filter:"eq(name,'".concat(n,"')")}}),console.log("-----------",a.links("reports")),e.next=2,t.apiCall(a.links("reports"),o);case 2:return c=e.sent,e.abrupt("return",0===c.itemsList().size?null:c);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ae=function(e,t){return qe.apply(this,arguments)};function Le(){return(Le=t(s().mark(function e(t,n){var r,a,o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.rafObject("reportImages"),e.next=1,Ae(t,n);case 1:if(null!==(a=e.sent)){e.next=2;break}return e.abrupt("return","".concat(n," was not found"));case 2:return o=a.itemsCmd(a.itemsList(0),"self","link","uri"),c={data:{reportUri:o,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},e.next=3,t.apiCall(r.links("createJob"),c);case 3:return u=e.sent,e.next=4,t.jobState(u,{qs:{wait:1.5}},10,2);case 4:if("completed"===(i=e.sent).data){e.next=5;break}return e.abrupt("return","Job failed ".concat(i.data));case 5:return e.next=6,t.apiCall(i.job.itemsCmd(i.job.itemsList(0),"image"));case 6:return l=e.sent,e.abrupt("return",l.items());case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Pe=function(e,t){return Le.apply(this,arguments)};function De(){return(De=t(s().mark(function e(t,n){var r,a;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ae(t,n);case 1:if(null!==(r=e.sent)){e.next=2;break}throw null==n?"No reports were found":"".concat(n," was not found");case 2:return a=[],r.items().map(function(e,t){var n={name:t,uri:r.itemsCmd(t,"self","link","uri")};a.push(n)}),e.abrupt("return",a);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ie=function(e,t){return De.apply(this,arguments)};function Ne(){return(Ne=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,d;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.tables[r],e.next=1,t.apiCall(a);case 1:return o=e.sent,e.next=2,t.apiCall(o.links("rowSet"));case 2:c=e.sent,u=c.items("columns"),i=c.items("rows"),l=[],p=i.size,f=s().mark(function e(){var t,n;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=i.get(d),n={},u.map(function(e,r){var a=e.toLowerCase();n[a]=t.get(r)}),l.push(n);case 1:case"end":return e.stop()}},e)}),d=0;case 3:if(!(d<p)){e.next=5;break}return e.delegateYield(f(),"t0",4);case 4:d++,e.next=3;break;case 5:return e.abrupt("return",l);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Fe=function(e,t,n){return Ne.apply(this,arguments)};function Je(){return(Je=t(s().mark(function e(t,n){var r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=1;break}return e.next=1,t.logon(n);case 1:return e.next=2,t.addServices("jobExecution","compute","jobDefinitions");case 2:return r=e.sent,e.abrupt("return",r.jobExecution);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ue=function(e,t){return Je.apply(this,arguments)};function Me(){return(Me=t(s().mark(function e(t,n){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Qe=function(e,t){return Me.apply(this,arguments)};function ze(){return(ze=t(s().mark(function e(t,n,r){var a,o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.apiCall(n.links("create"),r);case 1:return a=e.sent,e.next=2,t.jobState(a,null,5,2);case 2:if("running"!==(o=e.sent).data){e.next=3;break}throw"ERROR: Job did not complete in allotted time";case 3:if("failed"!==o.data){e.next=4;break}throw JSON.stringify(o);case 4:return e.next=5,Qe(t,o.job);case 5:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ge=function(e,t,n){return ze.apply(this,arguments)};function Be(){return(Be=t(s().mark(function e(t,n,r,a,o){var c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c={},u={},null===a){e.next=2;break}return e.next=1,He(t,a);case 1:c.jobDefinitionUri=e.sent;case 2:return-0!=r&&(u.code=r),u.type="Compute",c.arguments=o,c.jobDefinition=u,i={data:c},e.next=3,Ge(t,n,i);case 3:return l=e.sent,e.abrupt("return",l);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function He(e,t){return Ye.apply(this,arguments)}function Ye(){return(Ye=t(s().mark(function e(t,n){var r,a,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.getService("jobDefinitions"),r=null,a={qs:{filter:"eq(name,'".concat(n,"')")}},e.next=1,Ge(t,a);case 1:if(0!==(o=e.sent).itemsList().size){e.next=2;break}throw"Error: ".concat(n," not found in the system");case 2:r=o.itemsCmd(n,"self","link","uri");case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ve=function(e,t,n,r,a){return Be.apply(this,arguments)};function We(){return(We=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=n.service,o=0;case 1:if(!(o<r.length)){e.next=4;break}if(c=r[o],null!=n.steps[c]){e.next=3;break}return e.next=2,$e(t,a,c);case 2:u=e.sent,n.steps[c]=u;case 3:o++,e.next=1;break;case 4:return e.abrupt("return",!0);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ke=function(e,t,n){return We.apply(this,arguments)};function Xe(){return(Xe=t(s().mark(function e(t,n,r){var a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},e.next=1,t.apiCall(n.links("modules"),a);case 1:if(0!==(o=e.sent).itemsList().size){e.next=2;break}return e.abrupt("return",null);case 2:return c=o.itemsCmd(r,"steps"),e.next=3,t.apiCall(c);case 3:return u=e.sent,i={name:r,stepsRafLink:u,stepIds:o.items(r,"data","stepIds").toJS(),microanalyticScore:n},e.abrupt("return",i);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var $e=function(e,t,n){return Xe.apply(this,arguments)};function Ze(){return(Ze=t(s().mark(function e(t,n,r){var a,o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r){e.next=1;break}return e.next=1,t.logon(r);case 1:return e.next=2,t.addServices("microanalyticScore");case 2:a=e.sent,o=a.microanalyticScore,c={service:o,steps:{}},u=0;case 3:if(!(u<n.length)){e.next=6;break}return i=n[u],e.next=4,$e(t,o,i);case 4:l=e.sent,c.steps[i]=l;case 5:u++,e.next=3;break;case 6:return e.abrupt("return",c);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}var et=function(e,t,n){return Ze.apply(this,arguments)},tt=function(e,t,n,r){var a=e.steps[t];if(null===a)return[];var s=null;if(null==n){var o=a.stepIds.findIndex(function(e){return"execute"===e||"score"===e});if(-1===o)return[];s=a.stepIds[o];var c=a.stepsRafLink.items(s,"data","inputs"),u=a.stepsRafLink.items(s,"data","outputs");return null===c?[]:!0===r?{inputs:c.toJS(),outputs:u.toJS()}:c.toJS()}if(-1===a.stepIds.findIndex(function(e){return e===n}))return[];s=n;var i=a.stepsRafLink.items(s,"data","inputs"),l=a.stepsRafLink.items(s,"data","outputs");return null===i?[]:!0===r?{inputs:i.toJS(),outputs:l.toJS()}:i.toJS()};function nt(){return(nt=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f,d,b,m,h,y,v,x,w;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=n.steps[r],i=!1,l=[],!1===Array.isArray(a))for(p in a)f={name:p,value:a[p]},l.push(f);else i=!0;if(d={data:{inputs:!0===i?a:l}},b=null,null!=o){e.next=3;break}if(-1!==(m=u.stepIds.findIndex(function(e){return"execute"===e||"score"===e}))){e.next=1;break}return e.abrupt("return",[]);case 1:b=u.stepIds[m];case 2:e.next=5;break;case 3:if(-1!==u.stepIds.findIndex(function(e){return e===o})){e.next=4;break}return e.abrupt("return",[]);case 4:b=o;case 5:if(null==c&&(c="execute"),null!==(h=u.stepsRafLink.itemsCmd(b,c))){e.next=6;break}return y=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(o," operation: ").concat(c," is an invalid combination")}],e.abrupt("return",y);case 6:return e.next=7,t.apiCall(h,d);case 7:return v=e.sent,x=v.items("outputs").toJS(),!0===i?w=x:(w={},x.map(function(e){w[e.name]=e.value})),e.abrupt("return",w);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var rt=function(e,t,n,r,a,s){return nt.apply(this,arguments)};function at(){return(at=t(s().mark(function e(t,n,r){var a,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,et(t,[n]);case 1:return a=e.sent,e.next=2,rt(t,a,n,r,"score","execute");case 2:return o=e.sent,e.abrupt("return",o);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var st=function(e,t,n){return at.apply(this,arguments)},ot={caslRun:h,caslRunBase:p,casSetup:O,casActionRun:R,casFetchData:q,casUpdateData:N,computeRun:le,computeSetup:fe,computeSummary:oe,computeFetchData:ge,computeFileContent:_e,computeResults:be,findReport:Ae,getReportImage:Pe,getReportUri:Ie,getSASTableRows:Fe,jesSetup:Ue,jesRun:Ve,jesSummary:Qe,jsonToDict:i,casTableToJson:Q,caslScore:g,caslDescribe:C,masSetup:et,masAddModel:Ke,masDescribe:tt,masRun:rt}}(),r}()});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("restaflib",[],t):"object"==typeof exports?exports.restaflib=t():e.restaflib=t()}(self,function(){return function(){var e={125:function(e,t,n){var r=n(590);function a(){var t,n,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",c=s.toStringTag||"@@toStringTag";function u(e,a,s,o){var c=a&&a.prototype instanceof l?a:l,u=Object.create(c.prototype);return r(u,"_invoke",function(e,r,a){var s,o,c,u=0,l=a||[],p=!1,f={p:0,n:0,v:t,a:b,f:b.bind(t,4),d:function(e,n){return s=e,o=0,c=t,f.n=n,i}};function b(e,r){for(o=e,c=r,n=0;!p&&u&&!a&&n<l.length;n++){var a,s=l[n],b=f.p,d=s[2];e>3?(a=d===r)&&(c=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=t):s[0]<=b&&((a=e<2&&b<s[1])?(o=0,f.v=r,f.n=s[1]):b<d&&(a=e<3||s[0]>r||r>d)&&(s[4]=e,s[5]=r,f.n=d,o=0))}if(a||e>1)return i;throw p=!0,r}return function(a,l,d){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&b(l,d),o=l,c=d;(n=o<2?t:c)||!p;){s||(o?o<3?(o>1&&(f.n=-1),b(o,c)):f.n=c:f.v=c);try{if(u=2,s){if(o||(a="next"),n=s[a]){if(!(n=n.call(s,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,o<2&&(o=0)}else 1===o&&(n=s.return)&&n.call(s),o<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),o=1);s=t}else if((n=(p=f.n<0)?c:e.call(r,f))!==i)break}catch(e){s=t,o=1,c=e}finally{u=1}}return{value:n,done:p}}}(e,s,o),!0),u}var i={};function l(){}function p(){}function f(){}n=Object.getPrototypeOf;var b=[][o]?n(n([][o]())):(r(n={},o,function(){return this}),n),d=f.prototype=l.prototype=Object.create(b);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,c,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=f,r(d,"constructor",f),r(f,"constructor",p),p.displayName="GeneratorFunction",r(f,c,"GeneratorFunction"),r(d),r(d,c,"Generator"),r(d,o,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(e.exports=a=function(){return{w:u,m:m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},192:function(e,t,n){var r=n(541)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},203:function(e){e.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},251:function(e,t,n){var r=n(632),a=n(590);e.exports=function e(t,n){function s(e,a,o,c){try{var u=t[e](a),i=u.value;return i instanceof r?n.resolve(i.v).then(function(e){s("next",e,o,c)},function(e){s("throw",e,o,c)}):n.resolve(i).then(function(e){u.value=e,o(u)},function(e){return s("throw",e,o,c)})}catch(e){c(e)}}var o;this.next||(a(e.prototype),a(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),a(this,"_invoke",function(e,t,r){function a(){return new n(function(t,n){s(e,r,t,n)})}return o=o?o.then(a,a):a()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},423:function(e,t,n){var r=n(998).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},541:function(e,t,n){var r=n(632),a=n(125),s=n(857),o=n(691),c=n(251),u=n(769),i=n(423);function l(){"use strict";var t=a(),n=t.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var b={throw:1,return:2,break:3,continue:3};function d(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,b[e],t)},delegateYield:function(e,a,s){return t.resultName=a,n(r.d,i(e),s)},finish:function(e){return n(r.f,e)}},n=function(e,n,a){r.p=t.prev,r.n=t.next;try{return e(n,a)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,a){return t.w(d(e),n,r,a&&a.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:c,async:function(e,t,n,r,a){return(f(t)?o:s)(d(e),t,n,r,a)},keys:u,values:i}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},590:function(e){function t(n,r,a,s){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}e.exports=t=function(e,n,r,a){function s(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?o?o(e,n,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[n]=r:(s("next",0),s("throw",1),s("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,a,s)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},632:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},691:function(e,t,n){var r=n(125),a=n(251);e.exports=function(e,t,n,s,o){return new a(r().w(e,t,n,s),o||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},769:function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},857:function(e,t,n){var r=n(691);e.exports=function(e,t,n,a,s){var o=r(e,t,n,a,s);return o.next().then(function(e){return e.done?e.value:o.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},998:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";function e(e,t,n,r,a,s,o){try{var c=e[s](o),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(a,s){var o=t.apply(n,r);function c(t){e(o,a,s,c,u,"next",t)}function u(t){e(o,a,s,c,u,"throw",t)}c(void 0)})}}n.r(r),n.d(r,{casActionRun:function(){return R},casAppendTable:function(){return M},casFetchData:function(){return q},casFetchRows:function(){return A},casLoadTable:function(){return ee},casSaveTable:function(){return F},casSetup:function(){return O},casTableToJson:function(){return Q},casUpdateData:function(){return N},casUpload:function(){return $},caslDescribe:function(){return C},caslRun:function(){return h},caslRunBase:function(){return p},caslScore:function(){return g},computeAppendTable:function(){return Ce},computeFetchData:function(){return ge},computeFileContent:function(){return _e},computeResults:function(){return de},computeRun:function(){return le},computeSetup:function(){return fe},computeSetupTables:function(){return he},computeSummary:function(){return oe},computeUpdateData:function(){return Te},computeUpload:function(){return Ee},findReport:function(){return Pe},getReportImage:function(){return Le},getReportUri:function(){return Ie},getSasTableRows:function(){return Je},jesRun:function(){return Xe},jesSetup:function(){return Ue},jesSummary:function(){return Ge},jobRun:function(){return at},jsonToDict:function(){return i},lib:function(){return ht},masAddModel:function(){return ot},masDescribe:function(){return pt},masRun:function(){return bt},masScore:function(){return mt},masSetup:function(){return lt}});var a=n(192),s=n.n(a);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e){var t="{ ",n=" ";for(var r in e){if(!0===Array.isArray(e[r])){var a=u(e[r]);t=t+n+"".concat(r,"=")+a}else{var s=o(e[r]);if("object"===s){var i=c(e[r]);t=t+n+"".concat(r,"=")+i}else t=t+n+"".concat(r,"=")+("string"===s?' "'.concat(e[r],'" '):"".concat(e[r]," "))}n=","}return t+"} "}function u(e){for(var t="{",n=" ",r=e.length,a=0;a<r;a++)if(!0===Array.isArray(e[a])){var s=u(e[a]);t=t+n+"".concat(a,"=")+s}else{var i=o(e[a]);t="object"===i?t+n+c(e[a]):t+n+("string"===i?' "'.concat(e[a],'" '):"".concat(e[a]," ")),n=","}return t+"}"}var i=function(e,t){var n;return n=null===e?"{}":!0===Array.isArray(e)?u(e):c(e),"".concat(t," = ").concat(n,";")};function l(){return l=t(s().mark(function e(t,n,r,a){var o,c,u,l,p,f,b,d=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(o=i(null!==a?a:{},"_args_"),c=(c=o+" "+r).replace(/\r?\n|\r/g,""),u={action:"sccasl.runcasl",data:{code:c}},l=d.length,p=new Array(l>4?l-4:0),f=4;f<l;f++)p[f-4]=d[f];return e.next=1,t.runAction.apply(t,[n,u].concat(p));case 1:return b=e.sent,e.abrupt("return",b);case 2:case"end":return e.stop()}},e)})),l.apply(this,arguments)}var p=function(e,t,n,r){return l.apply(this,arguments)},f=n(203),b=function(){return"\n print _args_;\n\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.start + 1, _args_.limit, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get tableoinfo to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows'];\n to = from + count - 1;\n\n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n\n rows = {};\n if (from <= rowCount) then do;\n action table.fetch r = result status=rcx/ \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n if (rcx.severity eq 2) then do;\n exit(rcx);\n end;\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n end;\n\n currentCount = DIM(rows);\n pagination = {}; \n table = {caslib=caslib, name=name};\n\n pagination = setPagination(from, count, format, where, currentCount, rowCount, table);\n \n lastRequest={start=from-1, limit=count, format=format, currentCount=currentCount, \n rowCount=rowCount, where=where, table=table, version='3'};\n scrollOptions = getKeys(pagination);\n return( \n {pagination = pagination, data = {schema=columns, rows=rows , scrollOptions=scrollOptions}, lasRequest=lastRequest}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function setPagination(from, count, format, where, currentCount, rowCount, table);\n\n\n prevStart = max(from - count - 1, 0);\n\n if (currentCount lt count) then do; \n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n currentStart = from -1;\n if (currentStart eq 0) then do;\n pagination.next = {start=count, limit=count, format=format, where=' ', table=table};\n return pagination;\n end;\n\n nextStart = currentStart + count;\n pagination.next = {start=nextStart, limit=count, format=format, where=' ', table=table};\n pagination.prev = {start=prevStart, limit=count, format=format, where=' ', table=table};\n if (prevStart ne 0) then do;\n pagination.first = {start=0, limit=count, format=format, where=' ', table=table};\n end; \n return pagination;\n end;\n\n\n\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},d={commonCasl:function(){return"\n function checkAndLoadTable(caslib, name); \n \n /* verify caslib is there */\n table.queryCaslib status=status result=result/\n caslib = caslib;\n do k,v over result; /* to handle casuser[user] */ \n rc = v;\n end;\n if ( rc eq false ) then \n return -1;\n /* \n * Check to see if table is already loaded \n */ \n action table.tableExists r=result/ \n caslib = caslib \n name = name; \n /* \n * if not loaded then try to load it \n */ \n rc = true;\n if (result.exists eq 0 or result.exists eq 2) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n action table.loadTable status=status/ \n caslib = caslib \n source = path \n casout={caslib= caslib name=name}; \n if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n \n function saveAndLoadTable(caslib, source, targetlib, targetname,promote);\n \n /* load source */\n r = checkAndLoadTable(caslib, source);\n \n sashdat = target||\".sashdat\";\n table.save /\n caslib= targetlib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.droptable /\n caslib=targetlib name=target quiet=true;\n \n table.loadtable result=r status=rc/\n caslib=targetlib casout={caslib=targetlib name=target replace=TRUE}\n path=sashdat;\n \n if (promote eq true) then do;\n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n end;\n if (rc.severity eq 2) then do;\n print rc;\n print 'Ignoring error';\n end;\n r = 0;\n return r;\n \n end;\n \n function lookupPath(caslib, name ) ; \n table.fileInfo r = result/\n caslib=caslib; \n \n names = result.fileInfo[,4]; \n nameu = upcase(name)||'.SASHDAT'; \n cpath = '*'; \n count = 0; \n \n do n over names; \n if (upcase(n) eq nameu) then do; \n count = count + 1; \n if ( cpath eq '*') then do; \n cpath = n; \n end; \n end; \n end; \n \n if (count GT 1 ) then do; \n print 'Warning: ' count 'Files with names only different in case exist - First one chosen';\n print 'Path: ' cpath ' will be used****'; \n end; \n r = cpath; \n return r; \n end; \n /*-----------------------------------------*/ \n /* isModel: is it model table */ \n /*-----------------------------------------*/ \n \n function isModel(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n validTable = false; \n mtype = 'bad'; \n do c over result.columninfo; \n cu = upCase(c.Column); \n if ( cu eq 'DATASTEPSRC') then do; \n mtype = 'ds'; \n end; \n else if ( cu eq '_STATE_' ) then do; \n mtype = 'astore'; \n end; \n else if (cu eq 'MODELMETADATA') then do; \n mtype = 'ds2'; \n end; \n end; \n print 'Specified model type: ' || mtype; \n return mtype; \n end; \n \n /*-----------------------------------------*/ \n /* Returns contents of the specified table */ \n /*-----------------------------------------*/ \n \n function contents(caslib, name) ; \n table.columnInfo r = result / \n table = {caslib=caslib , name=name}; \n /* columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}}; */ \n i = 1; \n columns = {}; \n do c over result.columninfo; \n columns[i] = c; \n i = i + 1; \n end; \n return {describe = columns, table = {}}; \n end; \n \n /*------------------------------------------*/ \n /* Returns unique values */ \n /*-----------------------------------------*/ \n \n function selectionLists(idvars,caslib, name, where); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name, statusCode = s}; \n \n end; \n print idvars;\n do k over idvars; \n r = _getValues(k, caslib, name, where); \n results[k] = r; \n end; \n return { data=results, statusCode=0}; \n end; \n function _getValues(id, caslib, name, where) ; \n \n action table.dropTable/ \n caslib='casuser' name='dtemp1' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= 'dtemp1.sashdat' quiet=TRUE; \n \n action simple.groupby result=r status=rc/ \n aggregator = 'N' \n inputs = {id} \n table = {caslib=caslib name=name, where=where} \n casout = {caslib='casuser' name='dtemp1'} \n ; \n action table.fetch result=r/ \n table={caslib='casuser' name='dtemp1'} \n sortby={{name=id, order='ascending'}}; \n result = r.Fetch[,2]; \n return result; \n end; \n /*------------------------------------------*/ \n /* get a record */ \n /*------------------------------------------*/ \n \n function _fetchData(filter, table); \n s = checkAndLoadTable(table.caslib, table.name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||table.caslib||'.'||table.name}; \n return results; \n end; \n wherex = dictTowhere(filter); \n /* wherex = table.caslib||'.'||table.name||'(where=('||wherex||'));'; \n \n destroyTable('casuser', 'input'); \n \n action datastep.runCode r=result status=rc/ \n single='yes' \n code = 'data casuser.input; set ' || wherex||'run;'; \n */ \n \n action table.fetch r = result / \n table={caslib=table.caslib name=table.name where=wherex}; \n \n rows = resultsToDict(result.Fetch); \n return {scenario = rows, table = result.Fetch}; \n \n end; \n function destroyTable(caslib,name); \n action table.dropTable/ \n caslib=caslib name=name quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib=caslib source= name||'.sashdat' quiet=TRUE; \n \n return true; \n end; \n \n \n function dictToWhere(filter); \n where =''; \n andbit=' '; \n do k,v over filter; \n if (isString(v) ) then do; \n where = where || andbit || k || ' eq ' || '\"'||v||'\"'; \n end; \n else do; \n where = where || andbit || k || ' eq ' || v ; \n end; \n andbit =' and '; \n end; \n return where; \n end; \n \n function resultsToDict(r); \n casResults = {}; \n i = 1; \n do row over r; \n casResults[i] = row; \n i = i + 1; \n end; \n return casResults; \n end; \n \n function argsToTable(_arg_, caslib, name ); \n action table.droptable/ \n caslib=caslib name=name quiet=TRUE; \n i = 1; \n do key,obj over _arg_; \n columns[i] = key; \n row[i] = obj; \n if ( isString(obj) ) then \n type[i] = 'varchar'; \n else if ( isInteger(obj) ) then \n type[i] = 'int'; \n else type[i] = 'double'; \n i = i + 1; \n end; \n \n data1 = newTable('data1', columns, type, row ); \n \n saveresult data1 casout=name caslib=caslib replace; \n end; \n \n function saveAndPromoteTable(caslib, target, source);\n sashdat = target||\".sashdat\";\n rc = checkAndLoadTable(caslib, source);\n table.droptable /\n caslib=caslib name=target quiet=true;\n \n table.save /\n caslib= caslib name=sashdat\n table = {caslib=caslib name=source} replace=true;\n \n table.loadtable result=r/\n caslib=caslib casout={caslib=caslib name=target replace=TRUE}\n path=sashdat;\n \n table.promote result=r status=rc/\n caslib=caslib name=target quiet=true\n targetLib=caslib target=target;\n print rc;\n r = rc.severity;\n if (rc.severity gt 0) then do;\n print rc;\n print 'Ignoring error';\n rc = 0;\n end;\n \n return r;\n end; \n \n "},casFetchData:b,casFetchRows:function(){return"\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format, _args_.where); \n send_response({casResults = results}); \n \n function casFetchRows(caslib, name, from, count, format, where) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n text = 'Unable to access ' ||caslib||'.'||name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n\n /*\n * get all table to get rowCount\n */\n\n action table.tableinfo r= result/ \n caslib = caslib \n name = name; \n \n rowCount = result.TableInfo[1, 'rows']; \n \n to = from + count - 1; \n \n /*\n * get column information\n */\n\n action table.columninfo r=infoResult /\n table = {caslib=caslib name=name};\n\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\n i = 2;\n do c over inforesult.columninfo;\n columns[i] = c;\n i = i + 1;\n end;\n \n /*\n * Fetch the current set of rows\n */\n /* wherex = dictTowhere(where); let user send in the where clause */\n print where;\n\n action table.fetch r = result / \n table = {caslib=caslib, name=name where=where} \n from= from to=to format=format sastypes=true\n ;\n\n /* \n * create payload to return\n */\n\n i = 1;\n rows ={};\n do row over result.fetch;\n rr = {};\n j = 1;\n do key,v over row;\n rr[j] = override(columns[j].Type, v);\n j = j + 1;\n end;\n rows[i] = rr;\n i = i + 1;\n end;\n\n pagePrev = max(from - count, 1);\n \n if ( to eq rowCount ) then do; \n pageNext = -1; \n end; \n else do ; \n pageNext = min(to + 1, rowCount); \n end; \n table = {caslib=caslib, name=name};\n pagination = {next= {from=pageNext, count=count, format=format, where=where table=table}, prev={from=pagePrev, count=count, format=format, where=where, table=table}};\n pagination.current = {from = from, to=to, rowCount=rowCount, version=1};\n return( \n {pagination = pagination, data = {schema=columns, rows=rows }}\n );\n end; \n \n \n /*\n * For non-primary column types set new content\n */\n\n function override(type, iv);\n if (type EQ 'varbinary') then v = '...varbinary';\n else if (type EQ 'blob') then v = '...blob';\n else if (type EQ 'table') then v = '...table';\n else if (type EQ 'dictionary') then v = '...dictionary';\n else if (type EQ 'list') then v = '...list';\n else if (type EQ 'isArray') then v = '...array';\n else v = iv;\n return v;\n end;\n\n \n "},scoreCasl:n.n(f)(),casAppendTable:function(){return"\n rc = checkAndLoadTable(_args_.masterTable.caslib, _args_.masterTable.name);\n\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.masterTable.caslib||'.'||_args_.masterTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n exit(rx); \n end; \n \n rc = checkAndLoadTable(_args_.setTable.caslib, _args_.setTable.name);\n if (rc ne true) then do;\n text = 'Unable to access ' ||_args_.setTable.caslib||'.'||_args_.setTable.name; \n rx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n return rx;\n end;\n\n\n setdata = _args_.setTable.caslib ||'.'||_args_.setTable.name;\n masterdata = _args_.masterTable.caslib ||'.'||_args_.masterTable.name;\n\n action datastep.runCode r=result status=rc/\n code='data ' ||masterdata||'(append=YES);set ' || setdata ||'; run;';\n\n if (rc.statusCode ne 0) then do;\n exit(rc);\n end; \n else do;\n results = {msg= 'Append succeeded', statusCode=true};\n end;\n \n send_response({casResults = results});\n "},casRowSets:b};function m(){return m=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,f,b=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(c=r,!1!==o&&(c=d.commonCasl()+" "+r),u=b.length,i=new Array(u>5?u-5:0),l=5;l<u;l++)i[l-5]=b[l];return e.next=1,p.apply(void 0,[t,n,c,a].concat(i));case 1:return f=e.sent,e.abrupt("return",f.items().toJS());case 2:case"end":return e.stop()}},e)})),m.apply(this,arguments)}var h=function(e,t,n,r,a){return m.apply(this,arguments)};function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(){return(w=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.commonCasl()+" "+d.scoreCasl(),o=v({path:"/score"},r),e.next=1,p(t,n,a,o);case 1:return c=e.sent,u=c.items("results","casResults").toJS()[0],e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(e,t,n){return w.apply(this,arguments)};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(){return(S=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.commonCasl()+" "+d.scoreCasl(),o=_({path:"/describe"},r),e.next=1,p(t,n,a,o);case 1:return c=e.sent,u=c.items("results").toJS(),e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var C=function(e,t,n){return S.apply(this,arguments)};function j(){return(j=t(s().mark(function e(t,n,r,a){var c,u,i,l,p,f,b,d,m,h;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=2;break}return e.next=1,t.logon(n);case 1:e.sent;case 2:return e.next=3,t.addServices("casManagement");case 3:return c=e.sent,u=c.casManagement,e.next=4,t.apiCall(u.links("servers"));case 4:if(0!==(i=e.sent).itemsList().size){e.next=5;break}throw{Error:"No cas servers were found"};case 5:if(l=null,null!=a){e.next=6;break}l=i.itemsList(0),e.next=8;break;case 6:if(p=i.itemsList().toJS(),-1!==(f=p.findIndex(function(e){return e===a}))){e.next=7;break}throw{Error:"server with name of ".concat(a," was not found")};case 7:l=i.itemsList(f);case 8:if(b=null,null!=r){e.next=10;break}return e.next=9,t.apiCall(i.itemsCmd(l,"createSession"));case 9:b=e.sent,e.next=15;break;case 10:if("object"!==o(r)){e.next=11;break}b=r,e.next=15;break;case 11:return d={qs:{filter:"eq( id,'".concat(r,"')")}},e.next=12,t.apiCall(i.itemsCmd(l,"sessions"),d);case 12:if(0!==(m=e.sent).items().size){e.next=13;break}throw"ERROR: The sessionID ".concat(r," was not found.");case 13:return h=m.itemsCmd(m.itemsList(0),"self"),e.next=14,t.apiCall(h);case 14:b=e.sent;case 15:return e.abrupt("return",{servers:i,session:b});case 16:case"end":return e.stop()}},e)}))).apply(this,arguments)}var O=function(e,t,n,r){return j.apply(this,arguments)};function T(){return T=t(s().mark(function e(t){var n,r,a,o,c=arguments;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=c.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=c[a];return e.next=1,t.runAction.apply(t,r);case 1:return o=e.sent,e.abrupt("return",o.items().toJS());case 2:case"end":return e.stop()}},e)})),T.apply(this,arguments)}var R=function(e){return T.apply(this,arguments)};function E(){return(E=t(s().mark(function e(t,n,r){var a,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.commonCasl()+" "+d.casFetchData(),e.next=1,p(t,n,a,r);case 1:return o=e.sent,e.abrupt("return",o.items("results","casResults").toJS());case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var q=function(e,t,n){return E.apply(this,arguments)};function P(){return(P=t(s().mark(function e(t,n,r){var a,o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==r.where&&(r.where=" "),a=d.commonCasl()+" "+d.casFetchRows(),e.next=1,p(t,n,a,r);case 1:return o=e.sent,null==(c=o.items("results","casResults").toJS()).data&&(c.data={rows:[]}),e.abrupt("return",c);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var A=function(e,t,n){return P.apply(this,arguments)};function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I(){return(I=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,b,d,m,h,y,x,v,w,g;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l in a=r.data,o=r.where,c=r.table,u="",i=" ",o)p=o[l],f="string"==typeof p?"'".concat(p.toString(),"'"):p,u=u+i+l+"= ".concat(f," "),i=" AND ";for(d in b=[],a)m=a[d],void 0,h=null==m?".":"string"==typeof m?JSON.stringify(m):m.toString(),b.push({var:d,value:h});return y=D(D({},c),{},{where:"".concat(u)}),x={action:"table.update",data:{table:y,set:b}},e.next=1,t.runAction(n,x);case 1:return v=e.sent,w={msg:"Update completed",statusCode:0},0!==(g=v.items().toJS().disposition).statusCode&&(w.statusCode=g.statusCode,w.msg=g.reason),e.abrupt("return",w);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var N=function(e,t,n){return I.apply(this,arguments)};function J(){return(J=t(s().mark(function e(t,n,r,a,o){var c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=r.caslib,u=r.name,'\n table.save /\n replace=true\n table = {caslib="'.concat(c,'" name="').concat(u,'"}\n caslib="').concat(c,'" name="').concat(u,'.sashdat";\n\n /* clean up before promoting the table */\n table.droptable /\n caslib="').concat(c,'" name="').concat(u,'" ;\n\n /* promote the table to make it available for further analysis */\n table.loadTable status=status r=rc/\n caslib="').concat(c,'",\n path="').concat(u,'.sashdat",\n casout={name="').concat(u,'", caslib="').concat(c,'" promote=True};\n run;\n\t'),e.abrupt("return",{msg:"".concat(c,".").concat(u," saved}"),statusCode:0});case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var F=function(e,t,n,r,a){return J.apply(this,arguments)};function U(){return(U=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=d.commonCasl()+" "+d.casAppendTable(),i={masterTable:a,setTable:r,save:null==o||o,promote:null!=c&&c},e.next=1,p(t,n,u,i);case 1:if(l=e.sent,f=l.items("results","casResults").toJS(),!0!==o){e.next=2;break}return e.next=2,F(t,n,a);case 2:return e.abrupt("return",f);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var M=function(e,t,n,r,a,s){return U.apply(this,arguments)},Q=function(e,t){var n=e.items("tables",t),r=n.get("rows"),a=[];n.get("schema").map(function(e){a.push(e.get("name"))});var s=[];return r.map(function(e){var t={};e.map(function(e,n){t[a[n]]=e}),s.push(t)}),s};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G(){return(G=t(s().mark(function e(t,n,r,a){var o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a.output,c=o.caslib,null!=(u=o.name)){e.next=1;break}throw"Please specify table as caslib.name";case 1:return u=u.toLowerCase(u),i="\n action table.droptable /\n caslib= '".concat(c,"' name= '").concat(u,"' quiet=true;\n\n action table.deleteSource/\n caslib= '").concat(c,"' source= '").concat(u,".sashdat' quiet=true; \n "),l={action:"sccasl.runcasl",data:{code:i}},e.next=2,t.runAction(n,l);case 2:return l={action:"astore.upload",data:{rstore:{name:"".concat(u),caslib:"".concat(c),replace:!0},store:r}},e.next=3,t.runAction(n,l);case 3:return e.sent,e.abrupt("return","Upload of ".concat(a.source," to ").concat(c,".").concat(u," completed"));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var B=function(e,t,n,r){return G.apply(this,arguments)};function H(){return(H=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,p,f,b;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a.output,u=c.caslib,null!=(i=c.name)){e.next=1;break}throw"Please specify table as caslib.name";case 1:return e.next=2,Y(t,n,u,i);case 2:return e.sent,l={casout:{caslib:u,name:i},importOptions:{fileType:a.fileType}},"sas"!==a.fileExt&&"ds2"!==a.fileExt||(l.importOptions.delimiter="\\"),p={headers:{"JSON-Parameters":l,"Content-Type":"binary/octet-stream"},data:r,action:"table.upload"},e.next=3,t.runAction(n,p);case 3:if(f=e.sent,!0!==o){e.next=5;break}return b="\n\t\t\n\t\t\taction table.save r = result / \n\t\t\t\ttable = {caslib='".concat(u,"' name='").concat(i,"'} \n\t\t\t\tcaslib='").concat(u,"' name='").concat(i,"' replace=true;\n\t\t\t\n\t\t\taction table.loadTable r = result2 /\n\t\t\t\tcaslib='").concat(u,"' casout={caslib='").concat(u,"' name='").concat(i,"' replace=true} \n\t\t\t\tpath='").concat(i,".sashdat' ;\n\n\t\t\n\t\t send_response({status=result2});\n\t\t\t"),e.next=4,h(t,n,b,null,!0);case 4:e.sent;case 5:return null==a.source||a.source,e.abrupt("return",f);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Y(e,t,n,r){return V.apply(this,arguments)}function V(){return(V=t(s().mark(function e(t,n,r,a){var o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"".concat(r,".").concat(a),o="\n\t\taction table.dropTable/ \n caslib='".concat(r,"' name='").concat(a,"' quiet=TRUE; \n \n action table.deleteSource status=src / \n caslib='casuser' source= '").concat(a,".sashdat' quiet=TRUE; \n\t\tsend_response({casResults = {status=src, results= 'data deleted'}})\n\t\t"),e.next=1,h(t,n,o);case 1:return c=e.sent,e.abrupt("return",c);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var W=function(e,t,n,r,a){return H.apply(this,arguments)},X=function(e,t){var n,r,a=null,s=W,o=function(e){return e};switch(r=null==e?"csv":e.split(".").pop().toLowerCase()){case"sas7bdat":n="basesas";break;case"sashdat":n="hdat";break;case"csv":n=r,a="UTF8";break;case"xslx":case"xsl":n=r;break;case"astore":case"sasast":n=r,s=B,o=function(e){return new Buffer.from(e).toString("base64")};break;case"ds2":case"sas":n="csv",a="UTF8",s=W,o=function(e,t){var n=e.replace(/[^\x00-\x7F]/g,"").replace(/\r?\n/g,""),r=t.fileExt;return"modelName\\"+("sas"===r?"dataStepSrc":"ds2"===r?"ds2Src":"casl"===r?"caslSrc":"dataStepsrc")+"\n"+t.output.name+"\\ "+n+"\n"};break;default:throw"Currently file type of ".concat(r," is not supported")}var c,u,i=(c=t.split("."),u=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s,o,c=[],u=!0,i=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){i=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(i)throw a}}return c}}(c,u)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return{source:e,output:{caslib:i[0],name:i[1].toLowerCase()},fileType:n,fileExt:r,fileOptions:a,transform:o,contentType:"binary/octet-stream",handler:s}};function K(){return(K=t(s().mark(function e(t,n,r,a,c,u){var i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=a,"object"===o(a)&&(i="".concat(a.caslib,".").concat(a.name)),l=X(r,i),p=u,e.next=1,l.handler(t,n,p,l,c);case 1:return f=e.sent,e.abrupt("return",f);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var $=function(e,t,n,r,a,s){return K.apply(this,arguments)};function Z(){return(Z=t(s().mark(function e(t,n,r,a){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,h(t,n,"\n\t print _args_;\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\n\t\tif (rc ne true) then do;\n\t\t\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \n\t\t\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\n\t\t\texit(rx); \n\t\tend; \n\t print 'return code = ' || rc;\n\t send_response({casResults={status='ok'}});\n ",r,!0);case 1:return e.sent,e.abrupt("return",{msg:"".concat(r.caslib,".").concat(r.name," loaded}"),statusCode:0});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ee=function(e,t,n,r){return Z.apply(this,arguments)};function te(){return(te=t(s().mark(function e(t,n,r,a){var o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r||null!=a){e.next=2;break}return e.next=1,ne(t,n,r);case 1:o=e.sent,e.next=4;break;case 2:return e.next=3,ae(t,n,a);case 3:o=e.sent;case 4:return e.abrupt("return",o);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ne(e,t,n){return re.apply(this,arguments)}function re(){return(re=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,b,d;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((a={session:n,log:null,listing:null,ods:null,job:r,tables:{},files:{}}).log=r.links("log"),a.listing=r.links("listing"),null===(o=r.links("results"))){e.next=2;break}return e.next=1,t.apiCall(o);case 1:if(c=e.sent,(u=c.itemsList().size)>0)for(i=0;i<u;i++)l=c.itemsList(i),"ods"===(p=c.items(l,"data","type").toLowerCase())?a.ods=c.itemsCmd(l,"self"):"table"===p?(f={self:c.itemsCmd(l,"self"),current:null},a.tables[l.toUpperCase()]=f):"file"===p?(b={self:l,current:null,data:null},a.files[l]=b):(d={self:l,current:null,data:null},a[p]=d);case 2:return e.abrupt("return",a);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ae(e,t,n){return se.apply(this,arguments)}function se(){return(se=t(s().mark(function e(t,n,r){var a,c,u,i,l,p,f,b,d,m,h,y,x;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},c="object"===o(r)?[r]:r,u=0;case 1:if(!(u<c.length)){e.next=8;break}return i=c[u],l=i.libref.toUpperCase(),p=i.name.toUpperCase(),f={qs:{filter:"eq(name,'".concat(l,"')")}},e.next=2,t.apiCall(n.links("librefs"),f);case 2:if(0!==(b=e.sent).itemsList().size){e.next=3;break}throw"ERROR: Libref ".concat(l," not found");case 3:return d=b.itemsCmd(l,"self"),e.next=4,t.apiCall(d);case 4:return m=e.sent,f={qs:{filter:"eq(name,'".concat(p,"')")}},e.next=5,t.apiCall(m.links("tables"),f);case 5:if(0!==(h=e.sent).itemsList().size){e.next=6;break}throw"ERROR: Table ".concat(p," not found");case 6:y="".concat(l,".").concat(p).toLowerCase(),x={self:h.itemsCmd(p,"self"),current:null},a.tables[y.toUpperCase()]=x;case 7:u++,e.next=1;break;case 8:return e.abrupt("return",a);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var oe=function(e,t,n,r){return te.apply(this,arguments)};function ce(){return(ce=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={data:{code:r}},e.next=1,t.apiCall(n.links("execute"),u);case 1:return i=e.sent,l={qs:{wait:null!=a?a:5},headers:{"If-None-Match":i.headers("etag")}},e.next=2,t.jobState(i,l,"longpoll",0,o,c);case 2:return p=e.sent,e.next=3,oe(t,n,p.job);case 3:return(f=e.sent).SASJobStatus=p.data,f.jobStateStatus=p,e.abrupt("return",f);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ue=function(e,t,n,r,a,s){return ce.apply(this,arguments)};function ie(){return(ie=t(s().mark(function e(t,n,r,a,o,c,u){var i,l,p,f,b;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("number"==typeof c&&(c=null),i=["options NOSYNTAXCHECK OBS=MAX;%let syscc=0;"],null!=a)for(l in a)p="%let ".concat(l,"=").concat(a[l],";"),i.push(p);return f=(f=r.replace(/\t/g," ")).split(/\r?\n/),i=i.concat(f).concat(";"),e.next=1,ue(t,n,i,o,c,u);case 1:return b=e.sent,e.abrupt("return",b);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var le=function(e,t,n,r,a,s,o){return ie.apply(this,arguments)};function pe(){return(pe=t(s().mark(function e(t,n,r,a,c){var u,i,l,p,f,b,d,m,h,y,x,v;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==c||"object"!==o(c)){e.next=1;break}return e.abrupt("return",c);case 1:if(null==r){e.next=3;break}return e.next=2,t.logon(r);case 2:e.sent;case 3:return e.next=4,t.addServices("compute");case 4:if(u=e.sent,i=u.compute,l=null,null==c){e.next=8;break}return p={start:0,limit:100,qs:{filter:"eq(id,'".concat(c,"')")}},e.next=5,t.apiCall(i.links("sessions"),p);case 5:if(f=e.sent,!((b=f.itemsList().toJS().indexOf(c))<0)){e.next=6;break}throw"ERROR: The sessionID ".concat(c," was not found.");case 6:return d=f.itemsCmd(f.itemsList(b),"self"),e.next=7,t.apiCall(d);case 7:return l=e.sent,e.abrupt("return",l);case 8:if(null==t.store.config.options.computeServerId){e.next=10;break}return console.log("NOTE: Detected Workbench"),e.next=9,t.apiCall(i.links("createSession"));case 9:return l=e.sent,e.abrupt("return",l);case 10:return null==n&&(n="SAS Job Execution compute context"),m={qs:{filter:"contains(name,'".concat(n,"')")}},h=null,e.prev=11,e.next=12,t.apiCall(i.links("contexts"),m);case 12:if(0!==(h=e.sent).itemsList().size){e.next=13;break}throw"Context ".concat(n," not found");case 13:e.next=15;break;case 14:throw e.prev=14,v=e.catch(11),console.log("Error: Not able to get context"),v;case 15:if(y=h.itemsList(0),null!=c){e.next=17;break}return m=null==a?null:a,x=h.itemsCmd(y,"createSession"),e.next=16,t.apiCall(x,a);case 16:l=e.sent;case 17:return e.abrupt("return",l);case 18:case"end":return e.stop()}},e,null,[[11,14]])}))).apply(this,arguments)}var fe=function(e,t,n,r,a){return pe.apply(this,arguments)};function be(){return(be=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("log"!==r&&"listing"!==r){e.next=7;break}if(a=[],null===n[r]){e.next=5;break}return e.next=1,t.apiCall(n[r]);case 1:o=e.sent,a=a.concat(o.items().toJS());case 2:if(null===(c=o.scrollCmds("next"))){e.next=4;break}return e.next=3,t.apiCall(c);case 3:o=e.sent,a=a.concat(o.items().toJS()),e.next=2;break;case 4:e.next=6;break;case 5:a[0]="Note: No ".concat(r);case 6:return e.abrupt("return",a);case 7:if("ods"!==r){e.next=11;break}if(null===n.ods){e.next=9;break}return e.next=8,t.apiCall(n.ods);case 8:return u=e.sent,e.abrupt("return",u.items());case 9:return e.abrupt("return","<h2> No ODS output </h2>");case 10:e.next=14;break;case 11:if("tables"!==r){e.next=12;break}return e.abrupt("return",Object.keys(n.tables));case 12:if("files"!==r){e.next=13;break}return e.abrupt("return",Object.keys(n.files));case 13:throw"Error: Invalid type ".concat(r);case 14:case"end":return e.stop()}},e)}))).apply(this,arguments)}var de=function(e,t,n){return be.apply(this,arguments)};function me(){return(me=t(s().mark(function e(t,n,r,a){var o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==a){e.next=2;break}return e.next=1,le(t,n,a);case 1:if("completed"===(o=e.sent).SASJobStatus){e.next=2;break}throw"Error: Preamble failed with completion code of ".concat(o.SASJobStatus);case 2:return e.next=3,oe(t,n,null,r);case 3:return c=e.sent,e.abrupt("return",c);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var he=function(e,t,n,r){return me.apply(this,arguments)};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ve(){return(ve=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f,b,d,m,h,y,x,v,w,g,k,_,S,C,j,O,T,R,E;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=null,i=(i="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),(l=null!=o?xe({},o):{qs:{}}).qs.includeIndex=!0,p=l.qs.format,f=null==c?"rows":c,b=null!=o&&null==a,null==(d=n.tables[i])){e.next=6;break}if(!0===b&&(d.current=null),null!==d.current&&null!=a&&"first"!==a){e.next=4;break}return e.next=1,t.apiCall(d.self);case 1:return m=e.sent,h=m.items().toJS().columnCount,y={qs:{start:0,limit:h}},e.next=2,t.apiCall(m.links("columns"),y);case 2:for(g in x=e.sent,v=[],w=x.items().toJS(),"rows"===f&&v.push({name:"_index_",Column:"_Index_",Label:"Index",length:8,type:"FLOAT",format:"BEST",informat:"BEST",custom:!1,isFormat:!1}),w)k=w[g],_={name:k.name.toLowerCase(),Column:k.name.toLowerCase(),Label:k.data.label,length:k.data.length,type:k.data.type,format:null!=k.data.format?k.data.format.name:null,informat:null!=k.data.informat?k.data.informat.name:null,custom:!1,isFormat:p},S=!0===l.qs.includeIndex?1:0,v[k.data.index+S]=_;return e.next=3,t.apiCall(m.links(f),l);case 3:C=e.sent,j="rowSet"===f?C.items("rows").toJS():we(C),d.current=C,d.schema=v,d.columns=x,u={columns:x,schema:v,rows:j,scrollOptions:C.scrollCmds().keySeq().toJS()},e.next=6;break;case 4:if(O=d.current,T=a,"next"===a&&null===O.scrollCmds("next")&&(T=null!==O.links("last")?"last":null),"prev"===a&&null===O.scrollCmds("prev")&&(T=null!==O.links("first")?"first":null),u={schema:d.schema,columns:d.columns,currentColumns:d.currentColumns,rows:[],scrollOptions:O.scrollCmds().keySeq().toJS()},null===T||null===O.scrollCmds(T)){e.next=6;break}return e.next=5,t.apiCall(O.scrollCmds(T),l);case 5:R=e.sent,d.current=R,E="rows"!==f?R.items("rows").toJS():we(R),u={schema:d.schema,columns:d.schema,rows:E,scrollOptions:R.scrollCmds().keySeq().toJS()};case 6:return e.abrupt("return",u);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function we(e){return e.items().toJS().map(function(e){return e.cells})}var ge=function(e,t,n,r,a,s){return ve.apply(this,arguments)};function ke(){return(ke=t(s().mark(function e(t,n,r,a){var o,c,u,i,l,p;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(o=n.files[r])){e.next=1;break}throw"Invalid fileref ".concat(r);case 1:if(null!==o.current){e.next=4;break}return c={qs:{filter:"eq(name,'".concat(r,"')")}},e.next=2,t.apiCall(n.session.links("files"),c);case 2:return u=e.sent,e.next=3,t.apiCall(u.itemsCmd(r,"self"));case 3:u=e.sent,o.current=u;case 4:if(!0!==a){e.next=5;break}return i="".concat(n.session.host).concat(o.current.links("content","link","uri")),e.abrupt("return",i);case 5:if(null!==o.data){e.next=7;break}return e.next=6,t.apiCall(o.current.links("content"));case 6:return l=e.sent,p=l.items(),o.data=p,e.abrupt("return",p);case 7:return e.abrupt("return",o.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var _e=function(e,t,n,r){return ke.apply(this,arguments)};function Se(){return(Se=t(s().mark(function e(t,n,r,a){var o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o="\n proc append base=".concat(a.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),e.next=1,le(t,n,o);case 1:return c=e.sent,u="completed"===c.SASJobStatus?0:1,e.abrupt("return",{msg:"Append Completed. Status is: ".concat(c.SASJobStatus),statusCode:u});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ce=function(e,t,n,r){return Se.apply(this,arguments)};function je(){return(je=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,b,d,m,h,y,x,v,w,g,k;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(p in a=r.data,o=r.table,c=r.where,u="proc sql; update ".concat(o.libref,".").concat(o.name),i="SET ",l=" ",a)i=i+l+p+"="+Oe(a[p]),l=", ";if(u=u+" "+i,f=" WHERE ",b=" ","string"==typeof c)f+=c;else for(d in c)m=c[d],h=Oe(m),f=f+b+d+"= ".concat(h," "),b=" AND ";return y=(u=u+" "+f+";run;").split(/\r?\n/),x={data:{code:y}},e.next=1,t.apiCall(n.links("execute"),x);case 1:return v=e.sent,w={qs:{newState:"Completed",timeout:1}},e.next=2,t.jobState(v,w);case 2:return g=e.sent,k="completed"===g.data?0:1,e.abrupt("return",{statusCode:k,msg:g.data});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Oe(e){return null==e?".":"string"==typeof e?JSON.stringify(e):e.toString()}var Te=function(e,t,n){return je.apply(this,arguments)};function Re(){return(Re=t(s().mark(function e(t,n,r,a,o){var c,u,i,l,p,f;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l in c="data ".concat(r.libref,".").concat(r.name,"; INFILE datalines delimiter=',' ;\n"),u="",i="INPUT ",o)p=o[l],i=i+p.Column+" ","CHAR"===p.Type&&(f=" ".concat(p.Column," $ ").concat(p.length," \n"),u=u+" "+f);return u.length>0&&(u="LENGTH "+u+";\n"),c=c+";\n"+u+(i+=";\n")+"datalines;\n"+a+"\n; run; proc print;run;\n",e.next=1,le(t,n,c);case 1:return e.abrupt("return",{msg:"done",statusCode:0});case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ee=function(e,t,n,r,a){return Re.apply(this,arguments)};function qe(){return(qe=t(s().mark(function e(t,n){var r,a,o,c;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("reports");case 1:return r=e.sent,a=r.reports,console.log(a),o=null,null!==n&&(o={qs:{filter:"eq(name,'".concat(n,"')")}}),console.log("-----------",a.links("reports")),e.next=2,t.apiCall(a.links("reports"),o);case 2:return c=e.sent,e.abrupt("return",0===c.itemsList().size?null:c);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Pe=function(e,t){return qe.apply(this,arguments)};function Ae(){return(Ae=t(s().mark(function e(t,n){var r,a,o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.rafObject("reportImages"),e.next=1,Pe(t,n);case 1:if(null!==(a=e.sent)){e.next=2;break}return e.abrupt("return","".concat(n," was not found"));case 2:return o=a.itemsCmd(a.itemsList(0),"self","link","uri"),c={data:{reportUri:o,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},e.next=3,t.apiCall(r.links("createJob"),c);case 3:return u=e.sent,e.next=4,t.jobState(u,{qs:{wait:1.5}},10,2);case 4:if("completed"===(i=e.sent).data){e.next=5;break}return e.abrupt("return","Job failed ".concat(i.data));case 5:return e.next=6,t.apiCall(i.job.itemsCmd(i.job.itemsList(0),"image"));case 6:return l=e.sent,e.abrupt("return",l.items());case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Le=function(e,t){return Ae.apply(this,arguments)};function De(){return(De=t(s().mark(function e(t,n){var r,a;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pe(t,n);case 1:if(null!==(r=e.sent)){e.next=2;break}throw null==n?"No reports were found":"".concat(n," was not found");case 2:return a=[],r.items().map(function(e,t){var n={name:t,uri:r.itemsCmd(t,"self","link","uri")};a.push(n)}),e.abrupt("return",a);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ie=function(e,t){return De.apply(this,arguments)};function Ne(){return(Ne=t(s().mark(function e(t,n,r){var a,o,c,u,i,l,p,f,b;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.tables[r],e.next=1,t.apiCall(a);case 1:return o=e.sent,e.next=2,t.apiCall(o.links("rowSet"));case 2:c=e.sent,u=c.items("columns"),i=c.items("rows"),l=[],p=i.size,f=s().mark(function e(){var t,n;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=i.get(b),n={},u.map(function(e,r){var a=e.toLowerCase();n[a]=t.get(r)}),l.push(n);case 1:case"end":return e.stop()}},e)}),b=0;case 3:if(!(b<p)){e.next=5;break}return e.delegateYield(f(),"t0",4);case 4:b++,e.next=3;break;case 5:return e.abrupt("return",l);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Je=function(e,t,n){return Ne.apply(this,arguments)};function Fe(){return(Fe=t(s().mark(function e(t,n){var r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n){e.next=1;break}return e.next=1,t.logon(n);case 1:return e.next=2,t.addServices("jobExecution","compute","jobDefinitions");case 2:return r=e.sent,e.abrupt("return",r.jobExecution);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ue=function(e,t){return Fe.apply(this,arguments)};function Me(){return(Me=t(s().mark(function e(t,n){return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Qe(t,n);case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Qe(e,t){return ze.apply(this,arguments)}function ze(){return ze=t(s().mark(function e(n,r){var a,o,c,u,i,l,p,f,b,d;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(c in d=function(){return d=t(s().mark(function e(t,n){var r,a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("files");case 1:return r=e.sent,a=r.files,o={qs:{filter:"eq(id,'".concat(n,"')")}},e.next=2,t.apiCall(a.links("files"),o);case 2:return c=e.sent,u=c.itemsCmd(c.itemsList(0),"content"),e.next=3,t.apiCall(u);case 3:return i=e.sent,e.abrupt("return",i.items());case 4:case"end":return e.stop()}},e)})),d.apply(this,arguments)},b=function(e,t){return d.apply(this,arguments)},a=r.items().toJS(),o={session:r.session,log:null,listing:null,ods:null,job:r,tables:{},files:{},results:a.results},a.results)"COMPUTE_CONTEXT"!==c&&"COMPUTE_JOB"!==c&&"COMPUTE_SESSION"!==c&&(u=c.split("."),i=u[1],3===u.length&&(i=u[1]+"."+u[2]),o.files[i]=f,l=a.results[c],p=l.split("/"),f=l.split("/")[p.length-1],o.files[i]=f);return e.next=1,b(n,o.files["log.txt"]);case 1:return o.log=e.sent,e.next=2,b(n,o.files["listing.txt"]);case 2:return o.listing=e.sent,e.abrupt("return",o);case 3:case"end":return e.stop()}},e)})),ze.apply(this,arguments)}var Ge=function(e,t){return Me.apply(this,arguments)};function Be(){return(Be=t(s().mark(function e(t,n){var r,a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("jobExecution");case 1:return r=e.sent,a=r.jobExecution,e.next=2,t.apiCall(a.links("create"),n);case 2:return o=e.sent,e.next=3,t.jobState(o,null,5,2);case 3:if("running"!==(c=e.sent).data){e.next=4;break}throw"ERROR: Job did not complete in allotted time";case 4:if("failed"!==c.data){e.next=5;break}throw JSON.stringify(c);case 5:return e.next=6,Ge(t,c.job);case 6:return u=e.sent,e.abrupt("return",u);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}var He=function(e,t){return Be.apply(this,arguments)};function Ye(){return(Ye=t(s().mark(function e(t,n,r,a){var o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o={},null==a){e.next=1;break}i=a,e.next=3;break;case 1:return e.next=2,Ve(t,n);case 2:i=e.sent;case 3:return o.jobDefinitionUri=i,o.arguments=r,c={data:o},e.next=4,He(t,c);case 4:return u=e.sent,e.abrupt("return",u);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ve(e,t){return We.apply(this,arguments)}function We(){return(We=t(s().mark(function e(t,n){var r,a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("jobDefinitions");case 1:return r=e.sent,a=r.jobDefinitions,o=null,c={qs:{filter:"eq(name,'".concat(n,"')")}},u=a.links("job-definitions"),e.prev=2,e.next=3,t.apiCall(u,c);case 3:if(0!==(i=e.sent).itemsList().size){e.next=4;break}throw"Error: ".concat(n," not found in the system");case 4:o=i.itemsCmd(n,"self","link","uri");case 5:return e.abrupt("return",o);case 6:throw e.prev=6,e.catch(2),"Error: ".concat(n," not found in the system");case 7:case"end":return e.stop()}},e,null,[[2,6]])}))).apply(this,arguments)}var Xe=function(e,t,n,r){return Ye.apply(this,arguments)};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(){return(Ze=t(s().mark(function e(t,n){var r,a,o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("jobExecution");case 1:return r=e.sent,a=r.jobExecution,e.next=2,t.apiCall(a.links("jobRequests"));case 2:return o=e.sent,e.next=3,t.apiCall(o.links("createJobRequest"),$e({},n));case 3:return c=e.sent,e.next=4,t.apiCall(c.links("submitJob"),n);case 4:return u=e.sent,e.next=5,t.jobState(u,null,5,2);case 5:if(i=e.sent,console.log(i),"running"!==i.data){e.next=6;break}throw"ERROR: Job did not complete in allotted time";case 6:if("failed"!==i.data){e.next=7;break}throw JSON.stringify(i);case 7:return e.next=8,Ge(t,i.job);case 8:return l=e.sent,e.abrupt("return",l);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var et=function(e,t){return Ze.apply(this,arguments)};function tt(){return(tt=t(s().mark(function e(t,n,r){var a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.addServices("jobExecution");case 1:return a=e.sent,o=a.jobExecution,e.prev=2,e.next=3,nt(t,o,n);case 3:return c=e.sent,u={data:{jobDefinitionUri:c,arguments:r}},e.next=4,et(t,u);case 4:return i=e.sent,e.abrupt("return",i);case 5:throw e.prev=5,e.catch(2);case 6:case"end":return e.stop()}},e,null,[[2,5]])}))).apply(this,arguments)}function nt(e,t,n){return rt.apply(this,arguments)}function rt(){return(rt=t(s().mark(function e(t,n,r){var a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={qs:{filter:"eq(name,'".concat(r,"')")}},o=n.links("jobs"),e.prev=1,e.next=2,t.apiCall(o,a);case 2:return c=e.sent,u=c.itemsList(0),i=c.items(u,"data","jobRequest","jobDefinitionUri"),e.abrupt("return",i);case 3:throw e.prev=3,e.catch(1),"Error: ".concat(name," not found in the system");case 4:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)}var at=function(e,t,n){return tt.apply(this,arguments)};function st(){return(st=t(s().mark(function e(t,n,r){var a,o,c,u;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=n.service,o=0;case 1:if(!(o<r.length)){e.next=4;break}if(c=r[o],null!=n.steps[c]){e.next=3;break}return e.next=2,ut(t,a,c);case 2:u=e.sent,n.steps[c]=u;case 3:o++,e.next=1;break;case 4:return e.abrupt("return",!0);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ot=function(e,t,n){return st.apply(this,arguments)};function ct(){return(ct=t(s().mark(function e(t,n,r){var a,o,c,u,i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},e.next=1,t.apiCall(n.links("modules"),a);case 1:if(0!==(o=e.sent).itemsList().size){e.next=2;break}return e.abrupt("return",null);case 2:return c=o.itemsCmd(r,"steps"),e.next=3,t.apiCall(c);case 3:return u=e.sent,i={name:r,stepsRafLink:u,stepIds:o.items(r,"data","stepIds").toJS(),microanalyticScore:n},e.abrupt("return",i);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ut=function(e,t,n){return ct.apply(this,arguments)};function it(){return(it=t(s().mark(function e(t,n,r){var a,o,c,u,i,l;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null==r){e.next=1;break}return e.next=1,t.logon(r);case 1:return e.next=2,t.addServices("microanalyticScore");case 2:a=e.sent,o=a.microanalyticScore,c={service:o,steps:{}},u=0;case 3:if(!(u<n.length)){e.next=6;break}return i=n[u],e.next=4,ut(t,o,i);case 4:l=e.sent,c.steps[i]=l;case 5:u++,e.next=3;break;case 6:return e.abrupt("return",c);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}var lt=function(e,t,n){return it.apply(this,arguments)},pt=function(e,t,n,r){var a=e.steps[t];if(null===a)return[];var s=null;if(null==n){var o=a.stepIds.findIndex(function(e){return"execute"===e||"score"===e});if(-1===o)return[];s=a.stepIds[o];var c=a.stepsRafLink.items(s,"data","inputs"),u=a.stepsRafLink.items(s,"data","outputs");return null===c?[]:!0===r?{inputs:c.toJS(),outputs:u.toJS()}:c.toJS()}if(-1===a.stepIds.findIndex(function(e){return e===n}))return[];s=n;var i=a.stepsRafLink.items(s,"data","inputs"),l=a.stepsRafLink.items(s,"data","outputs");return null===i?[]:!0===r?{inputs:i.toJS(),outputs:l.toJS()}:i.toJS()};function ft(){return(ft=t(s().mark(function e(t,n,r,a,o,c){var u,i,l,p,f,b,d,m,h,y,x,v,w;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=n.steps[r],i=!1,l=[],!1===Array.isArray(a))for(p in a)f={name:p,value:a[p]},l.push(f);else i=!0;if(b={data:{inputs:!0===i?a:l}},d=null,null!=o){e.next=3;break}if(-1!==(m=u.stepIds.findIndex(function(e){return"execute"===e||"score"===e}))){e.next=1;break}return e.abrupt("return",[]);case 1:d=u.stepIds[m];case 2:e.next=5;break;case 3:if(-1!==u.stepIds.findIndex(function(e){return e===o})){e.next=4;break}return e.abrupt("return",[]);case 4:d=o;case 5:if(null==c&&(c="execute"),null!==(h=u.stepsRafLink.itemsCmd(d,c))){e.next=6;break}return y=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(o," operation: ").concat(c," is an invalid combination")}],e.abrupt("return",y);case 6:return e.next=7,t.apiCall(h,b);case 7:return x=e.sent,v=x.items("outputs").toJS(),!0===i?w=v:(w={},v.map(function(e){w[e.name]=e.value})),e.abrupt("return",w);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var bt=function(e,t,n,r,a,s){return ft.apply(this,arguments)};function dt(){return(dt=t(s().mark(function e(t,n,r){var a,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,lt(t,[n]);case 1:return a=e.sent,e.next=2,bt(t,a,n,r,"score","execute");case 2:return o=e.sent,e.abrupt("return",o);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var mt=function(e,t,n){return dt.apply(this,arguments)},ht={caslRun:h,caslRunBase:p,casSetup:O,casActionRun:R,casFetchData:q,casUpdateData:N,computeRun:le,computeSetup:fe,computeSummary:oe,computeFetchData:ge,computeFileContent:_e,computeResults:de,findReport:Pe,getReportImage:Le,getReportUri:Ie,getSASTableRows:Je,jesSetup:Ue,jesRun:Xe,jesSummary:Ge,jsonToDict:i,casTableToJson:Q,caslScore:g,caslDescribe:C,masSetup:lt,masAddModel:ot,masDescribe:pt,masRun:bt}}(),r}()});
|
package/lib/restaflib.js
CHANGED
|
@@ -566,7 +566,7 @@ eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* har
|
|
|
566
566
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
567
567
|
|
|
568
568
|
"use strict";
|
|
569
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ casActionRun: () => (/* reexport safe */ _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"default\"]),\n/* harmony export */ casAppendTable: () => (/* reexport safe */ _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ casFetchData: () => (/* reexport safe */ _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n/* harmony export */ casFetchRows: () => (/* reexport safe */ _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"default\"]),\n/* harmony export */ casLoadTable: () => (/* reexport safe */ _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ casSaveTable: () => (/* reexport safe */ _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ casSetup: () => (/* reexport safe */ _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ casTableToJson: () => (/* reexport safe */ _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"default\"]),\n/* harmony export */ casUpdateData: () => (/* reexport safe */ _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n/* harmony export */ casUpload: () => (/* reexport safe */ _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"default\"]),\n/* harmony export */ caslDescribe: () => (/* reexport safe */ _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ caslRun: () => (/* reexport safe */ _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ caslRunBase: () => (/* reexport safe */ _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ caslScore: () => (/* reexport safe */ _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ computeAppendTable: () => (/* reexport safe */ _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"default\"]),\n/* harmony export */ computeFetchData: () => (/* reexport safe */ _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"default\"]),\n/* harmony export */ computeFileContent: () => (/* reexport safe */ _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"default\"]),\n/* harmony export */ computeResults: () => (/* reexport safe */ _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"default\"]),\n/* harmony export */ computeRun: () => (/* reexport safe */ _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"default\"]),\n/* harmony export */ computeSetup: () => (/* reexport safe */ _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"default\"]),\n/* harmony export */ computeSetupTables: () => (/* reexport safe */ _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ computeSummary: () => (/* reexport safe */ _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"default\"]),\n/* harmony export */ computeUpdateData: () => (/* reexport safe */ _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"default\"]),\n/* harmony export */ computeUpload: () => (/* reexport safe */ _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"default\"]),\n/* harmony export */ findReport: () => (/* reexport safe */ _findReport__WEBPACK_IMPORTED_MODULE_24__[\"default\"]),\n/* harmony export */ getReportImage: () => (/* reexport safe */ _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"default\"]),\n/* harmony export */ getReportUri: () => (/* reexport safe */ _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"default\"]),\n/* harmony export */ getSasTableRows: () => (/* reexport safe */ _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"default\"]),\n/* harmony export */ jesRun: () => (/* reexport safe */ _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"default\"]),\n/* harmony export */ jesSetup: () => (/* reexport safe */ _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"default\"]),\n/* harmony export */ jesSummary: () => (/* reexport safe */ _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"default\"]),\n/* harmony export */ jsonToDict: () => (/* reexport safe */ _jsonToDict__WEBPACK_IMPORTED_MODULE_31__[\"default\"]),\n/* harmony export */ lib: () => (/* binding */ lib),\n/* harmony export */ masAddModel: () => (/* reexport safe */ _masAddModel__WEBPACK_IMPORTED_MODULE_36__[\"default\"]),\n/* harmony export */ masDescribe: () => (/* reexport safe */ _masDescribe__WEBPACK_IMPORTED_MODULE_33__[\"default\"]),\n/* harmony export */ masRun: () => (/* reexport safe */ _masRun__WEBPACK_IMPORTED_MODULE_34__[\"default\"]),\n/* harmony export */ masScore: () => (/* reexport safe */ _masScore__WEBPACK_IMPORTED_MODULE_35__[\"default\"]),\n/* harmony export */ masSetup: () => (/* reexport safe */ _masSetup__WEBPACK_IMPORTED_MODULE_32__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = (0,_lib__WEBPACK_IMPORTED_MODULE_37__[\"default\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?\n}");
|
|
569
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ casActionRun: () => (/* reexport safe */ _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"default\"]),\n/* harmony export */ casAppendTable: () => (/* reexport safe */ _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ casFetchData: () => (/* reexport safe */ _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"default\"]),\n/* harmony export */ casFetchRows: () => (/* reexport safe */ _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"default\"]),\n/* harmony export */ casLoadTable: () => (/* reexport safe */ _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ casSaveTable: () => (/* reexport safe */ _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ casSetup: () => (/* reexport safe */ _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ casTableToJson: () => (/* reexport safe */ _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"default\"]),\n/* harmony export */ casUpdateData: () => (/* reexport safe */ _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n/* harmony export */ casUpload: () => (/* reexport safe */ _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"default\"]),\n/* harmony export */ caslDescribe: () => (/* reexport safe */ _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ caslRun: () => (/* reexport safe */ _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ caslRunBase: () => (/* reexport safe */ _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ caslScore: () => (/* reexport safe */ _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ computeAppendTable: () => (/* reexport safe */ _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"default\"]),\n/* harmony export */ computeFetchData: () => (/* reexport safe */ _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"default\"]),\n/* harmony export */ computeFileContent: () => (/* reexport safe */ _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"default\"]),\n/* harmony export */ computeResults: () => (/* reexport safe */ _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"default\"]),\n/* harmony export */ computeRun: () => (/* reexport safe */ _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"default\"]),\n/* harmony export */ computeSetup: () => (/* reexport safe */ _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"default\"]),\n/* harmony export */ computeSetupTables: () => (/* reexport safe */ _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ computeSummary: () => (/* reexport safe */ _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"default\"]),\n/* harmony export */ computeUpdateData: () => (/* reexport safe */ _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"default\"]),\n/* harmony export */ computeUpload: () => (/* reexport safe */ _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"default\"]),\n/* harmony export */ findReport: () => (/* reexport safe */ _findReport__WEBPACK_IMPORTED_MODULE_24__[\"default\"]),\n/* harmony export */ getReportImage: () => (/* reexport safe */ _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"default\"]),\n/* harmony export */ getReportUri: () => (/* reexport safe */ _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"default\"]),\n/* harmony export */ getSasTableRows: () => (/* reexport safe */ _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"default\"]),\n/* harmony export */ jesRun: () => (/* reexport safe */ _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"default\"]),\n/* harmony export */ jesSetup: () => (/* reexport safe */ _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"default\"]),\n/* harmony export */ jesSummary: () => (/* reexport safe */ _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"default\"]),\n/* harmony export */ jobRun: () => (/* reexport safe */ _jobRun__WEBPACK_IMPORTED_MODULE_31__[\"default\"]),\n/* harmony export */ jsonToDict: () => (/* reexport safe */ _jsonToDict__WEBPACK_IMPORTED_MODULE_32__[\"default\"]),\n/* harmony export */ lib: () => (/* binding */ lib),\n/* harmony export */ masAddModel: () => (/* reexport safe */ _masAddModel__WEBPACK_IMPORTED_MODULE_37__[\"default\"]),\n/* harmony export */ masDescribe: () => (/* reexport safe */ _masDescribe__WEBPACK_IMPORTED_MODULE_34__[\"default\"]),\n/* harmony export */ masRun: () => (/* reexport safe */ _masRun__WEBPACK_IMPORTED_MODULE_35__[\"default\"]),\n/* harmony export */ masScore: () => (/* reexport safe */ _masScore__WEBPACK_IMPORTED_MODULE_36__[\"default\"]),\n/* harmony export */ masSetup: () => (/* reexport safe */ _masSetup__WEBPACK_IMPORTED_MODULE_33__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jobRun__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jobRun */ \"./jobRun.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = (0,_lib__WEBPACK_IMPORTED_MODULE_38__[\"default\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?\n}");
|
|
570
570
|
|
|
571
571
|
/***/ }),
|
|
572
572
|
|
|
@@ -577,7 +577,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
577
577
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
578
578
|
|
|
579
579
|
"use strict";
|
|
580
|
-
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {
|
|
580
|
+
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string jobDefinition - jogdefinition name\r\n * @param {object} args - arguments to pass to the job definition\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4) {\n return _jesRun.apply(this, arguments);\n}\nfunction _jesRun() {\n _jesRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, jobDefinitionName, args, jobDef) {\n var jobRequest, jobDefinition, payload, jobResult, _t;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // generate macro variables\n jobRequest = {}; //jobRequest.type = 'Compute';\n jobDefinition = {};\n if (!(jobDef != null)) {\n _context.next = 1;\n break;\n }\n _t = jobDef;\n _context.next = 3;\n break;\n case 1:\n _context.next = 2;\n return jobDefUri(store, jobDefinitionName);\n case 2:\n _t = _context.sent;\n case 3:\n jobRequest.jobDefinitionUri = _t;\n // jobDefinition.type ='Compute';\n jobRequest.arguments = args;\n payload = {\n data: jobRequest\n }; // run code and get results\n debugger;\n _context.next = 4;\n return (0,_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, payload);\n case 4:\n jobResult = _context.sent;\n return _context.abrupt(\"return\", jobResult);\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRun.apply(this, arguments);\n}\nfunction jobDefUri(_x5, _x6) {\n return _jobDefUri.apply(this, arguments);\n}\nfunction _jobDefUri() {\n _jobDefUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, name) {\n var _yield$store$addServi, jobDefinitions, uri, payload, rafLink, jdefList, _t2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 1;\n return store.addServices('jobDefinitions');\n case 1:\n _yield$store$addServi = _context2.sent;\n jobDefinitions = _yield$store$addServi.jobDefinitions;\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n rafLink = jobDefinitions.links('job-definitions');\n _context2.prev = 2;\n _context2.next = 3;\n return store.apiCall(rafLink, payload);\n case 3:\n jdefList = _context2.sent;\n if (!(jdefList.itemsList().size === 0)) {\n _context2.next = 4;\n break;\n }\n throw \"Error: \".concat(name, \" not found in the system\");\n case 4:\n uri = jdefList.itemsCmd(name, 'self', 'link', 'uri');\n case 5:\n return _context2.abrupt(\"return\", uri);\n case 6:\n _context2.prev = 6;\n _t2 = _context2[\"catch\"](2);\n throw \"Error: \".concat(name, \" not found in the system\");\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[2, 6]]);\n }));\n return _jobDefUri.apply(this, arguments);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jesRun);\n\n//# sourceURL=webpack://restaflib/./jesRun.js?\n}");
|
|
581
581
|
|
|
582
582
|
/***/ }),
|
|
583
583
|
|
|
@@ -588,7 +588,7 @@ eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* har
|
|
|
588
588
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
589
589
|
|
|
590
590
|
"use strict";
|
|
591
|
-
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run
|
|
591
|
+
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run jobExecution service\n//\n/** \r\n * @description Reduce jobExecution service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - payload for the jobExecution service\r\n * \r\n * @returns {object} results from a sas jobExecution job in a consumable form\r\n * \r\n */\nfunction jesRunBase(_x, _x2) {\n return _jesRunBase.apply(this, arguments);\n}\nfunction _jesRunBase() {\n _jesRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, payload) {\n var _yield$store$addServi, jobExecution, job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n debugger;\n _context.next = 2;\n return store.apiCall(jobExecution.links('create'), payload);\n case 2:\n job = _context.sent;\n _context.next = 3;\n return store.jobState(job, null, 5, 2);\n case 3:\n status = _context.sent;\n if (!(status.data === 'running')) {\n _context.next = 4;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 4:\n if (!(status.data === 'failed')) {\n _context.next = 5;\n break;\n }\n throw JSON.stringify(status);\n case 5:\n _context.next = 6;\n return (0,_jesSummary__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, status.job);\n case 6:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRunBase.apply(this, arguments);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jesRunBase);\n\n//# sourceURL=webpack://restaflib/./jesRunBase.js?\n}");
|
|
592
592
|
|
|
593
593
|
/***/ }),
|
|
594
594
|
|
|
@@ -610,7 +610,29 @@ eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* har
|
|
|
610
610
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
611
611
|
|
|
612
612
|
"use strict";
|
|
613
|
-
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\",
|
|
613
|
+
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return jobResults(store, job);\n case 1:\n return _context.abrupt(\"return\", _context.sent);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSummary.apply(this, arguments);\n}\nfunction jobResults(_x3, _x4) {\n return _jobResults.apply(this, arguments);\n}\nfunction _jobResults() {\n _jobResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee3(store, job) {\n var jobjs, cResult, p, pa, key, l, la, id, getContent, _getContent;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n _getContent = function _getContent3() {\n _getContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, id) {\n var _yield$store$addServi, files, payload, f, contentRaf, text;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 1;\n return store.addServices(\"files\");\n case 1:\n _yield$store$addServi = _context2.sent;\n files = _yield$store$addServi.files;\n payload = {\n qs: {\n filter: \"eq(id,'\".concat(id, \"')\")\n }\n };\n _context2.next = 2;\n return store.apiCall(files.links(\"files\"), payload);\n case 2:\n f = _context2.sent;\n contentRaf = f.itemsCmd(f.itemsList(0), 'content');\n _context2.next = 3;\n return store.apiCall(contentRaf);\n case 3:\n text = _context2.sent;\n return _context2.abrupt(\"return\", text.items());\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _getContent.apply(this, arguments);\n };\n getContent = function _getContent2(_x5, _x6) {\n return _getContent.apply(this, arguments);\n };\n jobjs = job.items().toJS();\n cResult = {\n session: job.session,\n log: null,\n listing: null,\n ods: null,\n job: job /*null*/,\n tables: {},\n files: {},\n results: jobjs.results\n }; // extract fileid in the files service.\n for (p in jobjs.results) {\n if (!(p === 'COMPUTE_CONTEXT' || p === 'COMPUTE_JOB' || p === 'COMPUTE_SESSION')) {\n pa = p.split('.');\n key = pa[1];\n ;\n if (pa.length === 3) {\n key = pa[1] + '.' + pa[2];\n }\n cResult.files[key] = id;\n l = jobjs.results[p];\n la = l.split('/');\n id = l.split('/')[la.length - 1];\n cResult.files[key] = id;\n }\n }\n\n // get the log and listing for ease of use\n _context3.next = 1;\n return getContent(store, cResult.files['log.txt']);\n case 1:\n cResult.log = _context3.sent;\n _context3.next = 2;\n return getContent(store, cResult.files['listing.txt']);\n case 2:\n cResult.listing = _context3.sent;\n return _context3.abrupt(\"return\", cResult);\n case 3:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _jobResults.apply(this, arguments);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jesSummary);\n\n//# sourceURL=webpack://restaflib/./jesSummary.js?\n}");
|
|
614
|
+
|
|
615
|
+
/***/ }),
|
|
616
|
+
|
|
617
|
+
/***/ "./jobRun.js":
|
|
618
|
+
/*!*******************!*\
|
|
619
|
+
!*** ./jobRun.js ***!
|
|
620
|
+
\*******************/
|
|
621
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
622
|
+
|
|
623
|
+
"use strict";
|
|
624
|
+
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jobRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jobRunBase */ \"./jobRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} jobDefinition - jogdefinition name\r\n * @param {object} args - arguments to pass to the job definition\r\n * @param {string} src - source code to run\r\n * @param {string} jobDefUri - job definition URI to use(overrides jobDefinition name)\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jobrun(_x, _x2, _x3) {\n return _jobrun.apply(this, arguments);\n}\nfunction _jobrun() {\n _jobrun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(store, jobName, args) {\n var _yield$store$addServi, jobExecution, jobDefinitionUri, jobRequest, payload, jobSummary, _t;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n _context.prev = 2;\n _context.next = 3;\n return findJobDefinition(store, jobExecution, jobName);\n case 3:\n jobDefinitionUri = _context.sent;\n jobRequest = {\n jobDefinitionUri: jobDefinitionUri,\n arguments: args\n };\n payload = {\n data: jobRequest\n }; // jesRun will ignore the jobName and use thejobDefinitionUri\n debugger;\n _context.next = 4;\n return (0,_jobRunBase__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(store, payload);\n case 4:\n jobSummary = _context.sent;\n return _context.abrupt(\"return\", jobSummary);\n case 5:\n _context.prev = 5;\n _t = _context[\"catch\"](2);\n throw _t;\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[2, 5]]);\n }));\n return _jobrun.apply(this, arguments);\n}\nfunction findJobDefinition(_x4, _x5, _x6) {\n return _findJobDefinition.apply(this, arguments);\n}\nfunction _findJobDefinition() {\n _findJobDefinition = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee2(store, jobExecution, jobName) {\n var uri, payload, rafLink, jobList, id, _uri, _t2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function (_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(jobName, \"')\")\n }\n };\n rafLink = jobExecution.links('jobs');\n debugger;\n _context2.prev = 1;\n _context2.next = 2;\n return store.apiCall(rafLink, payload);\n case 2:\n jobList = _context2.sent;\n id = jobList.itemsList(0);\n _uri = jobList.items(id, 'data', 'jobRequest', 'jobDefinitionUri');\n return _context2.abrupt(\"return\", _uri);\n case 3:\n _context2.prev = 3;\n _t2 = _context2[\"catch\"](1);\n throw \"Error: \".concat(name, \" not found in the system\");\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[1, 3]]);\n }));\n return _findJobDefinition.apply(this, arguments);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jobrun);\n\n//# sourceURL=webpack://restaflib/./jobRun.js?\n}");
|
|
625
|
+
|
|
626
|
+
/***/ }),
|
|
627
|
+
|
|
628
|
+
/***/ "./jobRunBase.js":
|
|
629
|
+
/*!***********************!*\
|
|
630
|
+
!*** ./jobRunBase.js ***!
|
|
631
|
+
\***********************/
|
|
632
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
633
|
+
|
|
634
|
+
"use strict";
|
|
635
|
+
eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n//\n// Notes: Run jobExecution service\n//\n/** \r\n * @description Reduce jobExecution service to an consummable form(async)\r\n * @private\r\n * @module jobRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - payload for the jobExecution service\r\n * \r\n * @returns {object} results from a sas jobExecution job in a consumable form\r\n * \r\n */\nfunction jobRunBase(_x, _x2) {\n return _jobRunBase.apply(this, arguments);\n}\nfunction _jobRunBase() {\n _jobRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().mark(function _callee(store, payload) {\n var _yield$store$addServi, jobExecution, jobRequestList, jobRequest, job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default().wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 1;\n return store.addServices('jobExecution');\n case 1:\n _yield$store$addServi = _context.sent;\n jobExecution = _yield$store$addServi.jobExecution;\n debugger;\n // create a job request\n _context.next = 2;\n return store.apiCall(jobExecution.links('jobRequests'));\n case 2:\n jobRequestList = _context.sent;\n _context.next = 3;\n return store.apiCall(jobRequestList.links('createJobRequest'), _objectSpread({}, payload));\n case 3:\n jobRequest = _context.sent;\n debugger;\n _context.next = 4;\n return store.apiCall(jobRequest.links('submitJob'), payload);\n case 4:\n job = _context.sent;\n debugger;\n _context.next = 5;\n return store.jobState(job, null, 5, 2);\n case 5:\n status = _context.sent;\n console.log(status);\n\n // Now submit this job\n if (!(status.data === 'running')) {\n _context.next = 6;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 6:\n if (!(status.data === 'failed')) {\n _context.next = 7;\n break;\n }\n throw JSON.stringify(status);\n case 7:\n _context.next = 8;\n return (0,_jesSummary__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(store, status.job);\n case 8:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jobRunBase.apply(this, arguments);\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jobRunBase);\n\n//# sourceURL=webpack://restaflib/./jobRunBase.js?\n}");
|
|
614
636
|
|
|
615
637
|
/***/ }),
|
|
616
638
|
|