@sassoftware/restaflib 5.1.9 → 5.1.10

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 CHANGED
@@ -1,1055 +1,1055 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("restaflib", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["restaflib"] = factory();
8
- else
9
- root["restaflib"] = factory();
10
- })(window, function() {
11
- return /******/ (function(modules) { // webpackBootstrap
12
- /******/ // The module cache
13
- /******/ var installedModules = {};
14
- /******/
15
- /******/ // The require function
16
- /******/ function __webpack_require__(moduleId) {
17
- /******/
18
- /******/ // Check if module is in cache
19
- /******/ if(installedModules[moduleId]) {
20
- /******/ return installedModules[moduleId].exports;
21
- /******/ }
22
- /******/ // Create a new module (and put it into the cache)
23
- /******/ var module = installedModules[moduleId] = {
24
- /******/ i: moduleId,
25
- /******/ l: false,
26
- /******/ exports: {}
27
- /******/ };
28
- /******/
29
- /******/ // Execute the module function
30
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
- /******/
32
- /******/ // Flag the module as loaded
33
- /******/ module.l = true;
34
- /******/
35
- /******/ // Return the exports of the module
36
- /******/ return module.exports;
37
- /******/ }
38
- /******/
39
- /******/
40
- /******/ // expose the modules object (__webpack_modules__)
41
- /******/ __webpack_require__.m = modules;
42
- /******/
43
- /******/ // expose the module cache
44
- /******/ __webpack_require__.c = installedModules;
45
- /******/
46
- /******/ // define getter function for harmony exports
47
- /******/ __webpack_require__.d = function(exports, name, getter) {
48
- /******/ if(!__webpack_require__.o(exports, name)) {
49
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
- /******/ }
51
- /******/ };
52
- /******/
53
- /******/ // define __esModule on exports
54
- /******/ __webpack_require__.r = function(exports) {
55
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
- /******/ }
58
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
- /******/ };
60
- /******/
61
- /******/ // create a fake namespace object
62
- /******/ // mode & 1: value is a module id, require it
63
- /******/ // mode & 2: merge all properties of value into the ns
64
- /******/ // mode & 4: return value when already ns object
65
- /******/ // mode & 8|1: behave like require
66
- /******/ __webpack_require__.t = function(value, mode) {
67
- /******/ if(mode & 1) value = __webpack_require__(value);
68
- /******/ if(mode & 8) return value;
69
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
- /******/ var ns = Object.create(null);
71
- /******/ __webpack_require__.r(ns);
72
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
- /******/ return ns;
75
- /******/ };
76
- /******/
77
- /******/ // getDefaultExport function for compatibility with non-harmony modules
78
- /******/ __webpack_require__.n = function(module) {
79
- /******/ var getter = module && module.__esModule ?
80
- /******/ function getDefault() { return module['default']; } :
81
- /******/ function getModuleExports() { return module; };
82
- /******/ __webpack_require__.d(getter, 'a', getter);
83
- /******/ return getter;
84
- /******/ };
85
- /******/
86
- /******/ // Object.prototype.hasOwnProperty.call
87
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
- /******/
89
- /******/ // __webpack_public_path__
90
- /******/ __webpack_require__.p = "";
91
- /******/
92
- /******/
93
- /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 0);
95
- /******/ })
96
- /************************************************************************/
97
- /******/ ({
98
-
99
- /***/ "../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
100
- /*!*************************************************************************************!*\
101
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
102
- \*************************************************************************************/
103
- /*! no static exports found */
104
- /*! all exports used */
105
- /***/ (function(module, exports) {
106
-
107
- eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
108
-
109
- /***/ }),
110
-
111
- /***/ "../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
112
- /*!***********************************************************************************!*\
113
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
114
- \***********************************************************************************/
115
- /*! no static exports found */
116
- /*! all exports used */
117
- /***/ (function(module, exports) {
118
-
119
- eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
120
-
121
- /***/ }),
122
-
123
- /***/ "../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
124
- /*!*************************************************************************************!*\
125
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
126
- \*************************************************************************************/
127
- /*! no static exports found */
128
- /*! exports used: default */
129
- /***/ (function(module, exports) {
130
-
131
- eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
132
-
133
- /***/ }),
134
-
135
- /***/ "../../../node_modules/@babel/runtime/helpers/defineProperty.js":
136
- /*!***********************************************************************************!*\
137
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
138
- \***********************************************************************************/
139
- /*! no static exports found */
140
- /*! exports used: default */
141
- /***/ (function(module, exports, __webpack_require__) {
142
-
143
- eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
144
-
145
- /***/ }),
146
-
147
- /***/ "../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
148
- /*!*****************************************************************************************!*\
149
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
150
- \*****************************************************************************************/
151
- /*! no static exports found */
152
- /*! all exports used */
153
- /***/ (function(module, exports) {
154
-
155
- eval("function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
156
-
157
- /***/ }),
158
-
159
- /***/ "../../../node_modules/@babel/runtime/helpers/nonIterableRest.js":
160
- /*!************************************************************************************!*\
161
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
162
- \************************************************************************************/
163
- /*! no static exports found */
164
- /*! all exports used */
165
- /***/ (function(module, exports) {
166
-
167
- eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js?");
168
-
169
- /***/ }),
170
-
171
- /***/ "../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
172
- /*!***************************************************************************************!*\
173
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
174
- \***************************************************************************************/
175
- /*! no static exports found */
176
- /*! all exports used */
177
- /***/ (function(module, exports, __webpack_require__) {
178
-
179
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
180
-
181
- /***/ }),
182
-
183
- /***/ "../../../node_modules/@babel/runtime/helpers/slicedToArray.js":
184
- /*!**********************************************************************************!*\
185
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js ***!
186
- \**********************************************************************************/
187
- /*! no static exports found */
188
- /*! exports used: default */
189
- /***/ (function(module, exports, __webpack_require__) {
190
-
191
- eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"../../../node_modules/@babel/runtime/helpers/nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js?");
192
-
193
- /***/ }),
194
-
195
- /***/ "../../../node_modules/@babel/runtime/helpers/toPrimitive.js":
196
- /*!********************************************************************************!*\
197
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
198
- \********************************************************************************/
199
- /*! no static exports found */
200
- /*! all exports used */
201
- /***/ (function(module, exports, __webpack_require__) {
202
-
203
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
204
-
205
- /***/ }),
206
-
207
- /***/ "../../../node_modules/@babel/runtime/helpers/toPropertyKey.js":
208
- /*!**********************************************************************************!*\
209
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
210
- \**********************************************************************************/
211
- /*! no static exports found */
212
- /*! all exports used */
213
- /***/ (function(module, exports, __webpack_require__) {
214
-
215
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
216
-
217
- /***/ }),
218
-
219
- /***/ "../../../node_modules/@babel/runtime/helpers/typeof.js":
220
- /*!***************************************************************************!*\
221
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
222
- \***************************************************************************/
223
- /*! no static exports found */
224
- /*! all exports used */
225
- /***/ (function(module, exports) {
226
-
227
- eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
228
-
229
- /***/ }),
230
-
231
- /***/ "../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
232
- /*!***********************************************************************************************!*\
233
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
234
- \***********************************************************************************************/
235
- /*! no static exports found */
236
- /*! all exports used */
237
- /***/ (function(module, exports, __webpack_require__) {
238
-
239
- eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");
240
-
241
- /***/ }),
242
-
243
- /***/ "../../../node_modules/@babel/runtime/regenerator/index.js":
244
- /*!******************************************************************************!*\
245
- !*** C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
246
- \******************************************************************************/
247
- /*! no static exports found */
248
- /*! exports used: default */
249
- /***/ (function(module, exports, __webpack_require__) {
250
-
251
- eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js?");
252
-
253
- /***/ }),
254
-
255
- /***/ "../../../node_modules/base64-js/index.js":
256
- /*!*************************************************************!*\
257
- !*** C:/sassoftware/restaf/node_modules/base64-js/index.js ***!
258
- \*************************************************************/
259
- /*! no static exports found */
260
- /*! all exports used */
261
- /***/ (function(module, exports, __webpack_require__) {
262
-
263
- "use strict";
264
- eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/base64-js/index.js?");
265
-
266
- /***/ }),
267
-
268
- /***/ "../../../node_modules/buffer/index.js":
269
- /*!**********************************************************!*\
270
- !*** C:/sassoftware/restaf/node_modules/buffer/index.js ***!
271
- \**********************************************************/
272
- /*! no static exports found */
273
- /*! all exports used */
274
- /***/ (function(module, exports, __webpack_require__) {
275
-
276
- "use strict";
277
- eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"../../../node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"../../../node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"../../../node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/buffer/index.js?");
278
-
279
- /***/ }),
280
-
281
- /***/ "../../../node_modules/form-data/lib/browser.js":
282
- /*!*******************************************************************!*\
283
- !*** C:/sassoftware/restaf/node_modules/form-data/lib/browser.js ***!
284
- \*******************************************************************/
285
- /*! no static exports found */
286
- /*! all exports used */
287
- /***/ (function(module, exports) {
288
-
289
- eval("/* eslint-env browser */\nmodule.exports = typeof self == 'object' ? self.FormData : window.FormData;\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/form-data/lib/browser.js?");
290
-
291
- /***/ }),
292
-
293
- /***/ "../../../node_modules/ieee754/index.js":
294
- /*!***********************************************************!*\
295
- !*** C:/sassoftware/restaf/node_modules/ieee754/index.js ***!
296
- \***********************************************************/
297
- /*! no static exports found */
298
- /*! all exports used */
299
- /***/ (function(module, exports) {
300
-
301
- eval("/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/ieee754/index.js?");
302
-
303
- /***/ }),
304
-
305
- /***/ "../../../node_modules/isarray/index.js":
306
- /*!***********************************************************!*\
307
- !*** C:/sassoftware/restaf/node_modules/isarray/index.js ***!
308
- \***********************************************************/
309
- /*! no static exports found */
310
- /*! all exports used */
311
- /***/ (function(module, exports) {
312
-
313
- eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/isarray/index.js?");
314
-
315
- /***/ }),
316
-
317
- /***/ "../../../node_modules/node-libs-browser/mock/empty.js":
318
- /*!**************************************************************************!*\
319
- !*** C:/sassoftware/restaf/node_modules/node-libs-browser/mock/empty.js ***!
320
- \**************************************************************************/
321
- /*! no static exports found */
322
- /*! all exports used */
323
- /***/ (function(module, exports) {
324
-
325
- eval("\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/node-libs-browser/mock/empty.js?");
326
-
327
- /***/ }),
328
-
329
- /***/ "../../../node_modules/webpack/buildin/global.js":
330
- /*!***********************************!*\
331
- !*** (webpack)/buildin/global.js ***!
332
- \***********************************/
333
- /*! no static exports found */
334
- /*! all exports used */
335
- /***/ (function(module, exports) {
336
-
337
- eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://restaflib/(webpack)/buildin/global.js?");
338
-
339
- /***/ }),
340
-
341
- /***/ "./casActionRun.js":
342
- /*!*************************!*\
343
- !*** ./casActionRun.js ***!
344
- \*************************/
345
- /*! exports provided: default */
346
- /*! exports used: default */
347
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
348
-
349
- "use strict";
350
- eval("/* 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/*\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/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casActionRun\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} parameters - parameters for the action\r\n * \r\n * @returns {promise} returns results from cas \r\n * @alias module: casActionRun\r\n * @example\r\n * async function test_casAction () {\r\n * let {session} = await restaflib.casSetup(store);\r\n * // run fetch action\r\n * let p = \r\n * { action: 'table.fetch',\r\n * data : { table: { caslib: 'public', name: 'cars' } }\r\n * };\r\n * let casResults = await restaflib.casActionRun(store, session, p);\r\n * print.object(casResults.tables.Fetch, 'Fetched Table');\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\n\n\n// Notes: Function to call cas \n// See README file for notes on REUSECASSESSION\n//\n\n\nfunction casActionRun(_x) {\n return _casActionRun.apply(this, arguments);\n}\nfunction _casActionRun() {\n _casActionRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store) {\n var _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = _args[_key];\n }\n _context.next = 3;\n return store.runAction.apply(store, rest);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casActionRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casActionRun);\n\n//# sourceURL=webpack://restaflib/./casActionRun.js?");
351
-
352
- /***/ }),
353
-
354
- /***/ "./casAppendTable.js":
355
- /*!***************************!*\
356
- !*** ./casAppendTable.js ***!
357
- \***************************/
358
- /*! exports provided: default */
359
- /*! exports used: default */
360
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
361
-
362
- "use strict";
363
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n* @description Append a cas table to a master cas table \r\n* @async\r\n* @module casAppendTable\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {casTable} input Input table with new rows {caslib: xxx, name: nnn}\r\n* @param {casTable} output Master table {caslib: xxx, name: nnn}\r\n* @param {boolean} saveflag If true the master table will be saved to disk\r\n* @param {*} payload -\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.casAppendTable(store, session, 'casuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction casAppendTable(_x, _x2, _x3, _x4, _x5) {\n return _casAppendTable.apply(this, arguments);\n}\nfunction _casAppendTable() {\n _casAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output, save) {\n var src, args, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['casAppendTable']();\n args = {\n masterTable: output,\n setTable: input,\n save: save != null ? save : true\n };\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, args);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (!(save === true)) {\n _context.next = 9;\n break;\n }\n _context.next = 9;\n return Object(_casSaveTable__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, output);\n case 9:\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casAppendTable);\n\n//# sourceURL=webpack://restaflib/./casAppendTable.js?");
364
-
365
- /***/ }),
366
-
367
- /***/ "./casFetchData.js":
368
- /*!*************************!*\
369
- !*** ./casFetchData.js ***!
370
- \*************************/
371
- /*! exports provided: default */
372
- /*! exports used: default */
373
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
374
-
375
- "use strict";
376
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/**\r\n * @description Fetch rows from cas Tables\r\n * @async\r\n * @module casFetchData\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {rafObject} session cas session\r\n * @param {object} payload info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * @example\r\n * let payload = { start:0, limit:20, format: false, table: {caslib: 'casuser', name: 'sales'}} ;\r\n * let result = await casFetchData(store, session, payload);\r\n * result = {\r\n * data : {rows: array of row data, schema=<schema for table>},\r\n * pagination: {next: {<page>}, prev: {<page>}\r\n * }\r\n * page = {start: <number>, limit: <number>, format: <true:false> table: <caslib: <string>, name:<string>}\r\n * }\r\n * Will return a row of length 0 if no data is found.\r\n * Will throw exceptions if cas code fails(ex: fetch action fails)\r\n */\nfunction casFetchData(_x, _x2, _x3) {\n return _casFetchData.apply(this, arguments);\n}\nfunction _casFetchData() {\n _casFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchData'](); // console.log(src);\n _context.next = 3;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items('results', 'casResults').toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchData);\n\n//# sourceURL=webpack://restaflib/./casFetchData.js?");
377
-
378
- /***/ }),
379
-
380
- /***/ "./casFetchRows.js":
381
- /*!*************************!*\
382
- !*** ./casFetchRows.js ***!
383
- \*************************/
384
- /*! exports provided: default */
385
- /*! exports used: default */
386
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
387
-
388
- "use strict";
389
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * @private\r\n * @async\r\n * @module casFetchRows\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} payload - info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * \r\n * @example\r\n * async function test_casFetchRows () {\r\n * let {session} = await casSetup(store);\r\n * let payload = {\r\n * from : 1,\r\n * count : 20,\r\n * format: true,\r\n * table : {caslib: 'Public', name: 'cars'}\r\n * };\r\n * \r\n * let result = await restaflib.casFetchRows(store, session, payload);\r\n * console.log(result.data.schema);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * \r\n * while (result.pagination.next.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.next.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.next);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n * console.log('--------------------------------------- scroll backwards');\r\n *\r\n * while (result.pagination.prev.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.prev.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.prev);\r\n * console.log('The previous start is at: ' + result.pagination.prev.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n *\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\nfunction _casFetchRows() {\n _casFetchRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (payload.where == null) {\n payload.where = ' ';\n }\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchRows']();\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (r.data == null) {\n r.data = {\n rows: []\n };\n }\n return _context.abrupt(\"return\", r);\n case 8:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./casFetchRows.js?");
390
-
391
- /***/ }),
392
-
393
- /***/ "./casLoadTable.js":
394
- /*!*************************!*\
395
- !*** ./casLoadTable.js ***!
396
- \*************************/
397
- /*! exports provided: default */
398
- /*! exports used: default */
399
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
400
-
401
- "use strict";
402
- eval("/* 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 _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.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/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casLoadTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be loaded\r\n * \r\n * @returns {promise} returns status object\r\n */\nfunction casLoadTable(_x, _x2, _x3, _x4) {\n return _casLoadTable.apply(this, arguments);\n}\nfunction _casLoadTable() {\n _casLoadTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, _force) {\n var src, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\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 \";\n _context.next = 3;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, table, true);\n case 3:\n r = _context.sent;\n return _context.abrupt(\"return\", {\n msg: \"\".concat(table.caslib, \".\").concat(table.name, \" loaded}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casLoadTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casLoadTable);\n\n//# sourceURL=webpack://restaflib/./casLoadTable.js?");
403
-
404
- /***/ }),
405
-
406
- /***/ "./casSaveTable.js":
407
- /*!*************************!*\
408
- !*** ./casSaveTable.js ***!
409
- \*************************/
410
- /*! exports provided: default */
411
- /*! exports used: default */
412
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
413
-
414
- "use strict";
415
- eval("/* 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/*\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/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casSaveTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be saved\r\n * @param {boolean=} replace default is replace\r\n * @param {boolean=} loadTable load table (default= true)\r\n * \r\n * @returns {promise} returns status object\r\n */\n\n\nfunction casSaveTable(_x, _x2, _x3, _x4, _x5) {\n return _casSaveTable.apply(this, arguments);\n}\nfunction _casSaveTable() {\n _casSaveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, replace, loadTable) {\n var caslib, name, payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n caslib = table.caslib, name = table.name;\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: replace === false ? false : true,\n table: table\n }\n };\n _context.next = 4;\n return store.runAction(session, payload);\n case 4:\n return _context.abrupt(\"return\", {\n msg: \"\".concat(caslib, \".\").concat(name, \" saved}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSaveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSaveTable);\n\n//# sourceURL=webpack://restaflib/./casSaveTable.js?");
416
-
417
- /***/ }),
418
-
419
- /***/ "./casSetup.js":
420
- /*!*********************!*\
421
- !*** ./casSetup.js ***!
422
- \*********************/
423
- /*! exports provided: default */
424
- /*! exports used: default */
425
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
426
-
427
- "use strict";
428
- eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * @param {string=} sessionID - id of an existing session to attach.\r\n * @param {string} sasServer - name of cas server to use. else defaults to the first server on list.\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n * @example \r\n * const {servers, session} = await casSetup(storem logonPayload, <sessionID>)\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2, _x3, _x4) {\n return _casSetup.apply(this, arguments);\n}\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, logonPayload, sessionID, casServer) {\n var msg, _yield$store$addServi, casManagement, servers, casserver, itemsList, index, session, payload, sessionList, selfcmd;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 4;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n msg = _context.sent;\n case 4:\n _context.next = 6;\n return store.addServices('casManagement');\n case 6:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 10;\n return store.apiCall(casManagement.links('servers'));\n case 10:\n servers = _context.sent;\n if (!(servers.itemsList().size === 0)) {\n _context.next = 13;\n break;\n }\n throw {\n Error: 'No cas servers were found'\n };\n case 13:\n casserver = null;\n if (!(casServer == null)) {\n _context.next = 18;\n break;\n }\n casserver = servers.itemsList(0);\n _context.next = 25;\n break;\n case 18:\n itemsList = servers.itemsList().toJS();\n index = itemsList.findIndex(function (s) {\n return s === casServer;\n });\n if (!(index === -1)) {\n _context.next = 24;\n break;\n }\n throw {\n Error: \"server with name of \".concat(casServer, \" was not found\")\n };\n case 24:\n casserver = servers.itemsList(index);\n case 25:\n session = null;\n if (!(sessionID == null)) {\n _context.next = 32;\n break;\n }\n _context.next = 29;\n return store.apiCall(servers.itemsCmd(casserver, 'createSession'));\n case 29:\n session = _context.sent;\n _context.next = 46;\n break;\n case 32:\n if (!(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 36;\n break;\n }\n session = sessionID;\n _context.next = 46;\n break;\n case 36:\n payload = {\n qs: {\n filter: \"eq( id,'\".concat(sessionID, \"')\")\n }\n };\n _context.next = 39;\n return store.apiCall(servers.itemsCmd(casserver, \"sessions\"), payload);\n case 39:\n sessionList = _context.sent;\n if (!(sessionList.items().size === 0)) {\n _context.next = 42;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 42:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(0), \"self\");\n _context.next = 45;\n return store.apiCall(selfcmd);\n case 45:\n session = _context.sent;\n case 46:\n return _context.abrupt(\"return\", {\n servers: servers,\n session: session\n });\n case 47:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSetup);\n\n//# sourceURL=webpack://restaflib/./casSetup.js?");
429
-
430
- /***/ }),
431
-
432
- /***/ "./casTableToJson.js":
433
- /*!***************************!*\
434
- !*** ./casTableToJson.js ***!
435
- \***************************/
436
- /*! exports provided: default */
437
- /*! exports used: default */
438
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
439
-
440
- "use strict";
441
- eval("/*\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/**\r\n * @description Converts a cas table to JSON(utility)\r\n * @module casTableToJson\r\n * @category restaflib/util\r\n * @param {object} result - the raf object returned from a call to cas\r\n * @param {string} table - the name of the table\r\n * \r\n * @returns {object} - the new json version [{var1: value1, var2: value2,...}, {...}]\r\n * @alias module: casTableToJson\r\n * \r\n */\nfunction casTableToJson(result, table) {\n var data = result.items('tables', table);\n var itemRows = data.get('rows');\n var columns = [];\n data.get('schema').map(function (s) {\n columns.push(s.get('name'));\n });\n var allResults = [];\n itemRows.map(function (r) {\n var row = {};\n r.map(function (value, j) {\n row[columns[j]] = value;\n });\n allResults.push(row);\n });\n return allResults;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casTableToJson);\n\n//# sourceURL=webpack://restaflib/./casTableToJson.js?");
442
-
443
- /***/ }),
444
-
445
- /***/ "./casUpdateData.js":
446
- /*!**************************!*\
447
- !*** ./casUpdateData.js ***!
448
- \**************************/
449
- /*! exports provided: default */
450
- /*! exports used: default */
451
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
452
-
453
- "use strict";
454
- eval("/* 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\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/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Update a record in a cas table\r\n * @async\r\n * @module casUpdateData\r\n * @category restaflib/cas\r\n * @param {store} store - store\r\n * @param {rafObject} session - cas session\r\n * @param {*} payload - {data,where,table}\r\n * @returns {promise} - return \r\n * @example\r\n * let inputs = restaflib.casUpdateData(store, session, payload);\r\n * payload = { where: {key1: vale1, key2: value2,...},\r\n * data: {var1:value1, var2:value2,....}},\r\n * table: {caslib: caslib, name: name}\r\n * Expects a single row\r\n */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\nfunction _casUpdateData() {\n _casUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, payload) {\n var data, where, table, swhere, andbit, k, v, valString, set, _k, value, valueString, tbl, updateRow, pl, r, status, disp;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, where = payload.where, table = payload.table;\n swhere = '';\n andbit = ' ';\n for (k in where) {\n v = where[k];\n valString = typeof v === \"string\" ? \"'\".concat(v.toString(), \"'\") : v;\n swhere = swhere + andbit + k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n set = [];\n for (_k in data) {\n value = data[_k];\n valueString = void 0;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value) /*`${JSON.stringify(value)}`*/;\n } else {\n valueString = value.toString();\n }\n set.push({\n var: _k,\n value: valueString\n });\n }\n tbl = _objectSpread(_objectSpread({}, table), {}, {\n where: \"\".concat(swhere)\n });\n updateRow = {\n table: tbl,\n set: set\n };\n pl = {\n action: 'table.update',\n data: updateRow\n };\n _context.next = 11;\n return store.runAction(session, pl);\n case 11:\n r = _context.sent;\n status = {\n msg: 'Update completed',\n statusCode: 0\n };\n disp = r.items().toJS().disposition;\n if (disp.statusCode !== 0) {\n status.statusCode = disp.statusCode;\n status.msg = disp.reason;\n }\n return _context.abrupt(\"return\", status);\n case 16:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpdateData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpdateData);\n\n//# sourceURL=webpack://restaflib/./casUpdateData.js?");
455
-
456
- /***/ }),
457
-
458
- /***/ "./casUpload.js":
459
- /*!**********************!*\
460
- !*** ./casUpload.js ***!
461
- \**********************/
462
- /*! exports provided: default */
463
- /*! exports used: default */
464
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
465
-
466
- "use strict";
467
- eval("/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _uploadSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uploadSetup */ \"./uploadSetup.js\");\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.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\nvar fs = __webpack_require__(/*! fs */ \"../../../node_modules/node-libs-browser/mock/empty.js\").promises;\n\n\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module casUpload\r\n * @param {store} store \r\n * @param {*} session \r\n * @param {*} source \r\n * @param {*} output \r\n * @param {*} save \r\n * @param {*} altSrc \r\n * @returns {promise}\r\n */\nfunction casUpload(_x, _x2, _x3, _x4, _x5, _x6) {\n return _casUpload.apply(this, arguments);\n}\nfunction _casUpload() {\n _casUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee(store, session, source, output, save, altSrc) {\n var table, fileInfo, buf, r, _table$split, _table$split2, caslib, name;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // parse source file to figure out what we are uploading\n table = output;\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(output) === 'object') {\n table = \"\".concat(output.caslib, \".\").concat(output.name);\n }\n fileInfo = Object(_uploadSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(source, table); // read the file\n if (!(altSrc != null)) {\n _context.next = 7;\n break;\n }\n _context.t0 = altSrc;\n _context.next = 10;\n break;\n case 7:\n _context.next = 9;\n return fs.readFile(source, fileInfo.fileOptions);\n case 9:\n _context.t0 = _context.sent;\n case 10:\n buf = _context.t0;\n // transfrom data if necessary for upload\n if (fileInfo.transform !== null) {\n buf = fileInfo.transform(buf, fileInfo);\n }\n\n // upload using specific upload handlers\n _context.next = 14;\n return fileInfo.handler(store, session, buf, fileInfo, save);\n case 14:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 20;\n break;\n }\n _table$split = table.split('.'), _table$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_table$split, 2), caslib = _table$split2[0], name = _table$split2[1];\n _context.next = 19;\n return Object(_uploadHandlers__WEBPACK_IMPORTED_MODULE_5__[/* saveTable */ \"a\"])(store, session, caslib, name);\n case 19:\n r = r + '\\n' + \" \".concat(output, \" was saved\");\n case 20:\n return _context.abrupt(\"return\", r);\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpload);\n\n//# sourceURL=webpack://restaflib/./casUpload.js?");
468
-
469
- /***/ }),
470
-
471
- /***/ "./caslDescribe.js":
472
- /*!*************************!*\
473
- !*** ./caslDescribe.js ***!
474
- \*************************/
475
- /*! exports provided: default */
476
- /*! exports used: default */
477
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
478
-
479
- "use strict";
480
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslDescribe\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\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\nfunction caslDescribe(_x, _x2, _x3) {\n return _caslDescribe.apply(this, arguments);\n}\nfunction _caslDescribe() {\n _caslDescribe = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/describe'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results').toJS();\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslDescribe.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslDescribe);\n\n//# sourceURL=webpack://restaflib/./caslDescribe.js?");
481
-
482
- /***/ }),
483
-
484
- /***/ "./caslRun.js":
485
- /*!********************!*\
486
- !*** ./caslRun.js ***!
487
- \********************/
488
- /*! exports provided: default */
489
- /*! exports used: default */
490
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
491
-
492
- "use strict";
493
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\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\n\n\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module caslRun\r\n * @category restaflib/cas\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {string} src - casl src statements\r\n * @param {object=} args - user input args (reference this as _args_ in casl program)\r\n * @param {boolean=} useCommons - include the common casl programs(checkAndLoad etc...)\r\n * @returns {promise} returns results from cas\r\n * @example\r\n\r\n * let restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require('@sassoftware/restaflib');\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n let { session } = await casSetup (store, payload);\r\n // console.log(JSON.stringify(session.links(), null, 4));\r\n let casl = `\r\n action datastep.runcode/ single='YES' code = 'data casuser.a; x=1; run;';\r\n action table.fetch r=r1/\r\n table= { caslib= 'casuser', name= 'a' } ;\r\n run;\r\n action datastep.runcode/ single='YES' code = 'data casuser.b; y=1; run;';\r\n action table.fetch r=r2/\r\n table= { caslib= 'casuser', name= 'b' } ;\r\n run;\r\n c = {a=10, b=20};\r\n send_response({a=r1, b=r2, c=c});\r\n `;\r\n\r\n\r\n let r = await store.runCasl(session, casl);\r\n\r\n console.log(r.items().toJS());\r\n let a = r.items().toJS();\r\n console.log(a);\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n*/\nfunction caslRun(_x, _x2, _x3, _x4, _x5) {\n return _caslRun.apply(this, arguments);\n}\nfunction _caslRun() {\n _caslRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args, useCommons) {\n var tsrc,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n tsrc = src;\n if (useCommons !== false) {\n tsrc = src + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']();\n }\n for (_len = _args.length, rest = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = _args[_key];\n }\n _context.next = 5;\n return _caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].apply(void 0, [store, session, tsrc, args].concat(rest));\n case 5:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRun);\n\n//# sourceURL=webpack://restaflib/./caslRun.js?");
494
-
495
- /***/ }),
496
-
497
- /***/ "./caslRunBase.js":
498
- /*!************************!*\
499
- !*** ./caslRunBase.js ***!
500
- \************************/
501
- /*! exports provided: default */
502
- /*! exports used: default */
503
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
504
-
505
- "use strict";
506
- eval("/* 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 _jsonToDict__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.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 * lib\r\n */\n/** \r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * @private\r\n * @async\r\n * @function caslRunBase(async)\r\n * @category restaflib/cas\r\n * @param {object} store - restaf store\r\n * @param {object} session - cas session\r\n * @param {object} src - casl src statements\r\n * @param {object} args - arguments to pass to on to CAS as _args_\r\n * \r\n * @returns {object} standard return value from apiCall\r\n */\nfunction caslRunBase(_x, _x2, _x3, _x4) {\n return _caslRunBase.apply(this, arguments);\n}\nfunction _caslRunBase() {\n _caslRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args) {\n var _args_,\n code,\n payload,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n //\n // create casl statements for arguments and appenv\n //\n _args_ = Object(_jsonToDict__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(args !== null ? args : {}, '_args_');\n code = _args_ + ' ' + src; // Patch for issues with sccasl.runcasl via REST API\n code = code.replace(/\\r?\\n|\\r/g, '');\n // setup payload for runAction\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: code\n }\n };\n for (_len = _args.length, rest = new Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {\n rest[_key - 4] = _args[_key];\n }\n _context.next = 7;\n return store.runAction.apply(store, [session, payload].concat(rest));\n case 7:\n result = _context.sent;\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRunBase);\n\n//# sourceURL=webpack://restaflib/./caslRunBase.js?");
507
-
508
- /***/ }),
509
-
510
- /***/ "./caslScore.js":
511
- /*!**********************!*\
512
- !*** ./caslScore.js ***!
513
- \**********************/
514
- /*! exports provided: default */
515
- /*! exports used: default */
516
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
517
-
518
- "use strict";
519
- eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslScore\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\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\nfunction caslScore(_x, _x2, _x3) {\n return _caslScore.apply(this, arguments);\n}\nfunction _caslScore() {\n _caslScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/score'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results', 'casResults').toJS()[0];\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslScore);\n\n//# sourceURL=webpack://restaflib/./caslScore.js?");
520
-
521
- /***/ }),
522
-
523
- /***/ "./computeAppendTable.js":
524
- /*!*******************************!*\
525
- !*** ./computeAppendTable.js ***!
526
- \*******************************/
527
- /*! exports provided: default */
528
- /*! exports used: default */
529
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
530
-
531
- "use strict";
532
- eval("/* 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 _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.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/** \r\n* @description Append a compute table to a master compute table \r\n* @async\r\n* @module computeAppendTable\r\n* @category restaflib/compute\r\n* @param {store} store - store\r\n* @param {rafObject} session - compute session\r\n* @param {computeTable} input Input table with new rows {libref: xxx, name: nnn}\r\n* @param {computeTable} output Master table {computelib: xxx, name: nnn}\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.computeAppendTable(store, session, 'computeuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction computeAppendTable(_x, _x2, _x3, _x4) {\n return _computeAppendTable.apply(this, arguments);\n}\nfunction _computeAppendTable() {\n _computeAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output) {\n var src, computeSummary, statusCode;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\n proc append base=\".concat(output.libref, \".{output.name} \\n data= \").concat(input.libref, \".\").concat(input.name, \"; run;\\n \");\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 3:\n computeSummary = _context.sent;\n statusCode = computeSummary.SASJobStatus === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n msg: \"Append Completed. Status is: \".concat(computeSummary.SASJobStatus),\n statusCode: statusCode\n });\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeAppendTable);\n\n//# sourceURL=webpack://restaflib/./computeAppendTable.js?");
533
-
534
- /***/ }),
535
-
536
- /***/ "./computeFetchData.js":
537
- /*!*****************************!*\
538
- !*** ./computeFetchData.js ***!
539
- \*****************************/
540
- /*! exports provided: default */
541
- /*! exports used: default */
542
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
543
-
544
- "use strict";
545
- eval("/* 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\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/*\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 *\r\n * @description Fetch data from a SAS Table\r\n * @async\r\n * @module computeFetchData\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {computeSummary} computeSummary - Summary object created by computeSummary method\r\n * @param {string} table - name of the table\r\n * @param {string} scroll direction - null(to get first set)|next|prev|first|last\r\n * @param {object} payload - query values\r\n *\r\n * @returns {promise} - {columns: <column names>, rows: <data for rows> , scrollOptions: <available scroll directions>}\r\n */\nfunction computeFetchData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeFetchData.apply(this, arguments);\n} // convert cells to rowSet\nfunction _computeFetchData() {\n _computeFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, computeSummary, table, direction, payload, useRow) {\n var data, tname, ipayload, linkRel, adhoc, tableInfo, t1, colCount, qc, columns, schema, items, cx, c, newcol, indx, result, rowsData, current, dir, _result, _rowsData;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = null;\n tname = typeof table === \"string\" ? table : \"\".concat(table.libref, \".\").concat(table.name);\n tname = tname.toUpperCase(); /*to allow for compute service table info */\n ipayload = payload != null ? _objectSpread({}, payload) : {\n qs: {}\n };\n ipayload.qs.includeIndex = true;\n linkRel = useRow == null ? \"rows\" : useRow; // is payload an override or is this an adhoc request(i.e user is ignoring scroll info)\n adhoc = payload != null && direction == null ? true : false; // retrieve current info on this table(if any)\n tableInfo = computeSummary.tables[tname];\n if (!(tableInfo != null)) {\n _context.next = 45;\n break;\n }\n // reset current on if this is an adhoc request.\n if (adhoc === true) {\n tableInfo.current = null;\n }\n //get column info \n if (!(tableInfo.current === null || direction == null || direction === \"first\")) {\n _context.next = 33;\n break;\n }\n _context.next = 13;\n return store.apiCall(tableInfo.self);\n case 13:\n t1 = _context.sent;\n colCount = t1.items().toJS()[\"columnCount\"]; // get columns explicitly since user can control this thru payload\n qc = {\n qs: {\n start: 0,\n limit: colCount\n }\n };\n _context.next = 18;\n return store.apiCall(t1.links(\"columns\"), qc);\n case 18:\n columns = _context.sent;\n schema = [];\n items = columns.items().toJS();\n if (linkRel === \"rows\") {\n schema.push({\n name: \"_index_\",\n Column: \"_Index_\",\n Label: \"Index\",\n length: 8,\n type: \"FLOAT\",\n format: \"BEST\",\n informat: \"BEST\"\n });\n }\n for (cx in items) {\n c = items[cx];\n console.log(c.name, c.data.type, c.data.format, c.data.informat);\n newcol = {\n name: c.name.toLowerCase(),\n Column: c.name.toLowerCase(),\n Label: c.data.label,\n length: c.data.length,\n type: c.data.type,\n format: c.data.format != null ? c.data.format.name : null,\n informat: c.data.informat != null ? c.data.informat.name : null,\n custom: false\n };\n indx = ipayload.qs.includeIndex === true ? 1 : 0;\n schema[c.data.index + indx] = newcol;\n }\n // Now get data using rows or rowSet rel\n _context.next = 25;\n return store.apiCall(t1.links(linkRel), ipayload);\n case 25:\n result = _context.sent;\n // If using linkRel of rows, convert the data to rowSet schema\n rowsData = linkRel === \"rowSet\" ? result.items('rows').toJS() : cells2RowSet(result);\n tableInfo.current = result;\n tableInfo.schema = schema;\n tableInfo.columns = columns;\n data = {\n columns: columns,\n schema: schema,\n rows: rowsData,\n scrollOptions: result.scrollCmds().keySeq().toJS()\n };\n _context.next = 45;\n break;\n case 33:\n current = tableInfo.current;\n dir = direction;\n if (direction === \"next\" && current.scrollCmds(\"next\") === null) {\n dir = current.links(\"last\") !== null ? \"last\" : null;\n }\n if (direction === \"prev\" && current.scrollCmds(\"prev\") === null) {\n dir = current.links(\"first\") !== null ? \"first\" : null;\n }\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.columns,\n currentColumns: tableInfo.currentColumns,\n rows: [],\n scrollOptions: current.scrollCmds().keySeq().toJS()\n };\n if (!(dir !== null && current.scrollCmds(dir) !== null)) {\n _context.next = 45;\n break;\n }\n _context.next = 41;\n return store.apiCall(current.scrollCmds(dir), ipayload);\n case 41:\n _result = _context.sent;\n tableInfo.current = _result;\n _rowsData = linkRel !== \"rows\" ? _result.items('rows').toJS() : cells2RowSet(_result);\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.schema,\n rows: _rowsData,\n scrollOptions: _result.scrollCmds().keySeq().toJS()\n };\n case 45:\n return _context.abrupt(\"return\", data);\n case 46:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFetchData.apply(this, arguments);\n}\nfunction cells2RowSet(result) {\n var rowsData = result.items().toJS().map(function (r) {\n return r.cells;\n });\n return rowsData;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFetchData);\n\n//# sourceURL=webpack://restaflib/./computeFetchData.js?");
546
-
547
- /***/ }),
548
-
549
- /***/ "./computeFileContent.js":
550
- /*!*******************************!*\
551
- !*** ./computeFileContent.js ***!
552
- \*******************************/
553
- /*! exports provided: default */
554
- /*! exports used: default */
555
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
556
-
557
- "use strict";
558
- eval("/* 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/*\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// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description return content of a file output from a compute run\r\n * @async\r\n * @module computeFileContent\r\n * @category restaflib/compute\r\n *\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} fileref - name of the fileref\r\n * @param {boolean} url - set to true if you want the url and not the content\r\n *\r\n * @returns {promise} - get uri for content]\r\n */\n\n\nfunction computeFileContent(_x, _x2, _x3, _x4) {\n return _computeFileContent.apply(this, arguments);\n}\nfunction _computeFileContent() {\n _computeFileContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, fileref, url) {\n var fileInfo, payload, result, r, rx, _r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n fileInfo = computeSummary.files[fileref];\n if (!(fileInfo == null)) {\n _context.next = 3;\n break;\n }\n throw \"Invalid fileref \".concat(fileref);\n case 3:\n if (!(fileInfo.current === null)) {\n _context.next = 12;\n break;\n }\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(fileref, \"')\")\n }\n };\n _context.next = 7;\n return store.apiCall(computeSummary.session.links('files'), payload);\n case 7:\n result = _context.sent;\n _context.next = 10;\n return store.apiCall(result.itemsCmd(fileref, 'self'));\n case 10:\n result = _context.sent;\n fileInfo.current = result;\n case 12:\n if (!(url === true)) {\n _context.next = 17;\n break;\n }\n r = \"\".concat(computeSummary.session.host).concat(fileInfo.current.links('content', 'link', 'uri'));\n return _context.abrupt(\"return\", r);\n case 17:\n if (!(fileInfo.data === null)) {\n _context.next = 26;\n break;\n }\n _context.next = 20;\n return store.apiCall(fileInfo.current.links('content'));\n case 20:\n rx = _context.sent;\n _r = rx.items();\n fileInfo.data = _r;\n return _context.abrupt(\"return\", _r);\n case 26:\n return _context.abrupt(\"return\", fileInfo.data);\n case 27:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFileContent.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFileContent);\n\n//# sourceURL=webpack://restaflib/./computeFileContent.js?");
559
-
560
- /***/ }),
561
-
562
- /***/ "./computeResults.js":
563
- /*!***************************!*\
564
- !*** ./computeResults.js ***!
565
- \***************************/
566
- /*! exports provided: default */
567
- /*! exports used: default */
568
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
569
-
570
- "use strict";
571
- eval("/* 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 Return Log|listing|ODS|list of tables in the compute service job\r\n * @async\r\n * @module computeResults\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary object\r\n * @param {string} type - type of result( log|listing|ods|table)\r\n * @returns {object|string} - string for all except table(array of names)\r\n */\nfunction computeResults(_x, _x2, _x3) {\n return _computeResults.apply(this, arguments);\n}\nfunction _computeResults() {\n _computeResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, type) {\n var log, result, next, _result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(type === 'log' || type === 'listing')) {\n _context.next = 20;\n break;\n }\n log = [];\n if (!(computeSummary[type] !== null)) {\n _context.next = 16;\n break;\n }\n _context.next = 5;\n return store.apiCall(computeSummary[type]);\n case 5:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n case 7:\n if (!((next = result.scrollCmds('next')) !== null)) {\n _context.next = 14;\n break;\n }\n _context.next = 10;\n return store.apiCall(next);\n case 10:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n _context.next = 7;\n break;\n case 14:\n _context.next = 17;\n break;\n case 16:\n log[0] = \"Note: No \".concat(type);\n case 17:\n return _context.abrupt(\"return\", log);\n case 20:\n if (!(type === 'ods')) {\n _context.next = 31;\n break;\n }\n if (!(computeSummary.ods !== null)) {\n _context.next = 28;\n break;\n }\n _context.next = 24;\n return store.apiCall(computeSummary.ods);\n case 24:\n _result = _context.sent;\n return _context.abrupt(\"return\", _result.items());\n case 28:\n return _context.abrupt(\"return\", '<h2> No ODS output </h2>');\n case 29:\n _context.next = 40;\n break;\n case 31:\n if (!(type === 'tables')) {\n _context.next = 35;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.tables));\n case 35:\n if (!(type === 'files')) {\n _context.next = 39;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.files));\n case 39:\n throw \"Error: Invalid type \".concat(type);\n case 40:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeResults.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeResults);\n\n//# sourceURL=webpack://restaflib/./computeResults.js?");
572
-
573
- /***/ }),
574
-
575
- /***/ "./computeRun.js":
576
- /*!***********************!*\
577
- !*** ./computeRun.js ***!
578
- \***********************/
579
- /*! exports provided: default */
580
- /*! exports used: default */
581
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
582
-
583
- "use strict";
584
- eval("/* 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 _computeRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRunBase */ \"./computeRunBase.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/**\r\n * @member compute\r\n * @description Prepare data for runCompute(@async)\r\n * @async\r\n * @module computeRun\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - current compute service session\r\n * @param {string} src - code to execute\r\n * @param {object=} macros - macros as a json\r\n * @param {number=} timeout - long polling timeout in seconds\r\n * @param {function=} checkStatus - callback to check on status\r\n * @param {object=} userContext - this is passed to the statusHandler \r\n * @returns {promise} computeSummary object. Job Status is computeSummary.SASJobStatus\r\n * @example\r\n * The job status will be one of these completed|warning|error|failed\r\n * Typical call:\r\n * let computeSummary = await computeRun(store,computeSession, src, args);\r\n * \r\n * Advanced call: If you want to track the job status pass a checkStatus function with some context\r\n \r\n const checkStatus = (state, context) => {\r\n console.log('state', state);\r\n console.log('context ', context);\r\n // do something useful - like in an UI display status for user\r\n \r\n // To stop waiting on job completion return a state value like 'exit' or any string\r\n // the value has to be something other than the state passed in.\r\n // this will force the code to stop waiting on the server and return to the app.\r\n // It is upto your app to take appropriate actions(like cancelling the job)\r\n // Below is a trivial example\r\n context.counter = context.counter + 1;\r\n\t\tif (state === 'running' && context.counter > 5) {\r\n\t\t\tcontext.realState = state;\r\n\t\t\tstate = 'exit';\r\n }\r\n return state;\r\n } // return true if you want to stop waiting on the job. Does not cancel the job\r\n \r\n===============================================\r\n\r\n* A simple example\r\n\r\n async function runtest(store, logonPayload) {\r\n let computeSession = await restaflib.computeSetup(store, null, logonPayload);\r\n let macros = {\r\n data: 'sashelp.cars'\r\n };\r\n let src = `\r\n ods html style=barrettsblue; \r\n proc print data=&data;run;\r\n ods html close; \r\n run;\r\n `;\r\n \r\n let computeSummary = await restaflib.computeRun(\r\n store,\r\n computeSession,\r\n src,\r\n macros\r\n );\r\n console.log('Job Status: ', computeSummary.SASJobStatus);\r\n\r\n let log = await restaflib.computeResults(store, computeSummary, \"log\");\r\n let ods = await restaflib.computeResults(store, computeSummary, \"ods\");\r\n return 'done';\r\n\r\n }\r\n\r\n */\n\n\n\nfunction computeRun(_x, _x2, _x3, _x4, _x5, _x6, _x7) {\n return _computeRun.apply(this, arguments);\n}\nfunction _computeRun() {\n _computeRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, macros, timeout, checkStatus, userContext) {\n var code, arg, c, asrc, resultSummary;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // adjust for backward compatability\n if (typeof checkStatus === 'number') {\n checkStatus = null;\n }\n\n // generate macro variables\n code = ['options NOSYNTAXCHECK OBS=MAX;%let syscc=0;'];\n if (macros != null) {\n for (arg in macros) {\n c = \"%let \".concat(arg, \"=\").concat(macros[arg], \";\");\n code.push(c);\n }\n }\n\n // Concat macro to code\n asrc = src.replace(/\\t/g, ' ');\n asrc = asrc.split(/\\r?\\n/);\n code = code.concat(asrc).concat(';');\n\n // run code and get results\n _context.next = 8;\n return Object(_computeRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, code, timeout, checkStatus, userContext);\n case 8:\n resultSummary = _context.sent;\n return _context.abrupt(\"return\", resultSummary);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRun);\n\n//# sourceURL=webpack://restaflib/./computeRun.js?");
585
-
586
- /***/ }),
587
-
588
- /***/ "./computeRunBase.js":
589
- /*!***************************!*\
590
- !*** ./computeRunBase.js ***!
591
- \***************************/
592
- /*! exports provided: default */
593
- /*! exports used: default */
594
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
595
-
596
- "use strict";
597
- eval("/* 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 _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.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 Reduce compute service execution results\r\n * @private\r\n * @async\r\n * @module computeRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} session - compute service session\r\n * @param {code} code - SAS code to be executed\r\n * @param {int} timeout optional - timeout for long poll in seconds(default= 5)\r\n\r\n * \r\n * @returns {object} computeSummary Object\r\n * \r\n */\nfunction computeRunBase(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeRunBase.apply(this, arguments);\n}\nfunction _computeRunBase() {\n _computeRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, code, timeout, eventHandler, userContext) {\n var payload, job, p, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n data: {\n code: code\n }\n }; // Now execute the data step and wait for completion\n // clear bad state if any\n _context.next = 3;\n return store.apiCall(session.links('execute'), payload);\n case 3:\n job = _context.sent;\n p = {\n qs: {\n wait: timeout != null ? timeout : 5\n },\n headers: {\n \"If-None-Match\": job.headers('etag')\n }\n };\n _context.next = 7;\n return store.jobState(job, p, 'longpoll', 0, eventHandler, userContext);\n case 7:\n status = _context.sent;\n _context.next = 10;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, status.job);\n case 10:\n results = _context.sent;\n results.SASJobStatus = status.data;\n results.jobStateStatus = status;\n return _context.abrupt(\"return\", results);\n case 14:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRunBase);\n\n//# sourceURL=webpack://restaflib/./computeRunBase.js?");
598
-
599
- /***/ }),
600
-
601
- /***/ "./computeSetup.js":
602
- /*!*************************!*\
603
- !*** ./computeSetup.js ***!
604
- \*************************/
605
- /*! exports provided: default */
606
- /*! exports used: default */
607
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
608
-
609
- "use strict";
610
- eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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/*\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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {string=} contextName name of the context. If not specified defaults to Job Execution context\r\n * @param {logonPayload=} payload logon payload.If null assumes that logon was done earlier.\r\n * @param {sessionPayload=} sessionPayload for createSession call\r\n * @param {string=} sessionID id of a session to attach\r\n * @returns {promise} - returns a compute session\r\n */\n\n\n\nfunction computeSetup(_x, _x2, _x3, _x4, _x5) {\n return _computeSetup.apply(this, arguments);\n}\nfunction _computeSetup() {\n _computeSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, contextName, payload, sessionPayload, sessionID) {\n var _yield$store$addServi, compute, msg, session, _p, sessionList, index, selfcmd, p, contexts, name, createSession;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.addServices('compute');\n case 2:\n _yield$store$addServi = _context.sent;\n compute = _yield$store$addServi.compute;\n if (!(sessionID != null && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", sessionID);\n case 6:\n if (!(payload != null)) {\n _context.next = 10;\n break;\n }\n _context.next = 9;\n return store.logon(payload);\n case 9:\n msg = _context.sent;\n case 10:\n // Not PUP\n session = null; // Use user specified session\n if (!(sessionID != null)) {\n _context.next = 24;\n break;\n }\n _p = {\n start: 0,\n limit: 100,\n qs: {\n filter: \"eq(id,'\".concat(sessionID, \"')\")\n }\n };\n _context.next = 15;\n return store.apiCall(compute.links('sessions'), _p);\n case 15:\n sessionList = _context.sent;\n index = sessionList.itemsList().toJS().indexOf(sessionID);\n if (!(index < 0)) {\n _context.next = 19;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 19:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(index), \"self\");\n _context.next = 22;\n return store.apiCall(selfcmd);\n case 22:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 24:\n if (!(store.store.config.options.computeServerId != null)) {\n _context.next = 30;\n break;\n }\n console.log('NOTE: Detected Workbench');\n _context.next = 28;\n return store.apiCall(compute.links('createSession'));\n case 28:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 30:\n // create a session - most common case\n\n if (contextName == null) {\n contextName = 'SAS Job Execution compute context';\n }\n p = {\n qs: {\n filter: \"contains(name,'\".concat(contextName, \"')\")\n }\n };\n contexts = null;\n _context.prev = 33;\n _context.next = 36;\n return store.apiCall(compute.links(\"contexts\"), p);\n case 36:\n contexts = _context.sent;\n if (!(contexts.itemsList().size === 0)) {\n _context.next = 39;\n break;\n }\n throw \"Context \".concat(contextName, \" not found\");\n case 39:\n _context.next = 45;\n break;\n case 41:\n _context.prev = 41;\n _context.t0 = _context[\"catch\"](33);\n console.log('Error: Not able to get context');\n throw _context.t0;\n case 45:\n name = contexts.itemsList(0);\n if (!(sessionID == null)) {\n _context.next = 52;\n break;\n }\n p = sessionPayload == null ? null : sessionPayload;\n createSession = contexts.itemsCmd(name, 'createSession');\n _context.next = 51;\n return store.apiCall(createSession, sessionPayload);\n case 51:\n session = _context.sent;\n case 52:\n return _context.abrupt(\"return\", session);\n case 53:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[33, 41]]);\n }));\n return _computeSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetup);\n\n//# sourceURL=webpack://restaflib/./computeSetup.js?");
611
-
612
- /***/ }),
613
-
614
- /***/ "./computeSetupTables.js":
615
- /*!*******************************!*\
616
- !*** ./computeSetupTables.js ***!
617
- \*******************************/
618
- /*! exports provided: default */
619
- /*! exports used: default */
620
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
621
-
622
- "use strict";
623
- eval("/* 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 _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @private\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {session} SAS compute Session\r\n * @param {tables} tables Tables to be setup{libref:xx,name:xxx} or array of this object \r\n * @param {string} preamble SAS code to execute before setup\r\n * @returns {promise} - returns a compute summary \r\n */\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\nfunction _computeSetupTables() {\n _computeSetupTables = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, tables, preamble) {\n var result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(preamble != null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, preamble);\n case 3:\n result = _context.sent;\n if (!(result.SASJobStatus !== 'completed')) {\n _context.next = 6;\n break;\n }\n throw \"Error: Preamble failed with completion code of \".concat(result.SASJobStatus);\n case 6:\n _context.next = 8;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, null, tables);\n case 8:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSetupTables.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetupTables);\n\n//# sourceURL=webpack://restaflib/./computeSetupTables.js?");
624
-
625
- /***/ }),
626
-
627
- /***/ "./computeSummary.js":
628
- /*!***************************!*\
629
- !*** ./computeSummary.js ***!
630
- \***************************/
631
- /*! exports provided: default */
632
- /*! exports used: default */
633
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
634
-
635
- "use strict";
636
- eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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\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 computeSummary\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - compute Session\r\n * @param {rafObject} job - rafObject representing the compute service job after job completion\r\n * @param {object|Array=} tables (see computeSetupTables)\r\n * @returns {promise} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n * \r\n */\nfunction computeSummary(_x, _x2, _x3, _x4) {\n return _computeSummary.apply(this, arguments);\n}\nfunction _computeSummary() {\n _computeSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, job, tables) {\n var result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(job != null && tables == null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return jobResults(store, session, job);\n case 3:\n result = _context.sent;\n _context.next = 9;\n break;\n case 6:\n _context.next = 8;\n return isetupTable(store, session, tables);\n case 8:\n result = _context.sent;\n case 9:\n return _context.abrupt(\"return\", result);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSummary.apply(this, arguments);\n}\nfunction jobResults(_x5, _x6, _x7) {\n return _jobResults.apply(this, arguments);\n}\nfunction _jobResults() {\n _jobResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee2(store, session, job) {\n var cResult, reportLink, results, size, i, resultItem, type, r, _r, _r2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: job /*null*/,\n tables: {},\n files: {}\n };\n cResult.log = job.links('log');\n cResult.listing = job.links('listing');\n reportLink = job.links('results');\n if (!(reportLink !== null)) {\n _context2.next = 10;\n break;\n }\n _context2.next = 7;\n return store.apiCall(reportLink);\n case 7:\n results = _context2.sent;\n size = results.itemsList().size;\n if (size > 0) {\n for (i = 0; i < size; i++) {\n resultItem = results.itemsList(i);\n type = results.items(resultItem, 'data', 'type').toLowerCase();\n if (type === 'ods') {\n cResult['ods'] = results.itemsCmd(resultItem, 'self');\n } else if (type === 'table') {\n r = {\n self: results.itemsCmd(resultItem, 'self'),\n current: null\n };\n cResult.tables[resultItem.toUpperCase()] = r;\n } else if (type === 'file') {\n _r = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult.files[resultItem] = _r;\n } else {\n _r2 = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult[type] = _r2;\n }\n }\n }\n case 10:\n return _context2.abrupt(\"return\", cResult);\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobResults.apply(this, arguments);\n}\nfunction isetupTable(_x8, _x9, _x10) {\n return _isetupTable.apply(this, arguments);\n}\nfunction _isetupTable() {\n _isetupTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee3(store, session, tables) {\n var cResult, tableList, i, itable, libref, name, p, currentLibrefs, rlink, currentLibrefSelf, _tables, tname, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: null,\n tables: {},\n files: {}\n };\n tableList = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(tables) === 'object' ? [tables] : tables;\n i = 0;\n case 3:\n if (!(i < tableList.length)) {\n _context3.next = 29;\n break;\n }\n itable = tableList[i];\n libref = itable.libref.toUpperCase();\n name = itable.name.toUpperCase();\n p = {\n qs: {\n filter: \"eq(name,'\".concat(libref, \"')\")\n }\n };\n _context3.next = 10;\n return store.apiCall(session.links('librefs'), p);\n case 10:\n currentLibrefs = _context3.sent;\n if (!(currentLibrefs.itemsList().size === 0)) {\n _context3.next = 13;\n break;\n }\n throw \"ERROR: Libref \".concat(libref, \" not found\");\n case 13:\n // get the links for this libref\n rlink = currentLibrefs.itemsCmd(libref, 'self');\n _context3.next = 16;\n return store.apiCall(rlink);\n case 16:\n currentLibrefSelf = _context3.sent;\n // get the table\n p = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context3.next = 20;\n return store.apiCall(currentLibrefSelf.links('tables'), p);\n case 20:\n _tables = _context3.sent;\n if (!(_tables.itemsList().size === 0)) {\n _context3.next = 23;\n break;\n }\n throw \"ERROR: Table \".concat(name, \" not found\");\n case 23:\n tname = \"\".concat(libref, \".\").concat(name).toLowerCase();\n r = {\n self: _tables.itemsCmd(name, 'self'),\n current: null\n };\n cResult.tables[tname.toUpperCase()] = r;\n case 26:\n i++;\n _context3.next = 3;\n break;\n case 29:\n return _context3.abrupt(\"return\", cResult);\n case 30:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _isetupTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSummary);\n\n//# sourceURL=webpack://restaflib/./computeSummary.js?");
637
-
638
- /***/ }),
639
-
640
- /***/ "./computeUpdateData.js":
641
- /*!******************************!*\
642
- !*** ./computeUpdateData.js ***!
643
- \******************************/
644
- /*! exports provided: default */
645
- /*! exports used: default */
646
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
647
-
648
- "use strict";
649
- eval("/* 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 © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n* @description Update a record in a cas table\r\n* @async\r\n* @private\r\n* @module computeUpdateData\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {*} payload - {data,where,table}\r\n* @returns {promise} - return \r\n* @example\r\n* let inputs = restaflib.computeUpdateData(store, session, payload);\r\n* payload = { where: {key1: vale1, key2: value2,...},\r\n* data: {var1:value1, var2:value2,....},\r\n* table: {caslib: caslib, name: name}\r\n* Expects a single row\r\n*/\nfunction computeUpdateData(_x, _x2, _x3) {\n return _computeUpdateData.apply(this, arguments);\n}\nfunction _computeUpdateData() {\n _computeUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var data, table, where, src, set, comma, k, swhere, andbit, _k, v, valString, asrc, p, job, qs, status, c;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, table = payload.table, where = payload.where;\n src = \"proc sql; update \".concat(table.libref, \".\").concat(table.name);\n set = 'SET ';\n comma = ' ';\n for (k in data) {\n set = set + comma + k + '=' + value2String(data[k]);\n comma = ', ';\n }\n src = src + ' ' + set;\n swhere = ' WHERE ';\n andbit = ' ';\n if (typeof where === 'string') {\n swhere = swhere + where;\n } else {\n for (_k in where) {\n v = where[_k];\n valString = value2String(v);\n swhere = swhere + andbit + _k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n }\n src = src + ' ' + swhere + ';run;';\n asrc = src.split(/\\r?\\n/);\n p = {\n data: {\n code: asrc\n }\n };\n _context.next = 14;\n return store.apiCall(session.links('execute'), p);\n case 14:\n job = _context.sent;\n qs = {\n qs: {\n newState: 'Completed',\n timeout: 1\n }\n }; // eslint-disable-next-line no-unused-vars\n _context.next = 18;\n return store.jobState(job, qs);\n case 18:\n status = _context.sent;\n c = status.data === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n statusCode: c,\n msg: status.data\n });\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpdateData.apply(this, arguments);\n}\nfunction value2String(value) {\n var valueString;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value);\n } else {\n valueString = value.toString();\n }\n return valueString;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpdateData);\n\n//# sourceURL=webpack://restaflib/./computeUpdateData.js?");
650
-
651
- /***/ }),
652
-
653
- /***/ "./computeUpload.js":
654
- /*!**************************!*\
655
- !*** ./computeUpload.js ***!
656
- \**************************/
657
- /*! exports provided: default */
658
- /*! exports used: default */
659
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
660
-
661
- "use strict";
662
- eval("/* 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 _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\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\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module computeUpload\r\n * @param {store} store \r\n * @param {rafobject} session compute session \r\n * @param {computeTable} table - name of table to be created\r\n * @param {object} data - rows of data objects\r\n * @param {object} columns columns\r\n * @returns {promise}\r\n */\nfunction computeUpload(_x, _x2, _x3, _x4, _x5) {\n return _computeUpload.apply(this, arguments);\n}\nfunction _computeUpload() {\n _computeUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, csvArray, columns) {\n var src, l, inx, k, c, x;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"data \".concat(table.libref, \".\").concat(table.name, \"; INFILE datalines delimiter=',' ;\\n\");\n l = '';\n inx = 'INPUT ';\n for (k in columns) {\n c = columns[k];\n inx = inx + c.Column + ' ';\n if (c.Type === 'CHAR') {\n x = \" \".concat(c.Column, \" $ \").concat(c.length, \" \\n\");\n l = l + ' ' + x;\n }\n }\n if (l.length > 0) {\n l = 'LENGTH ' + l + ';\\n';\n }\n inx = inx + ';\\n';\n src = src + ';\\n' + l + inx + 'datalines;\\n' + csvArray + '\\n; run; proc print;run;\\n';\n _context.next = 9;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 9:\n return _context.abrupt(\"return\", {\n msg: 'done',\n statusCode: 0\n });\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpload);\n\n//# sourceURL=webpack://restaflib/./computeUpload.js?");
663
-
664
- /***/ }),
665
-
666
- /***/ "./findReport.js":
667
- /*!***********************!*\
668
- !*** ./findReport.js ***!
669
- \***********************/
670
- /*! exports provided: default */
671
- /*! exports used: default */
672
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
673
-
674
- "use strict";
675
- eval("/* 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/*\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/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.getService('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
676
-
677
- /***/ }),
678
-
679
- /***/ "./getReportImage.js":
680
- /*!***************************!*\
681
- !*** ./getReportImage.js ***!
682
- \***************************/
683
- /*! exports provided: default */
684
- /*! exports used: default */
685
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
686
-
687
- "use strict";
688
- eval("/* 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 _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.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/**\r\n * @description Return the svg of the specified report(async)\r\n * \r\n * @module getReportImage\r\n * @category restaflib/report\r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the report\r\n * \r\n * @returns {string} - the svg of the report\r\n * \r\n */\n\n\n\nfunction getReportImage(_x, _x2) {\n return _getReportImage.apply(this, arguments);\n}\nfunction _getReportImage() {\n _getReportImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportImages, reportsList, uri, data, p, job, status, image;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reportImages = store.rafObject('reportImages');\n _context.next = 3;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 3:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", \"\".concat(name, \" was not found\"));\n case 6:\n uri = reportsList.itemsCmd(reportsList.itemsList(0), 'self', 'link', 'uri');\n data = {\n reportUri: uri,\n sectionIndex: 0,\n layoutType: 'entireSection',\n size: \"400x400\"\n };\n p = {\n data: data\n };\n _context.next = 11;\n return store.apiCall(reportImages.links('createJob'), p);\n case 11:\n job = _context.sent;\n _context.next = 14;\n return store.jobState(job, {\n qs: {\n wait: 1.5\n }\n }, 10, 2);\n case 14:\n status = _context.sent;\n if (!(status.data !== 'completed')) {\n _context.next = 17;\n break;\n }\n return _context.abrupt(\"return\", \"Job failed \".concat(status.data));\n case 17:\n _context.next = 19;\n return store.apiCall(status.job.itemsCmd(status.job.itemsList(0), 'image'));\n case 19:\n image = _context.sent;\n return _context.abrupt(\"return\", image.items());\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportImage.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportImage);\n\n//# sourceURL=webpack://restaflib/./getReportImage.js?");
689
-
690
- /***/ }),
691
-
692
- /***/ "./getReportUri.js":
693
- /*!*************************!*\
694
- !*** ./getReportUri.js ***!
695
- \*************************/
696
- /*! exports provided: default */
697
- /*! exports used: default */
698
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
699
-
700
- "use strict";
701
- eval("/* 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 _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.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/**\r\n * @description Generate url for report(async)\r\n * @module getReportUri\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of report\r\n * \r\n * @returns {promise} array of report's of the form {name: name, uri: uri} for the report(s)\r\n */\n\n\n\nfunction getReportUri(_x, _x2) {\n return _getReportUri.apply(this, arguments);\n}\nfunction _getReportUri() {\n _getReportUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportsList, e, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 2:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n e = name == null ? 'No reports were found' : \"\".concat(name, \" was not found\");\n throw e;\n case 6:\n result = [];\n reportsList.items().map(function (i, n) {\n var uri = {\n name: n,\n uri: reportsList.itemsCmd(n, 'self', 'link', 'uri')\n };\n result.push(uri);\n });\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportUri);\n\n//# sourceURL=webpack://restaflib/./getReportUri.js?");
702
-
703
- /***/ }),
704
-
705
- /***/ "./getSasTableRows.js":
706
- /*!****************************!*\
707
- !*** ./getSasTableRows.js ***!
708
- \****************************/
709
- /*! exports provided: default */
710
- /*! exports used: default */
711
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
712
-
713
- "use strict";
714
- eval("/* 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/*\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// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description Convert table to object of the form [{var1: value, var2: value,...},....](async)\r\n * @async\r\n * @private\r\n * @module getSASTableRows\r\n * @category restaflib/compute\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} tableName - name of the table\r\n * \r\n * @returns {promise} - get retrieved rows [{var1:value, var2:...}]\r\n */\n\n\nfunction getSasTableRows(_x, _x2, _x3) {\n return _getSasTableRows.apply(this, arguments);\n}\nfunction _getSasTableRows() {\n _getSasTableRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, computeSummary, tableName) {\n var tableSelf, t1, table, columns, rows, result, count, _loop, i;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n tableSelf = computeSummary.tables[tableName];\n _context2.next = 3;\n return store.apiCall(tableSelf);\n case 3:\n t1 = _context2.sent;\n _context2.next = 6;\n return store.apiCall(t1.links('rowSet'));\n case 6:\n table = _context2.sent;\n columns = table.items('columns');\n rows = table.items('rows');\n result = [];\n count = rows.size;\n _loop = /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n var row, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n row = rows.get(i);\n r = {};\n columns.map(function (c, i) {\n var varx = c.toLowerCase();\n r[varx] = row.get(i);\n });\n result.push(r);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n });\n i = 0;\n case 13:\n if (!(i < count)) {\n _context2.next = 18;\n break;\n }\n return _context2.delegateYield(_loop(), \"t0\", 15);\n case 15:\n i++;\n _context2.next = 13;\n break;\n case 18:\n return _context2.abrupt(\"return\", result);\n case 19:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _getSasTableRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getSasTableRows);\n\n//# sourceURL=webpack://restaflib/./getSasTableRows.js?");
715
-
716
- /***/ }),
717
-
718
- /***/ "./getScoreStep.js":
719
- /*!*************************!*\
720
- !*** ./getScoreStep.js ***!
721
- \*************************/
722
- /*! exports provided: default */
723
- /*! exports used: default */
724
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
725
-
726
- "use strict";
727
- eval("/* 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 _sassoftware_restaflib_src_masAddModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @sassoftware/restaflib/src/masAddModel */ \"./masAddModel.js\");\n\n\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 * @private\r\n * @module getScoreStep\r\n * @category restaflib/mas\r\n * @param {*} store \r\n * @param {*} microanalyticScore \r\n * @param {*} name \r\n * @returns {promise}\r\n */\nfunction getScoreStep(_x, _x2, _x3) {\n return _getScoreStep.apply(this, arguments);\n}\nfunction _getScoreStep() {\n _getScoreStep = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, microanalyticScore, name) {\n var payload, modList, rafLink, allSteps, control;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name.trim(), \"')\")\n }\n };\n _context.next = 3;\n return store.apiCall(microanalyticScore.links('modules'), payload);\n case 3:\n modList = _context.sent;\n if (!(modList.itemsList().size === 0)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", null);\n case 6:\n rafLink = modList.itemsCmd(name, 'steps');\n _context.next = 9;\n return store.apiCall(rafLink);\n case 9:\n allSteps = _context.sent;\n control = {\n name: name,\n stepsRafLink: allSteps,\n stepIds: modList.items(name, 'data', 'stepIds').toJS(),\n microanalyticScore: microanalyticScore\n };\n return _context.abrupt(\"return\", control);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getScoreStep.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getScoreStep);\n\n//# sourceURL=webpack://restaflib/./getScoreStep.js?");
728
-
729
- /***/ }),
730
-
731
- /***/ "./index.js":
732
- /*!******************!*\
733
- !*** ./index.js ***!
734
- \******************/
735
- /*! exports provided: caslRun, caslRunBase, casSetup, casActionRun, casTableToJson, casFetchData, casFetchRows, casAppendTable, casUpdateData, casUpload, casSaveTable, casLoadTable, computeRun, computeSetup, computeSummary, computeSetupTables, computeFetchData, computeFileContent, computeResults, computeAppendTable, computeUpdateData, computeUpload, findReport, getReportImage, getReportUri, getSasTableRows, jesSetup, jesRun, jesSummary, jsonToDict, caslScore, caslDescribe, masSetup, masAddModel, masDescribe, masRun, masScore, uploadData, lib */
736
- /*! all exports used */
737
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
738
-
739
- "use strict";
740
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRun\", function() { return _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRunBase\", function() { return _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslScore\", function() { return _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslDescribe\", function() { return _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"a\"]; });\n\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSetup\", function() { return _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"a\"]; });\n\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casActionRun\", function() { return _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"a\"]; });\n\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchData\", function() { return _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"a\"]; });\n\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchRows\", function() { return _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"a\"]; });\n\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpdateData\", function() { return _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"a\"]; });\n\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casAppendTable\", function() { return _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"a\"]; });\n\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casTableToJson\", function() { return _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"a\"]; });\n\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpload\", function() { return _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"a\"]; });\n\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSaveTable\", function() { return _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"a\"]; });\n\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casLoadTable\", function() { return _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"a\"]; });\n\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeRun\", function() { return _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"a\"]; });\n\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetup\", function() { return _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"a\"]; });\n\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSummary\", function() { return _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"a\"]; });\n\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetupTables\", function() { return _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"a\"]; });\n\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeResults\", function() { return _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"a\"]; });\n\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFetchData\", function() { return _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"a\"]; });\n\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFileContent\", function() { return _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"a\"]; });\n\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeAppendTable\", function() { return _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"a\"]; });\n\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpdateData\", function() { return _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"a\"]; });\n\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpload\", function() { return _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"a\"]; });\n\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findReport\", function() { return _findReport__WEBPACK_IMPORTED_MODULE_24__[\"a\"]; });\n\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportImage\", function() { return _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"a\"]; });\n\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportUri\", function() { return _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"a\"]; });\n\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getSasTableRows\", function() { return _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"a\"]; });\n\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSetup\", function() { return _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"a\"]; });\n\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesRun\", function() { return _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"a\"]; });\n\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSummary\", function() { return _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"a\"]; });\n\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jsonToDict\", function() { return _jsonToDict__WEBPACK_IMPORTED_MODULE_31__[\"a\"]; });\n\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masSetup\", function() { return _masSetup__WEBPACK_IMPORTED_MODULE_32__[\"a\"]; });\n\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masDescribe\", function() { return _masDescribe__WEBPACK_IMPORTED_MODULE_33__[\"a\"]; });\n\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masRun\", function() { return _masRun__WEBPACK_IMPORTED_MODULE_34__[\"a\"]; });\n\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masScore\", function() { return _masScore__WEBPACK_IMPORTED_MODULE_35__[\"a\"]; });\n\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masAddModel\", function() { return _masAddModel__WEBPACK_IMPORTED_MODULE_36__[\"a\"]; });\n\n/* harmony import */ var _uploadData__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./uploadData */ \"./uploadData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uploadData\", function() { return _uploadData__WEBPACK_IMPORTED_MODULE_37__[\"a\"]; });\n\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//import print from './print';\n\n\n\nvar lib = Object(_lib__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?");
741
-
742
- /***/ }),
743
-
744
- /***/ "./jesRun.js":
745
- /*!*******************!*\
746
- !*** ./jesRun.js ***!
747
- \*******************/
748
- /*! exports provided: default */
749
- /*! exports used: default */
750
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
751
-
752
- "use strict";
753
- eval("/* 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 {object} args - args from graphql server(enhanced)\r\n * @param {string} src - code to execute\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4, _x5) {\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.a.mark(function _callee(store, jes, src, jobDefinitionName, args) {\n var jobRequest, jobDefinition, payload, jobResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_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 (!(jobDefinitionName !== null)) {\n _context.next = 6;\n break;\n }\n _context.next = 5;\n return jobDefUri(store, jobDefinitionName);\n case 5:\n jobRequest.jobDefinitionUri = _context.sent;\n case 6:\n // Concat macro to code\n if (src != -null) {\n jobDefinition.code = src; /*src.split(/\\r?\\n/);*/\n }\n\n jobDefinition.type = 'Compute';\n /*\r\n if (args !== null) {\r\n let props = [];\r\n for (let r in args) {\r\n let item = { name: r, value: args[r] };\r\n props.push(item);\r\n }\r\n jobDefinition.properties = props;\r\n }\r\n */\n jobRequest.arguments = args;\n jobRequest.jobDefinition = jobDefinition;\n payload = {\n data: jobRequest\n }; // run code and get results\n _context.next = 13;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, jes, payload);\n case 13:\n jobResult = _context.sent;\n return _context.abrupt(\"return\", jobResult);\n case 15:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRun.apply(this, arguments);\n}\nfunction jobDefUri(_x6, _x7) {\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.a.mark(function _callee2(store, name) {\n var jobDef, uri, payload, jdefList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n jobDef = store.getService('jobDefinitions');\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context2.next = 5;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, payload);\n case 5:\n jdefList = _context2.sent;\n if (!(jdefList.itemsList().size === 0)) {\n _context2.next = 10;\n break;\n }\n throw \"Error: \".concat(name, \" not found in the system\");\n case 10:\n uri = jdefList.itemsCmd(name, 'self', 'link', 'uri');\n case 11:\n return _context2.abrupt(\"return\", uri);\n case 12:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobDefUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRun);\n\n//# sourceURL=webpack://restaflib/./jesRun.js?");
754
-
755
- /***/ }),
756
-
757
- /***/ "./jesRunBase.js":
758
- /*!***********************!*\
759
- !*** ./jesRunBase.js ***!
760
- \***********************/
761
- /*! exports provided: default */
762
- /*! exports used: default */
763
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
764
-
765
- "use strict";
766
- eval("/* 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 compute service \n//\n/** \r\n * @description Reduce compute service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} sore - restaf store\r\n * @param {code} code - SAS code to be executed\r\n * \r\n * @returns {object} rafobject of the results from a sas compute job\r\n * \r\n */\nfunction jesRunBase(_x, _x2, _x3) {\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.a.mark(function _callee(store, jes, payload) {\n var job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.apiCall(jes.links('create'), payload);\n case 2:\n job = _context.sent;\n _context.next = 5;\n return store.jobState(job, null, 5, 2);\n case 5:\n status = _context.sent;\n if (!(status.data === 'running')) {\n _context.next = 10;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 10:\n if (!(status.data === 'failed')) {\n _context.next = 14;\n break;\n }\n throw JSON.stringify(status);\n case 14:\n _context.next = 16;\n return Object(_jesSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, status.job);\n case 16:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRunBase);\n\n//# sourceURL=webpack://restaflib/./jesRunBase.js?");
767
-
768
- /***/ }),
769
-
770
- /***/ "./jesSetup.js":
771
- /*!*********************!*\
772
- !*** ./jesSetup.js ***!
773
- \*********************/
774
- /*! exports provided: default */
775
- /*! exports used: default */
776
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
777
-
778
- "use strict";
779
- eval("/* 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/*\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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module jesSetup\r\n * @private\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - logon payload - If null assumes that logon was done earlier.\r\n * \r\n * @returns {object} - returns a jobExecution raf object\r\n */\n\n\nfunction jesSetup(_x, _x2) {\n return _jesSetup.apply(this, arguments);\n}\nfunction _jesSetup() {\n _jesSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, payload) {\n var services;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(payload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(payload);\n case 3:\n _context.next = 5;\n return store.addServices('jobExecution', 'compute', 'jobDefinitions');\n case 5:\n services = _context.sent;\n return _context.abrupt(\"return\", services.jobExecution);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSetup);\n\n//# sourceURL=webpack://restaflib/./jesSetup.js?");
780
-
781
- /***/ }),
782
-
783
- /***/ "./jesSummary.js":
784
- /*!***********************!*\
785
- !*** ./jesSummary.js ***!
786
- \***********************/
787
- /*! exports provided: default */
788
- /*! exports used: default */
789
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
790
-
791
- "use strict";
792
- eval("/* 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.a.mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", job);\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSummary.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSummary);\n\n//# sourceURL=webpack://restaflib/./jesSummary.js?");
793
-
794
- /***/ }),
795
-
796
- /***/ "./jsonToDict.js":
797
- /*!***********************!*\
798
- !*** ./jsonToDict.js ***!
799
- \***********************/
800
- /*! exports provided: default */
801
- /*! exports used: default */
802
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
803
-
804
- "use strict";
805
- eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\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/**\r\n * @description Produce a string with casl dictionary suitable for inclusion in casl code\r\n * \r\n * @module jsonToDict\r\n * @category restaflib/util\r\n * @param {object} obj - the JS object of interest\r\n * @param {string} name - the name to assign to the dictionary\r\n * \r\n * @returns {string} returns the string containing the casl dictionary\r\n * @alias module: jsonToDict\r\n * @example\r\n * \r\n * obj = {x: 1, b:2, c: ['a','b']};\r\n * name ='_appEnv_';\r\n * result is a string _appEnv_ = {x=2, b=3, c={\"a\", \"b\"}}\r\n */\n\nfunction jsonToDict(obj, name) {\n var o1;\n if (obj === null) {\n o1 = \"{}\";\n } else {\n o1 = Array.isArray(obj) === true ? handleArray(obj) : handleObject(obj);\n }\n return \"\".concat(name, \" = \").concat(o1, \";\");\n}\nfunction handleObject(obj) {\n var r = '{ ';\n var sep = ' ';\n for (var k in obj) {\n if (Array.isArray(obj[k]) === true) {\n var o = handleArray(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + o;\n } else {\n var type = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(obj[k]);\n if (type === 'object') {\n var _o = handleObject(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + _o;\n } else {\n r = r + sep + \"\".concat(k, \"=\") + (type === 'string' ? \" \\\"\".concat(obj[k], \"\\\" \") : \"\".concat(obj[k], \" \"));\n }\n }\n sep = ',';\n }\n r = r + '} ';\n return r;\n}\nfunction handleArray(obj) {\n var r = '{';\n var sep = ' ';\n var size = obj.length;\n for (var k = 0; k < size; k++) {\n if (Array.isArray(obj[k]) === true) {\n var o = handleArray(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + o;\n } else {\n var type = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(obj[k]);\n if (type === 'object') {\n var _o2 = handleObject(obj[k]);\n r = r + sep + _o2;\n } else {\n r = r + sep + (type === 'string' ? \" \\\"\".concat(obj[k], \"\\\" \") : \"\".concat(obj[k], \" \"));\n }\n sep = ',';\n }\n }\n r = r + '}';\n return r;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jsonToDict);\n\n//# sourceURL=webpack://restaflib/./jsonToDict.js?");
806
-
807
- /***/ }),
808
-
809
- /***/ "./lib.js":
810
- /*!****************!*\
811
- !*** ./lib.js ***!
812
- \****************/
813
- /*! exports provided: default */
814
- /*! exports used: default */
815
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
816
-
817
- "use strict";
818
- eval("/* 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 _casUpdateData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _uploadData__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./uploadData */ \"./uploadData.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\nfunction lib() {\n return {\n caslRun: _caslRun__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"],\n caslRunBase: _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casSetup: _casSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casActionRun: _casActionRun__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n // casTableToJson,\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n casUpdateData: _casUpdateData__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"],\n computeRun: _computeRun__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"],\n computeSetup: _computeSetup__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"],\n computeSummary: _computeSummary__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"],\n computeFetchData: _computeFetchData__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n computeFileContent: _computeFileContent__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"],\n computeResults: _computeResults__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n findReport: _findReport__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"],\n getReportImage: _getReportImage__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"],\n getReportUri: _getReportUri__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"],\n getSASTableRows: _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"],\n jesSetup: _jesSetup__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"],\n jesRun: _jesRun__WEBPACK_IMPORTED_MODULE_20__[/* default */ \"a\"],\n jesSummary: _jesSummary__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"],\n jsonToDict: _jsonToDict__WEBPACK_IMPORTED_MODULE_22__[/* default */ \"a\"],\n casTableToJson: _casTableToJson__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n caslScore: _caslScore__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n caslDescribe: _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n masSetup: _masSetup__WEBPACK_IMPORTED_MODULE_23__[/* default */ \"a\"],\n masAddModel: _masAddModel__WEBPACK_IMPORTED_MODULE_26__[/* default */ \"a\"],\n masDescribe: _masDescribe__WEBPACK_IMPORTED_MODULE_24__[/* default */ \"a\"],\n masRun: _masRun__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"],\n casUpload: _casUpload__WEBPACK_IMPORTED_MODULE_27__[/* default */ \"a\"],\n uploadData: _uploadData__WEBPACK_IMPORTED_MODULE_28__[/* default */ \"a\"]\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (lib);\n\n//# sourceURL=webpack://restaflib/./lib.js?");
819
-
820
- /***/ }),
821
-
822
- /***/ "./masAddModel.js":
823
- /*!************************!*\
824
- !*** ./masAddModel.js ***!
825
- \************************/
826
- /*! exports provided: default */
827
- /*! exports used: default */
828
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
829
-
830
- "use strict";
831
- eval("/* 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 _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.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/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} masControl - control object from masSetup\r\n * @param {object} models - array of models to add\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masAddModel(_x, _x2, _x3) {\n return _masAddModel.apply(this, arguments);\n}\nfunction _masAddModel() {\n _masAddModel = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, models) {\n var microanalyticScore, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n microanalyticScore = masControl.service;\n i = 0;\n case 2:\n if (!(i < models.length)) {\n _context.next = 12;\n break;\n }\n m = models[i];\n if (!(masControl.steps[m] == null)) {\n _context.next = 9;\n break;\n }\n _context.next = 7;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 7:\n result = _context.sent;\n masControl.steps[m] = result;\n case 9:\n i++;\n _context.next = 2;\n break;\n case 12:\n return _context.abrupt(\"return\", true);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masAddModel.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masAddModel);\n\n//# sourceURL=webpack://restaflib/./masAddModel.js?");
832
-
833
- /***/ }),
834
-
835
- /***/ "./masDescribe.js":
836
- /*!************************!*\
837
- !*** ./masDescribe.js ***!
838
- \************************/
839
- /*! exports provided: default */
840
- /*! exports used: default */
841
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
842
-
843
- "use strict";
844
- eval("/*\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 * Score using MAS\r\n * @module masDescribe\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {string} step - if not specified it will try to find score or execute\r\n * \r\n * @returns {object} - return input information\r\n * @alias module: masDescribe\r\n * @example\r\n * let inputs = restaflib.masDescribe(masControl, 'modela', 'score');\r\n */\nfunction masDescribe(masControl, modelName, step) {\n var stepControl = masControl.steps[modelName];\n if (stepControl === null) {\n return [];\n }\n var currentStep = null;\n if (step == null) {\n var stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === 'execute' || x === 'score';\n });\n if (stepIndex === -1) {\n return [];\n } else {\n currentStep = stepControl.stepIds[stepIndex];\n }\n } else {\n var _stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === step;\n });\n if (_stepIndex === -1) {\n return [];\n } else {\n currentStep = step;\n }\n }\n var desc = stepControl.stepsRafLink.items(currentStep, 'data', 'inputs');\n if (desc === null) {\n return [];\n }\n return desc.toJS();\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masDescribe);\n\n//# sourceURL=webpack://restaflib/./masDescribe.js?");
845
-
846
- /***/ }),
847
-
848
- /***/ "./masRun.js":
849
- /*!*******************!*\
850
- !*** ./masRun.js ***!
851
- \*******************/
852
- /*! exports provided: default */
853
- /*! exports used: default */
854
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
855
-
856
- "use strict";
857
- eval("/* 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 * Score using MAS\r\n * @module masRun\r\n * @param {store} restaf store\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @param {string} stepName - if not specified it will default to score or execute\r\n * \r\n * @returns {promise} - returns scoring results\r\n * @alias module: masrun\r\n * @example\r\n * async function example (models, payload) {\r\n * await store.logon(payload);\r\n * let masControl = await restaflib.masSetup(store, models);\r\n * let defaults = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * let inp = restaflib.masDescribe(masControl, models[0], 'score');\r\n * print.object(inp, 'describe for score model');\r\n * inp = inp.map((n) => {\r\n * n.value = defaults[n.name];\r\n * return n;\r\n * });\r\n * print.object(inp, 'updated input for score model');\r\n * let result = await restaflib.masRun (store, masControl, models[0], inp, 'score');\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\nfunction masRun(_x, _x2, _x3, _x4, _x5, _x6) {\n return _masRun.apply(this, arguments);\n}\nfunction _masRun() {\n _masRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, modelName, scenario, step, cmd) {\n var stepControl, inputIsArray, inputs, r, item, scorePayload, currentStep, stepIndex, _stepIndex, rafLink, t, result, outputs, score;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n stepControl = masControl.steps[modelName];\n inputIsArray = false;\n inputs = [];\n if (Array.isArray(scenario) === false) {\n for (r in scenario) {\n item = {\n name: r,\n value: scenario[r]\n };\n inputs.push(item);\n }\n } else {\n inputIsArray = true;\n }\n scorePayload = {\n data: {\n inputs: inputIsArray === true ? scenario : inputs\n }\n };\n currentStep = null; //TBD: Need to convert stepId from array to object for cleaner coding\n if (!(step == null)) {\n _context.next = 15;\n break;\n }\n stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === 'execute' || x === 'score';\n });\n if (!(stepIndex === -1)) {\n _context.next = 12;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 12:\n currentStep = stepControl.stepIds[stepIndex];\n case 13:\n _context.next = 21;\n break;\n case 15:\n _stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === step;\n });\n if (!(_stepIndex === -1)) {\n _context.next = 20;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 20:\n currentStep = step;\n case 21:\n if (cmd == null) {\n cmd = 'execute';\n }\n rafLink = stepControl.stepsRafLink.itemsCmd(currentStep, cmd);\n if (!(rafLink === null)) {\n _context.next = 26;\n break;\n }\n t = [{\n name: 'Error',\n type: 'string',\n value: \"name: \".concat(modelName, \" step: \").concat(step, \" operation: \").concat(cmd, \" is an invalid combination\")\n }];\n return _context.abrupt(\"return\", t);\n case 26:\n _context.next = 28;\n return store.apiCall(rafLink, scorePayload);\n case 28:\n result = _context.sent;\n outputs = result.items('outputs').toJS();\n if (inputIsArray === true) {\n score = outputs;\n } else {\n score = {};\n outputs.map(function (m) {\n score[m.name] = m.value;\n });\n }\n return _context.abrupt(\"return\", score);\n case 32:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masRun);\n\n//# sourceURL=webpack://restaflib/./masRun.js?");
858
-
859
- /***/ }),
860
-
861
- /***/ "./masScore.js":
862
- /*!*********************!*\
863
- !*** ./masScore.js ***!
864
- \*********************/
865
- /*! exports provided: default */
866
- /*! exports used: default */
867
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
868
-
869
- "use strict";
870
- eval("/* 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 _masSetup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\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 * Score using MAS\r\n * @module masScore\r\n * @category restaflib/mas\r\n * @param {store} restaf store\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @returns {promise} - returns scoring results\r\n * @alias module: masScore\r\n * @example\r\n * async function example (store, model) {\r\n * let scenario = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * \r\n * let result = await restaflib.masScore (store, model, scenario);\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\n\n\nfunction masScore(_x, _x2, _x3) {\n return _masScore.apply(this, arguments);\n}\nfunction _masScore() {\n _masScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, modelName, scenario) {\n var masControl, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_masSetup__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, [modelName]);\n case 2:\n masControl = _context.sent;\n _context.next = 5;\n return Object(_masRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, masControl, modelName, scenario, 'score', 'execute');\n case 5:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masScore);\n\n//# sourceURL=webpack://restaflib/./masScore.js?");
871
-
872
- /***/ }),
873
-
874
- /***/ "./masSetup.js":
875
- /*!*********************!*\
876
- !*** ./masSetup.js ***!
877
- \*********************/
878
- /*! exports provided: default */
879
- /*! exports used: default */
880
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
881
-
882
- "use strict";
883
- eval("/* 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 _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.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/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} models - an array of model names\r\n * @param {object} logonPayload - null|restaf logon payload\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masSetup(_x, _x2, _x3) {\n return _masSetup.apply(this, arguments);\n}\nfunction _masSetup() {\n _masSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, models, logonPayload) {\n var _yield$store$addServi, microanalyticScore, control, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n _context.next = 5;\n return store.addServices('microanalyticScore');\n case 5:\n _yield$store$addServi = _context.sent;\n microanalyticScore = _yield$store$addServi.microanalyticScore;\n control = {\n service: microanalyticScore,\n steps: {}\n };\n i = 0;\n case 9:\n if (!(i < models.length)) {\n _context.next = 18;\n break;\n }\n m = models[i];\n _context.next = 13;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 13:\n result = _context.sent;\n control.steps[m] = result;\n case 15:\n i++;\n _context.next = 9;\n break;\n case 18:\n return _context.abrupt(\"return\", control);\n case 19:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masSetup);\n\n//# sourceURL=webpack://restaflib/./masSetup.js?");
884
-
885
- /***/ }),
886
-
887
- /***/ "./programs/casAppendTable.js":
888
- /*!************************************!*\
889
- !*** ./programs/casAppendTable.js ***!
890
- \************************************/
891
- /*! exports provided: default */
892
- /*! exports used: default */
893
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
894
-
895
- "use strict";
896
- eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction casAppendTable() {\n var src = \"\\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 \";\n return src;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casAppendTable);\n\n//# sourceURL=webpack://restaflib/./programs/casAppendTable.js?");
897
-
898
- /***/ }),
899
-
900
- /***/ "./programs/casFetchData.js":
901
- /*!**********************************!*\
902
- !*** ./programs/casFetchData.js ***!
903
- \**********************************/
904
- /*! exports provided: default */
905
- /*! exports used: default */
906
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
907
-
908
- "use strict";
909
- eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction casFetchData() {\n var code = \"\\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 \";\n return code;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchData);\n\n//# sourceURL=webpack://restaflib/./programs/casFetchData.js?");
910
-
911
- /***/ }),
912
-
913
- /***/ "./programs/casFetchRows.js":
914
- /*!**********************************!*\
915
- !*** ./programs/casFetchRows.js ***!
916
- \**********************************/
917
- /*! exports provided: default */
918
- /*! exports used: default */
919
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
920
-
921
- "use strict";
922
- eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n/* deprecate */\nfunction casFetchRows() {\n var code = \"\\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 \";\n return code;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./programs/casFetchRows.js?");
923
-
924
- /***/ }),
925
-
926
- /***/ "./programs/commonCasl.js":
927
- /*!********************************!*\
928
- !*** ./programs/commonCasl.js ***!
929
- \********************************/
930
- /*! exports provided: default */
931
- /*! exports used: default */
932
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
933
-
934
- "use strict";
935
- eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction commonCasl() {\n var casl = \"\\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 \";\n return casl;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (commonCasl);\n\n//# sourceURL=webpack://restaflib/./programs/commonCasl.js?");
936
-
937
- /***/ }),
938
-
939
- /***/ "./programs/index.js":
940
- /*!***************************!*\
941
- !*** ./programs/index.js ***!
942
- \***************************/
943
- /*! exports provided: default */
944
- /*! exports used: default */
945
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
946
-
947
- "use strict";
948
- eval("/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scoreCasl */ \"./programs/scoreCasl.js\");\n/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scoreCasl__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./casFetchData */ \"./programs/casFetchData.js\");\n/* harmony import */ var _commonCasl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonCasl */ \"./programs/commonCasl.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casFetchRows */ \"./programs/casFetchRows.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casAppendTable */ \"./programs/casAppendTable.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/* harmony default export */ __webpack_exports__[\"a\"] = ({\n commonCasl: _commonCasl__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casFetchRows: _casFetchRows__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n scoreCasl: _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default.a,\n casAppendTable: _casAppendTable__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casRowSets: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n});\n\n//# sourceURL=webpack://restaflib/./programs/index.js?");
949
-
950
- /***/ }),
951
-
952
- /***/ "./programs/scoreCasl.js":
953
- /*!*******************************!*\
954
- !*** ./programs/scoreCasl.js ***!
955
- \*******************************/
956
- /*! no static exports found */
957
- /*! exports used: default */
958
- /***/ (function(module, exports) {
959
-
960
- eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nmodule.exports = function scoreCasl() {\n var casl = \"\\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 \";\n return casl;\n};\n\n/*\r\n cas mycas; \r\n proc cas; \r\n \r\n \r\n _args_1 = { \r\n path = '/describe', \r\n model = { caslib='models', name='cms_sdoh_risk_stratification_cluster'}, \r\n table = { caslib= \"public\", name = \"cluster_test2\"}, \r\n scenario = { \r\n SDOH_Physically_Unhealthy_Days_= 4.3, \r\n SDOH_Per_Adults_Bachelors = 19.6, \r\n SDOH_Unemployment_Rate = 9.6, \r\n SDOH_Median_Household_Income = 45493 \r\n } \r\n \r\n }; \r\n \r\n _args_2 = { \r\n path = '/score', \r\n model = { caslib='models', name='cms_sdoh_risk_stratification_cluster'}, \r\n table = { caslib= \"public\", name = \"cluster_test2\"}, \r\n scenario = { \r\n SDOH_Physically_Unhealthy_Days_ = 4.3, \r\n SDOH_Per_Adults_Bachelors = 19.6, \r\n SDOH_Unemployment_Rate = 9.6, \r\n SDOH_Median_Household_Income = 45493 \r\n } \r\n \r\n }; \r\n \r\n _args_3 = { \r\n path = '/describe', \r\n model = { caslib='modelstore', name='_LBP6S3ZAQGO614AJKDJT3AF93'}, \r\n table = { caslib='', name=''}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n \r\n _args_4 = { \r\n path = '/score', \r\n model = { caslib='modelstore', name='_LBP6S3ZAQGO614AJKDJT3AF93'}, \r\n table = { caslib='', name=''}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n \r\n _args_5 = { \r\n path = '/score', \r\n modelName= 'Gradient_Boosting_3f3c7c89_13ac_469e_a761_28ee066e5b87' \r\n model = { caslib='casuser', name='testdest'}, \r\n table = { caslib=\"\", name=\"\"}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n _args_6 = { \r\n path = '/score', \r\n modelName= 'Gradient_Boosting_7adb0404_85e3_474d_9d03_1059ef7ae008' \r\n model = { caslib='public', name='testpublish'}, \r\n table = { caslib=\"\", name=\"\"}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n\n result = runMain(_args_1); \r\n result = runMain(_args_2); \r\n result = runMain(_args_3); \r\n result = runMain(_args_4); \r\n result = runMain(_args_5); \r\n */\n\n//# sourceURL=webpack://restaflib/./programs/scoreCasl.js?");
961
-
962
- /***/ }),
963
-
964
- /***/ "./uploadData.js":
965
- /*!***********************!*\
966
- !*** ./uploadData.js ***!
967
- \***********************/
968
- /*! exports provided: default */
969
- /*! exports used: default */
970
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
971
-
972
- "use strict";
973
- eval("/* 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\nvar FormData = __webpack_require__(/*! form-data */ \"../../../node_modules/form-data/lib/browser.js\");\nfunction uploadData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _uploadData.apply(this, arguments);\n}\nfunction _uploadData() {\n _uploadData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(caslib, fileName, file, type, store, scope) {\n var _yield$store$addServi, casManagement, servers, serverName, p1, caslibResult, tables, qt, lastTable, n, uri, formData, p3, upload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.addServices('casManagement');\n case 2:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 6;\n return store.apiCall(casManagement.links('servers'));\n case 6:\n servers = _context.sent;\n if (!(servers.itemsList().size === 0)) {\n _context.next = 9;\n break;\n }\n throw {\n Error: 'No cas servers were found'\n };\n case 9:\n serverName = servers.itemsList(0); // query for preferred caslib \n p1 = {\n qs: {\n filter: \"eq(name,\".concat(caslib, \")\")\n }\n };\n _context.next = 13;\n return store.apiCall(servers.itemsCmd(serverName, 'caslibs'), p1);\n case 13:\n caslibResult = _context.sent;\n _context.next = 16;\n return store.apiCall(caslibResult.itemsCmd(caslib, 'tables'));\n case 16:\n tables = _context.sent;\n qt = {\n qs: {\n filter: \"eq(name, \".concat(fileName.trim().toUpperCase(), \")\")\n }\n };\n _context.next = 20;\n return store.apiCall(caslibResult.itemsCmd(caslib, 'tables'), qt);\n case 20:\n lastTable = _context.sent;\n if (!(lastTable.itemsList().size === 1)) {\n _context.next = 25;\n break;\n }\n n = lastTable.itemsList(0);\n uri = lastTable.items(n, 'data', 'tableReference', 'tableUri');\n return _context.abrupt(\"return\", uri);\n case 25:\n // upload table using the upload rel\n formData = new FormData();\n formData.append('tableName', fileName);\n formData.append('format', type);\n formData.append('scope', scope == null ? 'global' : scope);\n formData.append('replace', true);\n formData.append('containsHeaderRow', true);\n formData.append('file', file); // note that we are passing the File object\n p3 = {\n data: formData,\n headers: {\n 'content-type': \"multipart/form-data; boundary=\\\"----------12345678901234567\\\"\"\n }\n };\n _context.next = 35;\n return store.apiCall(tables.links('upload'), p3);\n case 35:\n upload = _context.sent;\n return _context.abrupt(\"return\", upload);\n case 37:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadData);\n\n//# sourceURL=webpack://restaflib/./uploadData.js?");
974
-
975
- /***/ }),
976
-
977
- /***/ "./uploadHandlers/index.js":
978
- /*!*********************************!*\
979
- !*** ./uploadHandlers/index.js ***!
980
- \*********************************/
981
- /*! exports provided: uploadAstore, uploadSrc, saveTable */
982
- /*! exports used: saveTable, uploadAstore, uploadSrc */
983
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
984
-
985
- "use strict";
986
- eval("/* harmony import */ var _uploadAstore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uploadAstore */ \"./uploadHandlers/uploadAstore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return _uploadAstore__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _uploadSrc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadSrc */ \"./uploadHandlers/uploadSrc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return _uploadSrc__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _saveTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./saveTable */ \"./uploadHandlers/saveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return _saveTable__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\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\n\n\n\n\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/index.js?");
987
-
988
- /***/ }),
989
-
990
- /***/ "./uploadHandlers/saveTable.js":
991
- /*!*************************************!*\
992
- !*** ./uploadHandlers/saveTable.js ***!
993
- \*************************************/
994
- /*! exports provided: default */
995
- /*! exports used: default */
996
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
997
-
998
- "use strict";
999
- eval("/* 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/*\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\nfunction saveTable(_x, _x2, _x3, _x4) {\n return _saveTable.apply(this, arguments);\n}\nfunction _saveTable() {\n _saveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, caslib, name) {\n var payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true,\n table: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib)\n }\n }\n };\n _context.next = 3;\n return store.runAction(session, payload);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _saveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (saveTable);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/saveTable.js?");
1000
-
1001
- /***/ }),
1002
-
1003
- /***/ "./uploadHandlers/uploadAstore.js":
1004
- /*!****************************************!*\
1005
- !*** ./uploadHandlers/uploadAstore.js ***!
1006
- \****************************************/
1007
- /*! exports provided: default */
1008
- /*! exports used: default */
1009
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1010
-
1011
- "use strict";
1012
- eval("/* 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/*\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\nfunction uploadAstore(_x, _x2, _x3, _x4) {\n return _uploadAstore.apply(this, arguments);\n}\nfunction _uploadAstore() {\n _uploadAstore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, astoreBuf, fileInfo) {\n var _fileInfo$output, caslib, name, casl, payload, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n name = name.toLowerCase(name);\n\n // delete old table\n casl = \"\\n action table.droptable /\\n caslib= '\".concat(caslib, \"' name= '\").concat(name, \"' quiet=true;\\n\\n action table.deleteSource/\\n caslib= '\").concat(caslib, \"' source= '\").concat(name, \".sashdat' quiet=true; \\n \");\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: casl\n }\n };\n _context.next = 8;\n return store.runAction(session, payload);\n case 8:\n // upload table\n\n payload = {\n action: 'astore.upload',\n data: {\n rstore: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true\n },\n store: astoreBuf\n }\n };\n _context.next = 11;\n return store.runAction(session, payload);\n case 11:\n r = _context.sent;\n return _context.abrupt(\"return\", \"Upload of \".concat(fileInfo.source, \" to \").concat(caslib, \".\").concat(name, \" completed\"));\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadAstore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadAstore);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadAstore.js?");
1013
-
1014
- /***/ }),
1015
-
1016
- /***/ "./uploadHandlers/uploadSrc.js":
1017
- /*!*************************************!*\
1018
- !*** ./uploadHandlers/uploadSrc.js ***!
1019
- \*************************************/
1020
- /*! exports provided: default */
1021
- /*! exports used: default */
1022
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1023
-
1024
- "use strict";
1025
- eval("/* 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 _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../caslRun */ \"./caslRun.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 uploadSrc(_x, _x2, _x3, _x4, _x5) {\n return _uploadSrc.apply(this, arguments);\n}\nfunction _uploadSrc() {\n _uploadSrc = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, modelBuf, fileInfo, save) {\n var _fileInfo$output, caslib, name, JSON_Parameters, p, r, casl, _r, text;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n _context.next = 5;\n return cleanup(store, session, caslib, name);\n case 5:\n JSON_Parameters = {\n casout: {\n caslib: caslib,\n /* a valid caslib */\n name: name /* name of output file on cas server */\n },\n\n importOptions: {\n fileType: fileInfo.fileType /* type of the file being uploaded */\n }\n };\n\n if (fileInfo.fileExt === 'sas' || fileInfo.fileExt === 'ds2') {\n JSON_Parameters.importOptions.delimiter = '\\\\';\n }\n p = {\n headers: {\n 'JSON-Parameters': JSON_Parameters,\n 'Content-Type': 'binary/octet-stream'\n },\n data: modelBuf,\n action: 'table.upload'\n };\n _context.next = 10;\n return store.runAction(session, p);\n case 10:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 16;\n break;\n }\n casl = \"\\n\\t\\t\\taction table.save r = result / \\n\\t\\t\\ttable = {caslib='\".concat(caslib, \"' name='\").concat(name, \"'} replace=true\\n\\t\\t\\tcaslib='\").concat(caslib, \"' name='\").concat(name, \"';\\n\\n\\t\\t\\tsend_response(result);\\n\\t\\t\\t\");\n _context.next = 15;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, casl, null, true);\n case 15:\n _r = _context.sent;\n case 16:\n text = fileInfo.source == null ? \"inline source\" : fileInfo.source;\n return _context.abrupt(\"return\", \"Upload of \".concat(text, \" to \").concat((fileInfo.output, caslib), \".\").concat(fileInfo.output.name, \" completed\"));\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadSrc.apply(this, arguments);\n}\nfunction cleanup(_x6, _x7, _x8, _x9) {\n return _cleanup.apply(this, arguments);\n}\nfunction _cleanup() {\n _cleanup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, caslib, name) {\n var table, deleteSrc, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n table = \"\".concat(caslib, \".\").concat(name);\n deleteSrc = \"\\n\\t\\taction table.dropTable/ \\n caslib='\".concat(caslib, \"' name='\").concat(name, \"' quiet=TRUE; \\n \\n action table.deleteSource status=src / \\n caslib='casuser' source= '\").concat(table, \"' quiet=TRUE; \\n\\t\\tsend_response({csResults = {results= 'data deleted'}})\\n\\t\\t\");\n _context2.next = 4;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, deleteSrc);\n case 4:\n r = _context2.sent;\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _cleanup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSrc);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadSrc.js?");
1026
-
1027
- /***/ }),
1028
-
1029
- /***/ "./uploadSetup.js":
1030
- /*!************************!*\
1031
- !*** ./uploadSetup.js ***!
1032
- \************************/
1033
- /*! exports provided: default */
1034
- /*! exports used: default */
1035
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1036
-
1037
- "use strict";
1038
- eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\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\n/**\r\n * parse a source file name\r\n * @module uploadSetup\r\n * @private\r\n * @param {string} source - the source file( absolute or relative path can be used)\r\n * @returns {object} - returns {ext: file-extension, fileOptions: <option for fread>, transform: transform for content-type, contentType: content-type}\r\n * @alias module: uploadSetup\r\n * @example\r\n * let t = uploadSetup('./cars.sashdat');\r\n */\n\nfunction uploadSetup(source, output) {\n var fileOptions = null; /* option for file reader */\n var contentType = 'binary/octet-stream'; /* header content-type on API call */\n\n var fileType; /* fileType for use in API call */\n var handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n var transform = noChange;\n var fext;\n if (source == null) {\n fext = 'csv';\n } else {\n fext = source.split('.').pop().toLowerCase();\n }\n switch (fext) {\n case 'sas7bdat':\n {\n fileType = 'basesas';\n break;\n }\n case 'sashdat':\n {\n fileType = 'hdat';\n break;\n }\n case 'csv':\n {\n fileType = fext;\n fileOptions = 'UTF8';\n break;\n }\n case 'xslx':\n case 'xsl':\n {\n fileType = fext;\n break;\n }\n case 'astore':\n case 'sasast':\n {\n fileType = fext;\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadAstore */ \"b\"];\n transform = toBase64;\n break;\n }\n case 'ds2':\n case 'sas':\n {\n fileType = 'csv';\n fileOptions = 'UTF8';\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n transform = toCsv;\n break;\n }\n default:\n {\n throw \"Currently file type of \".concat(fext, \" is not supported\");\n }\n }\n var _output$split = output.split('.'),\n _output$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_output$split, 2),\n caslib = _output$split2[0],\n name = _output$split2[1];\n return {\n source: source,\n output: {\n caslib: caslib,\n name: name.toLowerCase()\n },\n fileType: fileType /* for cas actions */,\n fileExt: fext,\n fileOptions: fileOptions,\n transform: transform,\n contentType: contentType,\n handler: handler\n };\n function toBase64(data) {\n return new Buffer.from(data).toString('base64');\n }\n function toCsv(data, fileInfo) {\n // preprocess to get rid of things that upset datastep\n // eslint-disable-next-line no-control-regex\n var isrc = data.replace(/[^\\x00-\\x7F]/g, '');\n var src = isrc.replace(/\\r?\\n/g, '');\n // convert to a csv\n var fileType = fileInfo.fileExt;\n var varname = fileType === 'sas' ? 'dataStepSrc' : fileType === 'ds2' ? 'ds2Src' : fileType === 'casl' ? 'caslSrc' : 'dataStepsrc';\n var csv = 'modelName' + '\\\\' + varname + '\\n' + fileInfo.output.name + '\\\\' + ' ' + src + '\\n';\n return csv;\n }\n function noChange(data) {\n return data;\n }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSetup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaflib/./uploadSetup.js?");
1039
-
1040
- /***/ }),
1041
-
1042
- /***/ 0:
1043
- /*!*********************!*\
1044
- !*** multi ./index ***!
1045
- \*********************/
1046
- /*! no static exports found */
1047
- /*! all exports used */
1048
- /***/ (function(module, exports, __webpack_require__) {
1049
-
1050
- eval("module.exports = __webpack_require__(/*! C:\\sassoftware\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
1051
-
1052
- /***/ })
1053
-
1054
- /******/ });
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define("restaflib", [], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["restaflib"] = factory();
8
+ else
9
+ root["restaflib"] = factory();
10
+ })(window, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = 0);
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ "../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
100
+ /*!*************************************************************************************!*\
101
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
102
+ \*************************************************************************************/
103
+ /*! no static exports found */
104
+ /*! all exports used */
105
+ /***/ (function(module, exports) {
106
+
107
+ eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
108
+
109
+ /***/ }),
110
+
111
+ /***/ "../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
112
+ /*!***********************************************************************************!*\
113
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
114
+ \***********************************************************************************/
115
+ /*! no static exports found */
116
+ /*! all exports used */
117
+ /***/ (function(module, exports) {
118
+
119
+ eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
120
+
121
+ /***/ }),
122
+
123
+ /***/ "../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
124
+ /*!*************************************************************************************!*\
125
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
126
+ \*************************************************************************************/
127
+ /*! no static exports found */
128
+ /*! exports used: default */
129
+ /***/ (function(module, exports) {
130
+
131
+ eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
132
+
133
+ /***/ }),
134
+
135
+ /***/ "../../../node_modules/@babel/runtime/helpers/defineProperty.js":
136
+ /*!***********************************************************************************!*\
137
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js ***!
138
+ \***********************************************************************************/
139
+ /*! no static exports found */
140
+ /*! exports used: default */
141
+ /***/ (function(module, exports, __webpack_require__) {
142
+
143
+ eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../../node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/defineProperty.js?");
144
+
145
+ /***/ }),
146
+
147
+ /***/ "../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
148
+ /*!*****************************************************************************************!*\
149
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
150
+ \*****************************************************************************************/
151
+ /*! no static exports found */
152
+ /*! all exports used */
153
+ /***/ (function(module, exports) {
154
+
155
+ eval("function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
156
+
157
+ /***/ }),
158
+
159
+ /***/ "../../../node_modules/@babel/runtime/helpers/nonIterableRest.js":
160
+ /*!************************************************************************************!*\
161
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
162
+ \************************************************************************************/
163
+ /*! no static exports found */
164
+ /*! all exports used */
165
+ /***/ (function(module, exports) {
166
+
167
+ eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js?");
168
+
169
+ /***/ }),
170
+
171
+ /***/ "../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
172
+ /*!***************************************************************************************!*\
173
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
174
+ \***************************************************************************************/
175
+ /*! no static exports found */
176
+ /*! all exports used */
177
+ /***/ (function(module, exports, __webpack_require__) {
178
+
179
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
180
+
181
+ /***/ }),
182
+
183
+ /***/ "../../../node_modules/@babel/runtime/helpers/slicedToArray.js":
184
+ /*!**********************************************************************************!*\
185
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js ***!
186
+ \**********************************************************************************/
187
+ /*! no static exports found */
188
+ /*! exports used: default */
189
+ /***/ (function(module, exports, __webpack_require__) {
190
+
191
+ eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"../../../node_modules/@babel/runtime/helpers/nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js?");
192
+
193
+ /***/ }),
194
+
195
+ /***/ "../../../node_modules/@babel/runtime/helpers/toPrimitive.js":
196
+ /*!********************************************************************************!*\
197
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
198
+ \********************************************************************************/
199
+ /*! no static exports found */
200
+ /*! all exports used */
201
+ /***/ (function(module, exports, __webpack_require__) {
202
+
203
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js?");
204
+
205
+ /***/ }),
206
+
207
+ /***/ "../../../node_modules/@babel/runtime/helpers/toPropertyKey.js":
208
+ /*!**********************************************************************************!*\
209
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
210
+ \**********************************************************************************/
211
+ /*! no static exports found */
212
+ /*! all exports used */
213
+ /***/ (function(module, exports, __webpack_require__) {
214
+
215
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"../../../node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPropertyKey.js?");
216
+
217
+ /***/ }),
218
+
219
+ /***/ "../../../node_modules/@babel/runtime/helpers/typeof.js":
220
+ /*!***************************************************************************!*\
221
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js ***!
222
+ \***************************************************************************/
223
+ /*! no static exports found */
224
+ /*! all exports used */
225
+ /***/ (function(module, exports) {
226
+
227
+ eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/typeof.js?");
228
+
229
+ /***/ }),
230
+
231
+ /***/ "../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
232
+ /*!***********************************************************************************************!*\
233
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
234
+ \***********************************************************************************************/
235
+ /*! no static exports found */
236
+ /*! all exports used */
237
+ /***/ (function(module, exports, __webpack_require__) {
238
+
239
+ eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");
240
+
241
+ /***/ }),
242
+
243
+ /***/ "../../../node_modules/@babel/runtime/regenerator/index.js":
244
+ /*!******************************************************************************!*\
245
+ !*** C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
246
+ \******************************************************************************/
247
+ /*! no static exports found */
248
+ /*! exports used: default */
249
+ /***/ (function(module, exports, __webpack_require__) {
250
+
251
+ eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ \"../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js?");
252
+
253
+ /***/ }),
254
+
255
+ /***/ "../../../node_modules/base64-js/index.js":
256
+ /*!*************************************************************!*\
257
+ !*** C:/sassoftware/restaf/node_modules/base64-js/index.js ***!
258
+ \*************************************************************/
259
+ /*! no static exports found */
260
+ /*! all exports used */
261
+ /***/ (function(module, exports, __webpack_require__) {
262
+
263
+ "use strict";
264
+ eval("\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/base64-js/index.js?");
265
+
266
+ /***/ }),
267
+
268
+ /***/ "../../../node_modules/buffer/index.js":
269
+ /*!**********************************************************!*\
270
+ !*** C:/sassoftware/restaf/node_modules/buffer/index.js ***!
271
+ \**********************************************************/
272
+ /*! no static exports found */
273
+ /*! all exports used */
274
+ /***/ (function(module, exports, __webpack_require__) {
275
+
276
+ "use strict";
277
+ eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"../../../node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"../../../node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"../../../node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"../../../node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/buffer/index.js?");
278
+
279
+ /***/ }),
280
+
281
+ /***/ "../../../node_modules/form-data/lib/browser.js":
282
+ /*!*******************************************************************!*\
283
+ !*** C:/sassoftware/restaf/node_modules/form-data/lib/browser.js ***!
284
+ \*******************************************************************/
285
+ /*! no static exports found */
286
+ /*! all exports used */
287
+ /***/ (function(module, exports) {
288
+
289
+ eval("/* eslint-env browser */\nmodule.exports = typeof self == 'object' ? self.FormData : window.FormData;\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/form-data/lib/browser.js?");
290
+
291
+ /***/ }),
292
+
293
+ /***/ "../../../node_modules/ieee754/index.js":
294
+ /*!***********************************************************!*\
295
+ !*** C:/sassoftware/restaf/node_modules/ieee754/index.js ***!
296
+ \***********************************************************/
297
+ /*! no static exports found */
298
+ /*! all exports used */
299
+ /***/ (function(module, exports) {
300
+
301
+ eval("/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/ieee754/index.js?");
302
+
303
+ /***/ }),
304
+
305
+ /***/ "../../../node_modules/isarray/index.js":
306
+ /*!***********************************************************!*\
307
+ !*** C:/sassoftware/restaf/node_modules/isarray/index.js ***!
308
+ \***********************************************************/
309
+ /*! no static exports found */
310
+ /*! all exports used */
311
+ /***/ (function(module, exports) {
312
+
313
+ eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/isarray/index.js?");
314
+
315
+ /***/ }),
316
+
317
+ /***/ "../../../node_modules/node-libs-browser/mock/empty.js":
318
+ /*!**************************************************************************!*\
319
+ !*** C:/sassoftware/restaf/node_modules/node-libs-browser/mock/empty.js ***!
320
+ \**************************************************************************/
321
+ /*! no static exports found */
322
+ /*! all exports used */
323
+ /***/ (function(module, exports) {
324
+
325
+ eval("\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/node-libs-browser/mock/empty.js?");
326
+
327
+ /***/ }),
328
+
329
+ /***/ "../../../node_modules/webpack/buildin/global.js":
330
+ /*!***********************************!*\
331
+ !*** (webpack)/buildin/global.js ***!
332
+ \***********************************/
333
+ /*! no static exports found */
334
+ /*! all exports used */
335
+ /***/ (function(module, exports) {
336
+
337
+ eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://restaflib/(webpack)/buildin/global.js?");
338
+
339
+ /***/ }),
340
+
341
+ /***/ "./casActionRun.js":
342
+ /*!*************************!*\
343
+ !*** ./casActionRun.js ***!
344
+ \*************************/
345
+ /*! exports provided: default */
346
+ /*! exports used: default */
347
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
348
+
349
+ "use strict";
350
+ eval("/* 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/*\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/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casActionRun\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} parameters - parameters for the action\r\n * \r\n * @returns {promise} returns results from cas \r\n * @alias module: casActionRun\r\n * @example\r\n * async function test_casAction () {\r\n * let {session} = await restaflib.casSetup(store);\r\n * // run fetch action\r\n * let p = \r\n * { action: 'table.fetch',\r\n * data : { table: { caslib: 'public', name: 'cars' } }\r\n * };\r\n * let casResults = await restaflib.casActionRun(store, session, p);\r\n * print.object(casResults.tables.Fetch, 'Fetched Table');\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\n\n\n// Notes: Function to call cas \n// See README file for notes on REUSECASSESSION\n//\n\n\nfunction casActionRun(_x) {\n return _casActionRun.apply(this, arguments);\n}\nfunction _casActionRun() {\n _casActionRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store) {\n var _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = _args[_key];\n }\n _context.next = 3;\n return store.runAction.apply(store, rest);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casActionRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casActionRun);\n\n//# sourceURL=webpack://restaflib/./casActionRun.js?");
351
+
352
+ /***/ }),
353
+
354
+ /***/ "./casAppendTable.js":
355
+ /*!***************************!*\
356
+ !*** ./casAppendTable.js ***!
357
+ \***************************/
358
+ /*! exports provided: default */
359
+ /*! exports used: default */
360
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
361
+
362
+ "use strict";
363
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n* @description Append a cas table to a master cas table \r\n* @async\r\n* @module casAppendTable\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {casTable} input Input table with new rows {caslib: xxx, name: nnn}\r\n* @param {casTable} output Master table {caslib: xxx, name: nnn}\r\n* @param {boolean} saveflag If true the master table will be saved to disk\r\n* @param {*} payload -\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.casAppendTable(store, session, 'casuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction casAppendTable(_x, _x2, _x3, _x4, _x5) {\n return _casAppendTable.apply(this, arguments);\n}\nfunction _casAppendTable() {\n _casAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output, save) {\n var src, args, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['casAppendTable']();\n args = {\n masterTable: output,\n setTable: input,\n save: save != null ? save : true\n };\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, args);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (!(save === true)) {\n _context.next = 9;\n break;\n }\n _context.next = 9;\n return Object(_casSaveTable__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, output);\n case 9:\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casAppendTable);\n\n//# sourceURL=webpack://restaflib/./casAppendTable.js?");
364
+
365
+ /***/ }),
366
+
367
+ /***/ "./casFetchData.js":
368
+ /*!*************************!*\
369
+ !*** ./casFetchData.js ***!
370
+ \*************************/
371
+ /*! exports provided: default */
372
+ /*! exports used: default */
373
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
374
+
375
+ "use strict";
376
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/**\r\n * @description Fetch rows from cas Tables\r\n * @async\r\n * @module casFetchData\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {rafObject} session cas session\r\n * @param {object} payload info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * @example\r\n * let payload = { start:0, limit:20, format: false, table: {caslib: 'casuser', name: 'sales'}} ;\r\n * let result = await casFetchData(store, session, payload);\r\n * result = {\r\n * data : {rows: array of row data, schema=<schema for table>},\r\n * pagination: {next: {<page>}, prev: {<page>}\r\n * }\r\n * page = {start: <number>, limit: <number>, format: <true:false> table: <caslib: <string>, name:<string>}\r\n * }\r\n * Will return a row of length 0 if no data is found.\r\n * Will throw exceptions if cas code fails(ex: fetch action fails)\r\n */\nfunction casFetchData(_x, _x2, _x3) {\n return _casFetchData.apply(this, arguments);\n}\nfunction _casFetchData() {\n _casFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchData'](); // console.log(src);\n _context.next = 3;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items('results', 'casResults').toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchData);\n\n//# sourceURL=webpack://restaflib/./casFetchData.js?");
377
+
378
+ /***/ }),
379
+
380
+ /***/ "./casFetchRows.js":
381
+ /*!*************************!*\
382
+ !*** ./casFetchRows.js ***!
383
+ \*************************/
384
+ /*! exports provided: default */
385
+ /*! exports used: default */
386
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
387
+
388
+ "use strict";
389
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * @private\r\n * @async\r\n * @module casFetchRows\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} payload - info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * \r\n * @example\r\n * async function test_casFetchRows () {\r\n * let {session} = await casSetup(store);\r\n * let payload = {\r\n * from : 1,\r\n * count : 20,\r\n * format: true,\r\n * table : {caslib: 'Public', name: 'cars'}\r\n * };\r\n * \r\n * let result = await restaflib.casFetchRows(store, session, payload);\r\n * console.log(result.data.schema);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * \r\n * while (result.pagination.next.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.next.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.next);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n * console.log('--------------------------------------- scroll backwards');\r\n *\r\n * while (result.pagination.prev.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.prev.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.prev);\r\n * console.log('The previous start is at: ' + result.pagination.prev.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n *\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\nfunction _casFetchRows() {\n _casFetchRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (payload.where == null) {\n payload.where = ' ';\n }\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchRows']();\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (r.data == null) {\n r.data = {\n rows: []\n };\n }\n return _context.abrupt(\"return\", r);\n case 8:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./casFetchRows.js?");
390
+
391
+ /***/ }),
392
+
393
+ /***/ "./casLoadTable.js":
394
+ /*!*************************!*\
395
+ !*** ./casLoadTable.js ***!
396
+ \*************************/
397
+ /*! exports provided: default */
398
+ /*! exports used: default */
399
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
400
+
401
+ "use strict";
402
+ eval("/* 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 _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.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/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casLoadTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be loaded\r\n * \r\n * @returns {promise} returns status object\r\n */\nfunction casLoadTable(_x, _x2, _x3, _x4) {\n return _casLoadTable.apply(this, arguments);\n}\nfunction _casLoadTable() {\n _casLoadTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, _force) {\n var src, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\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 \";\n _context.next = 3;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, table, true);\n case 3:\n r = _context.sent;\n return _context.abrupt(\"return\", {\n msg: \"\".concat(table.caslib, \".\").concat(table.name, \" loaded}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casLoadTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casLoadTable);\n\n//# sourceURL=webpack://restaflib/./casLoadTable.js?");
403
+
404
+ /***/ }),
405
+
406
+ /***/ "./casSaveTable.js":
407
+ /*!*************************!*\
408
+ !*** ./casSaveTable.js ***!
409
+ \*************************/
410
+ /*! exports provided: default */
411
+ /*! exports used: default */
412
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
413
+
414
+ "use strict";
415
+ eval("/* 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/*\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/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casSaveTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be saved\r\n * @param {boolean=} replace default is replace\r\n * @param {boolean=} loadTable load table (default= true)\r\n * \r\n * @returns {promise} returns status object\r\n */\n\n\nfunction casSaveTable(_x, _x2, _x3, _x4, _x5) {\n return _casSaveTable.apply(this, arguments);\n}\nfunction _casSaveTable() {\n _casSaveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, replace, loadTable) {\n var caslib, name, payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n caslib = table.caslib, name = table.name;\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: replace === false ? false : true,\n table: table\n }\n };\n _context.next = 4;\n return store.runAction(session, payload);\n case 4:\n return _context.abrupt(\"return\", {\n msg: \"\".concat(caslib, \".\").concat(name, \" saved}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSaveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSaveTable);\n\n//# sourceURL=webpack://restaflib/./casSaveTable.js?");
416
+
417
+ /***/ }),
418
+
419
+ /***/ "./casSetup.js":
420
+ /*!*********************!*\
421
+ !*** ./casSetup.js ***!
422
+ \*********************/
423
+ /*! exports provided: default */
424
+ /*! exports used: default */
425
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
426
+
427
+ "use strict";
428
+ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * @param {string=} sessionID - id of an existing session to attach.\r\n * @param {string} sasServer - name of cas server to use. else defaults to the first server on list.\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n * @example \r\n * const {servers, session} = await casSetup(storem logonPayload, <sessionID>)\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2, _x3, _x4) {\n return _casSetup.apply(this, arguments);\n}\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, logonPayload, sessionID, casServer) {\n var msg, _yield$store$addServi, casManagement, servers, casserver, itemsList, index, session, payload, sessionList, selfcmd;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 4;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n msg = _context.sent;\n case 4:\n _context.next = 6;\n return store.addServices('casManagement');\n case 6:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 10;\n return store.apiCall(casManagement.links('servers'));\n case 10:\n servers = _context.sent;\n if (!(servers.itemsList().size === 0)) {\n _context.next = 13;\n break;\n }\n throw {\n Error: 'No cas servers were found'\n };\n case 13:\n casserver = null;\n if (!(casServer == null)) {\n _context.next = 18;\n break;\n }\n casserver = servers.itemsList(0);\n _context.next = 25;\n break;\n case 18:\n itemsList = servers.itemsList().toJS();\n index = itemsList.findIndex(function (s) {\n return s === casServer;\n });\n if (!(index === -1)) {\n _context.next = 24;\n break;\n }\n throw {\n Error: \"server with name of \".concat(casServer, \" was not found\")\n };\n case 24:\n casserver = servers.itemsList(index);\n case 25:\n session = null;\n if (!(sessionID == null)) {\n _context.next = 32;\n break;\n }\n _context.next = 29;\n return store.apiCall(servers.itemsCmd(casserver, 'createSession'));\n case 29:\n session = _context.sent;\n _context.next = 46;\n break;\n case 32:\n if (!(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 36;\n break;\n }\n session = sessionID;\n _context.next = 46;\n break;\n case 36:\n payload = {\n qs: {\n filter: \"eq( id,'\".concat(sessionID, \"')\")\n }\n };\n _context.next = 39;\n return store.apiCall(servers.itemsCmd(casserver, \"sessions\"), payload);\n case 39:\n sessionList = _context.sent;\n if (!(sessionList.items().size === 0)) {\n _context.next = 42;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 42:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(0), \"self\");\n _context.next = 45;\n return store.apiCall(selfcmd);\n case 45:\n session = _context.sent;\n case 46:\n return _context.abrupt(\"return\", {\n servers: servers,\n session: session\n });\n case 47:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSetup);\n\n//# sourceURL=webpack://restaflib/./casSetup.js?");
429
+
430
+ /***/ }),
431
+
432
+ /***/ "./casTableToJson.js":
433
+ /*!***************************!*\
434
+ !*** ./casTableToJson.js ***!
435
+ \***************************/
436
+ /*! exports provided: default */
437
+ /*! exports used: default */
438
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
439
+
440
+ "use strict";
441
+ eval("/*\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/**\r\n * @description Converts a cas table to JSON(utility)\r\n * @module casTableToJson\r\n * @category restaflib/util\r\n * @param {object} result - the raf object returned from a call to cas\r\n * @param {string} table - the name of the table\r\n * \r\n * @returns {object} - the new json version [{var1: value1, var2: value2,...}, {...}]\r\n * @alias module: casTableToJson\r\n * \r\n */\nfunction casTableToJson(result, table) {\n var data = result.items('tables', table);\n var itemRows = data.get('rows');\n var columns = [];\n data.get('schema').map(function (s) {\n columns.push(s.get('name'));\n });\n var allResults = [];\n itemRows.map(function (r) {\n var row = {};\n r.map(function (value, j) {\n row[columns[j]] = value;\n });\n allResults.push(row);\n });\n return allResults;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casTableToJson);\n\n//# sourceURL=webpack://restaflib/./casTableToJson.js?");
442
+
443
+ /***/ }),
444
+
445
+ /***/ "./casUpdateData.js":
446
+ /*!**************************!*\
447
+ !*** ./casUpdateData.js ***!
448
+ \**************************/
449
+ /*! exports provided: default */
450
+ /*! exports used: default */
451
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
452
+
453
+ "use strict";
454
+ eval("/* 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\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/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Update a record in a cas table\r\n * @async\r\n * @module casUpdateData\r\n * @category restaflib/cas\r\n * @param {store} store - store\r\n * @param {rafObject} session - cas session\r\n * @param {*} payload - {data,where,table}\r\n * @returns {promise} - return \r\n * @example\r\n * let inputs = restaflib.casUpdateData(store, session, payload);\r\n * payload = { where: {key1: vale1, key2: value2,...},\r\n * data: {var1:value1, var2:value2,....}},\r\n * table: {caslib: caslib, name: name}\r\n * Expects a single row\r\n */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\nfunction _casUpdateData() {\n _casUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, payload) {\n var data, where, table, swhere, andbit, k, v, valString, set, _k, value, valueString, tbl, updateRow, pl, r, status, disp;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, where = payload.where, table = payload.table;\n swhere = '';\n andbit = ' ';\n for (k in where) {\n v = where[k];\n valString = typeof v === \"string\" ? \"'\".concat(v.toString(), \"'\") : v;\n swhere = swhere + andbit + k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n set = [];\n for (_k in data) {\n value = data[_k];\n valueString = void 0;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value) /*`${JSON.stringify(value)}`*/;\n } else {\n valueString = value.toString();\n }\n set.push({\n var: _k,\n value: valueString\n });\n }\n tbl = _objectSpread(_objectSpread({}, table), {}, {\n where: \"\".concat(swhere)\n });\n updateRow = {\n table: tbl,\n set: set\n };\n pl = {\n action: 'table.update',\n data: updateRow\n };\n _context.next = 11;\n return store.runAction(session, pl);\n case 11:\n r = _context.sent;\n status = {\n msg: 'Update completed',\n statusCode: 0\n };\n disp = r.items().toJS().disposition;\n if (disp.statusCode !== 0) {\n status.statusCode = disp.statusCode;\n status.msg = disp.reason;\n }\n return _context.abrupt(\"return\", status);\n case 16:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpdateData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpdateData);\n\n//# sourceURL=webpack://restaflib/./casUpdateData.js?");
455
+
456
+ /***/ }),
457
+
458
+ /***/ "./casUpload.js":
459
+ /*!**********************!*\
460
+ !*** ./casUpload.js ***!
461
+ \**********************/
462
+ /*! exports provided: default */
463
+ /*! exports used: default */
464
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
465
+
466
+ "use strict";
467
+ eval("/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _uploadSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uploadSetup */ \"./uploadSetup.js\");\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.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\nvar fs = __webpack_require__(/*! fs */ \"../../../node_modules/node-libs-browser/mock/empty.js\").promises;\n\n\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module casUpload\r\n * @param {store} store \r\n * @param {*} session \r\n * @param {*} source \r\n * @param {*} output \r\n * @param {*} save \r\n * @param {*} altSrc \r\n * @returns {promise}\r\n */\nfunction casUpload(_x, _x2, _x3, _x4, _x5, _x6) {\n return _casUpload.apply(this, arguments);\n}\nfunction _casUpload() {\n _casUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee(store, session, source, output, save, altSrc) {\n var table, fileInfo, buf, r, _table$split, _table$split2, caslib, name;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // parse source file to figure out what we are uploading\n table = output;\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(output) === 'object') {\n table = \"\".concat(output.caslib, \".\").concat(output.name);\n }\n fileInfo = Object(_uploadSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(source, table); // read the file\n if (!(altSrc != null)) {\n _context.next = 7;\n break;\n }\n _context.t0 = altSrc;\n _context.next = 10;\n break;\n case 7:\n _context.next = 9;\n return fs.readFile(source, fileInfo.fileOptions);\n case 9:\n _context.t0 = _context.sent;\n case 10:\n buf = _context.t0;\n // transfrom data if necessary for upload\n if (fileInfo.transform !== null) {\n buf = fileInfo.transform(buf, fileInfo);\n }\n\n // upload using specific upload handlers\n _context.next = 14;\n return fileInfo.handler(store, session, buf, fileInfo, save);\n case 14:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 20;\n break;\n }\n _table$split = table.split('.'), _table$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_table$split, 2), caslib = _table$split2[0], name = _table$split2[1];\n _context.next = 19;\n return Object(_uploadHandlers__WEBPACK_IMPORTED_MODULE_5__[/* saveTable */ \"a\"])(store, session, caslib, name);\n case 19:\n r = r + '\\n' + \" \".concat(output, \" was saved\");\n case 20:\n return _context.abrupt(\"return\", r);\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpload);\n\n//# sourceURL=webpack://restaflib/./casUpload.js?");
468
+
469
+ /***/ }),
470
+
471
+ /***/ "./caslDescribe.js":
472
+ /*!*************************!*\
473
+ !*** ./caslDescribe.js ***!
474
+ \*************************/
475
+ /*! exports provided: default */
476
+ /*! exports used: default */
477
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
478
+
479
+ "use strict";
480
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslDescribe\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\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\nfunction caslDescribe(_x, _x2, _x3) {\n return _caslDescribe.apply(this, arguments);\n}\nfunction _caslDescribe() {\n _caslDescribe = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/describe'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results').toJS();\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslDescribe.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslDescribe);\n\n//# sourceURL=webpack://restaflib/./caslDescribe.js?");
481
+
482
+ /***/ }),
483
+
484
+ /***/ "./caslRun.js":
485
+ /*!********************!*\
486
+ !*** ./caslRun.js ***!
487
+ \********************/
488
+ /*! exports provided: default */
489
+ /*! exports used: default */
490
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
491
+
492
+ "use strict";
493
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\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\n\n\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module caslRun\r\n * @category restaflib/cas\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {string} src - casl src statements\r\n * @param {object=} args - user input args (reference this as _args_ in casl program)\r\n * @param {boolean=} useCommons - include the common casl programs(checkAndLoad etc...)\r\n * @returns {promise} returns results from cas\r\n * @example\r\n\r\n * let restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require('@sassoftware/restaflib');\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n let { session } = await casSetup (store, payload);\r\n // console.log(JSON.stringify(session.links(), null, 4));\r\n let casl = `\r\n action datastep.runcode/ single='YES' code = 'data casuser.a; x=1; run;';\r\n action table.fetch r=r1/\r\n table= { caslib= 'casuser', name= 'a' } ;\r\n run;\r\n action datastep.runcode/ single='YES' code = 'data casuser.b; y=1; run;';\r\n action table.fetch r=r2/\r\n table= { caslib= 'casuser', name= 'b' } ;\r\n run;\r\n c = {a=10, b=20};\r\n send_response({a=r1, b=r2, c=c});\r\n `;\r\n\r\n\r\n let r = await store.runCasl(session, casl);\r\n\r\n console.log(r.items().toJS());\r\n let a = r.items().toJS();\r\n console.log(a);\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n*/\nfunction caslRun(_x, _x2, _x3, _x4, _x5) {\n return _caslRun.apply(this, arguments);\n}\nfunction _caslRun() {\n _caslRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args, useCommons) {\n var tsrc,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n tsrc = src;\n if (useCommons !== false) {\n tsrc = src + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']();\n }\n for (_len = _args.length, rest = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = _args[_key];\n }\n _context.next = 5;\n return _caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].apply(void 0, [store, session, tsrc, args].concat(rest));\n case 5:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRun);\n\n//# sourceURL=webpack://restaflib/./caslRun.js?");
494
+
495
+ /***/ }),
496
+
497
+ /***/ "./caslRunBase.js":
498
+ /*!************************!*\
499
+ !*** ./caslRunBase.js ***!
500
+ \************************/
501
+ /*! exports provided: default */
502
+ /*! exports used: default */
503
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
504
+
505
+ "use strict";
506
+ eval("/* 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 _jsonToDict__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.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 * lib\r\n */\n/** \r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * @private\r\n * @async\r\n * @function caslRunBase(async)\r\n * @category restaflib/cas\r\n * @param {object} store - restaf store\r\n * @param {object} session - cas session\r\n * @param {object} src - casl src statements\r\n * @param {object} args - arguments to pass to on to CAS as _args_\r\n * \r\n * @returns {object} standard return value from apiCall\r\n */\nfunction caslRunBase(_x, _x2, _x3, _x4) {\n return _caslRunBase.apply(this, arguments);\n}\nfunction _caslRunBase() {\n _caslRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args) {\n var _args_,\n code,\n payload,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n //\n // create casl statements for arguments and appenv\n //\n _args_ = Object(_jsonToDict__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(args !== null ? args : {}, '_args_');\n code = _args_ + ' ' + src; // Patch for issues with sccasl.runcasl via REST API\n code = code.replace(/\\r?\\n|\\r/g, '');\n // setup payload for runAction\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: code\n }\n };\n for (_len = _args.length, rest = new Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {\n rest[_key - 4] = _args[_key];\n }\n _context.next = 7;\n return store.runAction.apply(store, [session, payload].concat(rest));\n case 7:\n result = _context.sent;\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRunBase);\n\n//# sourceURL=webpack://restaflib/./caslRunBase.js?");
507
+
508
+ /***/ }),
509
+
510
+ /***/ "./caslScore.js":
511
+ /*!**********************!*\
512
+ !*** ./caslScore.js ***!
513
+ \**********************/
514
+ /*! exports provided: default */
515
+ /*! exports used: default */
516
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
517
+
518
+ "use strict";
519
+ eval("/* 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 _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.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/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslScore\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\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\nfunction caslScore(_x, _x2, _x3) {\n return _caslScore.apply(this, arguments);\n}\nfunction _caslScore() {\n _caslScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/score'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results', 'casResults').toJS()[0];\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslScore);\n\n//# sourceURL=webpack://restaflib/./caslScore.js?");
520
+
521
+ /***/ }),
522
+
523
+ /***/ "./computeAppendTable.js":
524
+ /*!*******************************!*\
525
+ !*** ./computeAppendTable.js ***!
526
+ \*******************************/
527
+ /*! exports provided: default */
528
+ /*! exports used: default */
529
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
530
+
531
+ "use strict";
532
+ eval("/* 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 _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.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/** \r\n* @description Append a compute table to a master compute table \r\n* @async\r\n* @module computeAppendTable\r\n* @category restaflib/compute\r\n* @param {store} store - store\r\n* @param {rafObject} session - compute session\r\n* @param {computeTable} input Input table with new rows {libref: xxx, name: nnn}\r\n* @param {computeTable} output Master table {computelib: xxx, name: nnn}\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.computeAppendTable(store, session, 'computeuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction computeAppendTable(_x, _x2, _x3, _x4) {\n return _computeAppendTable.apply(this, arguments);\n}\nfunction _computeAppendTable() {\n _computeAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output) {\n var src, computeSummary, statusCode;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\n proc append base=\".concat(output.libref, \".{output.name} \\n data= \").concat(input.libref, \".\").concat(input.name, \"; run;\\n \");\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 3:\n computeSummary = _context.sent;\n statusCode = computeSummary.SASJobStatus === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n msg: \"Append Completed. Status is: \".concat(computeSummary.SASJobStatus),\n statusCode: statusCode\n });\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeAppendTable);\n\n//# sourceURL=webpack://restaflib/./computeAppendTable.js?");
533
+
534
+ /***/ }),
535
+
536
+ /***/ "./computeFetchData.js":
537
+ /*!*****************************!*\
538
+ !*** ./computeFetchData.js ***!
539
+ \*****************************/
540
+ /*! exports provided: default */
541
+ /*! exports used: default */
542
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
543
+
544
+ "use strict";
545
+ eval("/* 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\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/*\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 *\r\n * @description Fetch data from a SAS Table\r\n * @async\r\n * @module computeFetchData\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {computeSummary} computeSummary - Summary object created by computeSummary method\r\n * @param {string} table - name of the table\r\n * @param {string} scroll direction - null(to get first set)|next|prev|first|last\r\n * @param {object} payload - query values\r\n *\r\n * @returns {promise} - {columns: <column names>, rows: <data for rows> , scrollOptions: <available scroll directions>}\r\n */\nfunction computeFetchData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeFetchData.apply(this, arguments);\n} // convert cells to rowSet\nfunction _computeFetchData() {\n _computeFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, computeSummary, table, direction, payload, useRow) {\n var data, tname, ipayload, linkRel, adhoc, tableInfo, t1, colCount, qc, columns, schema, items, cx, c, newcol, indx, result, rowsData, current, dir, _result, _rowsData;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = null;\n tname = typeof table === \"string\" ? table : \"\".concat(table.libref, \".\").concat(table.name);\n tname = tname.toUpperCase(); /*to allow for compute service table info */\n ipayload = payload != null ? _objectSpread({}, payload) : {\n qs: {}\n };\n ipayload.qs.includeIndex = true;\n linkRel = useRow == null ? \"rows\" : useRow; // is payload an override or is this an adhoc request(i.e user is ignoring scroll info)\n adhoc = payload != null && direction == null ? true : false; // retrieve current info on this table(if any)\n tableInfo = computeSummary.tables[tname];\n if (!(tableInfo != null)) {\n _context.next = 45;\n break;\n }\n // reset current on if this is an adhoc request.\n if (adhoc === true) {\n tableInfo.current = null;\n }\n //get column info \n if (!(tableInfo.current === null || direction == null || direction === \"first\")) {\n _context.next = 33;\n break;\n }\n _context.next = 13;\n return store.apiCall(tableInfo.self);\n case 13:\n t1 = _context.sent;\n colCount = t1.items().toJS()[\"columnCount\"]; // get columns explicitly since user can control this thru payload\n qc = {\n qs: {\n start: 0,\n limit: colCount\n }\n };\n _context.next = 18;\n return store.apiCall(t1.links(\"columns\"), qc);\n case 18:\n columns = _context.sent;\n schema = [];\n items = columns.items().toJS();\n if (linkRel === \"rows\") {\n schema.push({\n name: \"_index_\",\n Column: \"_Index_\",\n Label: \"Index\",\n length: 8,\n type: \"FLOAT\",\n format: \"BEST\",\n informat: \"BEST\"\n });\n }\n for (cx in items) {\n c = items[cx];\n console.log(c.name, c.data.type, c.data.format, c.data.informat);\n newcol = {\n name: c.name.toLowerCase(),\n Column: c.name.toLowerCase(),\n Label: c.data.label,\n length: c.data.length,\n type: c.data.type,\n format: c.data.format != null ? c.data.format.name : null,\n informat: c.data.informat != null ? c.data.informat.name : null,\n custom: false\n };\n indx = ipayload.qs.includeIndex === true ? 1 : 0;\n schema[c.data.index + indx] = newcol;\n }\n // Now get data using rows or rowSet rel\n _context.next = 25;\n return store.apiCall(t1.links(linkRel), ipayload);\n case 25:\n result = _context.sent;\n // If using linkRel of rows, convert the data to rowSet schema\n rowsData = linkRel === \"rowSet\" ? result.items('rows').toJS() : cells2RowSet(result);\n tableInfo.current = result;\n tableInfo.schema = schema;\n tableInfo.columns = columns;\n data = {\n columns: columns,\n schema: schema,\n rows: rowsData,\n scrollOptions: result.scrollCmds().keySeq().toJS()\n };\n _context.next = 45;\n break;\n case 33:\n current = tableInfo.current;\n dir = direction;\n if (direction === \"next\" && current.scrollCmds(\"next\") === null) {\n dir = current.links(\"last\") !== null ? \"last\" : null;\n }\n if (direction === \"prev\" && current.scrollCmds(\"prev\") === null) {\n dir = current.links(\"first\") !== null ? \"first\" : null;\n }\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.columns,\n currentColumns: tableInfo.currentColumns,\n rows: [],\n scrollOptions: current.scrollCmds().keySeq().toJS()\n };\n if (!(dir !== null && current.scrollCmds(dir) !== null)) {\n _context.next = 45;\n break;\n }\n _context.next = 41;\n return store.apiCall(current.scrollCmds(dir), ipayload);\n case 41:\n _result = _context.sent;\n tableInfo.current = _result;\n _rowsData = linkRel !== \"rows\" ? _result.items('rows').toJS() : cells2RowSet(_result);\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.schema,\n rows: _rowsData,\n scrollOptions: _result.scrollCmds().keySeq().toJS()\n };\n case 45:\n return _context.abrupt(\"return\", data);\n case 46:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFetchData.apply(this, arguments);\n}\nfunction cells2RowSet(result) {\n var rowsData = result.items().toJS().map(function (r) {\n return r.cells;\n });\n return rowsData;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFetchData);\n\n//# sourceURL=webpack://restaflib/./computeFetchData.js?");
546
+
547
+ /***/ }),
548
+
549
+ /***/ "./computeFileContent.js":
550
+ /*!*******************************!*\
551
+ !*** ./computeFileContent.js ***!
552
+ \*******************************/
553
+ /*! exports provided: default */
554
+ /*! exports used: default */
555
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
556
+
557
+ "use strict";
558
+ eval("/* 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/*\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// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description return content of a file output from a compute run\r\n * @async\r\n * @module computeFileContent\r\n * @category restaflib/compute\r\n *\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} fileref - name of the fileref\r\n * @param {boolean} url - set to true if you want the url and not the content\r\n *\r\n * @returns {promise} - get uri for content]\r\n */\n\n\nfunction computeFileContent(_x, _x2, _x3, _x4) {\n return _computeFileContent.apply(this, arguments);\n}\nfunction _computeFileContent() {\n _computeFileContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, fileref, url) {\n var fileInfo, payload, result, r, rx, _r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n fileInfo = computeSummary.files[fileref];\n if (!(fileInfo == null)) {\n _context.next = 3;\n break;\n }\n throw \"Invalid fileref \".concat(fileref);\n case 3:\n if (!(fileInfo.current === null)) {\n _context.next = 12;\n break;\n }\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(fileref, \"')\")\n }\n };\n _context.next = 7;\n return store.apiCall(computeSummary.session.links('files'), payload);\n case 7:\n result = _context.sent;\n _context.next = 10;\n return store.apiCall(result.itemsCmd(fileref, 'self'));\n case 10:\n result = _context.sent;\n fileInfo.current = result;\n case 12:\n if (!(url === true)) {\n _context.next = 17;\n break;\n }\n r = \"\".concat(computeSummary.session.host).concat(fileInfo.current.links('content', 'link', 'uri'));\n return _context.abrupt(\"return\", r);\n case 17:\n if (!(fileInfo.data === null)) {\n _context.next = 26;\n break;\n }\n _context.next = 20;\n return store.apiCall(fileInfo.current.links('content'));\n case 20:\n rx = _context.sent;\n _r = rx.items();\n fileInfo.data = _r;\n return _context.abrupt(\"return\", _r);\n case 26:\n return _context.abrupt(\"return\", fileInfo.data);\n case 27:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFileContent.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFileContent);\n\n//# sourceURL=webpack://restaflib/./computeFileContent.js?");
559
+
560
+ /***/ }),
561
+
562
+ /***/ "./computeResults.js":
563
+ /*!***************************!*\
564
+ !*** ./computeResults.js ***!
565
+ \***************************/
566
+ /*! exports provided: default */
567
+ /*! exports used: default */
568
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
569
+
570
+ "use strict";
571
+ eval("/* 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 Return Log|listing|ODS|list of tables in the compute service job\r\n * @async\r\n * @module computeResults\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary object\r\n * @param {string} type - type of result( log|listing|ods|table)\r\n * @returns {object|string} - string for all except table(array of names)\r\n */\nfunction computeResults(_x, _x2, _x3) {\n return _computeResults.apply(this, arguments);\n}\nfunction _computeResults() {\n _computeResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, type) {\n var log, result, next, _result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(type === 'log' || type === 'listing')) {\n _context.next = 20;\n break;\n }\n log = [];\n if (!(computeSummary[type] !== null)) {\n _context.next = 16;\n break;\n }\n _context.next = 5;\n return store.apiCall(computeSummary[type]);\n case 5:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n case 7:\n if (!((next = result.scrollCmds('next')) !== null)) {\n _context.next = 14;\n break;\n }\n _context.next = 10;\n return store.apiCall(next);\n case 10:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n _context.next = 7;\n break;\n case 14:\n _context.next = 17;\n break;\n case 16:\n log[0] = \"Note: No \".concat(type);\n case 17:\n return _context.abrupt(\"return\", log);\n case 20:\n if (!(type === 'ods')) {\n _context.next = 31;\n break;\n }\n if (!(computeSummary.ods !== null)) {\n _context.next = 28;\n break;\n }\n _context.next = 24;\n return store.apiCall(computeSummary.ods);\n case 24:\n _result = _context.sent;\n return _context.abrupt(\"return\", _result.items());\n case 28:\n return _context.abrupt(\"return\", '<h2> No ODS output </h2>');\n case 29:\n _context.next = 40;\n break;\n case 31:\n if (!(type === 'tables')) {\n _context.next = 35;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.tables));\n case 35:\n if (!(type === 'files')) {\n _context.next = 39;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.files));\n case 39:\n throw \"Error: Invalid type \".concat(type);\n case 40:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeResults.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeResults);\n\n//# sourceURL=webpack://restaflib/./computeResults.js?");
572
+
573
+ /***/ }),
574
+
575
+ /***/ "./computeRun.js":
576
+ /*!***********************!*\
577
+ !*** ./computeRun.js ***!
578
+ \***********************/
579
+ /*! exports provided: default */
580
+ /*! exports used: default */
581
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
582
+
583
+ "use strict";
584
+ eval("/* 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 _computeRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRunBase */ \"./computeRunBase.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/**\r\n * @member compute\r\n * @description Prepare data for runCompute(@async)\r\n * @async\r\n * @module computeRun\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - current compute service session\r\n * @param {string} src - code to execute\r\n * @param {object=} macros - macros as a json\r\n * @param {number=} timeout - long polling timeout in seconds\r\n * @param {function=} checkStatus - callback to check on status\r\n * @param {object=} userContext - this is passed to the statusHandler \r\n * @returns {promise} computeSummary object. Job Status is computeSummary.SASJobStatus\r\n * @example\r\n * The job status will be one of these completed|warning|error|failed\r\n * Typical call:\r\n * let computeSummary = await computeRun(store,computeSession, src, args);\r\n * \r\n * Advanced call: If you want to track the job status pass a checkStatus function with some context\r\n \r\n const checkStatus = (state, context) => {\r\n console.log('state', state);\r\n console.log('context ', context);\r\n // do something useful - like in an UI display status for user\r\n \r\n // To stop waiting on job completion return a state value like 'exit' or any string\r\n // the value has to be something other than the state passed in.\r\n // this will force the code to stop waiting on the server and return to the app.\r\n // It is upto your app to take appropriate actions(like cancelling the job)\r\n // Below is a trivial example\r\n context.counter = context.counter + 1;\r\n\t\tif (state === 'running' && context.counter > 5) {\r\n\t\t\tcontext.realState = state;\r\n\t\t\tstate = 'exit';\r\n }\r\n return state;\r\n } // return true if you want to stop waiting on the job. Does not cancel the job\r\n \r\n===============================================\r\n\r\n* A simple example\r\n\r\n async function runtest(store, logonPayload) {\r\n let computeSession = await restaflib.computeSetup(store, null, logonPayload);\r\n let macros = {\r\n data: 'sashelp.cars'\r\n };\r\n let src = `\r\n ods html style=barrettsblue; \r\n proc print data=&data;run;\r\n ods html close; \r\n run;\r\n `;\r\n \r\n let computeSummary = await restaflib.computeRun(\r\n store,\r\n computeSession,\r\n src,\r\n macros\r\n );\r\n console.log('Job Status: ', computeSummary.SASJobStatus);\r\n\r\n let log = await restaflib.computeResults(store, computeSummary, \"log\");\r\n let ods = await restaflib.computeResults(store, computeSummary, \"ods\");\r\n return 'done';\r\n\r\n }\r\n\r\n */\n\n\n\nfunction computeRun(_x, _x2, _x3, _x4, _x5, _x6, _x7) {\n return _computeRun.apply(this, arguments);\n}\nfunction _computeRun() {\n _computeRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, macros, timeout, checkStatus, userContext) {\n var code, arg, c, asrc, resultSummary;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // adjust for backward compatability\n if (typeof checkStatus === 'number') {\n checkStatus = null;\n }\n\n // generate macro variables\n code = ['options NOSYNTAXCHECK OBS=MAX;%let syscc=0;'];\n if (macros != null) {\n for (arg in macros) {\n c = \"%let \".concat(arg, \"=\").concat(macros[arg], \";\");\n code.push(c);\n }\n }\n\n // Concat macro to code\n asrc = src.replace(/\\t/g, ' ');\n asrc = asrc.split(/\\r?\\n/);\n code = code.concat(asrc).concat(';');\n\n // run code and get results\n _context.next = 8;\n return Object(_computeRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, code, timeout, checkStatus, userContext);\n case 8:\n resultSummary = _context.sent;\n return _context.abrupt(\"return\", resultSummary);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRun);\n\n//# sourceURL=webpack://restaflib/./computeRun.js?");
585
+
586
+ /***/ }),
587
+
588
+ /***/ "./computeRunBase.js":
589
+ /*!***************************!*\
590
+ !*** ./computeRunBase.js ***!
591
+ \***************************/
592
+ /*! exports provided: default */
593
+ /*! exports used: default */
594
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
595
+
596
+ "use strict";
597
+ eval("/* 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 _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.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 Reduce compute service execution results\r\n * @private\r\n * @async\r\n * @module computeRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} session - compute service session\r\n * @param {code} code - SAS code to be executed\r\n * @param {int} timeout optional - timeout for long poll in seconds(default= 5)\r\n\r\n * \r\n * @returns {object} computeSummary Object\r\n * \r\n */\nfunction computeRunBase(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeRunBase.apply(this, arguments);\n}\nfunction _computeRunBase() {\n _computeRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, code, timeout, eventHandler, userContext) {\n var payload, job, p, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n data: {\n code: code\n }\n }; // Now execute the data step and wait for completion\n // clear bad state if any\n _context.next = 3;\n return store.apiCall(session.links('execute'), payload);\n case 3:\n job = _context.sent;\n p = {\n qs: {\n wait: timeout != null ? timeout : 5\n },\n headers: {\n \"If-None-Match\": job.headers('etag')\n }\n };\n _context.next = 7;\n return store.jobState(job, p, 'longpoll', 0, eventHandler, userContext);\n case 7:\n status = _context.sent;\n _context.next = 10;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, status.job);\n case 10:\n results = _context.sent;\n results.SASJobStatus = status.data;\n results.jobStateStatus = status;\n return _context.abrupt(\"return\", results);\n case 14:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRunBase);\n\n//# sourceURL=webpack://restaflib/./computeRunBase.js?");
598
+
599
+ /***/ }),
600
+
601
+ /***/ "./computeSetup.js":
602
+ /*!*************************!*\
603
+ !*** ./computeSetup.js ***!
604
+ \*************************/
605
+ /*! exports provided: default */
606
+ /*! exports used: default */
607
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
608
+
609
+ "use strict";
610
+ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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/*\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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {string=} contextName name of the context. If not specified defaults to Job Execution context\r\n * @param {logonPayload=} payload logon payload.If null assumes that logon was done earlier.\r\n * @param {sessionPayload=} sessionPayload for createSession call\r\n * @param {string=} sessionID id of a session to attach\r\n * @returns {promise} - returns a compute session\r\n */\n\n\n\nfunction computeSetup(_x, _x2, _x3, _x4, _x5) {\n return _computeSetup.apply(this, arguments);\n}\nfunction _computeSetup() {\n _computeSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, contextName, payload, sessionPayload, sessionID) {\n var _yield$store$addServi, compute, msg, session, _p, sessionList, index, selfcmd, p, contexts, name, createSession;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.addServices('compute');\n case 2:\n _yield$store$addServi = _context.sent;\n compute = _yield$store$addServi.compute;\n if (!(sessionID != null && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", sessionID);\n case 6:\n if (!(payload != null)) {\n _context.next = 10;\n break;\n }\n _context.next = 9;\n return store.logon(payload);\n case 9:\n msg = _context.sent;\n case 10:\n // Not PUP\n session = null; // Use user specified session\n if (!(sessionID != null)) {\n _context.next = 24;\n break;\n }\n _p = {\n start: 0,\n limit: 100,\n qs: {\n filter: \"eq(id,'\".concat(sessionID, \"')\")\n }\n };\n _context.next = 15;\n return store.apiCall(compute.links('sessions'), _p);\n case 15:\n sessionList = _context.sent;\n index = sessionList.itemsList().toJS().indexOf(sessionID);\n if (!(index < 0)) {\n _context.next = 19;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 19:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(index), \"self\");\n _context.next = 22;\n return store.apiCall(selfcmd);\n case 22:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 24:\n if (!(store.store.config.options.computeServerId != null)) {\n _context.next = 30;\n break;\n }\n console.log('NOTE: Detected Workbench');\n _context.next = 28;\n return store.apiCall(compute.links('createSession'));\n case 28:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 30:\n // create a session - most common case\n\n if (contextName == null) {\n contextName = 'SAS Job Execution compute context';\n }\n p = {\n qs: {\n filter: \"contains(name,'\".concat(contextName, \"')\")\n }\n };\n contexts = null;\n _context.prev = 33;\n _context.next = 36;\n return store.apiCall(compute.links(\"contexts\"), p);\n case 36:\n contexts = _context.sent;\n if (!(contexts.itemsList().size === 0)) {\n _context.next = 39;\n break;\n }\n throw \"Context \".concat(contextName, \" not found\");\n case 39:\n _context.next = 45;\n break;\n case 41:\n _context.prev = 41;\n _context.t0 = _context[\"catch\"](33);\n console.log('Error: Not able to get context');\n throw _context.t0;\n case 45:\n name = contexts.itemsList(0);\n if (!(sessionID == null)) {\n _context.next = 52;\n break;\n }\n p = sessionPayload == null ? null : sessionPayload;\n createSession = contexts.itemsCmd(name, 'createSession');\n _context.next = 51;\n return store.apiCall(createSession, sessionPayload);\n case 51:\n session = _context.sent;\n case 52:\n return _context.abrupt(\"return\", session);\n case 53:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[33, 41]]);\n }));\n return _computeSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetup);\n\n//# sourceURL=webpack://restaflib/./computeSetup.js?");
611
+
612
+ /***/ }),
613
+
614
+ /***/ "./computeSetupTables.js":
615
+ /*!*******************************!*\
616
+ !*** ./computeSetupTables.js ***!
617
+ \*******************************/
618
+ /*! exports provided: default */
619
+ /*! exports used: default */
620
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
621
+
622
+ "use strict";
623
+ eval("/* 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 _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @private\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {session} SAS compute Session\r\n * @param {tables} tables Tables to be setup{libref:xx,name:xxx} or array of this object \r\n * @param {string} preamble SAS code to execute before setup\r\n * @returns {promise} - returns a compute summary \r\n */\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\nfunction _computeSetupTables() {\n _computeSetupTables = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, tables, preamble) {\n var result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(preamble != null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, preamble);\n case 3:\n result = _context.sent;\n if (!(result.SASJobStatus !== 'completed')) {\n _context.next = 6;\n break;\n }\n throw \"Error: Preamble failed with completion code of \".concat(result.SASJobStatus);\n case 6:\n _context.next = 8;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, null, tables);\n case 8:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSetupTables.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetupTables);\n\n//# sourceURL=webpack://restaflib/./computeSetupTables.js?");
624
+
625
+ /***/ }),
626
+
627
+ /***/ "./computeSummary.js":
628
+ /*!***************************!*\
629
+ !*** ./computeSummary.js ***!
630
+ \***************************/
631
+ /*! exports provided: default */
632
+ /*! exports used: default */
633
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
634
+
635
+ "use strict";
636
+ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__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\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 computeSummary\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - compute Session\r\n * @param {rafObject} job - rafObject representing the compute service job after job completion\r\n * @param {object|Array=} tables (see computeSetupTables)\r\n * @returns {promise} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n * \r\n */\nfunction computeSummary(_x, _x2, _x3, _x4) {\n return _computeSummary.apply(this, arguments);\n}\nfunction _computeSummary() {\n _computeSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, job, tables) {\n var result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(job != null && tables == null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return jobResults(store, session, job);\n case 3:\n result = _context.sent;\n _context.next = 9;\n break;\n case 6:\n _context.next = 8;\n return isetupTable(store, session, tables);\n case 8:\n result = _context.sent;\n case 9:\n return _context.abrupt(\"return\", result);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSummary.apply(this, arguments);\n}\nfunction jobResults(_x5, _x6, _x7) {\n return _jobResults.apply(this, arguments);\n}\nfunction _jobResults() {\n _jobResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee2(store, session, job) {\n var cResult, reportLink, results, size, i, resultItem, type, r, _r, _r2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: job /*null*/,\n tables: {},\n files: {}\n };\n cResult.log = job.links('log');\n cResult.listing = job.links('listing');\n reportLink = job.links('results');\n if (!(reportLink !== null)) {\n _context2.next = 10;\n break;\n }\n _context2.next = 7;\n return store.apiCall(reportLink);\n case 7:\n results = _context2.sent;\n size = results.itemsList().size;\n if (size > 0) {\n for (i = 0; i < size; i++) {\n resultItem = results.itemsList(i);\n type = results.items(resultItem, 'data', 'type').toLowerCase();\n if (type === 'ods') {\n cResult['ods'] = results.itemsCmd(resultItem, 'self');\n } else if (type === 'table') {\n r = {\n self: results.itemsCmd(resultItem, 'self'),\n current: null\n };\n cResult.tables[resultItem.toUpperCase()] = r;\n } else if (type === 'file') {\n _r = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult.files[resultItem] = _r;\n } else {\n _r2 = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult[type] = _r2;\n }\n }\n }\n case 10:\n return _context2.abrupt(\"return\", cResult);\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobResults.apply(this, arguments);\n}\nfunction isetupTable(_x8, _x9, _x10) {\n return _isetupTable.apply(this, arguments);\n}\nfunction _isetupTable() {\n _isetupTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee3(store, session, tables) {\n var cResult, tableList, i, itable, libref, name, p, currentLibrefs, rlink, currentLibrefSelf, _tables, tname, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: null,\n tables: {},\n files: {}\n };\n tableList = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(tables) === 'object' ? [tables] : tables;\n i = 0;\n case 3:\n if (!(i < tableList.length)) {\n _context3.next = 29;\n break;\n }\n itable = tableList[i];\n libref = itable.libref.toUpperCase();\n name = itable.name.toUpperCase();\n p = {\n qs: {\n filter: \"eq(name,'\".concat(libref, \"')\")\n }\n };\n _context3.next = 10;\n return store.apiCall(session.links('librefs'), p);\n case 10:\n currentLibrefs = _context3.sent;\n if (!(currentLibrefs.itemsList().size === 0)) {\n _context3.next = 13;\n break;\n }\n throw \"ERROR: Libref \".concat(libref, \" not found\");\n case 13:\n // get the links for this libref\n rlink = currentLibrefs.itemsCmd(libref, 'self');\n _context3.next = 16;\n return store.apiCall(rlink);\n case 16:\n currentLibrefSelf = _context3.sent;\n // get the table\n p = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context3.next = 20;\n return store.apiCall(currentLibrefSelf.links('tables'), p);\n case 20:\n _tables = _context3.sent;\n if (!(_tables.itemsList().size === 0)) {\n _context3.next = 23;\n break;\n }\n throw \"ERROR: Table \".concat(name, \" not found\");\n case 23:\n tname = \"\".concat(libref, \".\").concat(name).toLowerCase();\n r = {\n self: _tables.itemsCmd(name, 'self'),\n current: null\n };\n cResult.tables[tname.toUpperCase()] = r;\n case 26:\n i++;\n _context3.next = 3;\n break;\n case 29:\n return _context3.abrupt(\"return\", cResult);\n case 30:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _isetupTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSummary);\n\n//# sourceURL=webpack://restaflib/./computeSummary.js?");
637
+
638
+ /***/ }),
639
+
640
+ /***/ "./computeUpdateData.js":
641
+ /*!******************************!*\
642
+ !*** ./computeUpdateData.js ***!
643
+ \******************************/
644
+ /*! exports provided: default */
645
+ /*! exports used: default */
646
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
647
+
648
+ "use strict";
649
+ eval("/* 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 © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n* @description Update a record in a cas table\r\n* @async\r\n* @private\r\n* @module computeUpdateData\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {*} payload - {data,where,table}\r\n* @returns {promise} - return \r\n* @example\r\n* let inputs = restaflib.computeUpdateData(store, session, payload);\r\n* payload = { where: {key1: vale1, key2: value2,...},\r\n* data: {var1:value1, var2:value2,....},\r\n* table: {caslib: caslib, name: name}\r\n* Expects a single row\r\n*/\nfunction computeUpdateData(_x, _x2, _x3) {\n return _computeUpdateData.apply(this, arguments);\n}\nfunction _computeUpdateData() {\n _computeUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var data, table, where, src, set, comma, k, swhere, andbit, _k, v, valString, asrc, p, job, qs, status, c;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, table = payload.table, where = payload.where;\n src = \"proc sql; update \".concat(table.libref, \".\").concat(table.name);\n set = 'SET ';\n comma = ' ';\n for (k in data) {\n set = set + comma + k + '=' + value2String(data[k]);\n comma = ', ';\n }\n src = src + ' ' + set;\n swhere = ' WHERE ';\n andbit = ' ';\n if (typeof where === 'string') {\n swhere = swhere + where;\n } else {\n for (_k in where) {\n v = where[_k];\n valString = value2String(v);\n swhere = swhere + andbit + _k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n }\n src = src + ' ' + swhere + ';run;';\n asrc = src.split(/\\r?\\n/);\n p = {\n data: {\n code: asrc\n }\n };\n _context.next = 14;\n return store.apiCall(session.links('execute'), p);\n case 14:\n job = _context.sent;\n qs = {\n qs: {\n newState: 'Completed',\n timeout: 1\n }\n }; // eslint-disable-next-line no-unused-vars\n _context.next = 18;\n return store.jobState(job, qs);\n case 18:\n status = _context.sent;\n c = status.data === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n statusCode: c,\n msg: status.data\n });\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpdateData.apply(this, arguments);\n}\nfunction value2String(value) {\n var valueString;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value);\n } else {\n valueString = value.toString();\n }\n return valueString;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpdateData);\n\n//# sourceURL=webpack://restaflib/./computeUpdateData.js?");
650
+
651
+ /***/ }),
652
+
653
+ /***/ "./computeUpload.js":
654
+ /*!**************************!*\
655
+ !*** ./computeUpload.js ***!
656
+ \**************************/
657
+ /*! exports provided: default */
658
+ /*! exports used: default */
659
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
660
+
661
+ "use strict";
662
+ eval("/* 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 _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\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\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module computeUpload\r\n * @param {store} store \r\n * @param {rafobject} session compute session \r\n * @param {computeTable} table - name of table to be created\r\n * @param {object} data - rows of data objects\r\n * @param {object} columns columns\r\n * @returns {promise}\r\n */\nfunction computeUpload(_x, _x2, _x3, _x4, _x5) {\n return _computeUpload.apply(this, arguments);\n}\nfunction _computeUpload() {\n _computeUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, csvArray, columns) {\n var src, l, inx, k, c, x;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"data \".concat(table.libref, \".\").concat(table.name, \"; INFILE datalines delimiter=',' ;\\n\");\n l = '';\n inx = 'INPUT ';\n for (k in columns) {\n c = columns[k];\n inx = inx + c.Column + ' ';\n if (c.Type === 'CHAR') {\n x = \" \".concat(c.Column, \" $ \").concat(c.length, \" \\n\");\n l = l + ' ' + x;\n }\n }\n if (l.length > 0) {\n l = 'LENGTH ' + l + ';\\n';\n }\n inx = inx + ';\\n';\n src = src + ';\\n' + l + inx + 'datalines;\\n' + csvArray + '\\n; run; proc print;run;\\n';\n _context.next = 9;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 9:\n return _context.abrupt(\"return\", {\n msg: 'done',\n statusCode: 0\n });\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpload);\n\n//# sourceURL=webpack://restaflib/./computeUpload.js?");
663
+
664
+ /***/ }),
665
+
666
+ /***/ "./findReport.js":
667
+ /*!***********************!*\
668
+ !*** ./findReport.js ***!
669
+ \***********************/
670
+ /*! exports provided: default */
671
+ /*! exports used: default */
672
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
673
+
674
+ "use strict";
675
+ eval("/* 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/*\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/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reports = store.getService('reports');\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n _context.next = 5;\n return store.apiCall(reports.links('reports'), payload);\n case 5:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
676
+
677
+ /***/ }),
678
+
679
+ /***/ "./getReportImage.js":
680
+ /*!***************************!*\
681
+ !*** ./getReportImage.js ***!
682
+ \***************************/
683
+ /*! exports provided: default */
684
+ /*! exports used: default */
685
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
686
+
687
+ "use strict";
688
+ eval("/* 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 _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.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/**\r\n * @description Return the svg of the specified report(async)\r\n * \r\n * @module getReportImage\r\n * @category restaflib/report\r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the report\r\n * \r\n * @returns {string} - the svg of the report\r\n * \r\n */\n\n\n\nfunction getReportImage(_x, _x2) {\n return _getReportImage.apply(this, arguments);\n}\nfunction _getReportImage() {\n _getReportImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportImages, reportsList, uri, data, p, job, status, image;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reportImages = store.rafObject('reportImages');\n _context.next = 3;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 3:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", \"\".concat(name, \" was not found\"));\n case 6:\n uri = reportsList.itemsCmd(reportsList.itemsList(0), 'self', 'link', 'uri');\n data = {\n reportUri: uri,\n sectionIndex: 0,\n layoutType: 'entireSection',\n size: \"400x400\"\n };\n p = {\n data: data\n };\n _context.next = 11;\n return store.apiCall(reportImages.links('createJob'), p);\n case 11:\n job = _context.sent;\n _context.next = 14;\n return store.jobState(job, {\n qs: {\n wait: 1.5\n }\n }, 10, 2);\n case 14:\n status = _context.sent;\n if (!(status.data !== 'completed')) {\n _context.next = 17;\n break;\n }\n return _context.abrupt(\"return\", \"Job failed \".concat(status.data));\n case 17:\n _context.next = 19;\n return store.apiCall(status.job.itemsCmd(status.job.itemsList(0), 'image'));\n case 19:\n image = _context.sent;\n return _context.abrupt(\"return\", image.items());\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportImage.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportImage);\n\n//# sourceURL=webpack://restaflib/./getReportImage.js?");
689
+
690
+ /***/ }),
691
+
692
+ /***/ "./getReportUri.js":
693
+ /*!*************************!*\
694
+ !*** ./getReportUri.js ***!
695
+ \*************************/
696
+ /*! exports provided: default */
697
+ /*! exports used: default */
698
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
699
+
700
+ "use strict";
701
+ eval("/* 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 _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.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/**\r\n * @description Generate url for report(async)\r\n * @module getReportUri\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of report\r\n * \r\n * @returns {promise} array of report's of the form {name: name, uri: uri} for the report(s)\r\n */\n\n\n\nfunction getReportUri(_x, _x2) {\n return _getReportUri.apply(this, arguments);\n}\nfunction _getReportUri() {\n _getReportUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportsList, e, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 2:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n e = name == null ? 'No reports were found' : \"\".concat(name, \" was not found\");\n throw e;\n case 6:\n result = [];\n reportsList.items().map(function (i, n) {\n var uri = {\n name: n,\n uri: reportsList.itemsCmd(n, 'self', 'link', 'uri')\n };\n result.push(uri);\n });\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportUri);\n\n//# sourceURL=webpack://restaflib/./getReportUri.js?");
702
+
703
+ /***/ }),
704
+
705
+ /***/ "./getSasTableRows.js":
706
+ /*!****************************!*\
707
+ !*** ./getSasTableRows.js ***!
708
+ \****************************/
709
+ /*! exports provided: default */
710
+ /*! exports used: default */
711
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
712
+
713
+ "use strict";
714
+ eval("/* 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/*\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// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description Convert table to object of the form [{var1: value, var2: value,...},....](async)\r\n * @async\r\n * @private\r\n * @module getSASTableRows\r\n * @category restaflib/compute\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} tableName - name of the table\r\n * \r\n * @returns {promise} - get retrieved rows [{var1:value, var2:...}]\r\n */\n\n\nfunction getSasTableRows(_x, _x2, _x3) {\n return _getSasTableRows.apply(this, arguments);\n}\nfunction _getSasTableRows() {\n _getSasTableRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, computeSummary, tableName) {\n var tableSelf, t1, table, columns, rows, result, count, _loop, i;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n tableSelf = computeSummary.tables[tableName];\n _context2.next = 3;\n return store.apiCall(tableSelf);\n case 3:\n t1 = _context2.sent;\n _context2.next = 6;\n return store.apiCall(t1.links('rowSet'));\n case 6:\n table = _context2.sent;\n columns = table.items('columns');\n rows = table.items('rows');\n result = [];\n count = rows.size;\n _loop = /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n var row, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n row = rows.get(i);\n r = {};\n columns.map(function (c, i) {\n var varx = c.toLowerCase();\n r[varx] = row.get(i);\n });\n result.push(r);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n });\n i = 0;\n case 13:\n if (!(i < count)) {\n _context2.next = 18;\n break;\n }\n return _context2.delegateYield(_loop(), \"t0\", 15);\n case 15:\n i++;\n _context2.next = 13;\n break;\n case 18:\n return _context2.abrupt(\"return\", result);\n case 19:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _getSasTableRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getSasTableRows);\n\n//# sourceURL=webpack://restaflib/./getSasTableRows.js?");
715
+
716
+ /***/ }),
717
+
718
+ /***/ "./getScoreStep.js":
719
+ /*!*************************!*\
720
+ !*** ./getScoreStep.js ***!
721
+ \*************************/
722
+ /*! exports provided: default */
723
+ /*! exports used: default */
724
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
725
+
726
+ "use strict";
727
+ eval("/* 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 _sassoftware_restaflib_src_masAddModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @sassoftware/restaflib/src/masAddModel */ \"./masAddModel.js\");\n\n\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 * @private\r\n * @module getScoreStep\r\n * @category restaflib/mas\r\n * @param {*} store \r\n * @param {*} microanalyticScore \r\n * @param {*} name \r\n * @returns {promise}\r\n */\nfunction getScoreStep(_x, _x2, _x3) {\n return _getScoreStep.apply(this, arguments);\n}\nfunction _getScoreStep() {\n _getScoreStep = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, microanalyticScore, name) {\n var payload, modList, rafLink, allSteps, control;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name.trim(), \"')\")\n }\n };\n _context.next = 3;\n return store.apiCall(microanalyticScore.links('modules'), payload);\n case 3:\n modList = _context.sent;\n if (!(modList.itemsList().size === 0)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", null);\n case 6:\n rafLink = modList.itemsCmd(name, 'steps');\n _context.next = 9;\n return store.apiCall(rafLink);\n case 9:\n allSteps = _context.sent;\n control = {\n name: name,\n stepsRafLink: allSteps,\n stepIds: modList.items(name, 'data', 'stepIds').toJS(),\n microanalyticScore: microanalyticScore\n };\n return _context.abrupt(\"return\", control);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getScoreStep.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getScoreStep);\n\n//# sourceURL=webpack://restaflib/./getScoreStep.js?");
728
+
729
+ /***/ }),
730
+
731
+ /***/ "./index.js":
732
+ /*!******************!*\
733
+ !*** ./index.js ***!
734
+ \******************/
735
+ /*! exports provided: caslRun, caslRunBase, casSetup, casActionRun, casTableToJson, casFetchData, casFetchRows, casAppendTable, casUpdateData, casUpload, casSaveTable, casLoadTable, computeRun, computeSetup, computeSummary, computeSetupTables, computeFetchData, computeFileContent, computeResults, computeAppendTable, computeUpdateData, computeUpload, findReport, getReportImage, getReportUri, getSasTableRows, jesSetup, jesRun, jesSummary, jsonToDict, caslScore, caslDescribe, masSetup, masAddModel, masDescribe, masRun, masScore, uploadData, lib */
736
+ /*! all exports used */
737
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
738
+
739
+ "use strict";
740
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRun\", function() { return _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRunBase\", function() { return _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslScore\", function() { return _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslDescribe\", function() { return _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"a\"]; });\n\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSetup\", function() { return _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"a\"]; });\n\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casActionRun\", function() { return _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"a\"]; });\n\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchData\", function() { return _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"a\"]; });\n\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchRows\", function() { return _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"a\"]; });\n\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpdateData\", function() { return _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"a\"]; });\n\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casAppendTable\", function() { return _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"a\"]; });\n\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casTableToJson\", function() { return _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"a\"]; });\n\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpload\", function() { return _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"a\"]; });\n\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSaveTable\", function() { return _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"a\"]; });\n\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casLoadTable\", function() { return _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"a\"]; });\n\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeRun\", function() { return _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"a\"]; });\n\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetup\", function() { return _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"a\"]; });\n\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSummary\", function() { return _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"a\"]; });\n\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetupTables\", function() { return _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"a\"]; });\n\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeResults\", function() { return _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"a\"]; });\n\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFetchData\", function() { return _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"a\"]; });\n\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFileContent\", function() { return _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"a\"]; });\n\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeAppendTable\", function() { return _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"a\"]; });\n\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpdateData\", function() { return _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"a\"]; });\n\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpload\", function() { return _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"a\"]; });\n\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findReport\", function() { return _findReport__WEBPACK_IMPORTED_MODULE_24__[\"a\"]; });\n\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportImage\", function() { return _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"a\"]; });\n\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportUri\", function() { return _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"a\"]; });\n\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getSasTableRows\", function() { return _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"a\"]; });\n\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSetup\", function() { return _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"a\"]; });\n\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesRun\", function() { return _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"a\"]; });\n\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSummary\", function() { return _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"a\"]; });\n\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jsonToDict\", function() { return _jsonToDict__WEBPACK_IMPORTED_MODULE_31__[\"a\"]; });\n\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masSetup\", function() { return _masSetup__WEBPACK_IMPORTED_MODULE_32__[\"a\"]; });\n\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masDescribe\", function() { return _masDescribe__WEBPACK_IMPORTED_MODULE_33__[\"a\"]; });\n\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masRun\", function() { return _masRun__WEBPACK_IMPORTED_MODULE_34__[\"a\"]; });\n\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masScore\", function() { return _masScore__WEBPACK_IMPORTED_MODULE_35__[\"a\"]; });\n\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masAddModel\", function() { return _masAddModel__WEBPACK_IMPORTED_MODULE_36__[\"a\"]; });\n\n/* harmony import */ var _uploadData__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./uploadData */ \"./uploadData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"uploadData\", function() { return _uploadData__WEBPACK_IMPORTED_MODULE_37__[\"a\"]; });\n\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//import print from './print';\n\n\n\nvar lib = Object(_lib__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?");
741
+
742
+ /***/ }),
743
+
744
+ /***/ "./jesRun.js":
745
+ /*!*******************!*\
746
+ !*** ./jesRun.js ***!
747
+ \*******************/
748
+ /*! exports provided: default */
749
+ /*! exports used: default */
750
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
751
+
752
+ "use strict";
753
+ eval("/* 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 {object} args - args from graphql server(enhanced)\r\n * @param {string} src - code to execute\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4, _x5) {\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.a.mark(function _callee(store, jes, src, jobDefinitionName, args) {\n var jobRequest, jobDefinition, payload, jobResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_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 (!(jobDefinitionName !== null)) {\n _context.next = 6;\n break;\n }\n _context.next = 5;\n return jobDefUri(store, jobDefinitionName);\n case 5:\n jobRequest.jobDefinitionUri = _context.sent;\n case 6:\n // Concat macro to code\n if (src != -null) {\n jobDefinition.code = src; /*src.split(/\\r?\\n/);*/\n }\n\n jobDefinition.type = 'Compute';\n /*\r\n if (args !== null) {\r\n let props = [];\r\n for (let r in args) {\r\n let item = { name: r, value: args[r] };\r\n props.push(item);\r\n }\r\n jobDefinition.properties = props;\r\n }\r\n */\n jobRequest.arguments = args;\n jobRequest.jobDefinition = jobDefinition;\n payload = {\n data: jobRequest\n }; // run code and get results\n _context.next = 13;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, jes, payload);\n case 13:\n jobResult = _context.sent;\n return _context.abrupt(\"return\", jobResult);\n case 15:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRun.apply(this, arguments);\n}\nfunction jobDefUri(_x6, _x7) {\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.a.mark(function _callee2(store, name) {\n var jobDef, uri, payload, jdefList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n jobDef = store.getService('jobDefinitions');\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context2.next = 5;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, payload);\n case 5:\n jdefList = _context2.sent;\n if (!(jdefList.itemsList().size === 0)) {\n _context2.next = 10;\n break;\n }\n throw \"Error: \".concat(name, \" not found in the system\");\n case 10:\n uri = jdefList.itemsCmd(name, 'self', 'link', 'uri');\n case 11:\n return _context2.abrupt(\"return\", uri);\n case 12:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobDefUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRun);\n\n//# sourceURL=webpack://restaflib/./jesRun.js?");
754
+
755
+ /***/ }),
756
+
757
+ /***/ "./jesRunBase.js":
758
+ /*!***********************!*\
759
+ !*** ./jesRunBase.js ***!
760
+ \***********************/
761
+ /*! exports provided: default */
762
+ /*! exports used: default */
763
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
764
+
765
+ "use strict";
766
+ eval("/* 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 compute service \n//\n/** \r\n * @description Reduce compute service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} sore - restaf store\r\n * @param {code} code - SAS code to be executed\r\n * \r\n * @returns {object} rafobject of the results from a sas compute job\r\n * \r\n */\nfunction jesRunBase(_x, _x2, _x3) {\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.a.mark(function _callee(store, jes, payload) {\n var job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.apiCall(jes.links('create'), payload);\n case 2:\n job = _context.sent;\n _context.next = 5;\n return store.jobState(job, null, 5, 2);\n case 5:\n status = _context.sent;\n if (!(status.data === 'running')) {\n _context.next = 10;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 10:\n if (!(status.data === 'failed')) {\n _context.next = 14;\n break;\n }\n throw JSON.stringify(status);\n case 14:\n _context.next = 16;\n return Object(_jesSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, status.job);\n case 16:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRunBase);\n\n//# sourceURL=webpack://restaflib/./jesRunBase.js?");
767
+
768
+ /***/ }),
769
+
770
+ /***/ "./jesSetup.js":
771
+ /*!*********************!*\
772
+ !*** ./jesSetup.js ***!
773
+ \*********************/
774
+ /*! exports provided: default */
775
+ /*! exports used: default */
776
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
777
+
778
+ "use strict";
779
+ eval("/* 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/*\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/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module jesSetup\r\n * @private\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - logon payload - If null assumes that logon was done earlier.\r\n * \r\n * @returns {object} - returns a jobExecution raf object\r\n */\n\n\nfunction jesSetup(_x, _x2) {\n return _jesSetup.apply(this, arguments);\n}\nfunction _jesSetup() {\n _jesSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, payload) {\n var services;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(payload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(payload);\n case 3:\n _context.next = 5;\n return store.addServices('jobExecution', 'compute', 'jobDefinitions');\n case 5:\n services = _context.sent;\n return _context.abrupt(\"return\", services.jobExecution);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSetup);\n\n//# sourceURL=webpack://restaflib/./jesSetup.js?");
780
+
781
+ /***/ }),
782
+
783
+ /***/ "./jesSummary.js":
784
+ /*!***********************!*\
785
+ !*** ./jesSummary.js ***!
786
+ \***********************/
787
+ /*! exports provided: default */
788
+ /*! exports used: default */
789
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
790
+
791
+ "use strict";
792
+ eval("/* 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.a.mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", job);\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSummary.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSummary);\n\n//# sourceURL=webpack://restaflib/./jesSummary.js?");
793
+
794
+ /***/ }),
795
+
796
+ /***/ "./jsonToDict.js":
797
+ /*!***********************!*\
798
+ !*** ./jsonToDict.js ***!
799
+ \***********************/
800
+ /*! exports provided: default */
801
+ /*! exports used: default */
802
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
803
+
804
+ "use strict";
805
+ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\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/**\r\n * @description Produce a string with casl dictionary suitable for inclusion in casl code\r\n * \r\n * @module jsonToDict\r\n * @category restaflib/util\r\n * @param {object} obj - the JS object of interest\r\n * @param {string} name - the name to assign to the dictionary\r\n * \r\n * @returns {string} returns the string containing the casl dictionary\r\n * @alias module: jsonToDict\r\n * @example\r\n * \r\n * obj = {x: 1, b:2, c: ['a','b']};\r\n * name ='_appEnv_';\r\n * result is a string _appEnv_ = {x=2, b=3, c={\"a\", \"b\"}}\r\n */\n\nfunction jsonToDict(obj, name) {\n var o1;\n if (obj === null) {\n o1 = \"{}\";\n } else {\n o1 = Array.isArray(obj) === true ? handleArray(obj) : handleObject(obj);\n }\n return \"\".concat(name, \" = \").concat(o1, \";\");\n}\nfunction handleObject(obj) {\n var r = '{ ';\n var sep = ' ';\n for (var k in obj) {\n if (Array.isArray(obj[k]) === true) {\n var o = handleArray(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + o;\n } else {\n var type = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(obj[k]);\n if (type === 'object') {\n var _o = handleObject(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + _o;\n } else {\n r = r + sep + \"\".concat(k, \"=\") + (type === 'string' ? \" \\\"\".concat(obj[k], \"\\\" \") : \"\".concat(obj[k], \" \"));\n }\n }\n sep = ',';\n }\n r = r + '} ';\n return r;\n}\nfunction handleArray(obj) {\n var r = '{';\n var sep = ' ';\n var size = obj.length;\n for (var k = 0; k < size; k++) {\n if (Array.isArray(obj[k]) === true) {\n var o = handleArray(obj[k]);\n r = r + sep + \"\".concat(k, \"=\") + o;\n } else {\n var type = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(obj[k]);\n if (type === 'object') {\n var _o2 = handleObject(obj[k]);\n r = r + sep + _o2;\n } else {\n r = r + sep + (type === 'string' ? \" \\\"\".concat(obj[k], \"\\\" \") : \"\".concat(obj[k], \" \"));\n }\n sep = ',';\n }\n }\n r = r + '}';\n return r;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jsonToDict);\n\n//# sourceURL=webpack://restaflib/./jsonToDict.js?");
806
+
807
+ /***/ }),
808
+
809
+ /***/ "./lib.js":
810
+ /*!****************!*\
811
+ !*** ./lib.js ***!
812
+ \****************/
813
+ /*! exports provided: default */
814
+ /*! exports used: default */
815
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
816
+
817
+ "use strict";
818
+ eval("/* 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 _casUpdateData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony import */ var _uploadData__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./uploadData */ \"./uploadData.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\nfunction lib() {\n return {\n caslRun: _caslRun__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"],\n caslRunBase: _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casSetup: _casSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casActionRun: _casActionRun__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n // casTableToJson,\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n casUpdateData: _casUpdateData__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"],\n computeRun: _computeRun__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"],\n computeSetup: _computeSetup__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"],\n computeSummary: _computeSummary__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"],\n computeFetchData: _computeFetchData__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n computeFileContent: _computeFileContent__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"],\n computeResults: _computeResults__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n findReport: _findReport__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"],\n getReportImage: _getReportImage__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"],\n getReportUri: _getReportUri__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"],\n getSASTableRows: _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"],\n jesSetup: _jesSetup__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"],\n jesRun: _jesRun__WEBPACK_IMPORTED_MODULE_20__[/* default */ \"a\"],\n jesSummary: _jesSummary__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"],\n jsonToDict: _jsonToDict__WEBPACK_IMPORTED_MODULE_22__[/* default */ \"a\"],\n casTableToJson: _casTableToJson__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n caslScore: _caslScore__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n caslDescribe: _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n masSetup: _masSetup__WEBPACK_IMPORTED_MODULE_23__[/* default */ \"a\"],\n masAddModel: _masAddModel__WEBPACK_IMPORTED_MODULE_26__[/* default */ \"a\"],\n masDescribe: _masDescribe__WEBPACK_IMPORTED_MODULE_24__[/* default */ \"a\"],\n masRun: _masRun__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"],\n casUpload: _casUpload__WEBPACK_IMPORTED_MODULE_27__[/* default */ \"a\"],\n uploadData: _uploadData__WEBPACK_IMPORTED_MODULE_28__[/* default */ \"a\"]\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (lib);\n\n//# sourceURL=webpack://restaflib/./lib.js?");
819
+
820
+ /***/ }),
821
+
822
+ /***/ "./masAddModel.js":
823
+ /*!************************!*\
824
+ !*** ./masAddModel.js ***!
825
+ \************************/
826
+ /*! exports provided: default */
827
+ /*! exports used: default */
828
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
829
+
830
+ "use strict";
831
+ eval("/* 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 _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.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/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} masControl - control object from masSetup\r\n * @param {object} models - array of models to add\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masAddModel(_x, _x2, _x3) {\n return _masAddModel.apply(this, arguments);\n}\nfunction _masAddModel() {\n _masAddModel = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, models) {\n var microanalyticScore, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n microanalyticScore = masControl.service;\n i = 0;\n case 2:\n if (!(i < models.length)) {\n _context.next = 12;\n break;\n }\n m = models[i];\n if (!(masControl.steps[m] == null)) {\n _context.next = 9;\n break;\n }\n _context.next = 7;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 7:\n result = _context.sent;\n masControl.steps[m] = result;\n case 9:\n i++;\n _context.next = 2;\n break;\n case 12:\n return _context.abrupt(\"return\", true);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masAddModel.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masAddModel);\n\n//# sourceURL=webpack://restaflib/./masAddModel.js?");
832
+
833
+ /***/ }),
834
+
835
+ /***/ "./masDescribe.js":
836
+ /*!************************!*\
837
+ !*** ./masDescribe.js ***!
838
+ \************************/
839
+ /*! exports provided: default */
840
+ /*! exports used: default */
841
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
842
+
843
+ "use strict";
844
+ eval("/*\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 * Score using MAS\r\n * @module masDescribe\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {string} step - if not specified it will try to find score or execute\r\n * \r\n * @returns {object} - return input information\r\n * @alias module: masDescribe\r\n * @example\r\n * let inputs = restaflib.masDescribe(masControl, 'modela', 'score');\r\n */\nfunction masDescribe(masControl, modelName, step) {\n var stepControl = masControl.steps[modelName];\n if (stepControl === null) {\n return [];\n }\n var currentStep = null;\n if (step == null) {\n var stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === 'execute' || x === 'score';\n });\n if (stepIndex === -1) {\n return [];\n } else {\n currentStep = stepControl.stepIds[stepIndex];\n }\n } else {\n var _stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === step;\n });\n if (_stepIndex === -1) {\n return [];\n } else {\n currentStep = step;\n }\n }\n var desc = stepControl.stepsRafLink.items(currentStep, 'data', 'inputs');\n if (desc === null) {\n return [];\n }\n return desc.toJS();\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masDescribe);\n\n//# sourceURL=webpack://restaflib/./masDescribe.js?");
845
+
846
+ /***/ }),
847
+
848
+ /***/ "./masRun.js":
849
+ /*!*******************!*\
850
+ !*** ./masRun.js ***!
851
+ \*******************/
852
+ /*! exports provided: default */
853
+ /*! exports used: default */
854
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
855
+
856
+ "use strict";
857
+ eval("/* 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 * Score using MAS\r\n * @module masRun\r\n * @param {store} restaf store\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @param {string} stepName - if not specified it will default to score or execute\r\n * \r\n * @returns {promise} - returns scoring results\r\n * @alias module: masrun\r\n * @example\r\n * async function example (models, payload) {\r\n * await store.logon(payload);\r\n * let masControl = await restaflib.masSetup(store, models);\r\n * let defaults = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * let inp = restaflib.masDescribe(masControl, models[0], 'score');\r\n * print.object(inp, 'describe for score model');\r\n * inp = inp.map((n) => {\r\n * n.value = defaults[n.name];\r\n * return n;\r\n * });\r\n * print.object(inp, 'updated input for score model');\r\n * let result = await restaflib.masRun (store, masControl, models[0], inp, 'score');\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\nfunction masRun(_x, _x2, _x3, _x4, _x5, _x6) {\n return _masRun.apply(this, arguments);\n}\nfunction _masRun() {\n _masRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, modelName, scenario, step, cmd) {\n var stepControl, inputIsArray, inputs, r, item, scorePayload, currentStep, stepIndex, _stepIndex, rafLink, t, result, outputs, score;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n stepControl = masControl.steps[modelName];\n inputIsArray = false;\n inputs = [];\n if (Array.isArray(scenario) === false) {\n for (r in scenario) {\n item = {\n name: r,\n value: scenario[r]\n };\n inputs.push(item);\n }\n } else {\n inputIsArray = true;\n }\n scorePayload = {\n data: {\n inputs: inputIsArray === true ? scenario : inputs\n }\n };\n currentStep = null; //TBD: Need to convert stepId from array to object for cleaner coding\n if (!(step == null)) {\n _context.next = 15;\n break;\n }\n stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === 'execute' || x === 'score';\n });\n if (!(stepIndex === -1)) {\n _context.next = 12;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 12:\n currentStep = stepControl.stepIds[stepIndex];\n case 13:\n _context.next = 21;\n break;\n case 15:\n _stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === step;\n });\n if (!(_stepIndex === -1)) {\n _context.next = 20;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 20:\n currentStep = step;\n case 21:\n if (cmd == null) {\n cmd = 'execute';\n }\n rafLink = stepControl.stepsRafLink.itemsCmd(currentStep, cmd);\n if (!(rafLink === null)) {\n _context.next = 26;\n break;\n }\n t = [{\n name: 'Error',\n type: 'string',\n value: \"name: \".concat(modelName, \" step: \").concat(step, \" operation: \").concat(cmd, \" is an invalid combination\")\n }];\n return _context.abrupt(\"return\", t);\n case 26:\n _context.next = 28;\n return store.apiCall(rafLink, scorePayload);\n case 28:\n result = _context.sent;\n outputs = result.items('outputs').toJS();\n if (inputIsArray === true) {\n score = outputs;\n } else {\n score = {};\n outputs.map(function (m) {\n score[m.name] = m.value;\n });\n }\n return _context.abrupt(\"return\", score);\n case 32:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masRun);\n\n//# sourceURL=webpack://restaflib/./masRun.js?");
858
+
859
+ /***/ }),
860
+
861
+ /***/ "./masScore.js":
862
+ /*!*********************!*\
863
+ !*** ./masScore.js ***!
864
+ \*********************/
865
+ /*! exports provided: default */
866
+ /*! exports used: default */
867
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
868
+
869
+ "use strict";
870
+ eval("/* 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 _masSetup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\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 * Score using MAS\r\n * @module masScore\r\n * @category restaflib/mas\r\n * @param {store} restaf store\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @returns {promise} - returns scoring results\r\n * @alias module: masScore\r\n * @example\r\n * async function example (store, model) {\r\n * let scenario = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * \r\n * let result = await restaflib.masScore (store, model, scenario);\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\n\n\nfunction masScore(_x, _x2, _x3) {\n return _masScore.apply(this, arguments);\n}\nfunction _masScore() {\n _masScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, modelName, scenario) {\n var masControl, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_masSetup__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, [modelName]);\n case 2:\n masControl = _context.sent;\n _context.next = 5;\n return Object(_masRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, masControl, modelName, scenario, 'score', 'execute');\n case 5:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masScore);\n\n//# sourceURL=webpack://restaflib/./masScore.js?");
871
+
872
+ /***/ }),
873
+
874
+ /***/ "./masSetup.js":
875
+ /*!*********************!*\
876
+ !*** ./masSetup.js ***!
877
+ \*********************/
878
+ /*! exports provided: default */
879
+ /*! exports used: default */
880
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
881
+
882
+ "use strict";
883
+ eval("/* 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 _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.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/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} models - an array of model names\r\n * @param {object} logonPayload - null|restaf logon payload\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masSetup(_x, _x2, _x3) {\n return _masSetup.apply(this, arguments);\n}\nfunction _masSetup() {\n _masSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, models, logonPayload) {\n var _yield$store$addServi, microanalyticScore, control, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n _context.next = 5;\n return store.addServices('microanalyticScore');\n case 5:\n _yield$store$addServi = _context.sent;\n microanalyticScore = _yield$store$addServi.microanalyticScore;\n control = {\n service: microanalyticScore,\n steps: {}\n };\n i = 0;\n case 9:\n if (!(i < models.length)) {\n _context.next = 18;\n break;\n }\n m = models[i];\n _context.next = 13;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 13:\n result = _context.sent;\n control.steps[m] = result;\n case 15:\n i++;\n _context.next = 9;\n break;\n case 18:\n return _context.abrupt(\"return\", control);\n case 19:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masSetup);\n\n//# sourceURL=webpack://restaflib/./masSetup.js?");
884
+
885
+ /***/ }),
886
+
887
+ /***/ "./programs/casAppendTable.js":
888
+ /*!************************************!*\
889
+ !*** ./programs/casAppendTable.js ***!
890
+ \************************************/
891
+ /*! exports provided: default */
892
+ /*! exports used: default */
893
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
894
+
895
+ "use strict";
896
+ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction casAppendTable() {\n var src = \"\\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 \";\n return src;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casAppendTable);\n\n//# sourceURL=webpack://restaflib/./programs/casAppendTable.js?");
897
+
898
+ /***/ }),
899
+
900
+ /***/ "./programs/casFetchData.js":
901
+ /*!**********************************!*\
902
+ !*** ./programs/casFetchData.js ***!
903
+ \**********************************/
904
+ /*! exports provided: default */
905
+ /*! exports used: default */
906
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
907
+
908
+ "use strict";
909
+ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction casFetchData() {\n var code = \"\\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 \";\n return code;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchData);\n\n//# sourceURL=webpack://restaflib/./programs/casFetchData.js?");
910
+
911
+ /***/ }),
912
+
913
+ /***/ "./programs/casFetchRows.js":
914
+ /*!**********************************!*\
915
+ !*** ./programs/casFetchRows.js ***!
916
+ \**********************************/
917
+ /*! exports provided: default */
918
+ /*! exports used: default */
919
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
920
+
921
+ "use strict";
922
+ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n/* deprecate */\nfunction casFetchRows() {\n var code = \"\\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 \";\n return code;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./programs/casFetchRows.js?");
923
+
924
+ /***/ }),
925
+
926
+ /***/ "./programs/commonCasl.js":
927
+ /*!********************************!*\
928
+ !*** ./programs/commonCasl.js ***!
929
+ \********************************/
930
+ /*! exports provided: default */
931
+ /*! exports used: default */
932
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
933
+
934
+ "use strict";
935
+ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nfunction commonCasl() {\n var casl = \"\\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 \";\n return casl;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (commonCasl);\n\n//# sourceURL=webpack://restaflib/./programs/commonCasl.js?");
936
+
937
+ /***/ }),
938
+
939
+ /***/ "./programs/index.js":
940
+ /*!***************************!*\
941
+ !*** ./programs/index.js ***!
942
+ \***************************/
943
+ /*! exports provided: default */
944
+ /*! exports used: default */
945
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
946
+
947
+ "use strict";
948
+ eval("/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scoreCasl */ \"./programs/scoreCasl.js\");\n/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scoreCasl__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./casFetchData */ \"./programs/casFetchData.js\");\n/* harmony import */ var _commonCasl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonCasl */ \"./programs/commonCasl.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casFetchRows */ \"./programs/casFetchRows.js\");\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casAppendTable */ \"./programs/casAppendTable.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/* harmony default export */ __webpack_exports__[\"a\"] = ({\n commonCasl: _commonCasl__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casFetchRows: _casFetchRows__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n scoreCasl: _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default.a,\n casAppendTable: _casAppendTable__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casRowSets: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n});\n\n//# sourceURL=webpack://restaflib/./programs/index.js?");
949
+
950
+ /***/ }),
951
+
952
+ /***/ "./programs/scoreCasl.js":
953
+ /*!*******************************!*\
954
+ !*** ./programs/scoreCasl.js ***!
955
+ \*******************************/
956
+ /*! no static exports found */
957
+ /*! exports used: default */
958
+ /***/ (function(module, exports) {
959
+
960
+ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\nmodule.exports = function scoreCasl() {\n var casl = \"\\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 \";\n return casl;\n};\n\n/*\r\n cas mycas; \r\n proc cas; \r\n \r\n \r\n _args_1 = { \r\n path = '/describe', \r\n model = { caslib='models', name='cms_sdoh_risk_stratification_cluster'}, \r\n table = { caslib= \"public\", name = \"cluster_test2\"}, \r\n scenario = { \r\n SDOH_Physically_Unhealthy_Days_= 4.3, \r\n SDOH_Per_Adults_Bachelors = 19.6, \r\n SDOH_Unemployment_Rate = 9.6, \r\n SDOH_Median_Household_Income = 45493 \r\n } \r\n \r\n }; \r\n \r\n _args_2 = { \r\n path = '/score', \r\n model = { caslib='models', name='cms_sdoh_risk_stratification_cluster'}, \r\n table = { caslib= \"public\", name = \"cluster_test2\"}, \r\n scenario = { \r\n SDOH_Physically_Unhealthy_Days_ = 4.3, \r\n SDOH_Per_Adults_Bachelors = 19.6, \r\n SDOH_Unemployment_Rate = 9.6, \r\n SDOH_Median_Household_Income = 45493 \r\n } \r\n \r\n }; \r\n \r\n _args_3 = { \r\n path = '/describe', \r\n model = { caslib='modelstore', name='_LBP6S3ZAQGO614AJKDJT3AF93'}, \r\n table = { caslib='', name=''}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n \r\n _args_4 = { \r\n path = '/score', \r\n model = { caslib='modelstore', name='_LBP6S3ZAQGO614AJKDJT3AF93'}, \r\n table = { caslib='', name=''}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n \r\n _args_5 = { \r\n path = '/score', \r\n modelName= 'Gradient_Boosting_3f3c7c89_13ac_469e_a761_28ee066e5b87' \r\n model = { caslib='casuser', name='testdest'}, \r\n table = { caslib=\"\", name=\"\"}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n \r\n _args_6 = { \r\n path = '/score', \r\n modelName= 'Gradient_Boosting_7adb0404_85e3_474d_9d03_1059ef7ae008' \r\n model = { caslib='public', name='testpublish'}, \r\n table = { caslib=\"\", name=\"\"}, \r\n scenario = { \r\n sensor_ratio = 4.3, \r\n days_out_of_service = 5 \r\n } \r\n }; \r\n\n result = runMain(_args_1); \r\n result = runMain(_args_2); \r\n result = runMain(_args_3); \r\n result = runMain(_args_4); \r\n result = runMain(_args_5); \r\n */\n\n//# sourceURL=webpack://restaflib/./programs/scoreCasl.js?");
961
+
962
+ /***/ }),
963
+
964
+ /***/ "./uploadData.js":
965
+ /*!***********************!*\
966
+ !*** ./uploadData.js ***!
967
+ \***********************/
968
+ /*! exports provided: default */
969
+ /*! exports used: default */
970
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
971
+
972
+ "use strict";
973
+ eval("/* 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\nvar FormData = __webpack_require__(/*! form-data */ \"../../../node_modules/form-data/lib/browser.js\");\nfunction uploadData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _uploadData.apply(this, arguments);\n}\nfunction _uploadData() {\n _uploadData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(caslib, fileName, file, type, store, scope) {\n var _yield$store$addServi, casManagement, servers, serverName, p1, caslibResult, tables, qt, lastTable, n, uri, formData, p3, upload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.addServices('casManagement');\n case 2:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 6;\n return store.apiCall(casManagement.links('servers'));\n case 6:\n servers = _context.sent;\n if (!(servers.itemsList().size === 0)) {\n _context.next = 9;\n break;\n }\n throw {\n Error: 'No cas servers were found'\n };\n case 9:\n serverName = servers.itemsList(0); // query for preferred caslib \n p1 = {\n qs: {\n filter: \"eq(name,\".concat(caslib, \")\")\n }\n };\n _context.next = 13;\n return store.apiCall(servers.itemsCmd(serverName, 'caslibs'), p1);\n case 13:\n caslibResult = _context.sent;\n _context.next = 16;\n return store.apiCall(caslibResult.itemsCmd(caslib, 'tables'));\n case 16:\n tables = _context.sent;\n qt = {\n qs: {\n filter: \"eq(name, \".concat(fileName.trim().toUpperCase(), \")\")\n }\n };\n _context.next = 20;\n return store.apiCall(caslibResult.itemsCmd(caslib, 'tables'), qt);\n case 20:\n lastTable = _context.sent;\n if (!(lastTable.itemsList().size === 1)) {\n _context.next = 25;\n break;\n }\n n = lastTable.itemsList(0);\n uri = lastTable.items(n, 'data', 'tableReference', 'tableUri');\n return _context.abrupt(\"return\", uri);\n case 25:\n // upload table using the upload rel\n formData = new FormData();\n formData.append('tableName', fileName);\n formData.append('format', type);\n formData.append('scope', scope == null ? 'global' : scope);\n formData.append('replace', true);\n formData.append('containsHeaderRow', true);\n formData.append('file', file); // note that we are passing the File object\n p3 = {\n data: formData,\n headers: {\n 'content-type': \"multipart/form-data; boundary=\\\"----------12345678901234567\\\"\"\n }\n };\n _context.next = 35;\n return store.apiCall(tables.links('upload'), p3);\n case 35:\n upload = _context.sent;\n return _context.abrupt(\"return\", upload);\n case 37:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadData);\n\n//# sourceURL=webpack://restaflib/./uploadData.js?");
974
+
975
+ /***/ }),
976
+
977
+ /***/ "./uploadHandlers/index.js":
978
+ /*!*********************************!*\
979
+ !*** ./uploadHandlers/index.js ***!
980
+ \*********************************/
981
+ /*! exports provided: uploadAstore, uploadSrc, saveTable */
982
+ /*! exports used: saveTable, uploadAstore, uploadSrc */
983
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
984
+
985
+ "use strict";
986
+ eval("/* harmony import */ var _uploadAstore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uploadAstore */ \"./uploadHandlers/uploadAstore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return _uploadAstore__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _uploadSrc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadSrc */ \"./uploadHandlers/uploadSrc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return _uploadSrc__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _saveTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./saveTable */ \"./uploadHandlers/saveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return _saveTable__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\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\n\n\n\n\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/index.js?");
987
+
988
+ /***/ }),
989
+
990
+ /***/ "./uploadHandlers/saveTable.js":
991
+ /*!*************************************!*\
992
+ !*** ./uploadHandlers/saveTable.js ***!
993
+ \*************************************/
994
+ /*! exports provided: default */
995
+ /*! exports used: default */
996
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
997
+
998
+ "use strict";
999
+ eval("/* 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/*\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\nfunction saveTable(_x, _x2, _x3, _x4) {\n return _saveTable.apply(this, arguments);\n}\nfunction _saveTable() {\n _saveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, caslib, name) {\n var payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true,\n table: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib)\n }\n }\n };\n _context.next = 3;\n return store.runAction(session, payload);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _saveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (saveTable);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/saveTable.js?");
1000
+
1001
+ /***/ }),
1002
+
1003
+ /***/ "./uploadHandlers/uploadAstore.js":
1004
+ /*!****************************************!*\
1005
+ !*** ./uploadHandlers/uploadAstore.js ***!
1006
+ \****************************************/
1007
+ /*! exports provided: default */
1008
+ /*! exports used: default */
1009
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1010
+
1011
+ "use strict";
1012
+ eval("/* 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/*\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\nfunction uploadAstore(_x, _x2, _x3, _x4) {\n return _uploadAstore.apply(this, arguments);\n}\nfunction _uploadAstore() {\n _uploadAstore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, astoreBuf, fileInfo) {\n var _fileInfo$output, caslib, name, casl, payload, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n name = name.toLowerCase(name);\n\n // delete old table\n casl = \"\\n action table.droptable /\\n caslib= '\".concat(caslib, \"' name= '\").concat(name, \"' quiet=true;\\n\\n action table.deleteSource/\\n caslib= '\").concat(caslib, \"' source= '\").concat(name, \".sashdat' quiet=true; \\n \");\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: casl\n }\n };\n _context.next = 8;\n return store.runAction(session, payload);\n case 8:\n // upload table\n\n payload = {\n action: 'astore.upload',\n data: {\n rstore: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true\n },\n store: astoreBuf\n }\n };\n _context.next = 11;\n return store.runAction(session, payload);\n case 11:\n r = _context.sent;\n return _context.abrupt(\"return\", \"Upload of \".concat(fileInfo.source, \" to \").concat(caslib, \".\").concat(name, \" completed\"));\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadAstore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadAstore);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadAstore.js?");
1013
+
1014
+ /***/ }),
1015
+
1016
+ /***/ "./uploadHandlers/uploadSrc.js":
1017
+ /*!*************************************!*\
1018
+ !*** ./uploadHandlers/uploadSrc.js ***!
1019
+ \*************************************/
1020
+ /*! exports provided: default */
1021
+ /*! exports used: default */
1022
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1023
+
1024
+ "use strict";
1025
+ eval("/* 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 _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../caslRun */ \"./caslRun.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 uploadSrc(_x, _x2, _x3, _x4, _x5) {\n return _uploadSrc.apply(this, arguments);\n}\nfunction _uploadSrc() {\n _uploadSrc = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, modelBuf, fileInfo, save) {\n var _fileInfo$output, caslib, name, JSON_Parameters, p, r, casl, _r, text;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n _context.next = 5;\n return cleanup(store, session, caslib, name);\n case 5:\n JSON_Parameters = {\n casout: {\n caslib: caslib,\n /* a valid caslib */\n name: name /* name of output file on cas server */\n },\n\n importOptions: {\n fileType: fileInfo.fileType /* type of the file being uploaded */\n }\n };\n\n if (fileInfo.fileExt === 'sas' || fileInfo.fileExt === 'ds2') {\n JSON_Parameters.importOptions.delimiter = '\\\\';\n }\n p = {\n headers: {\n 'JSON-Parameters': JSON_Parameters,\n 'Content-Type': 'binary/octet-stream'\n },\n data: modelBuf,\n action: 'table.upload'\n };\n _context.next = 10;\n return store.runAction(session, p);\n case 10:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 16;\n break;\n }\n casl = \"\\n\\t\\t\\taction table.save r = result / \\n\\t\\t\\ttable = {caslib='\".concat(caslib, \"' name='\").concat(name, \"'} replace=true\\n\\t\\t\\tcaslib='\").concat(caslib, \"' name='\").concat(name, \"';\\n\\n\\t\\t\\tsend_response(result);\\n\\t\\t\\t\");\n _context.next = 15;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, casl, null, true);\n case 15:\n _r = _context.sent;\n case 16:\n text = fileInfo.source == null ? \"inline source\" : fileInfo.source;\n return _context.abrupt(\"return\", \"Upload of \".concat(text, \" to \").concat((fileInfo.output, caslib), \".\").concat(fileInfo.output.name, \" completed\"));\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadSrc.apply(this, arguments);\n}\nfunction cleanup(_x6, _x7, _x8, _x9) {\n return _cleanup.apply(this, arguments);\n}\nfunction _cleanup() {\n _cleanup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, caslib, name) {\n var table, deleteSrc, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n table = \"\".concat(caslib, \".\").concat(name);\n deleteSrc = \"\\n\\t\\taction table.dropTable/ \\n caslib='\".concat(caslib, \"' name='\").concat(name, \"' quiet=TRUE; \\n \\n action table.deleteSource status=src / \\n caslib='casuser' source= '\").concat(table, \"' quiet=TRUE; \\n\\t\\tsend_response({csResults = {results= 'data deleted'}})\\n\\t\\t\");\n _context2.next = 4;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, deleteSrc);\n case 4:\n r = _context2.sent;\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _cleanup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSrc);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadSrc.js?");
1026
+
1027
+ /***/ }),
1028
+
1029
+ /***/ "./uploadSetup.js":
1030
+ /*!************************!*\
1031
+ !*** ./uploadSetup.js ***!
1032
+ \************************/
1033
+ /*! exports provided: default */
1034
+ /*! exports used: default */
1035
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1036
+
1037
+ "use strict";
1038
+ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\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\n/**\r\n * parse a source file name\r\n * @module uploadSetup\r\n * @private\r\n * @param {string} source - the source file( absolute or relative path can be used)\r\n * @returns {object} - returns {ext: file-extension, fileOptions: <option for fread>, transform: transform for content-type, contentType: content-type}\r\n * @alias module: uploadSetup\r\n * @example\r\n * let t = uploadSetup('./cars.sashdat');\r\n */\n\nfunction uploadSetup(source, output) {\n var fileOptions = null; /* option for file reader */\n var contentType = 'binary/octet-stream'; /* header content-type on API call */\n\n var fileType; /* fileType for use in API call */\n var handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n var transform = noChange;\n var fext;\n if (source == null) {\n fext = 'csv';\n } else {\n fext = source.split('.').pop().toLowerCase();\n }\n switch (fext) {\n case 'sas7bdat':\n {\n fileType = 'basesas';\n break;\n }\n case 'sashdat':\n {\n fileType = 'hdat';\n break;\n }\n case 'csv':\n {\n fileType = fext;\n fileOptions = 'UTF8';\n break;\n }\n case 'xslx':\n case 'xsl':\n {\n fileType = fext;\n break;\n }\n case 'astore':\n case 'sasast':\n {\n fileType = fext;\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadAstore */ \"b\"];\n transform = toBase64;\n break;\n }\n case 'ds2':\n case 'sas':\n {\n fileType = 'csv';\n fileOptions = 'UTF8';\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n transform = toCsv;\n break;\n }\n default:\n {\n throw \"Currently file type of \".concat(fext, \" is not supported\");\n }\n }\n var _output$split = output.split('.'),\n _output$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_output$split, 2),\n caslib = _output$split2[0],\n name = _output$split2[1];\n return {\n source: source,\n output: {\n caslib: caslib,\n name: name.toLowerCase()\n },\n fileType: fileType /* for cas actions */,\n fileExt: fext,\n fileOptions: fileOptions,\n transform: transform,\n contentType: contentType,\n handler: handler\n };\n function toBase64(data) {\n return new Buffer.from(data).toString('base64');\n }\n function toCsv(data, fileInfo) {\n // preprocess to get rid of things that upset datastep\n // eslint-disable-next-line no-control-regex\n var isrc = data.replace(/[^\\x00-\\x7F]/g, '');\n var src = isrc.replace(/\\r?\\n/g, '');\n // convert to a csv\n var fileType = fileInfo.fileExt;\n var varname = fileType === 'sas' ? 'dataStepSrc' : fileType === 'ds2' ? 'ds2Src' : fileType === 'casl' ? 'caslSrc' : 'dataStepsrc';\n var csv = 'modelName' + '\\\\' + varname + '\\n' + fileInfo.output.name + '\\\\' + ' ' + src + '\\n';\n return csv;\n }\n function noChange(data) {\n return data;\n }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSetup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaflib/./uploadSetup.js?");
1039
+
1040
+ /***/ }),
1041
+
1042
+ /***/ 0:
1043
+ /*!*********************!*\
1044
+ !*** multi ./index ***!
1045
+ \*********************/
1046
+ /*! no static exports found */
1047
+ /*! all exports used */
1048
+ /***/ (function(module, exports, __webpack_require__) {
1049
+
1050
+ eval("module.exports = __webpack_require__(/*! C:\\sassoftware\\restaf\\packages\\restaflib\\src/index */\"./index.js\");\n\n\n//# sourceURL=webpack://restaflib/multi_./index?");
1051
+
1052
+ /***/ })
1053
+
1054
+ /******/ });
1055
1055
  });