@sassoftware/restaflib 4.1.2 → 4.1.3
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 +1 -1
- package/dist/restaflib.min.js +3 -3
- package/lib/restaflib.js +1 -1
- package/package.json +1 -1
package/dist/restaflib.js
CHANGED
|
@@ -620,7 +620,7 @@ eval("/*\r\n * Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights
|
|
|
620
620
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
621
621
|
|
|
622
622
|
"use strict";
|
|
623
|
-
eval("/* harmony import */ var
|
|
623
|
+
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\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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 */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\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, set, tbl, updateRow, pl, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, where = payload.where, table = payload.table;\n swhere = '';\n\n if (where.length > 0) {\n andbit = ' ';\n debugger;\n where.map(function (w) {\n var valString = typeof w.dataValue === \"string\" ? \"'\".concat(w.dataValue.toString(), \"'\") : w.dataValue;\n swhere = swhere + andbit + w.value + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n });\n }\n\n set = []; // let data = fdata.filter ( (r) => where.findIndex((k) => r.name === k.value));\n\n data.map(function (e, i) {\n if (e.name !== '_Index_') {\n var valueString;\n\n if (e.value == null) {\n valueString = '.';\n } else if (typeof e.value === 'string') {\n valueString = JSON.stringify(e.value)\n /*`${JSON.stringify(e.value)}`*/\n ;\n } else {\n valueString = e.value.toString();\n }\n\n console.log(valueString);\n set.push({\n var: e.name,\n value: valueString\n });\n }\n });\n tbl = _objectSpread(_objectSpread({}, table), {}, {\n where: \"\".concat(swhere)\n });\n updateRow = {\n table: tbl,\n set: set\n };\n console.log(updateRow);\n pl = {\n action: 'table.update',\n data: updateRow\n };\n _context.next = 11;\n return store.runAction(session, pl);\n\n case 11:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casUpdateData.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpdateData);\n\n//# sourceURL=webpack://restaflib/./casUpdateData.js?");
|
|
624
624
|
|
|
625
625
|
/***/ }),
|
|
626
626
|
|
package/dist/restaflib.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("restaflib",[],e):"object"==typeof exports?exports.restaflib=e():t.restaflib=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e,n){t.exports=n(16)},function(t,e){function n(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function u(t){n(a,i,o,u,s,"next",t)}function s(t){n(a,i,o,u,s,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=n.n(o),u=n(5);function s(){return(s=i()(a.a.mark((function t(e,n,r,i){var o,s,c,f,l,p,h,d=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o=Object(u.a)(null!==i?i:{},"_args_"),s=(s=o+" "+r).replace(/\r?\n|\r/g,""),c={action:"sccasl.runcasl",data:{code:s}},f=d.length,l=new Array(f>4?f-4:0),p=4;p<f;p++)l[p-4]=d[p];return t.next=7,e.runAction.apply(e,[n,c].concat(l));case 7:return h=t.sent,t.abrupt("return",h);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.a=function(t,e,n,r){return s.apply(this,arguments)}},function(t,e,n){"use strict";var r=n(13),i=n.n(r);var o=function(){return"\n results = casFetchData(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format); \n send_response({casResults = results}); \n \n function casFetchData(caslib, name, from, count, format) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n results = {Errors= 'Unable to access ' ||caslib||'.'||name}; \n return results; \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 to = min(from + count -1, rowCount); \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 action table.fetch r = result / \n table = {caslib=caslib, name=name} \n from= from to=to format=format \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 if (from ne 1) then do;\n pagePrev = max(pagePrev,1);\n end; \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, table=table}, prev={from=pagePrev, count=count, format=format, table=table}};\n\n /*return ({pagination = {table = {caslib=caslib, name=name}, prev=pagePrev, next=pageNext, count=count}, rc=0 , data = {schema=columns, rows=rows } } ); */\n\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 "};var a=function(){return"\n \n /*------------------------------------------------*/\n /*Does the tables exist and if not try to load it */\n /*\n Typical usage:\n rc = checkAndLoadTable(caslib, name);\n if ( rc ne true) then do;\n ...handle errors...\n end; \n else do;\n ...your stuff...\n end;\n rc = true - the data is ready for use\n rc = false - the table could not be found\n rc = -1 - the caslib does not exist\n */\n /*------------------------------------------------*/\n\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) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n\t action table.loadTable status=status/ \n\t caslib = caslib \n\t source = path \n\t casout={caslib= caslib name=name}; \n\t if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n\n/*\n * return path to table\n */\n\nfunction 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\t if (upcase(n) eq nameu) then do; \n\t count = count + 1; \n\t if ( cpath eq '*') then do; \n\t cpath = n; \n\t end; \n\t 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; \nend; \n\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); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name}; \n return results; \n end; \n \n do k over idvars; \n r = _getValues(k, caslib, name); \n results[k] = r; \n end; \n \n return results; \n end; \n \n function _getValues(id, caslib, name) ; \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} \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 /*------------------------------------------*/ \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\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 "};e.a={commonCasl:a,casFetchData:o,scoreCasl:i.a}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(0),a=n.n(o),u=n(2),s=n(3);function c(){return(c=i()(a.a.mark((function t(e,n,r,i,o){var c,f,l,p,h,d=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c=r,!0===o&&(c=r+" "+s.a.commonCasl()),f=d.length,l=new Array(f>5?f-5:0),p=5;p<f;p++)l[p-5]=d[p];return t.next=5,u.a.apply(void 0,[e,n,c,i].concat(l));case 5:return h=t.sent,t.abrupt("return",h.items().toJS());case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.a=function(t,e,n,r,i){return c.apply(this,arguments)}},function(t,e,n){"use strict";var r=n(6),i=n.n(r);function o(t){var e="{ ",n=" ";for(var r in t){if(!0===Array.isArray(t[r])){var u=a(t[r]);e=e+n+"".concat(r,"=")+u}else{var s=i()(t[r]);if("object"===s){var c=o(t[r]);e=e+n+"".concat(r,"=")+c}else e=e+n+"".concat(r,"=")+("string"===s?' "'.concat(t[r],'" '):"".concat(t[r]," "))}n=","}return e+="} "}function a(t){for(var e="{",n=" ",r=t.length,u=0;u<r;u++)if(!0===Array.isArray(t[u])){var s=a(t[u]);e=e+n+"".concat(u,"=")+s}else{var c=i()(t[u]);if("object"===c)e=e+n+o(t[u]);else e=e+n+("string"===c?' "'.concat(t[u],'" '):"".concat(t[u]," "));n=","}return e+="}"}e.a=function(t,e){var n;return n=null===t?"{}":!0===Array.isArray(t)?a(t):o(t),"".concat(e," = ").concat(n,";")}},function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(1),i=n.n(r),o=n(0),a=n.n(o);function u(){return(u=i()(a.a.mark((function t(e,n,r,i){var o,u,s,c,f;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i.output,u=o.caslib,null!=(s=o.name)){t.next=3;break}throw"Please specify table as caslib.name";case 3:return s=s.toLowerCase(s),c="\n action table.droptable /\n caslib= '".concat(u,"' name= '").concat(s,"' quiet=true;\n\n action table.deleteSource/\n caslib= '").concat(u,"' source= '").concat(s,".sashdat' quiet=true; \n "),f={action:"sccasl.runcasl",data:{code:c}},t.next=8,e.runAction(n,f);case 8:return f={action:"astore.upload",data:{rstore:{name:"".concat(s),caslib:"".concat(u),replace:!0},store:r}},t.next=11,e.runAction(n,f);case 11:return t.sent,t.abrupt("return","Upload of ".concat(i.source," to ").concat(u,".").concat(s," completed"));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var s=function(t,e,n,r){return u.apply(this,arguments)},c=n(4);function f(){return(f=i()(a.a.mark((function t(e,n,r,i,o){var u,s,f,l,p,h;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=i.output,s=u.caslib,null!=(f=u.name)){t.next=3;break}throw"Please specify table as caslib.name";case 3:return l={casout:{caslib:s,name:f},importOptions:{fileType:i.fileType}},"sas"!==i.fileExt&&"ds2"!==i.fileExt||(l.importOptions.delimiter="\\"),p={headers:{"JSON-Parameters":l,"Content-Type":"binary/octet-stream"},data:r,action:"table.upload"},t.next=8,e.runAction(n,p);case 8:if(!0!==o){t.next=13;break}return h="\n\t\t\taction table.save r = result / \n\t\t\ttable = {caslib='".concat(s,"' name='").concat(f,"'} replace=true\n\t\t\tcaslib='").concat(s,"' name='").concat(f,"';\n\n\t\t\tsend_response(result);\n\t\t\t"),t.next=12,Object(c.a)(e,n,h,null);case 12:t.sent;case 13:return t.abrupt("return","Upload of ".concat(i.source," to ").concat((i.output,s),".").concat(i.output.name," completed"));case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var l=function(t,e,n,r,i){return f.apply(this,arguments)};function p(){return(p=i()(a.a.mark((function t(e,n,r,i){var o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={action:"table.save",data:{name:"".concat(i),caslib:"".concat(r),replace:!0,table:{name:"".concat(i),caslib:"".concat(r)}}},t.next=3,e.runAction(n,o);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var h=function(t,e,n,r){return p.apply(this,arguments)}},function(t,e,n){"use strict";var r=n(12),i=n(31),o=/[^\w\s\n\r\v\t\.,]/i;e.version=n(32).version;var a=function(t,e){return void 0!==t||e.renderUndefined},u=function(t,e,n){return"boolean"==typeof t||"number"==typeof t||"function"==typeof t||null==t||t instanceof Date||("string"==typeof t&&-1===t.indexOf("\n")||!(!n.inlineArrays||e||!Array.isArray(t)||!u(t[0],!0,n)))},s=function(t,e){if(e.noColor)return t;if("string"==typeof t)return e.stringColor?r[e.stringColor](t):t;var n=t+"";return!0===t?r.green(n):!1===t?r.red(n):null==t?r.grey(n):"number"==typeof t?t>=0?r[e.positiveNumberColor](n):r[e.negativeNumberColor](n):"function"==typeof t?"function() {}":Array.isArray(t)?t.join(", "):n},c=function(t,e){return null===t.multilineStringColor||t.noColor?e:r[t.multilineStringColor](e)},f=function(t,e,n){var r=t.split("\n");return(r=r.map((function(t){return i.indent(e)+c(n,t)}))).join("\n")},l=function(t,e,n){if("string"==typeof t&&t.match(o)&&e.escape&&(t=JSON.stringify(t)),!a(t,e))return[];if(u(t,!1,e))return[i.indent(n)+s(t,e)];if("string"==typeof t)return[i.indent(n)+c(e,'"""'),f(t,n+e.defaultIndentation,e),i.indent(n)+c(e,'"""')];if(Array.isArray(t)){if(0===t.length)return[i.indent(n)+e.emptyArrayMsg];var p=[];return t.forEach((function(t){if(a(t,e)){var o="- ";e.noColor||(o=r[e.dashColor](o)),o=i.indent(n)+o,u(t,!1,e)?(o+=l(t,e,0)[0],p.push(o)):(p.push(o),p.push.apply(p,l(t,e,n+e.defaultIndentation)))}})),p}if(t instanceof Error)return l({message:t.message,stack:t.stack.split("\n")},e,n);var h,d=e.noAlign?0:i.getMaxIndexLength(t),y=[];return Object.getOwnPropertyNames(t).forEach((function(o){if(a(t[o],e))if(h=o+": ",e.noColor||(h=r[e.keysColor](h)),h=i.indent(n)+h,u(t[o],!1,e)){var s=e.noAlign?0:d-o.length;h+=l(t[o],e,s)[0],y.push(h)}else y.push(h),y.push.apply(y,l(t[o],e,n+e.defaultIndentation))})),y};e.render=function(t,e,n){return n=n||0,(e=e||{}).emptyArrayMsg=e.emptyArrayMsg||"(empty array)",e.keysColor=e.keysColor||"green",e.dashColor=e.dashColor||"green",e.numberColor=e.numberColor||"blue",e.positiveNumberColor=e.positiveNumberColor||e.numberColor,e.negativeNumberColor=e.negativeNumberColor||e.numberColor,e.defaultIndentation=e.defaultIndentation||2,e.noColor=!!e.noColor,e.noAlign=!!e.noAlign,e.escape=!!e.escape,e.renderUndefined=!!e.renderUndefined,e.stringColor=e.stringColor||null,e.multilineStringColor=e.multilineStringColor||null,l(t,e,n).join("\n")},e.renderString=function(t,n,i){var o,a,u="";if("string"!=typeof t||""===t)return"";"{"!==t[0]&&"["!==t[0]&&(a=-1===t.indexOf("{")?t.indexOf("["):-1===t.indexOf("[")||t.indexOf("{")<t.indexOf("[")?t.indexOf("{"):t.indexOf("["),u+=t.substr(0,a)+"\n",t=t.substr(a));try{o=JSON.parse(t)}catch(t){return r.red("Error:")+" Not valid JSON!"}return u+=e.render(o,n,i)}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(33),i=n(34),o=n(35),a=n(37);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=u(p);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||f||u(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(17);t.exports=r},function(t,e){t.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},function(t,e,n){"use strict";(function(t){var r=n(10),i=n.n(r),o=n(7);e.a=function(e,n){var r,a=null,u=o.c,s=function(t){return t},c=e.split(".").pop().toLowerCase();switch(c){case"sas7bdat":r="basesas";break;case"sashdat":r="hdat";break;case"csv":r=c,a="UTF8";break;case"xslx":case"xsl":r=c;break;case"astore":case"sasast":r=c,u=o.b,s=function(e){return new t.from(e).toString("base64")};break;case"ds2":case"sas":r="csv",a="UTF8",u=o.c,s=function(t,e){var n=t.replace(/[^\x00-\x7F]/g,"").replace(/\r?\n/g,""),r=e.fileExt;return"modelName\\"+("sas"===r?"dataStepSrc":"ds2"===r?"ds2Src":"casl"===r?"caslSrc":"dataStepsrc")+"\n"+e.output.name+"\\ "+n+"\n"};break;default:throw"Currently file type of ".concat(c," is not supported")}var f=n.split("."),l=i()(f,2);return{source:e,output:{caslib:l[0],name:l[1].toLowerCase()},fileType:r,fileExt:c,fileOptions:a,transform:s,contentType:"binary/octet-stream",handler:u}}}).call(this,n(39).Buffer)},function(t,e,n){t.exports=n(44)},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=b(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function l(){}function p(){}function h(){}var d={};u(d,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(E([])));v&&v!==e&&n.call(v,i)&&(d=v);var _=h.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=h,u(_,"constructor",h),u(h,"constructor",p),p.displayName=u(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,a,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},m(g.prototype),u(g.prototype,o,(function(){return this})),t.AsyncIterator=g,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new g(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(_),u(_,a,"Generator"),u(_,i,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){var r={};t.exports=r,r.themes={};var i=n(18),o=r.styles=n(21),a=Object.defineProperties,u=new RegExp(/[\r\n]+/g);r.supportsColor=n(22).supportsColor,void 0===r.enabled&&(r.enabled=!1!==r.supportsColor()),r.enable=function(){r.enabled=!0},r.disable=function(){r.enabled=!1},r.stripColors=r.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};r.stylize=function(t,e){if(!r.enabled)return t+"";var n=o[e];return!n&&e in r?r[e](t):n.open+t+n.close};var s=/[|\\{}()[\]^$+*?.]/g;function c(t){var e=function t(){return h.apply(t,arguments)};return e._styles=t,e.__proto__=p,e}var f,l=(f={},o.grey=o.gray,Object.keys(o).forEach((function(t){o[t].closeRe=new RegExp(function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(s,"\\$&")}(o[t].close),"g"),f[t]={get:function(){return c(this._styles.concat(t))}}})),f),p=a((function(){}),l);function h(){var t=Array.prototype.slice.call(arguments),e=t.map((function(t){return null!=t&&t.constructor===String?t:i.inspect(t)})).join(" ");if(!r.enabled||!e)return e;for(var n=-1!=e.indexOf("\n"),a=this._styles,s=a.length;s--;){var c=o[a[s]];e=c.open+e.replace(c.closeRe,c.open)+c.close,n&&(e=e.replace(u,(function(t){return c.close+t+c.open})))}return e}r.setTheme=function(t){if("string"!=typeof t)for(var e in t)!function(e){r[e]=function(n){if("object"==typeof t[e]){var i=n;for(var o in t[e])i=r[t[e][o]](i);return i}return r[t[e]](n)}}(e);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var d=function(t,e){var n=e.split("");return(n=n.map(t)).join("")};for(var y in r.trap=n(25),r.zalgo=n(26),r.maps={},r.maps.america=n(27)(r),r.maps.zebra=n(28)(r),r.maps.rainbow=n(29)(r),r.maps.random=n(30)(r),r.maps)!function(t){r[t]=function(e){return d(r.maps[t],e)}}(y);a(r,function(){var t={};return Object.keys(l).forEach((function(e){t[e]={get:function(){return c([e])}}})),t}())},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(u(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),s=r[n];n<o;s=r[++n])y(s)||!b(s)?a+=" "+s:a+=" "+u(s);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function u(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,t,r.depth)}function s(t,e){var n=u.styles[e];return n?"["+u.colors[n][0]+"m"+t+"["+u.colors[n][1]+"m":t}function c(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return _(i)||(i=f(t,i,r)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(_(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),u=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(S(n)){var s=n.name?": "+n.name:"";return t.stylize("[Function"+s+"]","special")}if(g(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return l(n)}var c,b="",E=!1,O=["{","}"];(h(n)&&(E=!0,O=["[","]"]),S(n))&&(b=" [Function"+(n.name?": "+n.name:"")+"]");return g(n)&&(b=" "+RegExp.prototype.toString.call(n)),w(n)&&(b=" "+Date.prototype.toUTCString.call(n)),x(n)&&(b=" "+l(n)),0!==a.length||E&&0!=n.length?r<0?g(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=E?function(t,e,n,r,i){for(var o=[],a=0,u=e.length;a<u;++a)I(e,String(a))?o.push(p(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,n,r,i,!0))})),o}(t,n,r,u,a):a.map((function(e){return p(t,n,r,u,e,E)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,b,O)):O[0]+b+O[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),I(r,i)||(a="["+i+"]"),u||(t.seen.indexOf(s.value)<0?(u=y(n)?f(t,s.value,null):f(t,s.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),m(a)){if(o&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function h(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function v(t){return"number"==typeof t}function _(t){return"string"==typeof t}function m(t){return void 0===t}function g(t){return b(t)&&"[object RegExp]"===E(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===E(t)}function x(t){return b(t)&&("[object Error]"===E(t)||t instanceof Error)}function S(t){return"function"==typeof t}function E(t){return Object.prototype.toString.call(t)}function O(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=h,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=g,e.isObject=b,e.isDate=w,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(19);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),A[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=n(20),e._extend=function(t,e){if(!e||!b(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(j&&t[j]){var e;if("function"!=typeof(e=t[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),j&&Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=j,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(R,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(11))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){var n={};t.exports=n;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach((function(t){var e=r[t],i=n[t]=[];i.open="["+e[0]+"m",i.close="["+e[1]+"m"}))},function(t,e,n){"use strict";(function(e){var r=n(23),i=n(24),o=e.env,a=void 0;function u(t){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(function(t){if(!1===a)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(t&&!t.isTTY&&!0!==a)return 0;var n=a?1:0;if("win32"===e.platform){var u=r.release().split(".");return Number(e.versions.node.split(".")[0])>=8&&Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(t){return t in o}))||"codeship"===o.CI_NAME?1:n;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in o){var s=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,n)}(t))}i("no-color")||i("no-colors")||i("color=false")?a=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=!0),"FORCE_COLOR"in o&&(a=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),t.exports={supportsColor:u,stdout:u(e.stdout),stderr:u(e.stderr)}}).call(this,n(11))},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},function(t,e,n){"use strict";(function(e){t.exports=function(t,n){var r=(n=n||e.argv).indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",o=n.indexOf(i+t);return-1!==o&&(-1===r||o<r)}}).call(this,n(11))},function(t,e){t.exports=function(t,e){var n="";t=(t=t||"Run the trap, drop the bass").split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return t.forEach((function(t){t=t.toLowerCase();var e=r[t]||[" "],i=Math.floor(Math.random()*e.length);n+=void 0!==r[t]?r[t][i]:t})),n}},function(t,e){t.exports=function(t,e){t=t||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},r=[].concat(n.up,n.down,n.mid);function i(t){return Math.floor(Math.random()*t)}function o(t){var e=!1;return r.filter((function(n){e=n===t})),e}return function(t,e){var r,a,u="";for(a in(e=e||{}).up=void 0===e.up||e.up,e.mid=void 0===e.mid||e.mid,e.down=void 0===e.down||e.down,e.size=void 0!==e.size?e.size:"maxi",t=t.split(""))if(!o(a)){switch(u+=t[a],r={up:0,down:0,mid:0},e.size){case"mini":r.up=i(8),r.mid=i(2),r.down=i(8);break;case"maxi":r.up=i(16)+3,r.mid=i(4)+1,r.down=i(64)+3;break;default:r.up=i(8)+1,r.mid=i(6)/2,r.down=i(8)+1}var s=["up","mid","down"];for(var c in s)for(var f=s[c],l=0;l<=r[f];l++)e[f]&&(u+=n[f][i(n[f].length)])}return u}(t,e)}},function(t,e){t.exports=function(t){return function(e,n,r){if(" "===e)return e;switch(n%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}},function(t,e){t.exports=function(t){return function(e,n,r){return n%2==0?e:t.inverse(e)}}},function(t,e){t.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(n,r,i){return" "===n?n:t[e[r++%e.length]](n)}}},function(t,e){t.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,r,i){return" "===n?n:t[e[Math.round(Math.random()*(e.length-2))]](n)}}},function(t,e,n){"use strict";e.indent=function(t){return new Array(t+1).join(" ")},e.getMaxIndexLength=function(t){var e=0;return Object.getOwnPropertyNames(t).forEach((function(n){void 0!==t[n]&&(e=Math.max(e,n.length))})),e}},function(t){t.exports=JSON.parse('{"author":"Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)","name":"prettyjson","description":"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output","version":"1.2.5","homepage":"http://rafeca.com/prettyjson","keywords":["json","cli","formatting","colors"],"repository":{"type":"git","url":"https://github.com/rafeca/prettyjson.git"},"bugs":{"url":"https://github.com/rafeca/prettyjson/issues"},"main":"./lib/prettyjson","files":["bin/prettyjson","lib/*.js"],"license":"MIT","scripts":{"test":"npm run jshint && mocha --reporter spec","testwin":"node ./node_modules/mocha/bin/mocha --reporter spec","jshint":"jshint lib/*.js test/*.js","coverage":"istanbul cover _mocha --report lcovonly -- -R spec","coveralls":"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage","changelog":"git log $(git describe --tags --abbrev=0)..HEAD --pretty=\'* %s\' --first-parent"},"bin":{"prettyjson":"./bin/prettyjson"},"dependencies":{"colors":"1.4.0","minimist":"^1.2.0"},"devDependencies":{"coveralls":"^2.11.15","istanbul":"^0.4.5","jshint":"^2.9.4","mocha":"^3.1.2","mocha-lcov-reporter":"^1.2.0","should":"^11.1.1"}}')},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){u=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(36);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){},function(t,e,n){"use strict";
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("restaflib",[],e):"object"==typeof exports?exports.restaflib=e():t.restaflib=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=15)}([function(t,e,r){t.exports=r(16)},function(t,e){function r(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function u(t){r(a,i,o,u,s,"next",t)}function s(t){r(a,i,o,u,s,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";var n=r(1),i=r.n(n),o=r(0),a=r.n(o),u=r(5);function s(){return(s=i()(a.a.mark((function t(e,r,n,i){var o,s,c,f,l,p,h,d=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o=Object(u.a)(null!==i?i:{},"_args_"),s=(s=o+" "+n).replace(/\r?\n|\r/g,""),c={action:"sccasl.runcasl",data:{code:s}},f=d.length,l=new Array(f>4?f-4:0),p=4;p<f;p++)l[p-4]=d[p];return t.next=7,e.runAction.apply(e,[r,c].concat(l));case 7:return h=t.sent,t.abrupt("return",h);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.a=function(t,e,r,n){return s.apply(this,arguments)}},function(t,e,r){"use strict";var n=r(13),i=r.n(n);var o=function(){return"\n results = casFetchData(_args_.table.caslib, _args_.table.name , _args_.from, _args_.count, _args_.format); \n send_response({casResults = results}); \n \n function casFetchData(caslib, name, from, count, format) ; \n \n rc = checkAndLoadTable(caslib, name);\n \n if (rc ne true) then do;\n results = {Errors= 'Unable to access ' ||caslib||'.'||name}; \n return results; \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 to = min(from + count -1, rowCount); \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 action table.fetch r = result / \n table = {caslib=caslib, name=name} \n from= from to=to format=format \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 if (from ne 1) then do;\n pagePrev = max(pagePrev,1);\n end; \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, table=table}, prev={from=pagePrev, count=count, format=format, table=table}};\n\n /*return ({pagination = {table = {caslib=caslib, name=name}, prev=pagePrev, next=pageNext, count=count}, rc=0 , data = {schema=columns, rows=rows } } ); */\n\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 "};var a=function(){return"\n \n /*------------------------------------------------*/\n /*Does the tables exist and if not try to load it */\n /*\n Typical usage:\n rc = checkAndLoadTable(caslib, name);\n if ( rc ne true) then do;\n ...handle errors...\n end; \n else do;\n ...your stuff...\n end;\n rc = true - the data is ready for use\n rc = false - the table could not be found\n rc = -1 - the caslib does not exist\n */\n /*------------------------------------------------*/\n\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) then do; \n path = lookupPath(caslib, name);\n if (path eq '*') then do;\n rc = false;\n end;\n else do;\n\t action table.loadTable status=status/ \n\t caslib = caslib \n\t source = path \n\t casout={caslib= caslib name=name}; \n\t if (status.statusCode ne 0 ) then rc = false;\n end; \n end; \n return rc; \n end; \n\n/*\n * return path to table\n */\n\nfunction 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\t if (upcase(n) eq nameu) then do; \n\t count = count + 1; \n\t if ( cpath eq '*') then do; \n\t cpath = n; \n\t end; \n\t 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; \nend; \n\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); \n \n s = checkAndLoadTable(caslib, name); \n if ( s ne 0 ) then do; \n results = {Errors= 'Unable to access ' ||caslib||'.'||name}; \n return results; \n end; \n \n do k over idvars; \n r = _getValues(k, caslib, name); \n results[k] = r; \n end; \n \n return results; \n end; \n \n function _getValues(id, caslib, name) ; \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} \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 /*------------------------------------------*/ \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\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 "};e.a={commonCasl:a,casFetchData:o,scoreCasl:i.a}},function(t,e,r){"use strict";var n=r(1),i=r.n(n),o=r(0),a=r.n(o),u=r(2),s=r(3);function c(){return(c=i()(a.a.mark((function t(e,r,n,i,o){var c,f,l,p,h,d=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c=n,!0===o&&(c=n+" "+s.a.commonCasl()),f=d.length,l=new Array(f>5?f-5:0),p=5;p<f;p++)l[p-5]=d[p];return t.next=5,u.a.apply(void 0,[e,r,c,i].concat(l));case 5:return h=t.sent,t.abrupt("return",h.items().toJS());case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.a=function(t,e,r,n,i){return c.apply(this,arguments)}},function(t,e,r){"use strict";var n=r(7),i=r.n(n);function o(t){var e="{ ",r=" ";for(var n in t){if(!0===Array.isArray(t[n])){var u=a(t[n]);e=e+r+"".concat(n,"=")+u}else{var s=i()(t[n]);if("object"===s){var c=o(t[n]);e=e+r+"".concat(n,"=")+c}else e=e+r+"".concat(n,"=")+("string"===s?' "'.concat(t[n],'" '):"".concat(t[n]," "))}r=","}return e+="} "}function a(t){for(var e="{",r=" ",n=t.length,u=0;u<n;u++)if(!0===Array.isArray(t[u])){var s=a(t[u]);e=e+r+"".concat(u,"=")+s}else{var c=i()(t[u]);if("object"===c)e=e+r+o(t[u]);else e=e+r+("string"===c?' "'.concat(t[u],'" '):"".concat(t[u]," "));r=","}return e+="}"}e.a=function(t,e){var r;return r=null===t?"{}":!0===Array.isArray(t)?a(t):o(t),"".concat(e," = ").concat(r,";")}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"a",(function(){return h}));var n=r(1),i=r.n(n),o=r(0),a=r.n(o);function u(){return(u=i()(a.a.mark((function t(e,r,n,i){var o,u,s,c,f;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i.output,u=o.caslib,null!=(s=o.name)){t.next=3;break}throw"Please specify table as caslib.name";case 3:return s=s.toLowerCase(s),c="\n action table.droptable /\n caslib= '".concat(u,"' name= '").concat(s,"' quiet=true;\n\n action table.deleteSource/\n caslib= '").concat(u,"' source= '").concat(s,".sashdat' quiet=true; \n "),f={action:"sccasl.runcasl",data:{code:c}},t.next=8,e.runAction(r,f);case 8:return f={action:"astore.upload",data:{rstore:{name:"".concat(s),caslib:"".concat(u),replace:!0},store:n}},t.next=11,e.runAction(r,f);case 11:return t.sent,t.abrupt("return","Upload of ".concat(i.source," to ").concat(u,".").concat(s," completed"));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var s=function(t,e,r,n){return u.apply(this,arguments)},c=r(4);function f(){return(f=i()(a.a.mark((function t(e,r,n,i,o){var u,s,f,l,p,h;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=i.output,s=u.caslib,null!=(f=u.name)){t.next=3;break}throw"Please specify table as caslib.name";case 3:return l={casout:{caslib:s,name:f},importOptions:{fileType:i.fileType}},"sas"!==i.fileExt&&"ds2"!==i.fileExt||(l.importOptions.delimiter="\\"),p={headers:{"JSON-Parameters":l,"Content-Type":"binary/octet-stream"},data:n,action:"table.upload"},t.next=8,e.runAction(r,p);case 8:if(!0!==o){t.next=13;break}return h="\n\t\t\taction table.save r = result / \n\t\t\ttable = {caslib='".concat(s,"' name='").concat(f,"'} replace=true\n\t\t\tcaslib='").concat(s,"' name='").concat(f,"';\n\n\t\t\tsend_response(result);\n\t\t\t"),t.next=12,Object(c.a)(e,r,h,null);case 12:t.sent;case 13:return t.abrupt("return","Upload of ".concat(i.source," to ").concat((i.output,s),".").concat(i.output.name," completed"));case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var l=function(t,e,r,n,i){return f.apply(this,arguments)};function p(){return(p=i()(a.a.mark((function t(e,r,n,i){var o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={action:"table.save",data:{name:"".concat(i),caslib:"".concat(n),replace:!0,table:{name:"".concat(i),caslib:"".concat(n)}}},t.next=3,e.runAction(r,o);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var h=function(t,e,r,n){return p.apply(this,arguments)}},function(t,e,r){"use strict";var n=r(12),i=r(31),o=/[^\w\s\n\r\v\t\.,]/i;e.version=r(32).version;var a=function(t,e){return void 0!==t||e.renderUndefined},u=function(t,e,r){return"boolean"==typeof t||"number"==typeof t||"function"==typeof t||null==t||t instanceof Date||("string"==typeof t&&-1===t.indexOf("\n")||!(!r.inlineArrays||e||!Array.isArray(t)||!u(t[0],!0,r)))},s=function(t,e){if(e.noColor)return t;if("string"==typeof t)return e.stringColor?n[e.stringColor](t):t;var r=t+"";return!0===t?n.green(r):!1===t?n.red(r):null==t?n.grey(r):"number"==typeof t?t>=0?n[e.positiveNumberColor](r):n[e.negativeNumberColor](r):"function"==typeof t?"function() {}":Array.isArray(t)?t.join(", "):r},c=function(t,e){return null===t.multilineStringColor||t.noColor?e:n[t.multilineStringColor](e)},f=function(t,e,r){var n=t.split("\n");return(n=n.map((function(t){return i.indent(e)+c(r,t)}))).join("\n")},l=function(t,e,r){if("string"==typeof t&&t.match(o)&&e.escape&&(t=JSON.stringify(t)),!a(t,e))return[];if(u(t,!1,e))return[i.indent(r)+s(t,e)];if("string"==typeof t)return[i.indent(r)+c(e,'"""'),f(t,r+e.defaultIndentation,e),i.indent(r)+c(e,'"""')];if(Array.isArray(t)){if(0===t.length)return[i.indent(r)+e.emptyArrayMsg];var p=[];return t.forEach((function(t){if(a(t,e)){var o="- ";e.noColor||(o=n[e.dashColor](o)),o=i.indent(r)+o,u(t,!1,e)?(o+=l(t,e,0)[0],p.push(o)):(p.push(o),p.push.apply(p,l(t,e,r+e.defaultIndentation)))}})),p}if(t instanceof Error)return l({message:t.message,stack:t.stack.split("\n")},e,r);var h,d=e.noAlign?0:i.getMaxIndexLength(t),y=[];return Object.getOwnPropertyNames(t).forEach((function(o){if(a(t[o],e))if(h=o+": ",e.noColor||(h=n[e.keysColor](h)),h=i.indent(r)+h,u(t[o],!1,e)){var s=e.noAlign?0:d-o.length;h+=l(t[o],e,s)[0],y.push(h)}else y.push(h),y.push.apply(y,l(t[o],e,r+e.defaultIndentation))})),y};e.render=function(t,e,r){return r=r||0,(e=e||{}).emptyArrayMsg=e.emptyArrayMsg||"(empty array)",e.keysColor=e.keysColor||"green",e.dashColor=e.dashColor||"green",e.numberColor=e.numberColor||"blue",e.positiveNumberColor=e.positiveNumberColor||e.numberColor,e.negativeNumberColor=e.negativeNumberColor||e.numberColor,e.defaultIndentation=e.defaultIndentation||2,e.noColor=!!e.noColor,e.noAlign=!!e.noAlign,e.escape=!!e.escape,e.renderUndefined=!!e.renderUndefined,e.stringColor=e.stringColor||null,e.multilineStringColor=e.multilineStringColor||null,l(t,e,r).join("\n")},e.renderString=function(t,r,i){var o,a,u="";if("string"!=typeof t||""===t)return"";"{"!==t[0]&&"["!==t[0]&&(a=-1===t.indexOf("{")?t.indexOf("["):-1===t.indexOf("[")||t.indexOf("{")<t.indexOf("[")?t.indexOf("{"):t.indexOf("["),u+=t.substr(0,a)+"\n",t=t.substr(a));try{o=JSON.parse(t)}catch(t){return n.red("Error:")+" Not valid JSON!"}return u+=e.render(o,r,i)}},function(t,e,r){var n=r(33),i=r(34),o=r(35),a=r(37);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=u(p);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||u(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){var n=r(17);t.exports=n},function(t,e){t.exports=function(){return"\n result = runMain(_args_); \n send_response(result); \n /* print result; */\n \n \n function runMain(_args_) ; \n r = {Error= 'No path'}; \n if ( _args_.path eq '/selectors') then do; \n r = selectionLists(_args_.selectors, _args_.table.caslib, _args_.table.name); \n end; \n else if ( _args_.path eq '/contents') then do; \n r = contents(_args_.table.caslib, _args_.table.name); \n end; \n else if (_args_.path eq '/describe') then do; \n r = describeModel(_args_); \n end; \n else if (_args_.path eq '/scenario' ) then do;\n r = fetchData(_args_.filter, _args_.table);\n end;\n else if (_args_.path eq '/score') then do; \n if( exists(_args_, 'modelName') eq false ) then\n modelname = '';\n else modelName =_args_.modelName;\n r = runScoreCode(_args_.model, _args_.scenario, modelName); \n end; \n else do; \n r = {icasResults={Errors = 'Invalid action option specified' || _args_.path}, statusCode=404}; \n end; \n print r;\n if ( r.statusCode ne 0) then do;\n print r.icasResults;\n exit({severity=2,reason=6, status=r.iCasResults.Errors,statusCode=r.statusCode});\n end;\n result = {casResults = r.icasResults}; \n print '***************************************************************'; \n print result; \n print '***************************************************************'; \n return result; \n end; \n \n /*-----------------------------------------*/ \n /* describeModel */ \n /*-----------------------------------------*/ \n \n function describeModel(_args_) ; \n s = checkAndLoadTable(_args_.model.caslib, _args_.model.name); \n if ( s ne true) then do; \n results = {Errors= 'Unable to access ' ||_args_.model.caslib||'.'||_args_.model.name}; \n return {icasResults=results, statusCode=404}; \n end; \n \n mtype = isModel(_args_.model.caslib, _args_.model.name); \n if ( mtype EQ 'astore' ) then do; \n r = astoreDescribe(_args_.model); \n end; \n else if (mtype EQ 'ds' or mtype EQ 'ds2') then do;\n s = checkAndLoadTable(_args_.table.caslib, _args_.table.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||_args_.table.caslib||'.'||_args_.table.name}; \n return {icasResults=results, statusCode=404}; \n end; \n r = contents( _args_.table.caslib, _args_.table.name); \n end; \n return {icasResults= r, statusCode=0} ;\n end; \n \n /*------------------------------------------*/ \n /* astoreDescribe */ \n /*------------------------------------------*/ \n \n function astoreDescribe(model); \n action astore.describe r=result/ \n rstore = { caslib= model.caslib name = model.name }; \n rows = resultsToDict(result.InputVariables); \n return {describe = rows, table = result.InputVariables}; \n end; \n \n /*------------------------------------------*/ \n /* score */ \n /*------------------------------------------*/ \n function runScoreCode( model, scenario, modelName); \n print model; \n s = checkAndLoadTable(model.caslib, model.name); \n if ( s ne true ) then do; \n results = {Errors= 'Unable to access ' ||model.caslib||'.'||model.name}; \n return {icasResults=results, statusCode=404}; \n end;\n \n mtype = isModel(model.caslib, model.name); \n \n if ( mtype eq 'bad' ) then do; \n results = {Error= model.caslib||'.'||model.name || ' is not recognized as a valid supported model. Please check your values'};\n return {icasResults=results, statusCode=400};\n end; \n destroyTable('casuser', 'input'); \n argsToTable(scenario, 'casuser', 'input'); \n \n destroyTable('casuser', 'output'); \n \n if (mtype eq 'astore') then do; \n print 'Scoring with astore'; \n action astore.score r = result/ \n rstore = {caslib=model.caslib name=model.name} \n out = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds') then do; \n print 'scoring with datastep code'; \n action datastep.runcodetable r = result/ \n single='YES' \n codeTable= {caslib=model.caslib name=model.name} \n casout = {caslib='casuser' name='output'} \n table = {caslib='casuser' name='input'}; \n end; \n else if (mtype eq 'ds2' ) then do; \n print 'Scoring with d2'; \n if ( missing(modelName) eq true) then do;\n results = {Error= 'modelName is missing. Please check your values'};\n return {icasResults=results, statusCode=400};\n end;\n\n action ds2.runModel r = result/ \n modelTable = {caslib=model.caslib, name=model.name} \n modelName = modelName \n table = {caslib= 'casuser', name='input'} \n casOut = {caslib= 'casuser' name='output'}; \n end; \n \n \n action table.fetch r = result / \n table={caslib='casuser' name='output'}; \n \n rows = resultsToDict(result.Fetch); \n \n return {icasResults= rows, statusCode=0} ;\n end; \n \n \n "}},function(t,e,r){"use strict";(function(t){var n=r(10),i=r.n(n),o=r(8);e.a=function(e,r){var n,a=null,u=o.c,s=function(t){return t},c=e.split(".").pop().toLowerCase();switch(c){case"sas7bdat":n="basesas";break;case"sashdat":n="hdat";break;case"csv":n=c,a="UTF8";break;case"xslx":case"xsl":n=c;break;case"astore":case"sasast":n=c,u=o.b,s=function(e){return new t.from(e).toString("base64")};break;case"ds2":case"sas":n="csv",a="UTF8",u=o.c,s=function(t,e){var r=t.replace(/[^\x00-\x7F]/g,"").replace(/\r?\n/g,""),n=e.fileExt;return"modelName\\"+("sas"===n?"dataStepSrc":"ds2"===n?"ds2Src":"casl"===n?"caslSrc":"dataStepsrc")+"\n"+e.output.name+"\\ "+r+"\n"};break;default:throw"Currently file type of ".concat(c," is not supported")}var f=r.split("."),l=i()(f,2);return{source:e,output:{caslib:l[0],name:l[1].toLowerCase()},fileType:n,fileExt:c,fileOptions:a,transform:s,contentType:"binary/octet-stream",handler:u}}}).call(this,r(39).Buffer)},function(t,e,r){t.exports=r(44)},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=b(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function l(){}function p(){}function h(){}var d={};u(d,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(E([])));v&&v!==e&&r.call(v,i)&&(d=v);var _=h.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(i,o){function a(){return new e((function(n,a){!function n(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(i,o,n,a)}))}return n=n?n.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=h,u(_,"constructor",h),u(h,"constructor",p),p.displayName=u(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,a,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},m(g.prototype),u(g.prototype,o,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new g(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(_),u(_,a,"Generator"),u(_,i,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n={};t.exports=n,n.themes={};var i=r(18),o=n.styles=r(21),a=Object.defineProperties,u=new RegExp(/[\r\n]+/g);n.supportsColor=r(22).supportsColor,void 0===n.enabled&&(n.enabled=!1!==n.supportsColor()),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};n.stylize=function(t,e){if(!n.enabled)return t+"";var r=o[e];return!r&&e in n?n[e](t):r.open+t+r.close};var s=/[|\\{}()[\]^$+*?.]/g;function c(t){var e=function t(){return h.apply(t,arguments)};return e._styles=t,e.__proto__=p,e}var f,l=(f={},o.grey=o.gray,Object.keys(o).forEach((function(t){o[t].closeRe=new RegExp(function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(s,"\\$&")}(o[t].close),"g"),f[t]={get:function(){return c(this._styles.concat(t))}}})),f),p=a((function(){}),l);function h(){var t=Array.prototype.slice.call(arguments),e=t.map((function(t){return null!=t&&t.constructor===String?t:i.inspect(t)})).join(" ");if(!n.enabled||!e)return e;for(var r=-1!=e.indexOf("\n"),a=this._styles,s=a.length;s--;){var c=o[a[s]];e=c.open+e.replace(c.closeRe,c.open)+c.close,r&&(e=e.replace(u,(function(t){return c.close+t+c.open})))}return e}n.setTheme=function(t){if("string"!=typeof t)for(var e in t)!function(e){n[e]=function(r){if("object"==typeof t[e]){var i=r;for(var o in t[e])i=n[t[e][o]](i);return i}return n[t[e]](r)}}(e);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var d=function(t,e){var r=e.split("");return(r=r.map(t)).join("")};for(var y in n.trap=r(25),n.zalgo=r(26),n.maps={},n.maps.america=r(27)(n),n.maps.zebra=r(28)(n),n.maps.rainbow=r(29)(n),n.maps.random=r(30)(n),n.maps)!function(t){n[t]=function(e){return d(n.maps[t],e)}}(y);a(n,function(){var t={};return Object.keys(l).forEach((function(e){t[e]={get:function(){return c([e])}}})),t}())},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])y(s)||!b(s)?a+=" "+s:a+=" "+u(s);return a},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,a={};function u(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),f(n,t,n.depth)}function s(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function c(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return _(i)||(i=f(t,i,n)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),u=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(S(r)){var s=r.name?": "+r.name:"";return t.stylize("[Function"+s+"]","special")}if(g(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return l(r)}var c,b="",E=!1,O=["{","}"];(h(r)&&(E=!0,O=["[","]"]),S(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return g(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),x(r)&&(b=" "+l(r)),0!==a.length||E&&0!=r.length?n<0?g(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=E?function(t,e,r,n,i){for(var o=[],a=0,u=e.length;a<u;++a)I(e,String(a))?o.push(p(t,e,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))})),o}(t,r,n,u,a):a.map((function(e){return p(t,r,n,u,e,E)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,O)):O[0]+b+O[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,o){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),I(n,i)||(a="["+i+"]"),u||(t.seen.indexOf(s.value)<0?(u=y(r)?f(t,s.value,null):f(t,s.value,r-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),m(a)){if(o&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function h(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function v(t){return"number"==typeof t}function _(t){return"string"==typeof t}function m(t){return void 0===t}function g(t){return b(t)&&"[object RegExp]"===E(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===E(t)}function x(t){return b(t)&&("[object Error]"===E(t)||t instanceof Error)}function S(t){return"function"==typeof t}function E(t){return Object.prototype.toString.call(t)}function O(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(m(o)&&(o=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else a[r]=function(){};return a[r]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=h,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=g,e.isObject=b,e.isDate=w,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(19);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[O(t.getHours()),O(t.getMinutes()),O(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=r(20),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(j&&t[j]){var e;if("function"!=typeof(e=t[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),j&&Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=j,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(R,e,a)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(11))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){var r={};t.exports=r;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(t){var e=n[t],i=r[t]=[];i.open="["+e[0]+"m",i.close="["+e[1]+"m"}))},function(t,e,r){"use strict";(function(e){var n=r(23),i=r(24),o=e.env,a=void 0;function u(t){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(function(t){if(!1===a)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(t&&!t.isTTY&&!0!==a)return 0;var r=a?1:0;if("win32"===e.platform){var u=n.release().split(".");return Number(e.versions.node.split(".")[0])>=8&&Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(t){return t in o}))||"codeship"===o.CI_NAME?1:r;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in o){var s=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,r)}(t))}i("no-color")||i("no-colors")||i("color=false")?a=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=!0),"FORCE_COLOR"in o&&(a=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),t.exports={supportsColor:u,stdout:u(e.stdout),stderr:u(e.stderr)}}).call(this,r(11))},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},function(t,e,r){"use strict";(function(e){t.exports=function(t,r){var n=(r=r||e.argv).indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",o=r.indexOf(i+t);return-1!==o&&(-1===n||o<n)}}).call(this,r(11))},function(t,e){t.exports=function(t,e){var r="";t=(t=t||"Run the trap, drop the bass").split("");var n={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return t.forEach((function(t){t=t.toLowerCase();var e=n[t]||[" "],i=Math.floor(Math.random()*e.length);r+=void 0!==n[t]?n[t][i]:t})),r}},function(t,e){t.exports=function(t,e){t=t||" he is here ";var r={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},n=[].concat(r.up,r.down,r.mid);function i(t){return Math.floor(Math.random()*t)}function o(t){var e=!1;return n.filter((function(r){e=r===t})),e}return function(t,e){var n,a,u="";for(a in(e=e||{}).up=void 0===e.up||e.up,e.mid=void 0===e.mid||e.mid,e.down=void 0===e.down||e.down,e.size=void 0!==e.size?e.size:"maxi",t=t.split(""))if(!o(a)){switch(u+=t[a],n={up:0,down:0,mid:0},e.size){case"mini":n.up=i(8),n.mid=i(2),n.down=i(8);break;case"maxi":n.up=i(16)+3,n.mid=i(4)+1,n.down=i(64)+3;break;default:n.up=i(8)+1,n.mid=i(6)/2,n.down=i(8)+1}var s=["up","mid","down"];for(var c in s)for(var f=s[c],l=0;l<=n[f];l++)e[f]&&(u+=r[f][i(r[f].length)])}return u}(t,e)}},function(t,e){t.exports=function(t){return function(e,r,n){if(" "===e)return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}},function(t,e){t.exports=function(t){return function(e,r,n){return r%2==0?e:t.inverse(e)}}},function(t,e){t.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return" "===r?r:t[e[n++%e.length]](r)}}},function(t,e){t.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return" "===r?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}},function(t,e,r){"use strict";e.indent=function(t){return new Array(t+1).join(" ")},e.getMaxIndexLength=function(t){var e=0;return Object.getOwnPropertyNames(t).forEach((function(r){void 0!==t[r]&&(e=Math.max(e,r.length))})),e}},function(t){t.exports=JSON.parse('{"author":"Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)","name":"prettyjson","description":"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output","version":"1.2.5","homepage":"http://rafeca.com/prettyjson","keywords":["json","cli","formatting","colors"],"repository":{"type":"git","url":"https://github.com/rafeca/prettyjson.git"},"bugs":{"url":"https://github.com/rafeca/prettyjson/issues"},"main":"./lib/prettyjson","files":["bin/prettyjson","lib/*.js"],"license":"MIT","scripts":{"test":"npm run jshint && mocha --reporter spec","testwin":"node ./node_modules/mocha/bin/mocha --reporter spec","jshint":"jshint lib/*.js test/*.js","coverage":"istanbul cover _mocha --report lcovonly -- -R spec","coveralls":"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage","changelog":"git log $(git describe --tags --abbrev=0)..HEAD --pretty=\'* %s\' --first-parent"},"bin":{"prettyjson":"./bin/prettyjson"},"dependencies":{"colors":"1.4.0","minimist":"^1.2.0"},"devDependencies":{"coveralls":"^2.11.15","istanbul":"^0.4.5","jshint":"^2.9.4","mocha":"^3.1.2","mocha-lcov-reporter":"^1.2.0","should":"^11.1.1"}}')},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){u=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(36);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){},function(t,e,r){"use strict";
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/var r=n(40),i=n(41),o=n(42);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=u(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(s.isBuffer(e)){var n=0|h(e.length);return 0===(t=u(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?u(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=u(t,e<0?0:0|h(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(t).length;default:if(r)return B(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,u=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function g(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function b(t,e,n,r){return Y(B(e,t.length-n),t,n,r)}function w(t,e,n,r){return Y(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return w(t,e,n,r)}function S(t,e,n,r){return Y(N(e),t,n,r)}function E(t,e,n,r){return Y(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function O(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,u,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==Object({}).TYPED_ARRAY_SUPPORT?Object({}).TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return c(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(t,e)}(null,t,e,n)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function j(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=U(t[o]);return i}function R(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function C(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function z(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function P(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},s.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:B(new s(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function N(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],u=r[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,u)),f=0,l=u>0?a-4:a;for(n=0;n<l;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],s[f++]=e>>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===u&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===u&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,u=n-i;a<u;a+=16383)o.push(f(t,a,a+16383>u?u:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var i,o,a=[],u=e;u<n;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
7
|
+
*/var n=r(40),i=r(41),o=r(42);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=u(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(s.isBuffer(e)){var r=0|h(e.length);return 0===(t=u(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?u(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=u(t,e<0?0:0|h(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=e.length<0?0:0|h(e.length);t=u(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(n)return B(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+s>u&&(r=u-s),o=r;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[r+a]=u}return a}function b(t,e,r,n){return Y(B(e,t.length-r),t,r,n)}function w(t,e,r,n){return Y(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function x(t,e,r,n){return w(t,e,r,n)}function S(t,e,r,n){return Y(N(e),t,r,n)}function E(t,e,r,n){return Y(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,u,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==Object({}).TYPED_ARRAY_SUPPORT?Object({}).TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return c(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?u(t,e):void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}(null,t,e,r)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function j(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function z(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return o||D(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,o){return o||D(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var o=r-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=s.isBuffer(t)?t:B(new s(t,n).toString()),u=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%u]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),a=n[0],u=n[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),f=0,l=u>0?a-4:a;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],s[f++]=e>>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===u&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,s[f++]=255&e);1===u&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,u=r-i;a<u;a+=16383)o.push(f(t,a,a+16383>u?u:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)n[u]=a[u],i[a.charCodeAt(u)]=u;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,a=[],u=e;u<r;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
8
8
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
-
e.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,f=-7,l=n?i-1:0,p=n?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=p,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,u,s,c=8*o-i-1,f=(1<<c)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?p/s:p*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,i),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&u,h+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[n+h]=255&a,h+=d,a/=256,c-=8);t[n+h-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,n){"use strict";n.r(e),n.d(e,"caslRun",(function(){return r.a})),n.d(e,"caslRunBase",(function(){return i.a})),n.d(e,"casSetup",(function(){return w})),n.d(e,"casActionRun",(function(){return S})),n.d(e,"casTableToJson",(function(){return I})),n.d(e,"casFetchData",(function(){return O})),n.d(e,"casUpdateData",(function(){return k})),n.d(e,"computeRun",(function(){return M})),n.d(e,"computeSetup",(function(){return L})),n.d(e,"computeSummary",(function(){return R})),n.d(e,"computeFetchData",(function(){return B})),n.d(e,"computeFileContent",(function(){return Y})),n.d(e,"findReport",(function(){return J})),n.d(e,"getReportImage",(function(){return G})),n.d(e,"getReportUri",(function(){return W})),n.d(e,"getSasTableRows",(function(){return Q})),n.d(e,"jesSetup",(function(){return X})),n.d(e,"jesRun",(function(){return at})),n.d(e,"jesSummary",(function(){return tt})),n.d(e,"jsonToDict",(function(){return ut.a})),n.d(e,"computeResults",(function(){return q})),n.d(e,"print",(function(){return Li})),n.d(e,"caslScore",(function(){return y})),n.d(e,"caslDescribe",(function(){return g})),n.d(e,"masSetup",(function(){return ht})),n.d(e,"masAddModel",(function(){return ct})),n.d(e,"masDescribe",(function(){return dt})),n.d(e,"masRun",(function(){return vt})),n.d(e,"masScore",(function(){return mt})),n.d(e,"casUpload",(function(){return Fi})),n.d(e,"uploadData",(function(){return Gi})),n.d(e,"lib",(function(){return Vi}));var r=n(4),i=n(2),o=n(9),a=n.n(o),u=n(1),s=n.n(u),c=n(0),f=n.n(c),l=n(3);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(){return(d=s()(f.a.mark((function t(e,n,r){var o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.scoreCasl(),a=h({path:"/score"},r),t.next=4,Object(i.a)(e,n,o,a);case 4:return u=t.sent,s=u.items("results","casResults").toJS()[0],t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var y=function(t,e,n){return d.apply(this,arguments)};function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(){return(m=s()(f.a.mark((function t(e,n,r){var o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.scoreCasl(),a=_({path:"/describe"},r),t.next=4,Object(i.a)(e,n,o,a);case 4:return u=t.sent,s=u.items("results").toJS(),t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var g=function(t,e,n){return m.apply(this,arguments)};function b(){return(b=s()(f.a.mark((function t(e,n){var r,i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n){t.next=3;break}return t.next=3,e.logon(n);case 3:return t.next=5,e.addServices("casManagement");case 5:return r=t.sent,i=r.casManagement,t.next=9,e.apiCall(i.links("servers"));case 9:if(0!==(o=t.sent).itemsList().size){t.next=12;break}throw{Error:"No cas servers were found"};case 12:return a=o.itemsList(0),t.next=15,e.apiCall(o.itemsCmd(a,"createSession"));case 15:return u=t.sent,t.abrupt("return",{servers:o,session:u});case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var w=function(t,e){return b.apply(this,arguments)};function x(){return(x=s()(f.a.mark((function t(e){var n,r,i,o,a=arguments;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=a[i];return t.next=3,e.runAction.apply(e,r);case 3:return o=t.sent,t.abrupt("return",o.items().toJS());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var S=function(t){return x.apply(this,arguments)};function E(){return(E=s()(f.a.mark((function t(e,n,r){var o,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.casFetchData(),t.next=3,Object(i.a)(e,n,o,r);case 3:return a=t.sent,t.abrupt("return",a.items("results","casResults").toJS());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var O=function(t,e,n){return E.apply(this,arguments)};function A(){return(A=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.data,o=r.where,a=r.table,u="",o.length>0&&(s=" ",o.map((function(t){var e="string"==typeof t.dataValue?"'".concat(t.dataValue.toString(),"'"):t.dataValue;u=u+s+t.value+"= ".concat(e," "),s=" AND "}))),c=[],i.map((function(t,e){var n;"_Index_"!==t.name&&(n=null==t.value?".":"string"==typeof t.value?JSON.stringify(t.value):t.value.toString(),console.log(n),c.push({var:t.name,value:n}))})),l={table:{caslib:caslib,name:a,where:"".concat(u)},set:c},console.log(l),p={action:"table.update",data:l},t.next=10,e.runAction(n,p);case 10:return h=t.sent,t.abrupt("return",h);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var k=function(t,e,n){return A.apply(this,arguments)};var I=function(t,e){var n=t.items("tables",e),r=n.get("rows"),i=[];n.get("schema").map((function(t){i.push(t.get("name"))}));var o=[];return r.map((function(t){var e={};t.map((function(t,n){e[i[n]]=t})),o.push(e)})),o};function j(){return(j=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i={session:n,log:null,listing:null,ods:null,job:r,tables:{},files:{}}).log=r.links("log"),i.listing=r.links("listing"),null===(o=r.links("results"))){t.next=10;break}return t.next=7,e.apiCall(o);case 7:if(a=t.sent,(u=a.itemsList().size)>0)for(s=0;s<u;s++)c=a.itemsList(s),"ods"===(l=a.items(c,"data","type").toLowerCase())?i.ods=a.itemsCmd(c,"self"):"table"===l?(p={self:a.itemsCmd(c,"self"),current:null},i.tables[c]=p):"file"===l?(h={self:c,current:null,data:null},i.files[c]=h):(d={self:c,current:null,data:null},i[l]=d);case 10:return t.abrupt("return",i);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var R=function(t,e,n){return j.apply(this,arguments)};function C(){return(C=s()(f.a.mark((function t(e,n,r,i,o){var a,u,s,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="wait",u=null!=o?o:5,"wait"!==i&&null!==i&&(a=Math.max(Math.floor(i/u),1)),s={data:{code:r}},t.next=6,e.apiCall(n.links("execute"),s);case 6:return c=t.sent,t.next=9,e.jobState(c,null,a,u);case 9:if("running"!==(l=t.sent).data){t.next=14;break}throw"ERROR: Job did not complete in allotted time";case 14:return t.next=16,R(e,n,l.job);case 16:return(p=t.sent).SASJobStatus=l.data,t.abrupt("return",p);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var T=function(t,e,n,r,i){return C.apply(this,arguments)};function z(){return(z=s()(f.a.mark((function t(e,n,r,i,o,a){var u,s,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=[],null!=i)for(s in i)c="%let ".concat(s," = ").concat(i[s],";"),u.push(c);return l=r.split(/\r?\n/),u=u.concat(l),t.next=6,T(e,n,u,o,a);case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var M=function(t,e,n,r,i,o){return z.apply(this,arguments)};function D(){return(D=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=4;break}return t.next=3,e.logon(r);case 3:t.sent;case 4:return t.next=6,e.addServices("compute");case 6:return i=t.sent,o=i.compute,t.next=10,e.apiCall(o.links("contexts"));case 10:if(a=t.sent,null==n&&(n="Job Execution compute"),n=n.toLowerCase(),-1!==(u=a.itemsList().findIndex((function(t){return t.toLowerCase().indexOf(n)>=0})))){t.next=17;break}throw{Error:"Compute Context not found: "+n};case 17:return s=a.itemsCmd(a.itemsList(u),"createSession"),t.next=20,e.apiCall(s);case 20:return c=t.sent,t.abrupt("return",c);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var L=function(t,e,n){return D.apply(this,arguments)};function P(){return(P=s()(f.a.mark((function t(e,n,r){var i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("log"!==r&&"listing"!==r){t.next=20;break}if(i=[],null===n[r]){t.next=16;break}return t.next=5,e.apiCall(n[r]);case 5:o=t.sent,i=i.concat(o.items().toJS());case 7:if(null===(a=o.scrollCmds("next"))){t.next=14;break}return t.next=10,e.apiCall(a);case 10:o=t.sent,i=i.concat(o.items().toJS()),t.next=7;break;case 14:t.next=17;break;case 16:i[0]="Note: No ".concat(r);case 17:return t.abrupt("return",i);case 20:if("ods"!==r){t.next=31;break}if(null===n.ods){t.next=28;break}return t.next=24,e.apiCall(n.ods);case 24:return u=t.sent,t.abrupt("return",u.items());case 28:return t.abrupt("return","<h2> No ODS output </h2>");case 29:t.next=40;break;case 31:if("tables"!==r){t.next=35;break}return t.abrupt("return",Object.keys(n.tables));case 35:if("files"!==r){t.next=39;break}return t.abrupt("return",Object.keys(n.files));case 39:throw"Error: Invalid type ".concat(r);case 40:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var q=function(t,e,n){return P.apply(this,arguments)};function U(){return(U=s()(f.a.mark((function t(e,n,r,i,o){var a,u,s,c,l,p,h,d,y,v;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,s=null!=o?{qs:o}:null,!0!==n.tables.hasOwnProperty(r)){t.next=29;break}if(null!==(u=n.tables[r]).current&&null!=i){t.next=17;break}return t.next=8,e.apiCall(u.self);case 8:return c=t.sent,t.next=11,e.apiCall(c.links("rowSet"),s);case 11:l=t.sent,u.current=l,p=l.items().toJS(),a={columns:p.columns,rows:p.rows,scrollOptions:l.scrollCmds().keySeq().toJS()},t.next=29;break;case 17:if(h=u.current,d=i,"next"===i&&null===h.scrollCmds("next")&&(d=null!==h.links("last")?"last":null),"prev"===i&&null===h.scrollCmds("prev")&&(d=null!==h.links("first")?"first":null),null===d||null===h.scrollCmds(d)){t.next=29;break}return t.next=25,e.apiCall(h.scrollCmds(d),s);case 25:y=t.sent,u.current=y,v=y.items().toJS(),a={columns:v.columns,rows:v.rows,scrollOptions:y.scrollCmds().keySeq().toJS()};case 29:return t.abrupt("return",a);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B=function(t,e,n,r,i){return U.apply(this,arguments)};function N(){return(N=s()(f.a.mark((function t(e,n,r,i){var o,a,u,s,c,l;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(o=n.files[r])){t.next=3;break}throw"Invalid fileref ".concat(r);case 3:if(null!==o.current){t.next=12;break}return a={qs:{filter:"eq(name,'".concat(r,"')")}},t.next=7,e.apiCall(n.session.links("files"),a);case 7:return u=t.sent,t.next=10,e.apiCall(u.itemsCmd(r,"self"));case 10:u=t.sent,o.current=u;case 12:if(!0!==i){t.next=17;break}return s="".concat(n.session.host).concat(o.current.links("content","link","uri")),t.abrupt("return",s);case 17:if(null!==o.data){t.next=26;break}return t.next=20,e.apiCall(o.current.links("content"));case 20:return c=t.sent,l=c.items(),o.data=l,t.abrupt("return",l);case 26:return t.abrupt("return",o.data);case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=function(t,e,n,r){return N.apply(this,arguments)};function F(){return(F=s()(f.a.mark((function t(e,n){var r,i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.getService("reports"),i=null,null!==n&&(i={qs:{filter:"eq(name,'".concat(n,"')")}}),t.next=5,e.apiCall(r.links("reports"),i);case 5:return o=t.sent,t.abrupt("return",0===o.itemsList().size?null:o);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var J=function(t,e){return F.apply(this,arguments)};function K(){return(K=s()(f.a.mark((function t(e,n){var r,i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.rafObject("reportImages"),t.next=3,J(e,n);case 3:if(null!==(i=t.sent)){t.next=6;break}return t.abrupt("return","".concat(n," was not found"));case 6:return o=i.itemsCmd(i.itemsList(0),"self","link","uri"),a={data:{reportUri:o,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},t.next=11,e.apiCall(r.links("createJob"),a);case 11:return u=t.sent,t.next=14,e.jobState(u,{qs:{wait:1.5}},10,2);case 14:if("completed"===(s=t.sent).data){t.next=17;break}return t.abrupt("return","Job failed ".concat(s.data));case 17:return t.next=19,e.apiCall(s.job.itemsCmd(s.job.itemsList(0),"image"));case 19:return c=t.sent,t.abrupt("return",c.items());case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var G=function(t,e){return K.apply(this,arguments)};function V(){return(V=s()(f.a.mark((function t(e,n){var r,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,J(e,n);case 2:if(null!==(r=t.sent)){t.next=6;break}throw null==n?"No reports were found":"".concat(n," was not found");case 6:return i=[],r.items().map((function(t,e){var n={name:e,uri:r.itemsCmd(e,"self","link","uri")};i.push(n)})),t.abrupt("return",i);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var W=function(t,e){return V.apply(this,arguments)};function H(){return(H=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.tables[r],t.next=3,e.apiCall(i);case 3:return o=t.sent,t.next=6,e.apiCall(o.links("rowSet"));case 6:for(a=t.sent,u=a.items("columns"),s=a.items("rows"),c=[],l=s.size,p=function(t){var e=s.get(t),n={};u.map((function(t,r){var i=t.toLowerCase();n[i]=e.get(r)})),c.push(n)},h=0;h<l;h++)p(h);return t.abrupt("return",c);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Q=function(t,e,n){return H.apply(this,arguments)};function $(){return($=s()(f.a.mark((function t(e,n){var r;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n){t.next=3;break}return t.next=3,e.logon(n);case 3:return t.next=5,e.addServices("jobExecution","compute","jobDefinitions");case 5:return r=t.sent,t.abrupt("return",r.jobExecution);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var X=function(t,e){return $.apply(this,arguments)};function Z(){return(Z=s()(f.a.mark((function t(e,n){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var tt=function(t,e){return Z.apply(this,arguments)};function et(){return(et=s()(f.a.mark((function t(e,n,r){var i,o,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apiCall(n.links("create"),r);case 2:return i=t.sent,t.next=5,e.jobState(i,null,5,2);case 5:if("running"!==(o=t.sent).data){t.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==o.data){t.next=14;break}throw JSON.stringify(o);case 14:return t.next=16,tt(e,o.job);case 16:return a=t.sent,t.abrupt("return",a);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nt=function(t,e,n){return et.apply(this,arguments)};function rt(){return(rt=s()(f.a.mark((function t(e,n,r,i,o){var a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={},u={},null===i){t.next=6;break}return t.next=5,it(e,i);case 5:a.jobDefinitionUri=t.sent;case 6:return-0!=r&&(u.code=r),u.type="Compute",a.arguments=o,a.jobDefinition=u,s={data:a},t.next=13,nt(e,n,s);case 13:return c=t.sent,t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function it(t,e){return ot.apply(this,arguments)}function ot(){return(ot=s()(f.a.mark((function t(e,n){var r,i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.getService("jobDefinitions"),r=null,i={qs:{filter:"eq(name,'".concat(n,"')")}},t.next=5,nt(e,i);case 5:if(0!==(o=t.sent).itemsList().size){t.next=10;break}throw"Error: ".concat(n," not found in the system");case 10:r=o.itemsCmd(n,"self","link","uri");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var at=function(t,e,n,r,i){return rt.apply(this,arguments)},ut=n(5);function st(){return(st=s()(f.a.mark((function t(e,n,r){var i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=n.service,o=0;case 2:if(!(o<r.length)){t.next=12;break}if(a=r[o],null!=n.steps[a]){t.next=9;break}return t.next=7,lt(e,i,a);case 7:u=t.sent,n.steps[a]=u;case 9:o++,t.next=2;break;case 12:return t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ct=function(t,e,n){return st.apply(this,arguments)};function ft(){return(ft=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},t.next=3,e.apiCall(n.links("modules"),i);case 3:if(0!==(o=t.sent).itemsList().size){t.next=6;break}return t.abrupt("return",null);case 6:return a=o.itemsCmd(r,"steps"),t.next=9,e.apiCall(a);case 9:return u=t.sent,s={name:r,stepsRafLink:u,stepIds:o.items(r,"data","stepIds").toJS(),microanalyticScore:n},t.abrupt("return",s);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var lt=function(t,e,n){return ft.apply(this,arguments)};function pt(){return(pt=s()(f.a.mark((function t(e,n,r){var i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=3;break}return t.next=3,e.logon(r);case 3:return t.next=5,e.addServices("microanalyticScore");case 5:i=t.sent,o=i.microanalyticScore,a={service:o,steps:{}},u=0;case 9:if(!(u<n.length)){t.next=18;break}return s=n[u],t.next=13,lt(e,o,s);case 13:c=t.sent,a.steps[s]=c;case 15:u++,t.next=9;break;case 18:return t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ht=function(t,e,n){return pt.apply(this,arguments)};var dt=function(t,e,n){var r=t.steps[e];if(null===r)return[];var i=null;if(null==n){var o=r.stepIds.findIndex((function(t){return"execute"===t||"score"===t}));if(-1===o)return[];i=r.stepIds[o]}else{if(-1===r.stepIds.findIndex((function(t){return t===n})))return[];i=n}var a=r.stepsRafLink.items(i,"data","inputs");return null===a?[]:a.toJS()};function yt(){return(yt=s()(f.a.mark((function t(e,n,r,i,o,a){var u,s,c,l,p,h,d,y,v,_,m,g,b;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=n.steps[r],s=!1,c=[],!1===Array.isArray(i))for(l in i)p={name:l,value:i[l]},c.push(p);else s=!0;if(h={data:{inputs:!0===s?i:c}},d=null,null!=o){t.next=15;break}if(-1!==(y=u.stepIds.findIndex((function(t){return"execute"===t||"score"===t})))){t.next=12;break}return t.abrupt("return",[]);case 12:d=u.stepIds[y];case 13:t.next=21;break;case 15:if(-1!==u.stepIds.findIndex((function(t){return t===o}))){t.next=20;break}return t.abrupt("return",[]);case 20:d=o;case 21:if(null!==(v=u.stepsRafLink.itemsCmd(d,a))){t.next=25;break}return _=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(o," operation: ").concat(a," is an invalid combination")}],t.abrupt("return",_);case 25:return t.next=27,e.apiCall(v,h);case 27:return m=t.sent,g=m.items("outputs").toJS(),!0===s?b=g:(b={},g.map((function(t){b[t.name]=t.value}))),t.abrupt("return",b);case 31:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt=function(t,e,n,r,i,o){return yt.apply(this,arguments)};function _t(){return(_t=s()(f.a.mark((function t(e,n,r){var i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht(e,[n]);case 2:return i=t.sent,t.next=5,vt(e,i,n,r,"score","execute");case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt=function(t,e,n){return _t.apply(this,arguments)},gt=n(6),bt=n.n(gt),wt={};function xt(t){t&&(t.value=!0)}function St(){}function Et(t){return void 0===t.size&&(t.size=t.__iterate(At)),t.size}function Ot(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?Et(t)+e:e}function At(){return!0}function kt(t,e,n){return(0===t&&!Ct(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function It(t,e){return Rt(t,e,0)}function jt(t,e){return Rt(t,e,e)}function Rt(t,e,n){return void 0===t?n:Ct(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function Ct(t){return t<0||0===t&&1/t==-1/0}function Tt(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function zt(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function Mt(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function Dt(t){return zt(t)||Mt(t)}var Lt=function(t){return Tt(t)?t:ne(t)},Pt=function(t){function e(t){return zt(t)?t:re(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt),qt=function(t){function e(t){return Mt(t)?t:ie(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt),Ut=function(t){function e(t){return Tt(t)&&!Dt(t)?t:oe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt);Lt.Keyed=Pt,Lt.Indexed=qt,Lt.Set=Ut;function Bt(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function Nt(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Yt(t){return Tt(t)||Nt(t)}var Ft="@@__IMMUTABLE_ORDERED__@@";function Jt(t){return Boolean(t&&t[Ft])}var Kt="function"==typeof Symbol&&Symbol.iterator,Gt=Kt||"@@iterator",Vt=function(t){this.next=t};function Wt(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function Ht(){return{value:void 0,done:!0}}function Qt(t){return!!Array.isArray(t)||!!Zt(t)}function $t(t){return t&&"function"==typeof t.next}function Xt(t){var e=Zt(t);return e&&e.call(t)}function Zt(t){var e=t&&(Kt&&t[Kt]||t["@@iterator"]);if("function"==typeof e)return e}Vt.prototype.toString=function(){return"[Iterator]"},Vt.KEYS=0,Vt.VALUES=1,Vt.ENTRIES=2,Vt.prototype.inspect=Vt.prototype.toSource=function(){return this.toString()},Vt.prototype[Gt]=function(){return this};var te=Object.prototype.hasOwnProperty;function ee(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var ne=function(t){function e(t){return null==t?fe():Yt(t)?t.toSeq():function(t){var e=he(t);if(e)return(r=Zt(n=t))&&r===n.entries?e.fromEntrySeq():function(t){var e=Zt(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var n,r;if("object"==typeof t)return new ue(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[e?r-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,i=0;return new Vt((function(){if(i===r)return{value:void 0,done:!0};var o=n[e?r-++i:i++];return Wt(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(Lt),re=function(t){function e(t){return null==t?fe().toKeyedSeq():Tt(t)?zt(t)?t.toSeq():t.fromEntrySeq():Nt(t)?t.toSeq():le(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ne),ie=function(t){function e(t){return null==t?fe():Tt(t)?zt(t)?t.entrySeq():t.toIndexedSeq():Nt(t)?t.toSeq().entrySeq():pe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ne),oe=function(t){function e(t){return(Tt(t)&&!Dt(t)?t:ie(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ne);ne.isSeq=Bt,ne.Keyed=re,ne.Set=oe,ne.Indexed=ie,ne.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var ae=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[Ot(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,i=0;i!==r;){var o=e?r-++i:i++;if(!1===t(n[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,i=0;return new Vt((function(){if(i===r)return{value:void 0,done:!0};var o=e?r-++i:i++;return Wt(t,o,n[o])}))},e}(ie),ue=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return te.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[e?i-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length,o=0;return new Vt((function(){if(o===i)return{value:void 0,done:!0};var a=r[e?i-++o:o++];return Wt(t,a,n[a])}))},e}(re);ue.prototype[Ft]=!0;var se,ce=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=Xt(this._collection),r=0;if($t(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=Xt(this._collection);if(!$t(n))return new Vt(Ht);var r=0;return new Vt((function(){var e=n.next();return e.done?e:Wt(t,r++,e.value)}))},e}(ie);function fe(){return se||(se=new ae([]))}function le(t){var e=he(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new ue(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function pe(t){var e=he(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function he(t){return ee(t)?new ae(t):Qt(t)?new ce(t):void 0}function de(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function ye(t){return de(t)&&Jt(t)}function ve(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function _e(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(ve(t)&&ve(e)&&t.equals(e))}var me="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function ge(t){return t>>>1&1073741824|3221225471&t}var be=Object.prototype.valueOf;function we(t){if(null==t)return xe(t);if("function"==typeof t.hashCode)return ge(t.hashCode(t));var e,n=(e=t).valueOf!==be&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==n)return xe(n);switch(typeof n){case"boolean":return n?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return ge(e)}(n);case"string":return n.length>Te?function(t){var e=De[t];void 0===e&&(e=Se(t),Me===ze&&(Me=0,De={}),Me++,De[t]=e);return e}(n):Se(n);case"object":case"function":return function(t){var e;if(Ie&&void 0!==(e=ke.get(t)))return e;if(void 0!==(e=t[Ce]))return e;if(!Oe){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ce]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=Ae(),Ie)ke.set(t,e);else{if(void 0!==Ee&&!1===Ee(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Oe)Object.defineProperty(t,Ce,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ce]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ce]=e}}return e}(n);case"symbol":return function(t){var e=je[t];if(void 0!==e)return e;return e=Ae(),je[t]=e,e}(n);default:if("function"==typeof n.toString)return Se(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function xe(t){return null===t?1108378658:1108378659}function Se(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return ge(e)}var Ee=Object.isExtensible,Oe=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Ae(){var t=++Re;return 1073741824&Re&&(Re=0),t}var ke,Ie="function"==typeof WeakMap;Ie&&(ke=new WeakMap);var je=Object.create(null),Re=0,Ce="__immutablehash__";"function"==typeof Symbol&&(Ce=Symbol(Ce));var Te=16,ze=255,Me=0,De={},Le=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=Ye(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var n=this,r=Ne(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},e.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e,r){return t(e,r,n)}),e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(re);Le.prototype[Ft]=!0;var Pe=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var n=this,r=0;return e&&Et(this),this._iter.__iterate((function(i){return t(i,e?n.size-++r:r++,n)}),e)},e.prototype.__iterator=function(t,e){var n=this,r=this._iter.__iterator(1,e),i=0;return e&&Et(this),new Vt((function(){var o=r.next();return o.done?o:Wt(t,e?n.size-++i:i++,o.value,o)}))},e}(ie),qe=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){return t(e,e,n)}),e)},e.prototype.__iterator=function(t,e){var n=this._iter.__iterator(1,e);return new Vt((function(){var e=n.next();return e.done?e:Wt(t,e.value,e.value,e)}))},e}(oe),Ue=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){if(e){Ze(e);var r=Tt(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}}),e)},e.prototype.__iterator=function(t,e){var n=this._iter.__iterator(1,e);return new Vt((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Ze(r);var i=Tt(r);return Wt(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}}))},e}(re);function Be(t){var e=en(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=nn,e.__iterateUncached=function(e,n){var r=this;return t.__iterate((function(t,n){return!1!==e(n,t,r)}),n)},e.__iteratorUncached=function(e,n){if(2===e){var r=t.__iterator(e,n);return new Vt((function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,n)},e}function Ne(t,e,n){var r=en(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,wt);return o===wt?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate((function(t,i,a){return!1!==r(e.call(n,t,i,a),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(2,i);return new Vt((function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return Wt(r,u,e.call(n,a[1],u,t),i)}))},r}function Ye(t,e){var n=this,r=en(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=Be(t);return e.reverse=function(){return t.flip()},e}),r.get=function(n,r){return t.get(e?n:-1-n,r)},r.has=function(n){return t.has(e?n:-1-n)},r.includes=function(e){return t.includes(e)},r.cacheResult=nn,r.__iterate=function(n,r){var i=this,o=0;return r&&Et(t),t.__iterate((function(t,a){return n(t,e?a:r?i.size-++o:o++,i)}),!r)},r.__iterator=function(r,i){var o=0;i&&Et(t);var a=t.__iterator(2,!i);return new Vt((function(){var t=a.next();if(t.done)return t;var u=t.value;return Wt(r,e?u[0]:i?n.size-++o:o++,u[1],t)}))},r}function Fe(t,e,n,r){var i=en(t);return r&&(i.has=function(r){var i=t.get(r,wt);return i!==wt&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,wt);return o!==wt&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate((function(t,o,s){if(e.call(n,t,o,s))return u++,i(t,r?o:u-1,a)}),o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(2,o),u=0;return new Vt((function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return Wt(i,r?c:u++,f,o)}}))},i}function Je(t,e,n,r){var i=t.size;if(kt(e,n,i))return t;var o=It(e,i),a=jt(n,i);if(o!=o||a!=a)return Je(t.toSeq().cacheResult(),e,n,r);var u,s=a-o;s==s&&(u=s<0?0:s);var c=en(t);return c.size=0===u?u:t.size&&u||void 0,!r&&Bt(t)&&u>=0&&(c.get=function(e,n){return(e=Ot(this,e))>=0&&e<u?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===u)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,s=!0,c=0;return t.__iterate((function(t,n){if(!s||!(s=a++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==u})),c},c.__iteratorUncached=function(e,n){if(0!==u&&n)return this.cacheResult().__iterator(e,n);if(0===u)return new Vt(Ht);var i=t.__iterator(e,n),a=0,s=0;return new Vt((function(){for(;a++<o;)i.next();if(++s>u)return{value:void 0,done:!0};var t=i.next();return r||1===e||t.done?t:Wt(e,s-1,0===e?void 0:t.value[1],t)}))},c}function Ke(t,e,n,r){var i=en(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate((function(t,o,c){if(!u||!(u=e.call(n,t,o,c)))return s++,i(t,r?o:s-1,a)})),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(2,o),s=!0,c=0;return new Vt((function(){var t,o,f;do{if((t=u.next()).done)return r||1===i?t:Wt(i,c++,0===i?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(n,f,o,a))}while(s);return 2===i?t:Wt(i,o,f,t)}))},i}function Ge(t,e){var n=zt(t),r=[t].concat(e).map((function(t){return Tt(t)?n&&(t=Pt(t)):t=n?le(t):pe(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&zt(i)||Mt(t)&&Mt(i))return i}var o=new ae(r);return n?o=o.toKeyedSeq():Mt(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function Ve(t,e,n){var r=en(t);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,u=!1;return function t(s,c){s.__iterate((function(o,s){return(!e||c<e)&&Tt(o)?t(o,c+1):(a++,!1===i(o,n?s:a-1,r)&&(u=!0)),!u}),o)}(t,0),a},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=t.__iterator(r,i),a=[],u=0;return new Vt((function(){for(;o;){var t=o.next();if(!1===t.done){var s=t.value;if(2===r&&(s=s[1]),e&&!(a.length<e)||!Tt(s))return n?t:Wt(r,u++,s,t);a.push(o),o=s.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}}))},r}function We(t,e,n){e||(e=rn);var r=zt(t),i=0,o=t.toSeq().map((function(e,r){return[r,e,i++,n?n(e,r,t):e]})).valueSeq().toArray();return o.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?re(o):Mt(t)?ie(o):oe(o)}function He(t,e,n){if(e||(e=rn),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return Qe(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return Qe(e,t,n)?n:t}))}function Qe(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function $e(t,e,n,r){var i=en(t),o=new ae(n).map((function(t){return t.size}));return i.size=r?o.max():o.min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=Lt(t),Xt(i?t.reverse():t)})),a=0,u=!1;return new Vt((function(){var n;return u||(n=o.map((function(t){return t.next()})),u=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),u?{value:void 0,done:!0}:Wt(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Xe(t,e){return t===e?t:Bt(t)?e:t.constructor(e)}function Ze(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function tn(t){return zt(t)?Pt:Mt(t)?qt:Ut}function en(t){return Object.create((zt(t)?re:Mt(t)?ie:oe).prototype)}function nn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ne.prototype.cacheResult.call(this)}function rn(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function on(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function an(t,e){if(!t)throw new Error(e)}function un(t){an(t!==1/0,"Cannot perform this action with an infinite size.")}function sn(t){if(ee(t)&&"string"!=typeof t)return t;if(Jt(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}Pe.prototype.cacheResult=Le.prototype.cacheResult=qe.prototype.cacheResult=Ue.prototype.cacheResult=nn;var cn=Object.prototype.toString;function fn(t){if(!t||"object"!=typeof t||"[object Object]"!==cn.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e,r=Object.getPrototypeOf(e);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===e}function ln(t){return"object"==typeof t&&(Yt(t)||Array.isArray(t)||fn(t))}function pn(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function hn(t,e){return Yt(t)?t.has(e):ln(t)&&te.call(t,e)}function dn(t,e,n){return Yt(t)?t.get(e,n):hn(t,e)?"function"==typeof t.get?t.get(e):t[e]:n}function yn(t){if(Array.isArray(t))return on(t);var e={};for(var n in t)te.call(t,n)&&(e[n]=t[n]);return e}function vn(t,e){if(!ln(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(Yt(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!te.call(t,e))return t;var n=yn(t);return Array.isArray(n)?n.splice(e,1):delete n[e],n}function _n(t,e,n){if(!ln(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(Yt(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,n)}if(te.call(t,e)&&n===t[e])return t;var r=yn(t);return r[e]=n,r}function mn(t,e,n,r){r||(r=n,n=void 0);var i=function t(e,n,r,i,o,a){var u=n===wt;if(i===r.length){var s=u?o:n,c=a(s);return c===s?n:c}if(!u&&!ln(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,i).map(pn)+"]: "+n);var f=r[i],l=u?wt:dn(n,f,wt),p=t(l===wt?e:Yt(l),l,r,i+1,o,a);return p===l?n:p===wt?vn(n,f):_n(u?e?$n():{}:n,f,p)}(Yt(t),t,sn(e),0,n,r);return i===wt?n:i}function gn(t,e,n){return mn(t,e,wt,(function(){return n}))}function bn(t,e){return gn(this,t,e)}function wn(t,e){return mn(t,e,(function(){return wt}))}function xn(t){return wn(this,t)}function Sn(t,e,n,r){return mn(t,[e],n,r)}function En(t,e,n){return 1===arguments.length?t(this):Sn(this,t,e,n)}function On(t,e,n){return mn(this,t,e,n)}function An(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return In(this,t)}function kn(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return In(this,e,t)}function In(t,e,n){for(var r=[],i=0;i<e.length;i++){var o=Pt(e[i]);0!==o.size&&r.push(o)}return 0===r.length?t:0!==t.toSeq().size||t.__ownerID||1!==r.length?t.withMutations((function(t){for(var e=n?function(e,r){Sn(t,r,wt,(function(t){return t===wt?e:n(t,e,r)}))}:function(e,n){t.set(n,e)},i=0;i<r.length;i++)r[i].forEach(e)})):t.constructor(r[0])}function jn(t,e,n){return Rn(t,e,function(t){return function e(n,r,i){return ln(n)&&ln(r)&&(o=r,a=ne(n),u=ne(o),Mt(a)===Mt(u)&&zt(a)===zt(u))?Rn(n,[r],e):t?t(n,r,i):r;var o,a,u}}(n))}function Rn(t,e,n){if(!ln(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(Yt(t))return"function"==typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var r=Array.isArray(t),i=t,o=r?qt:Pt,a=r?function(e){i===t&&(i=yn(i)),i.push(e)}:function(e,r){var o=te.call(i,r),a=o&&n?n(i[r],e,r):e;o&&a===i[r]||(i===t&&(i=yn(i)),i[r]=a)},u=0;u<e.length;u++)o(e[u]).forEach(a);return i}function Cn(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return jn(this,t)}function Tn(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return jn(this,e,t)}function zn(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return mn(this,t,$n(),(function(t){return Rn(t,e)}))}function Mn(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return mn(this,t,$n(),(function(t){return jn(t,e)}))}function Dn(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Ln(){return this.__ownerID?this:this.__ensureOwner(new St)}function Pn(){return this.__ensureOwner()}function qn(){return this.__altered}var Un=function(t){function e(e){return null==e?$n():de(e)&&!Jt(e)?e:$n().withMutations((function(n){var r=t(e);un(r.size),r.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return $n().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Xn(this,t,e)},e.prototype.remove=function(t){return Xn(this,t,wt)},e.prototype.deleteAll=function(t){var e=Lt(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$n()},e.prototype.sort=function(t){return xr(We(this,t))},e.prototype.sortBy=function(t,e){return xr(We(this,e,t))},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){r.forEach((function(i,o){r.set(o,t.call(e,i,o,n))}))}))},e.prototype.__iterator=function(t,e){return new Vn(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qn(this.size,this._root,t,this.__hash):0===this.size?$n():(this.__ownerID=t,this.__altered=!1,this)},e}(Pt);Un.isMap=de;var Bn=Un.prototype;Bn["@@__IMMUTABLE_MAP__@@"]=!0,Bn.delete=Bn.remove,Bn.removeAll=Bn.deleteAll,Bn.setIn=bn,Bn.removeIn=Bn.deleteIn=xn,Bn.update=En,Bn.updateIn=On,Bn.merge=Bn.concat=An,Bn.mergeWith=kn,Bn.mergeDeep=Cn,Bn.mergeDeepWith=Tn,Bn.mergeIn=zn,Bn.mergeDeepIn=Mn,Bn.withMutations=Dn,Bn.wasAltered=qn,Bn.asImmutable=Pn,Bn["@@transducer/init"]=Bn.asMutable=Ln,Bn["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Bn["@@transducer/result"]=function(t){return t.asImmutable()};var Nn=function(t,e){this.ownerID=t,this.entries=e};Nn.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(_e(n,i[o][0]))return i[o][1];return r},Nn.prototype.update=function(t,e,n,r,i,o,a){for(var u=i===wt,s=this.entries,c=0,f=s.length;c<f&&!_e(r,s[c][0]);c++);var l=c<f;if(l?s[c][1]===i:u)return this;if(xt(a),(u||!l)&&xt(o),!u||1!==s.length){if(!l&&!u&&s.length>=ir)return function(t,e,n,r){t||(t=new St);for(var i=new Kn(t,we(n),[n,r]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}(t,s,r,i);var p=t&&t===this.ownerID,h=p?s:on(s);return l?u?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),p?(this.entries=h,this):new Nn(t,h)}};var Yn=function(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n};Yn.prototype.get=function(t,e,n,r){void 0===e&&(e=we(n));var i=1<<(31&(0===t?e:e>>>t)),o=this.bitmap;return 0==(o&i)?r:this.nodes[nr(o&i-1)].get(t+5,e,n,r)},Yn.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=we(r));var u=31&(0===e?n:n>>>e),s=1<<u,c=this.bitmap,f=0!=(c&s);if(!f&&i===wt)return this;var l=nr(c&s-1),p=this.nodes,h=f?p[l]:void 0,d=Zn(h,t,e+5,n,r,i,o,a);if(d===h)return this;if(!f&&d&&p.length>=or)return function(t,e,n,r,i){for(var o=0,a=new Array(32),u=0;0!==n;u++,n>>>=1)a[u]=1&n?e[o++]:void 0;return a[r]=i,new Fn(t,o+1,a)}(t,p,c,u,d);if(f&&!d&&2===p.length&&tr(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&tr(d))return d;var y=t&&t===this.ownerID,v=f?d?c:c^s:c|s,_=f?d?rr(p,l,d,y):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a<r;a++)a===e&&(o=1),i[a]=t[a+o];return i}(p,l,y):function(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,u=0;u<i;u++)u===e?(o[u]=n,a=-1):o[u]=t[u+a];return o}(p,l,d,y);return y?(this.bitmap=v,this.nodes=_,this):new Yn(t,v,_)};var Fn=function(t,e,n){this.ownerID=t,this.count=e,this.nodes=n};Fn.prototype.get=function(t,e,n,r){void 0===e&&(e=we(n));var i=31&(0===t?e:e>>>t),o=this.nodes[i];return o?o.get(t+5,e,n,r):r},Fn.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=we(r));var u=31&(0===e?n:n>>>e),s=i===wt,c=this.nodes,f=c[u];if(s&&!f)return this;var l=Zn(f,t,e+5,n,r,i,o,a);if(l===f)return this;var p=this.count;if(f){if(!l&&--p<ar)return function(t,e,n,r){for(var i=0,o=0,a=new Array(n),u=0,s=1,c=e.length;u<c;u++,s<<=1){var f=e[u];void 0!==f&&u!==r&&(i|=s,a[o++]=f)}return new Yn(t,i,a)}(t,c,p,u)}else p++;var h=t&&t===this.ownerID,d=rr(c,u,l,h);return h?(this.count=p,this.nodes=d,this):new Fn(t,p,d)};var Jn=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n};Jn.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(_e(n,i[o][0]))return i[o][1];return r},Jn.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=we(r));var u=i===wt;if(n!==this.keyHash)return u?this:(xt(a),xt(o),er(this,t,e,n,[r,i]));for(var s=this.entries,c=0,f=s.length;c<f&&!_e(r,s[c][0]);c++);var l=c<f;if(l?s[c][1]===i:u)return this;if(xt(a),(u||!l)&&xt(o),u&&2===f)return new Kn(t,this.keyHash,s[1^c]);var p=t&&t===this.ownerID,h=p?s:on(s);return l?u?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),p?(this.entries=h,this):new Jn(t,this.keyHash,h)};var Kn=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n};Kn.prototype.get=function(t,e,n,r){return _e(n,this.entry[0])?this.entry[1]:r},Kn.prototype.update=function(t,e,n,r,i,o,a){var u=i===wt,s=_e(r,this.entry[0]);return(s?i===this.entry[1]:u)?this:(xt(a),u?void xt(o):s?t&&t===this.ownerID?(this.entry[1]=i,this):new Kn(t,this.keyHash,[r,i]):(xt(o),er(this,t,e,we(r),[r,i])))},Nn.prototype.iterate=Jn.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},Yn.prototype.iterate=Fn.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},Kn.prototype.iterate=function(t,e){return t(this.entry)};var Gn,Vn=function(t){function e(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Hn(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n=e.node,r=e.index++,i=void 0;if(n.entry){if(0===r)return Wn(t,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return Wn(t,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return Wn(t,o.entry);e=this._stack=Hn(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(Vt);function Wn(t,e){return Wt(t,e[0],e[1])}function Hn(t,e){return{node:t,index:0,__prev:e}}function Qn(t,e,n,r){var i=Object.create(Bn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function $n(){return Gn||(Gn=Qn(0))}function Xn(t,e,n){var r,i;if(t._root){var o={value:!1},a={value:!1};if(r=Zn(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===wt?-1:1:0)}else{if(n===wt)return t;i=1,r=new Nn(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Qn(i,r):$n()}function Zn(t,e,n,r,i,o,a,u){return t?t.update(e,n,r,i,o,a,u):o===wt?t:(xt(u),xt(a),new Kn(e,r,[i,o]))}function tr(t){return t.constructor===Kn||t.constructor===Jn}function er(t,e,n,r,i){if(t.keyHash===r)return new Jn(e,r,[t.entry,i]);var o,a=31&(0===n?t.keyHash:t.keyHash>>>n),u=31&(0===n?r:r>>>n),s=a===u?[er(t,e,n+5,r,i)]:(o=new Kn(e,r,i),a<u?[t,o]:[o,t]);return new Yn(e,1<<a|1<<u,s)}function nr(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function rr(t,e,n,r){var i=r?t:on(t);return i[e]=n,i}var ir=8,or=16,ar=8;function ur(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var sr=function(t){function e(e){var n=yr();if(null==e)return n;if(ur(e))return e;var r=t(e),i=r.size;return 0===i?n:(un(i),i>0&&i<32?dr(0,i,5,null,new fr(r.toArray())):n.withMutations((function(t){t.setSize(i),r.forEach((function(e,n){return t.set(n,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=Ot(this,t))>=0&&t<this.size){var n=mr(this,t+=this._origin);return n&&n.array[31&t]}return e},e.prototype.set=function(t,e){return function(t,e,n){if((e=Ot(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?gr(t,e).set(0,n):gr(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o={value:!1};e>=br(t._capacity)?r=vr(r,t.__ownerID,0,e,n,o):i=vr(i,t.__ownerID,t._level,e,n,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return dr(t._origin,t._capacity,t._level,i,r)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):yr()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){gr(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},e.prototype.pop=function(){return gr(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){gr(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},e.prototype.shift=function(){return gr(this,1)},e.prototype.concat=function(){for(var e=arguments,n=[],r=0;r<arguments.length;r++){var i=e[r],o=t("string"!=typeof i&&Qt(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations((function(t){n.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(n[0])},e.prototype.setSize=function(t){return gr(this,0,t)},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){for(var i=0;i<n.size;i++)r.set(i,t.call(e,r.get(i),i,n))}))},e.prototype.slice=function(t,e){var n=this.size;return kt(t,e,n)?this:gr(this,It(t,n),jt(e,n))},e.prototype.__iterator=function(t,e){var n=e?this.size:0,r=hr(this,e);return new Vt((function(){var i=r();return i===pr?{value:void 0,done:!0}:Wt(t,e?--n:n++,i)}))},e.prototype.__iterate=function(t,e){for(var n,r=e?this.size:0,i=hr(this,e);(n=i())!==pr&&!1!==t(n,e?--r:r++,this););return r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?dr(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?yr():(this.__ownerID=t,this.__altered=!1,this)},e}(qt);sr.isList=ur;var cr=sr.prototype;cr["@@__IMMUTABLE_LIST__@@"]=!0,cr.delete=cr.remove,cr.merge=cr.concat,cr.setIn=bn,cr.deleteIn=cr.removeIn=xn,cr.update=En,cr.updateIn=On,cr.mergeIn=zn,cr.mergeDeepIn=Mn,cr.withMutations=Dn,cr.wasAltered=qn,cr.asImmutable=Pn,cr["@@transducer/init"]=cr.asMutable=Ln,cr["@@transducer/step"]=function(t,e){return t.push(e)},cr["@@transducer/result"]=function(t){return t.asImmutable()};var fr=function(t,e){this.array=t,this.ownerID=e};fr.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&31;if(r>=this.array.length)return new fr([],t);var i,o=0===r;if(e>0){var a=this.array[r];if((i=a&&a.removeBefore(t,e-5,n))===a&&o)return this}if(o&&!i)return this;var u=_r(this,t);if(!o)for(var s=0;s<r;s++)u.array[s]=void 0;return i&&(u.array[r]=i),u},fr.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,i=n-1>>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-5,n))===o&&i===this.array.length-1)return this}var a=_r(this,t);return a.array.splice(i+1),r&&(a.array[i]=r),a};var lr,pr={};function hr(t,e){var n=t._origin,r=t._capacity,i=br(r),o=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===i?o&&o.array:t&&t.array,s=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(s===c)return pr;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,i,o){var u,s=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);f>32&&(f=32);return function(){for(;;){if(u){var t=u();if(t!==pr)return t;u=null}if(c===f)return pr;var n=e?--f:c++;u=a(s&&s[n],i-5,o+(n<<i))}}}(t,u,s)}}function dr(t,e,n,r,i,o,a){var u=Object.create(cr);return u.size=e-t,u._origin=t,u._capacity=e,u._level=n,u._root=r,u._tail=i,u.__ownerID=o,u.__hash=a,u.__altered=!1,u}function yr(){return lr||(lr=dr(0,0,5))}function vr(t,e,n,r,i,o){var a,u=r>>>n&31,s=t&&u<t.array.length;if(!s&&void 0===i)return t;if(n>0){var c=t&&t.array[u],f=vr(c,e,n-5,r,i,o);return f===c?t:((a=_r(t,e)).array[u]=f,a)}return s&&t.array[u]===i?t:(o&&xt(o),a=_r(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function _r(t,e){return e&&t&&e===t.ownerID?t:new fr(t?t.array.slice():[],e)}function mr(t,e){if(e>=br(t._capacity))return t._tail;if(e<1<<t._level+5){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&31],r-=5;return n}}function gr(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new St,i=t._origin,o=t._capacity,a=i+e,u=void 0===n?o:n<0?o+n:i+n;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,f=0;a+f<0;)c=new fr(c&&c.array.length?[void 0,c]:[],r),f+=1<<(s+=5);f&&(a+=f,i+=f,u+=f,o+=f);for(var l=br(o),p=br(u);p>=1<<s+5;)c=new fr(c&&c.array.length?[c]:[],r),s+=5;var h=t._tail,d=p<l?mr(t,u-1):p>l?new fr([],r):h;if(h&&p>l&&a<o&&h.array.length){for(var y=c=_r(c,r),v=s;v>5;v-=5){var _=l>>>v&31;y=y.array[_]=_r(y.array[_],r)}y.array[l>>>5&31]=h}if(u<o&&(d=d&&d.removeAfter(r,0,u)),a>=p)a-=p,u-=p,s=5,c=null,d=d&&d.removeBefore(r,0,a);else if(a>i||p<l){for(f=0;c;){var m=a>>>s&31;if(m!==p>>>s&31)break;m&&(f+=(1<<s)*m),s-=5,c=c.array[m]}c&&a>i&&(c=c.removeBefore(r,s,a-f)),c&&p<l&&(c=c.removeAfter(r,s,p-f)),f&&(a-=f,u-=f)}return t.__ownerID?(t.size=u-a,t._origin=a,t._capacity=u,t._level=s,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):dr(a,u,s,c,d)}function br(t){return t<32?0:t-1>>>5<<5}var wr,xr=function(t){function e(t){return null==t?Er():ye(t)?t:Er().withMutations((function(e){var n=Pt(t);un(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Er()},e.prototype.set=function(t,e){return Or(this,t,e)},e.prototype.remove=function(t){return Or(this,t,wt)},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Sr(e,n,t,this.__hash):0===this.size?Er():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=n,this)},e}(Un);function Sr(t,e,n,r){var i=Object.create(xr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Er(){return wr||(wr=Sr($n(),yr()))}function Or(t,e,n){var r,i,o=t._map,a=t._list,u=o.get(e),s=void 0!==u;if(n===wt){if(!s)return t;a.size>=32&&a.size>=2*o.size?(r=(i=a.filter((function(t,e){return void 0!==t&&u!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=o,i=a.set(u,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t.__altered=!0,t):Sr(r,i)}xr.isOrderedMap=ye,xr.prototype[Ft]=!0,xr.prototype.delete=xr.prototype.remove;function Ar(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var kr=function(t){function e(t){return null==t?Cr():Ar(t)?t:Cr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=Ot(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Rr(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Ar(e))return e;un(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Rr(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Cr()},e.prototype.slice=function(e,n){if(kt(e,n,this.size))return this;var r=It(e,this.size);if(jt(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Rr(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Rr(this.size,this._head,t,this.__hash):0===this.size?Cr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new ae(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new ae(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new Vt((function(){if(r){var e=r.value;return r=r.next,Wt(t,n++,e)}return{value:void 0,done:!0}}))},e}(qt);kr.isStack=Ar;var Ir,jr=kr.prototype;function Rr(t,e,n,r){var i=Object.create(jr);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Cr(){return Ir||(Ir=Rr(0))}jr["@@__IMMUTABLE_STACK__@@"]=!0,jr.shift=jr.pop,jr.unshift=jr.push,jr.unshiftAll=jr.pushAll,jr.withMutations=Dn,jr.wasAltered=qn,jr.asImmutable=Pn,jr["@@transducer/init"]=jr.asMutable=Ln,jr["@@transducer/step"]=function(t,e){return t.unshift(e)},jr["@@transducer/result"]=function(t){return t.asImmutable()};function Tr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function zr(t){return Tr(t)&&Jt(t)}function Mr(t,e){if(t===e)return!0;if(!Tt(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||zt(t)!==zt(e)||Mt(t)!==Mt(e)||Jt(t)!==Jt(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!Dt(t);if(Jt(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&_e(i[1],t)&&(n||_e(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!_e(e,t.get(r,wt)):!_e(t.get(r,wt),e))return a=!1,!1}));return a&&t.size===u}function Dr(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Lr(t){if(!t||"object"!=typeof t)return t;if(!Tt(t)){if(!ln(t))return t;t=ne(t)}if(zt(t)){var e={};return t.__iterate((function(t,n){e[n]=Lr(t)})),e}var n=[];return t.__iterate((function(t){n.push(Lr(t))})),n}var Pr=function(t){function e(e){return null==e?Yr():Tr(e)&&!Jt(e)?e:Yr().withMutations((function(n){var r=t(e);un(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(Pt(t).keySeq())},e.intersect=function(t){return(t=Lt(t).toArray()).length?Ur.intersect.apply(e(t.pop()),t):Yr()},e.union=function(t){return(t=Lt(t).toArray()).length?Ur.union.apply(e(t.pop()),t):Yr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Br(this,this._map.set(t,t))},e.prototype.remove=function(t){return Br(this,this._map.remove(t))},e.prototype.clear=function(){return Br(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=!1,i=Br(this,this._map.mapEntries((function(i){var o=i[1],a=t.call(e,o,o,n);return a!==o&&(r=!0),[a,a]}),e));return r?i:this},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r<e.length;r++)t(e[r]).forEach((function(t){return n.add(t)}))})):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var r=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||r.push(t)})),this.withMutations((function(t){r.forEach((function(e){t.remove(e)}))}))},e.prototype.subtract=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var r=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&r.push(t)})),this.withMutations((function(t){r.forEach((function(e){t.remove(e)}))}))},e.prototype.sort=function(t){return ui(We(this,t))},e.prototype.sortBy=function(t,e){return ui(We(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate((function(e){return t(e,e,n)}),e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(Ut);Pr.isSet=Tr;var qr,Ur=Pr.prototype;function Br(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Nr(t,e){var n=Object.create(Ur);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Yr(){return qr||(qr=Nr($n()))}Ur["@@__IMMUTABLE_SET__@@"]=!0,Ur.delete=Ur.remove,Ur.merge=Ur.concat=Ur.union,Ur.withMutations=Dn,Ur.asImmutable=Pn,Ur["@@transducer/init"]=Ur.asMutable=Ln,Ur["@@transducer/step"]=function(t,e){return t.add(e)},Ur["@@transducer/result"]=function(t){return t.asImmutable()},Ur.__empty=Yr,Ur.__make=Nr;var Fr,Jr=function(t){function e(t,n,r){if(!(this instanceof e))return new e(t,n,r);if(an(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<t&&(r=-r),this._start=t,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-t)/r-1)+1),0===this.size){if(Fr)return Fr;Fr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+Ot(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,n){return kt(t,n,this.size)?this:(t=It(t,this.size),(n=jt(n,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(n,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var n=this.size,r=this._step,i=e?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==t(i,e?n-++o:o++,this);)i+=e?-r:r;return o},e.prototype.__iterator=function(t,e){var n=this.size,r=this._step,i=e?this._start+(n-1)*r:this._start,o=0;return new Vt((function(){if(o===n)return{value:void 0,done:!0};var a=i;return i+=e?-r:r,Wt(t,e?n-++o:o++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:Mr(this,t)},e}(ie);function Kr(t,e,n){for(var r=sn(e),i=0;i!==r.length;)if((t=dn(t,r[i++],wt))===wt)return n;return t}function Gr(t,e){return Kr(this,t,e)}function Vr(t,e){return Kr(t,e,wt)!==wt}function Wr(){un(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t}Lt.isIterable=Tt,Lt.isKeyed=zt,Lt.isIndexed=Mt,Lt.isAssociative=Dt,Lt.isOrdered=Jt,Lt.Iterator=Vt,Dr(Lt,{toArray:function(){un(this.size);var t=new Array(this.size||0),e=zt(this),n=0;return this.__iterate((function(r,i){t[n++]=e?[i,r]:r})),t},toIndexedSeq:function(){return new Pe(this)},toJS:function(){return Lr(this)},toKeyedSeq:function(){return new Le(this,!0)},toMap:function(){return Un(this.toKeyedSeq())},toObject:Wr,toOrderedMap:function(){return xr(this.toKeyedSeq())},toOrderedSet:function(){return ui(zt(this)?this.valueSeq():this)},toSet:function(){return Pr(zt(this)?this.valueSeq():this)},toSetSeq:function(){return new qe(this)},toSeq:function(){return Mt(this)?this.toIndexedSeq():zt(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return kr(zt(this)?this.valueSeq():this)},toList:function(){return sr(zt(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Xe(this,Ge(this,t))},includes:function(t){return this.some((function(e){return _e(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){un(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1})),n},filter:function(t,e){return Xe(this,Fe(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return un(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){un(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate((function(r){n?n=!1:e+=t,e+=null!=r?r.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return Xe(this,Ne(this,t,e))},reduce:function(t,e,n){return Zr(this,t,e,n,arguments.length<2,!1)},reduceRight:function(t,e,n){return Zr(this,t,e,n,arguments.length<2,!0)},reverse:function(){return Xe(this,Ye(this,!0))},slice:function(t,e){return Xe(this,Je(this,t,e,!0))},some:function(t,e){return!this.every(ni(t),e)},sort:function(t){return Xe(this,We(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return Et(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Un().asMutable();return t.__iterate((function(i,o){r.update(e.call(n,i,o,t),0,(function(t){return t+1}))})),r.asImmutable()}(this,t,e)},equals:function(t){return Mr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ae(t._cache);var e=t.toSeq().map(ei).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(ni(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate((function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1})),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(At,null,t)},flatMap:function(t,e){return Xe(this,function(t,e,n){var r=tn(t);return t.toSeq().map((function(i,o){return r(e.call(n,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Xe(this,Ve(this,t,!0))},fromEntrySeq:function(){return new Ue(this)},get:function(t,e){return this.find((function(e,n){return _e(n,t)}),void 0,e)},getIn:Gr,groupBy:function(t,e){return function(t,e,n){var r=zt(t),i=(Jt(t)?xr():Un()).asMutable();t.__iterate((function(o,a){i.update(e.call(n,o,a,t),(function(t){return(t=t||[]).push(r?[a,o]:o),t}))}));var o=tn(t);return i.map((function(e){return Xe(t,o(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,wt)!==wt},hasIn:function(t){return Vr(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:Lt(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:Lt(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return _e(e,t)}))},keySeq:function(){return this.toSeq().map(ti).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return He(this,t)},maxBy:function(t,e){return He(this,e,t)},min:function(t){return He(this,t?ri(t):oi)},minBy:function(t,e){return He(this,e?ri(e):oi,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Xe(this,Ke(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(ni(t),e)},sortBy:function(t,e){return Xe(this,We(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Xe(this,function(t,e,n){var r=en(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate((function(t,i,u){return e.call(n,t,i,u)&&++a&&r(t,i,o)})),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(2,i),u=!0;return new Vt((function(){if(!u)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?2===r?t:Wt(r,s,c,t):(u=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(ni(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=Jt(t),n=zt(t),r=e?1:0;return function(t,e){return e=me(e,3432918353),e=me(e<<15|e>>>-15,461845907),e=me(e<<13|e>>>-13,5),e=me((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ge((e=me(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+ai(we(t),we(e))|0}:function(t,e){r=r+ai(we(t),we(e))|0}:e?function(t){r=31*r+we(t)|0}:function(t){r=r+we(t)|0}),r)}(this))}});var Hr=Lt.prototype;Hr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Hr[Gt]=Hr.values,Hr.toJSON=Hr.toArray,Hr.__toStringMapper=pn,Hr.inspect=Hr.toSource=function(){return this.toString()},Hr.chain=Hr.flatMap,Hr.contains=Hr.includes,Dr(Pt,{flip:function(){return Xe(this,Be(this))},mapEntries:function(t,e){var n=this,r=0;return Xe(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Xe(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Qr=Pt.prototype;Qr["@@__IMMUTABLE_KEYED__@@"]=!0,Qr[Gt]=Hr.entries,Qr.toJSON=Wr,Qr.__toStringMapper=function(t,e){return pn(e)+": "+pn(t)},Dr(qt,{toKeyedSeq:function(){return new Le(this,!1)},filter:function(t,e){return Xe(this,Fe(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Xe(this,Ye(this,!1))},slice:function(t,e){return Xe(this,Je(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=It(t,t<0?this.count():this.size);var r=this.slice(0,t);return Xe(this,1===n?r:r.concat(on(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Xe(this,Ve(this,t,!1))},get:function(t,e){return(t=Ot(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=Ot(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Xe(this,function(t,e){var n=en(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate((function(t){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(1,r),a=0;return new Vt((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?Wt(n,a++,e):Wt(n,a++,i.value,i)}))},n}(this,t))},interleave:function(){var t=[this].concat(on(arguments)),e=$e(this.toSeq(),ie.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Xe(this,n)},keySeq:function(){return Jr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Xe(this,Ke(this,t,e,!1))},zip:function(){var t=[this].concat(on(arguments));return Xe(this,$e(this,ii,t))},zipAll:function(){var t=[this].concat(on(arguments));return Xe(this,$e(this,ii,t,!0))},zipWith:function(t){var e=on(arguments);return e[0]=this,Xe(this,$e(this,t,e))}});var $r=qt.prototype;$r["@@__IMMUTABLE_INDEXED__@@"]=!0,$r[Ft]=!0,Dr(Ut,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Xr=Ut.prototype;function Zr(t,e,n,r,i,o){return un(t.size),t.__iterate((function(t,o,a){i?(i=!1,n=t):n=e.call(r,n,t,o,a)}),o),n}function ti(t,e){return e}function ei(t,e){return[e,t]}function ni(t){return function(){return!t.apply(this,arguments)}}function ri(t){return function(){return-t.apply(this,arguments)}}function ii(){return on(arguments)}function oi(t,e){return t<e?1:t>e?-1:0}function ai(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Xr.has=Hr.includes,Xr.contains=Xr.includes,Xr.keys=Xr.values,Dr(re,Qr),Dr(ie,$r),Dr(oe,Xr);var ui=function(t){function e(t){return null==t?li():zr(t)?t:li().withMutations((function(e){var n=Ut(t);un(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(Pt(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Pr);ui.isOrderedSet=zr;var si,ci=ui.prototype;function fi(t,e){var n=Object.create(ci);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function li(){return si||(si=fi(Er()))}ci[Ft]=!0,ci.zip=$r.zip,ci.zipWith=$r.zipWith,ci.zipAll=$r.zipAll,ci.__empty=li,ci.__make=fi;var pi=function(t,e){var n;!function(t){if(Nt(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Yt(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t),s=i._indices={};i._name=e,i._keys=u,i._defaultValues=t;for(var c=0;c<u.length;c++){var f=u[c];s[f]=c,i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+vi(this)+' with property "'+f+'" since that property name is part of the Record API.'):mi(i,f)}}return this.__ownerID=void 0,this._values=sr().withMutations((function(t){t.setSize(a._keys.length),Pt(o).forEach((function(e,n){t.set(a._indices[n],e===a._defaultValues[n]?void 0:e)}))})),this},i=r.prototype=Object.create(di);return i.constructor=r,e&&(r.displayName=e),r};pi.prototype.toString=function(){for(var t,e=vi(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)e+=(r?", ":"")+(t=n[r])+": "+pn(this.get(t));return e+" }"},pi.prototype.equals=function(t){return this===t||t&&_i(this).equals(_i(t))},pi.prototype.hashCode=function(){return _i(this).hashCode()},pi.prototype.has=function(t){return this._indices.hasOwnProperty(t)},pi.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._indices[t],r=this._values.get(n);return void 0===r?this._defaultValues[t]:r},pi.prototype.set=function(t,e){if(this.has(t)){var n=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(n!==this._values&&!this.__ownerID)return yi(this,n)}return this},pi.prototype.remove=function(t){return this.set(t)},pi.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:yi(this,t)},pi.prototype.wasAltered=function(){return this._values.wasAltered()},pi.prototype.toSeq=function(){return _i(this)},pi.prototype.toJS=function(){return Lr(this)},pi.prototype.entries=function(){return this.__iterator(2)},pi.prototype.__iterator=function(t,e){return _i(this).__iterator(t,e)},pi.prototype.__iterate=function(t,e){return _i(this).__iterate(t,e)},pi.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?yi(this,e,t):(this.__ownerID=t,this._values=e,this)},pi.isRecord=Nt,pi.getDescriptiveName=vi;var hi,di=pi.prototype;function yi(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._values=e,r.__ownerID=n,r}function vi(t){return t.constructor.displayName||t.constructor.name||"Record"}function _i(t){return le(t._keys.map((function(e){return[e,t.get(e)]})))}function mi(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){an(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}function gi(t,e){return Mt(e)?e.toList():zt(e)?e.toMap():e.toSet()}di["@@__IMMUTABLE_RECORD__@@"]=!0,di.delete=di.remove,di.deleteIn=di.removeIn=xn,di.getIn=Gr,di.hasIn=Hr.hasIn,di.merge=An,di.mergeWith=kn,di.mergeIn=zn,di.mergeDeep=Cn,di.mergeDeepWith=Tn,di.mergeDeepIn=Mn,di.setIn=bn,di.update=En,di.updateIn=On,di.withMutations=Dn,di.asMutable=Ln,di.asImmutable=Pn,di[Gt]=di.entries,di.toJSON=di.toObject=Hr.toObject,di.inspect=di.toSource=function(){return this.toString()};var bi={version:"4.0.0",Collection:Lt,Iterable:Lt,Seq:ne,Map:Un,OrderedMap:xr,List:sr,Stack:kr,Set:Pr,OrderedSet:ui,Record:pi,Range:Jr,Repeat:function(t){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this._value=t,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(hi)return hi;hi=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return _e(this._value,t)},e.prototype.slice=function(t,n){var r=this.size;return kt(t,n,r)?this:new e(this._value,jt(n,r)-It(t,r))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return _e(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return _e(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var n=this.size,r=0;r!==n&&!1!==t(this._value,e?n-++r:r++,this););return r},e.prototype.__iterator=function(t,e){var n=this,r=this.size,i=0;return new Vt((function(){return i===r?{value:void 0,done:!0}:Wt(t,e?r-++i:i++,n._value)}))},e.prototype.equals=function(t){return t instanceof e?_e(this._value,t._value):Mr(t)},e}(ie),is:_e,fromJS:function(t,e){return function t(e,n,r,i,o,a){if("string"!=typeof r&&!Yt(r)&&(ee(r)||Qt(r)||fn(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),o&&""!==i&&o.push(i);var u=n.call(a,i,ne(r).map((function(i,a){return t(e,n,i,a,o,r)})),o&&o.slice());return e.pop(),o&&o.pop(),u}return r}([],e||gi,t,"",e&&e.length>2?[]:void 0,{"":t})},hash:we,isImmutable:Yt,isCollection:Tt,isKeyed:zt,isIndexed:Mt,isAssociative:Dt,isOrdered:Jt,isValueObject:ve,isPlainObject:fn,isSeq:Bt,isList:ur,isMap:de,isOrderedMap:ye,isStack:Ar,isSet:Tr,isOrderedSet:zr,isRecord:Nt,get:dn,getIn:Kr,has:hn,hasIn:Vr,merge:function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return Rn(t,e)},mergeDeep:function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return jn(t,e)},mergeWith:function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Rn(e,n,t)},mergeDeepWith:function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return jn(e,n,t)},remove:vn,removeIn:wn,set:_n,setIn:gn,update:Sn,updateIn:mn},wi={keysColor:"red",dashColor:"bold",stringColor:"red"},xi={keysColor:"cyan",dashColor:"bold",stringColor:"bold"},Si={keysColor:"magenta",dashColor:"black",stringColor:"bold"};var Ei=function(t,e){var n=t.items("tablesByName",e);if(null!==n){var r=n.get("rows"),i=[];n.get("schema").map((function(t){i.push(t.get("name"))})),Li.object(i,"Columns"),Li.titleLine("Data Rows");var o=r.map((function(t,e){var n={};return t.map((function(t,e){n[i[e]]=t})),n}));Li.object(o,"Data for ".concat(e))}},Oi=n(12),Ai=n.n(Oi);function ki(){return(ki=s()(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.map((function(t){var e=t.line.replace(/(\r\n|\n|\r)/gm,"");0===e.length&&console.log(" "),"title"===t.type?console.log(Ai.a.bold(e)):console.log(e)})),t.abrupt("return");case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ii=function(t){return ki.apply(this,arguments)},ji=n(8),Ri=n.n(ji);function Ci(t){console.log(" ","\n======================================="),console.log(Ri.a.render({title:t},Si)),console.log(" ","=======================================\n")}function Ti(t,e){Ci("".concat(e," size: ").concat(t.itemsList().size)),t.itemsList().size>0?Di(t.itemsList().toJS()):Di({info:"List is empty"})}function zi(t,e){Ci("".concat(e," size: ").concat(t.links().size)),t.links().forEach((function(t,e){Di({rel:e})}))}function Mi(t,e){Ci("".concat(e," size: ").concat(Ti.size)),Di(t.items().toJS())}function Di(t,e){!function(t,e){e&&Ci(e);console.log(Ri.a.render(t,xi))}(bi.Iterable.isIterable(t)?t.toJS():"object"===bt()(t)||Array.isArray(t)?t:{value:t},e)}var Li={result:function(t,e){t.itemsList().size>0&&Ti(t,"".concat(e,": ItemList")),t.links().size>0&&zi(t,"".concat(e,": links")),null!==t.items()&&Mi(t,"".concat(e,": items"))},itemsList:Ti,links:zi,items:Mi,itemsCmd:function(t,e,n){Ci("".concat(n," size: ").concat(t.itemsCmd(e).size)),t.itemsCmd(e).forEach((function(t,e){Di({rel:e})}))},object:Di,errMsg:function(t){var e="object"===bt()(t)?t:{Error:t};console.log(Ri.a.render(e,wi))},msg:function(t,e){e&&Ci(e),console.log(Ri.a.render(t,xi))},titleLine:Ci,casTable:Ei,logListLines:Ii},Pi=n(10),qi=n.n(Pi),Ui=n(14),Bi=n(7),Ni=n(38).promises;function Yi(){return(Yi=s()(f.a.mark((function t(e,n,r,i,o,a){var u,s,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=Object(Ui.a)(r,i),null==a){t.next=5;break}t.t0=a,t.next=8;break;case 5:return t.next=7,Ni.readFile(r,u.fileOptions);case 7:t.t0=t.sent;case 8:return s=t.t0,null!==u.transform&&(s=u.transform(s,u)),t.next=12,u.handler(e,n,s,u,o);case 12:if(c=t.sent,!0!==o){t.next=18;break}return l=i.split("."),p=qi()(l,2),h=p[0],d=p[1],t.next=17,Object(Bi.a)(e,n,h,d);case 17:c=c+"\n"+" ".concat(i," was saved");case 18:return t.abrupt("return",c);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Fi=function(t,e,n,r,i,o){return Yi.apply(this,arguments)},Ji=n(43);function Ki(){return(Ki=s()(f.a.mark((function t(e,n,r,i,o,a){var u,s,c,l,p,h,d,y,v,_,m,g,b,w,x;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.addServices("casManagement");case 2:return u=t.sent,s=u.casManagement,t.next=6,o.apiCall(s.links("servers"));case 6:if(0!==(c=t.sent).itemsList().size){t.next=9;break}throw{Error:"No cas servers were found"};case 9:return l=c.itemsList(0),p={qs:{filter:"eq(name,".concat(e,")")}},t.next=13,o.apiCall(c.itemsCmd(l,"caslibs"),p);case 13:return h=t.sent,t.next=16,o.apiCall(h.itemsCmd(e,"tables"));case 16:return d=t.sent,y={qs:{filter:"eq(name, ".concat(n.trim().toUpperCase(),")")}},t.next=20,o.apiCall(h.itemsCmd(e,"tables"),y);case 20:if(1!==(v=t.sent).itemsList().size){t.next=25;break}return _=v.itemsList(0),m=v.items(_,"data","tableReference","tableUri"),t.abrupt("return",m);case 25:return(g=new Ji).append("tableName",n),g.append("format",i),g.append("scope",null==a?"global":a),g.append("containsHeaderRow",!0),g.append("file",r),b={data:g,headers:{"content-type":'multipart/form-data; boundary="----------12345678901234567"'}},t.next=34,o.apiCall(d.links("upload"),b);case 34:return w=t.sent,x=w.items("tableReference","tableUri"),t.abrupt("return",x);case 37:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Gi=function(t,e,n,r,i,o){return Ki.apply(this,arguments)};var Vi=function(){return{caslRun:r.a,caslRunBase:i.a,casSetup:w,casActionRun:S,casFetchData:O,casUpdateData:k,computeRun:M,computeSetup:L,computeSummary:R,computeFetchData:B,computeFileContent:Y,computeResults:q,findReport:J,getReportImage:G,getReportUri:W,getSASTableRows:Q,jesSetup:X,jesRun:at,jesSummary:tt,jsonToDict:ut.a,casTableToJson:I,caslScore:y,caslDescribe:g,masSetup:ht,masAddModel:ct,masDescribe:dt,masRun:vt,casUpload:Fi,uploadData:Gi}}()}])}));
|
|
9
|
+
e.read=function(t,e,r,n,i){var o,a,u=8*i-n-1,s=(1<<u)-1,c=s>>1,f=-7,l=r?i-1:0,p=r?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=p,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,u,s,c=8*o-i-1,f=(1<<c)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?p/s:p*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,i),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+h]=255&u,h+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,r){"use strict";r.r(e),r.d(e,"caslRun",(function(){return n.a})),r.d(e,"caslRunBase",(function(){return i.a})),r.d(e,"casSetup",(function(){return w})),r.d(e,"casActionRun",(function(){return S})),r.d(e,"casTableToJson",(function(){return R})),r.d(e,"casFetchData",(function(){return O})),r.d(e,"casUpdateData",(function(){return j})),r.d(e,"computeRun",(function(){return L})),r.d(e,"computeSetup",(function(){return q})),r.d(e,"computeSummary",(function(){return T})),r.d(e,"computeFetchData",(function(){return Y})),r.d(e,"computeFileContent",(function(){return J})),r.d(e,"findReport",(function(){return G})),r.d(e,"getReportImage",(function(){return W})),r.d(e,"getReportUri",(function(){return Q})),r.d(e,"getSasTableRows",(function(){return X})),r.d(e,"jesSetup",(function(){return tt})),r.d(e,"jesRun",(function(){return st})),r.d(e,"jesSummary",(function(){return rt})),r.d(e,"jsonToDict",(function(){return ct.a})),r.d(e,"computeResults",(function(){return B})),r.d(e,"print",(function(){return qi})),r.d(e,"caslScore",(function(){return y})),r.d(e,"caslDescribe",(function(){return g})),r.d(e,"masSetup",(function(){return yt})),r.d(e,"masAddModel",(function(){return lt})),r.d(e,"masDescribe",(function(){return vt})),r.d(e,"masRun",(function(){return mt})),r.d(e,"masScore",(function(){return bt})),r.d(e,"casUpload",(function(){return Ki})),r.d(e,"uploadData",(function(){return Wi})),r.d(e,"lib",(function(){return Hi}));var n=r(4),i=r(2),o=r(6),a=r.n(o),u=r(1),s=r.n(u),c=r(0),f=r.n(c),l=r(3);function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){a()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(){return(d=s()(f.a.mark((function t(e,r,n){var o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.scoreCasl(),a=h({path:"/score"},n),t.next=4,Object(i.a)(e,r,o,a);case 4:return u=t.sent,s=u.items("results","casResults").toJS()[0],t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var y=function(t,e,r){return d.apply(this,arguments)};function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){a()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function m(){return(m=s()(f.a.mark((function t(e,r,n){var o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.scoreCasl(),a=_({path:"/describe"},n),t.next=4,Object(i.a)(e,r,o,a);case 4:return u=t.sent,s=u.items("results").toJS(),t.abrupt("return",s);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var g=function(t,e,r){return m.apply(this,arguments)};function b(){return(b=s()(f.a.mark((function t(e,r){var n,i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=3;break}return t.next=3,e.logon(r);case 3:return t.next=5,e.addServices("casManagement");case 5:return n=t.sent,i=n.casManagement,t.next=9,e.apiCall(i.links("servers"));case 9:if(0!==(o=t.sent).itemsList().size){t.next=12;break}throw{Error:"No cas servers were found"};case 12:return a=o.itemsList(0),t.next=15,e.apiCall(o.itemsCmd(a,"createSession"));case 15:return u=t.sent,t.abrupt("return",{servers:o,session:u});case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var w=function(t,e){return b.apply(this,arguments)};function x(){return(x=s()(f.a.mark((function t(e){var r,n,i,o,a=arguments;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=a.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=a[i];return t.next=3,e.runAction.apply(e,n);case 3:return o=t.sent,t.abrupt("return",o.items().toJS());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var S=function(t){return x.apply(this,arguments)};function E(){return(E=s()(f.a.mark((function t(e,r,n){var o,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.a.commonCasl()+" "+l.a.casFetchData(),t.next=3,Object(i.a)(e,r,o,n);case 3:return a=t.sent,t.abrupt("return",a.items("results","casResults").toJS());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var O=function(t,e,r){return E.apply(this,arguments)};function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){a()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function I(){return(I=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.data,o=n.where,a=n.table,u="",o.length>0&&(s=" ",o.map((function(t){var e="string"==typeof t.dataValue?"'".concat(t.dataValue.toString(),"'"):t.dataValue;u=u+s+t.value+"= ".concat(e," "),s=" AND "}))),c=[],i.map((function(t,e){var r;"_Index_"!==t.name&&(r=null==t.value?".":"string"==typeof t.value?JSON.stringify(t.value):t.value.toString(),console.log(r),c.push({var:t.name,value:r}))})),l=A(A({},a),{},{where:"".concat(u)}),p={table:l,set:c},console.log(p),h={action:"table.update",data:p},t.next=11,e.runAction(r,h);case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var j=function(t,e,r){return I.apply(this,arguments)};var R=function(t,e){var r=t.items("tables",e),n=r.get("rows"),i=[];r.get("schema").map((function(t){i.push(t.get("name"))}));var o=[];return n.map((function(t){var e={};t.map((function(t,r){e[i[r]]=t})),o.push(e)})),o};function C(){return(C=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i={session:r,log:null,listing:null,ods:null,job:n,tables:{},files:{}}).log=n.links("log"),i.listing=n.links("listing"),null===(o=n.links("results"))){t.next=10;break}return t.next=7,e.apiCall(o);case 7:if(a=t.sent,(u=a.itemsList().size)>0)for(s=0;s<u;s++)c=a.itemsList(s),"ods"===(l=a.items(c,"data","type").toLowerCase())?i.ods=a.itemsCmd(c,"self"):"table"===l?(p={self:a.itemsCmd(c,"self"),current:null},i.tables[c]=p):"file"===l?(h={self:c,current:null,data:null},i.files[c]=h):(d={self:c,current:null,data:null},i[l]=d);case 10:return t.abrupt("return",i);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var T=function(t,e,r){return C.apply(this,arguments)};function z(){return(z=s()(f.a.mark((function t(e,r,n,i,o){var a,u,s,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="wait",u=null!=o?o:5,"wait"!==i&&null!==i&&(a=Math.max(Math.floor(i/u),1)),s={data:{code:n}},t.next=6,e.apiCall(r.links("execute"),s);case 6:return c=t.sent,t.next=9,e.jobState(c,null,a,u);case 9:if("running"!==(l=t.sent).data){t.next=14;break}throw"ERROR: Job did not complete in allotted time";case 14:return t.next=16,T(e,r,l.job);case 16:return(p=t.sent).SASJobStatus=l.data,t.abrupt("return",p);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var M=function(t,e,r,n,i){return z.apply(this,arguments)};function D(){return(D=s()(f.a.mark((function t(e,r,n,i,o,a){var u,s,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=[],null!=i)for(s in i)c="%let ".concat(s," = ").concat(i[s],";"),u.push(c);return l=n.split(/\r?\n/),u=u.concat(l),t.next=6,M(e,r,u,o,a);case 6:return p=t.sent,t.abrupt("return",p);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var L=function(t,e,r,n,i,o){return D.apply(this,arguments)};function P(){return(P=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n){t.next=4;break}return t.next=3,e.logon(n);case 3:t.sent;case 4:return t.next=6,e.addServices("compute");case 6:return i=t.sent,o=i.compute,t.next=10,e.apiCall(o.links("contexts"));case 10:if(a=t.sent,null==r&&(r="Job Execution compute"),r=r.toLowerCase(),-1!==(u=a.itemsList().findIndex((function(t){return t.toLowerCase().indexOf(r)>=0})))){t.next=17;break}throw{Error:"Compute Context not found: "+r};case 17:return s=a.itemsCmd(a.itemsList(u),"createSession"),t.next=20,e.apiCall(s);case 20:return c=t.sent,t.abrupt("return",c);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var q=function(t,e,r){return P.apply(this,arguments)};function U(){return(U=s()(f.a.mark((function t(e,r,n){var i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("log"!==n&&"listing"!==n){t.next=20;break}if(i=[],null===r[n]){t.next=16;break}return t.next=5,e.apiCall(r[n]);case 5:o=t.sent,i=i.concat(o.items().toJS());case 7:if(null===(a=o.scrollCmds("next"))){t.next=14;break}return t.next=10,e.apiCall(a);case 10:o=t.sent,i=i.concat(o.items().toJS()),t.next=7;break;case 14:t.next=17;break;case 16:i[0]="Note: No ".concat(n);case 17:return t.abrupt("return",i);case 20:if("ods"!==n){t.next=31;break}if(null===r.ods){t.next=28;break}return t.next=24,e.apiCall(r.ods);case 24:return u=t.sent,t.abrupt("return",u.items());case 28:return t.abrupt("return","<h2> No ODS output </h2>");case 29:t.next=40;break;case 31:if("tables"!==n){t.next=35;break}return t.abrupt("return",Object.keys(r.tables));case 35:if("files"!==n){t.next=39;break}return t.abrupt("return",Object.keys(r.files));case 39:throw"Error: Invalid type ".concat(n);case 40:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B=function(t,e,r){return U.apply(this,arguments)};function N(){return(N=s()(f.a.mark((function t(e,r,n,i,o){var a,u,s,c,l,p,h,d,y,v;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,s=null!=o?{qs:o}:null,!0!==r.tables.hasOwnProperty(n)){t.next=29;break}if(null!==(u=r.tables[n]).current&&null!=i){t.next=17;break}return t.next=8,e.apiCall(u.self);case 8:return c=t.sent,t.next=11,e.apiCall(c.links("rowSet"),s);case 11:l=t.sent,u.current=l,p=l.items().toJS(),a={columns:p.columns,rows:p.rows,scrollOptions:l.scrollCmds().keySeq().toJS()},t.next=29;break;case 17:if(h=u.current,d=i,"next"===i&&null===h.scrollCmds("next")&&(d=null!==h.links("last")?"last":null),"prev"===i&&null===h.scrollCmds("prev")&&(d=null!==h.links("first")?"first":null),null===d||null===h.scrollCmds(d)){t.next=29;break}return t.next=25,e.apiCall(h.scrollCmds(d),s);case 25:y=t.sent,u.current=y,v=y.items().toJS(),a={columns:v.columns,rows:v.rows,scrollOptions:y.scrollCmds().keySeq().toJS()};case 29:return t.abrupt("return",a);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=function(t,e,r,n,i){return N.apply(this,arguments)};function F(){return(F=s()(f.a.mark((function t(e,r,n,i){var o,a,u,s,c,l;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(o=r.files[n])){t.next=3;break}throw"Invalid fileref ".concat(n);case 3:if(null!==o.current){t.next=12;break}return a={qs:{filter:"eq(name,'".concat(n,"')")}},t.next=7,e.apiCall(r.session.links("files"),a);case 7:return u=t.sent,t.next=10,e.apiCall(u.itemsCmd(n,"self"));case 10:u=t.sent,o.current=u;case 12:if(!0!==i){t.next=17;break}return s="".concat(r.session.host).concat(o.current.links("content","link","uri")),t.abrupt("return",s);case 17:if(null!==o.data){t.next=26;break}return t.next=20,e.apiCall(o.current.links("content"));case 20:return c=t.sent,l=c.items(),o.data=l,t.abrupt("return",l);case 26:return t.abrupt("return",o.data);case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var J=function(t,e,r,n){return F.apply(this,arguments)};function K(){return(K=s()(f.a.mark((function t(e,r){var n,i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getService("reports"),i=null,null!==r&&(i={qs:{filter:"eq(name,'".concat(r,"')")}}),t.next=5,e.apiCall(n.links("reports"),i);case 5:return o=t.sent,t.abrupt("return",0===o.itemsList().size?null:o);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var G=function(t,e){return K.apply(this,arguments)};function V(){return(V=s()(f.a.mark((function t(e,r){var n,i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.rafObject("reportImages"),t.next=3,G(e,r);case 3:if(null!==(i=t.sent)){t.next=6;break}return t.abrupt("return","".concat(r," was not found"));case 6:return o=i.itemsCmd(i.itemsList(0),"self","link","uri"),a={data:{reportUri:o,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},t.next=11,e.apiCall(n.links("createJob"),a);case 11:return u=t.sent,t.next=14,e.jobState(u,{qs:{wait:1.5}},10,2);case 14:if("completed"===(s=t.sent).data){t.next=17;break}return t.abrupt("return","Job failed ".concat(s.data));case 17:return t.next=19,e.apiCall(s.job.itemsCmd(s.job.itemsList(0),"image"));case 19:return c=t.sent,t.abrupt("return",c.items());case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var W=function(t,e){return V.apply(this,arguments)};function H(){return(H=s()(f.a.mark((function t(e,r){var n,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G(e,r);case 2:if(null!==(n=t.sent)){t.next=6;break}throw null==r?"No reports were found":"".concat(r," was not found");case 6:return i=[],n.items().map((function(t,e){var r={name:e,uri:n.itemsCmd(e,"self","link","uri")};i.push(r)})),t.abrupt("return",i);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Q=function(t,e){return H.apply(this,arguments)};function $(){return($=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.tables[n],t.next=3,e.apiCall(i);case 3:return o=t.sent,t.next=6,e.apiCall(o.links("rowSet"));case 6:for(a=t.sent,u=a.items("columns"),s=a.items("rows"),c=[],l=s.size,p=function(t){var e=s.get(t),r={};u.map((function(t,n){var i=t.toLowerCase();r[i]=e.get(n)})),c.push(r)},h=0;h<l;h++)p(h);return t.abrupt("return",c);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var X=function(t,e,r){return $.apply(this,arguments)};function Z(){return(Z=s()(f.a.mark((function t(e,r){var n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=3;break}return t.next=3,e.logon(r);case 3:return t.next=5,e.addServices("jobExecution","compute","jobDefinitions");case 5:return n=t.sent,t.abrupt("return",n.jobExecution);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var tt=function(t,e){return Z.apply(this,arguments)};function et(){return(et=s()(f.a.mark((function t(e,r){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var rt=function(t,e){return et.apply(this,arguments)};function nt(){return(nt=s()(f.a.mark((function t(e,r,n){var i,o,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apiCall(r.links("create"),n);case 2:return i=t.sent,t.next=5,e.jobState(i,null,5,2);case 5:if("running"!==(o=t.sent).data){t.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==o.data){t.next=14;break}throw JSON.stringify(o);case 14:return t.next=16,rt(e,o.job);case 16:return a=t.sent,t.abrupt("return",a);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var it=function(t,e,r){return nt.apply(this,arguments)};function ot(){return(ot=s()(f.a.mark((function t(e,r,n,i,o){var a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={},u={},null===i){t.next=6;break}return t.next=5,at(e,i);case 5:a.jobDefinitionUri=t.sent;case 6:return-0!=n&&(u.code=n),u.type="Compute",a.arguments=o,a.jobDefinition=u,s={data:a},t.next=13,it(e,r,s);case 13:return c=t.sent,t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function at(t,e){return ut.apply(this,arguments)}function ut(){return(ut=s()(f.a.mark((function t(e,r){var n,i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.getService("jobDefinitions"),n=null,i={qs:{filter:"eq(name,'".concat(r,"')")}},t.next=5,it(e,i);case 5:if(0!==(o=t.sent).itemsList().size){t.next=10;break}throw"Error: ".concat(r," not found in the system");case 10:n=o.itemsCmd(r,"self","link","uri");case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var st=function(t,e,r,n,i){return ot.apply(this,arguments)},ct=r(5);function ft(){return(ft=s()(f.a.mark((function t(e,r,n){var i,o,a,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=r.service,o=0;case 2:if(!(o<n.length)){t.next=12;break}if(a=n[o],null!=r.steps[a]){t.next=9;break}return t.next=7,ht(e,i,a);case 7:u=t.sent,r.steps[a]=u;case 9:o++,t.next=2;break;case 12:return t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var lt=function(t,e,r){return ft.apply(this,arguments)};function pt(){return(pt=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={qs:{filter:"eq(name,'".concat(n.trim(),"')")}},t.next=3,e.apiCall(r.links("modules"),i);case 3:if(0!==(o=t.sent).itemsList().size){t.next=6;break}return t.abrupt("return",null);case 6:return a=o.itemsCmd(n,"steps"),t.next=9,e.apiCall(a);case 9:return u=t.sent,s={name:n,stepsRafLink:u,stepIds:o.items(n,"data","stepIds").toJS(),microanalyticScore:r},t.abrupt("return",s);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ht=function(t,e,r){return pt.apply(this,arguments)};function dt(){return(dt=s()(f.a.mark((function t(e,r,n){var i,o,a,u,s,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n){t.next=3;break}return t.next=3,e.logon(n);case 3:return t.next=5,e.addServices("microanalyticScore");case 5:i=t.sent,o=i.microanalyticScore,a={service:o,steps:{}},u=0;case 9:if(!(u<r.length)){t.next=18;break}return s=r[u],t.next=13,ht(e,o,s);case 13:c=t.sent,a.steps[s]=c;case 15:u++,t.next=9;break;case 18:return t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var yt=function(t,e,r){return dt.apply(this,arguments)};var vt=function(t,e,r){var n=t.steps[e];if(null===n)return[];var i=null;if(null==r){var o=n.stepIds.findIndex((function(t){return"execute"===t||"score"===t}));if(-1===o)return[];i=n.stepIds[o]}else{if(-1===n.stepIds.findIndex((function(t){return t===r})))return[];i=r}var a=n.stepsRafLink.items(i,"data","inputs");return null===a?[]:a.toJS()};function _t(){return(_t=s()(f.a.mark((function t(e,r,n,i,o,a){var u,s,c,l,p,h,d,y,v,_,m,g,b;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=r.steps[n],s=!1,c=[],!1===Array.isArray(i))for(l in i)p={name:l,value:i[l]},c.push(p);else s=!0;if(h={data:{inputs:!0===s?i:c}},d=null,null!=o){t.next=15;break}if(-1!==(y=u.stepIds.findIndex((function(t){return"execute"===t||"score"===t})))){t.next=12;break}return t.abrupt("return",[]);case 12:d=u.stepIds[y];case 13:t.next=21;break;case 15:if(-1!==u.stepIds.findIndex((function(t){return t===o}))){t.next=20;break}return t.abrupt("return",[]);case 20:d=o;case 21:if(null!==(v=u.stepsRafLink.itemsCmd(d,a))){t.next=25;break}return _=[{name:"Error",type:"string",value:"name: ".concat(n," step: ").concat(o," operation: ").concat(a," is an invalid combination")}],t.abrupt("return",_);case 25:return t.next=27,e.apiCall(v,h);case 27:return m=t.sent,g=m.items("outputs").toJS(),!0===s?b=g:(b={},g.map((function(t){b[t.name]=t.value}))),t.abrupt("return",b);case 31:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt=function(t,e,r,n,i,o){return _t.apply(this,arguments)};function gt(){return(gt=s()(f.a.mark((function t(e,r,n){var i,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,yt(e,[r]);case 2:return i=t.sent,t.next=5,mt(e,i,r,n,"score","execute");case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var bt=function(t,e,r){return gt.apply(this,arguments)},wt=r(7),xt=r.n(wt),St={};function Et(t){t&&(t.value=!0)}function Ot(){}function kt(t){return void 0===t.size&&(t.size=t.__iterate(It)),t.size}function At(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?kt(t)+e:e}function It(){return!0}function jt(t,e,r){return(0===t&&!zt(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function Rt(t,e){return Tt(t,e,0)}function Ct(t,e){return Tt(t,e,e)}function Tt(t,e,r){return void 0===t?r:zt(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function zt(t){return t<0||0===t&&1/t==-1/0}function Mt(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function Dt(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function Lt(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function Pt(t){return Dt(t)||Lt(t)}var qt=function(t){return Mt(t)?t:ie(t)},Ut=function(t){function e(t){return Dt(t)?t:oe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(qt),Bt=function(t){function e(t){return Lt(t)?t:ae(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(qt),Nt=function(t){function e(t){return Mt(t)&&!Pt(t)?t:ue(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(qt);qt.Keyed=Ut,qt.Indexed=Bt,qt.Set=Nt;function Yt(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function Ft(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Jt(t){return Mt(t)||Ft(t)}var Kt="@@__IMMUTABLE_ORDERED__@@";function Gt(t){return Boolean(t&&t[Kt])}var Vt="function"==typeof Symbol&&Symbol.iterator,Wt=Vt||"@@iterator",Ht=function(t){this.next=t};function Qt(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function $t(){return{value:void 0,done:!0}}function Xt(t){return!!Array.isArray(t)||!!ee(t)}function Zt(t){return t&&"function"==typeof t.next}function te(t){var e=ee(t);return e&&e.call(t)}function ee(t){var e=t&&(Vt&&t[Vt]||t["@@iterator"]);if("function"==typeof e)return e}Ht.prototype.toString=function(){return"[Iterator]"},Ht.KEYS=0,Ht.VALUES=1,Ht.ENTRIES=2,Ht.prototype.inspect=Ht.prototype.toSource=function(){return this.toString()},Ht.prototype[Wt]=function(){return this};var re=Object.prototype.hasOwnProperty;function ne(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var ie=function(t){function e(t){return null==t?pe():Jt(t)?t.toSeq():function(t){var e=ye(t);if(e)return(n=ee(r=t))&&n===r.entries?e.fromEntrySeq():function(t){var e=ee(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var r,n;if("object"==typeof t)return new ce(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new Ht((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return Qt(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(qt),oe=function(t){function e(t){return null==t?pe().toKeyedSeq():Mt(t)?Dt(t)?t.toSeq():t.fromEntrySeq():Ft(t)?t.toSeq():he(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ie),ae=function(t){function e(t){return null==t?pe():Mt(t)?Dt(t)?t.entrySeq():t.toIndexedSeq():Ft(t)?t.toSeq().entrySeq():de(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ie),ue=function(t){function e(t){return(Mt(t)&&!Pt(t)?t:ae(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ie);ie.isSeq=Yt,ie.Keyed=oe,ie.Set=ue,ie.Indexed=ae,ie.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var se=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[At(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new Ht((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return Qt(t,o,r[o])}))},e}(ae),ce=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return re.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new Ht((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return Qt(t,a,r[a])}))},e}(oe);ce.prototype[Kt]=!0;var fe,le=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=te(this._collection),n=0;if(Zt(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=te(this._collection);if(!Zt(r))return new Ht($t);var n=0;return new Ht((function(){var e=r.next();return e.done?e:Qt(t,n++,e.value)}))},e}(ae);function pe(){return fe||(fe=new se([]))}function he(t){var e=ye(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new ce(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function de(t){var e=ye(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function ye(t){return ne(t)?new se(t):Xt(t)?new le(t):void 0}function ve(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function _e(t){return ve(t)&&Gt(t)}function me(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function ge(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(me(t)&&me(e)&&t.equals(e))}var be="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function we(t){return t>>>1&1073741824|3221225471&t}var xe=Object.prototype.valueOf;function Se(t){if(null==t)return Ee(t);if("function"==typeof t.hashCode)return we(t.hashCode(t));var e,r=(e=t).valueOf!==xe&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return Ee(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return we(e)}(r);case"string":return r.length>Me?function(t){var e=Pe[t];void 0===e&&(e=Oe(t),Le===De&&(Le=0,Pe={}),Le++,Pe[t]=e);return e}(r):Oe(r);case"object":case"function":return function(t){var e;if(Re&&void 0!==(e=je.get(t)))return e;if(void 0!==(e=t[ze]))return e;if(!Ae){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[ze]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=Ie(),Re)je.set(t,e);else{if(void 0!==ke&&!1===ke(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Ae)Object.defineProperty(t,ze,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[ze]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[ze]=e}}return e}(r);case"symbol":return function(t){var e=Ce[t];if(void 0!==e)return e;return e=Ie(),Ce[t]=e,e}(r);default:if("function"==typeof r.toString)return Oe(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function Ee(t){return null===t?1108378658:1108378659}function Oe(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return we(e)}var ke=Object.isExtensible,Ae=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Ie(){var t=++Te;return 1073741824&Te&&(Te=0),t}var je,Re="function"==typeof WeakMap;Re&&(je=new WeakMap);var Ce=Object.create(null),Te=0,ze="__immutablehash__";"function"==typeof Symbol&&(ze=Symbol(ze));var Me=16,De=255,Le=0,Pe={},qe=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=Je(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=Fe(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e,n){return t(e,n,r)}),e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(oe);qe.prototype[Kt]=!0;var Ue=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&kt(this),this._iter.__iterate((function(i){return t(i,e?r.size-++n:n++,r)}),e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(1,e),i=0;return e&&kt(this),new Ht((function(){var o=n.next();return o.done?o:Qt(t,e?r.size-++i:i++,o.value,o)}))},e}(ae),Be=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new Ht((function(){var e=r.next();return e.done?e:Qt(t,e.value,e.value,e)}))},e}(ue),Ne=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){er(e);var n=Mt(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new Ht((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){er(n);var i=Mt(n);return Qt(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}}))},e}(oe);function Ye(t){var e=nr(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ir,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new Ht((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,r)},e}function Fe(t,e,r){var n=nr(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,St);return o===St?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate((function(t,i,a){return!1!==n(e.call(r,t,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(2,i);return new Ht((function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return Qt(n,u,e.call(r,a[1],u,t),i)}))},n}function Je(t,e){var r=this,n=nr(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Ye(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=ir,n.__iterate=function(r,n){var i=this,o=0;return n&&kt(t),t.__iterate((function(t,a){return r(t,e?a:n?i.size-++o:o++,i)}),!n)},n.__iterator=function(n,i){var o=0;i&&kt(t);var a=t.__iterator(2,!i);return new Ht((function(){var t=a.next();if(t.done)return t;var u=t.value;return Qt(n,e?u[0]:i?r.size-++o:o++,u[1],t)}))},n}function Ke(t,e,r,n){var i=nr(t);return n&&(i.has=function(n){var i=t.get(n,St);return i!==St&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,St);return o!==St&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate((function(t,o,s){if(e.call(r,t,o,s))return u++,i(t,n?o:u-1,a)}),o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(2,o),u=0;return new Ht((function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return Qt(i,n?c:u++,f,o)}}))},i}function Ge(t,e,r,n){var i=t.size;if(jt(e,r,i))return t;var o=Rt(e,i),a=Ct(r,i);if(o!=o||a!=a)return Ge(t.toSeq().cacheResult(),e,r,n);var u,s=a-o;s==s&&(u=s<0?0:s);var c=nr(t);return c.size=0===u?u:t.size&&u||void 0,!n&&Yt(t)&&u>=0&&(c.get=function(e,r){return(e=At(this,e))>=0&&e<u?t.get(e+o,r):r}),c.__iterateUncached=function(e,r){var i=this;if(0===u)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,s=!0,c=0;return t.__iterate((function(t,r){if(!s||!(s=a++<o))return c++,!1!==e(t,n?r:c-1,i)&&c!==u})),c},c.__iteratorUncached=function(e,r){if(0!==u&&r)return this.cacheResult().__iterator(e,r);if(0===u)return new Ht($t);var i=t.__iterator(e,r),a=0,s=0;return new Ht((function(){for(;a++<o;)i.next();if(++s>u)return{value:void 0,done:!0};var t=i.next();return n||1===e||t.done?t:Qt(e,s-1,0===e?void 0:t.value[1],t)}))},c}function Ve(t,e,r,n){var i=nr(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate((function(t,o,c){if(!u||!(u=e.call(r,t,o,c)))return s++,i(t,n?o:s-1,a)})),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(2,o),s=!0,c=0;return new Ht((function(){var t,o,f;do{if((t=u.next()).done)return n||1===i?t:Qt(i,c++,0===i?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],s&&(s=e.call(r,f,o,a))}while(s);return 2===i?t:Qt(i,o,f,t)}))},i}function We(t,e){var r=Dt(t),n=[t].concat(e).map((function(t){return Mt(t)?r&&(t=Ut(t)):t=r?he(t):de(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&Dt(i)||Lt(t)&&Lt(i))return i}var o=new se(n);return r?o=o.toKeyedSeq():Lt(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function He(t,e,r){var n=nr(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,u=!1;return function t(s,c){s.__iterate((function(o,s){return(!e||c<e)&&Mt(o)?t(o,c+1):(a++,!1===i(o,r?s:a-1,n)&&(u=!0)),!u}),o)}(t,0),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=t.__iterator(n,i),a=[],u=0;return new Ht((function(){for(;o;){var t=o.next();if(!1===t.done){var s=t.value;if(2===n&&(s=s[1]),e&&!(a.length<e)||!Mt(s))return r?t:Qt(n,u++,s,t);a.push(o),o=s.__iterator(n,i)}else o=a.pop()}return{value:void 0,done:!0}}))},n}function Qe(t,e,r){e||(e=or);var n=Dt(t),i=0,o=t.toSeq().map((function(e,n){return[n,e,i++,r?r(e,n,t):e]})).valueSeq().toArray();return o.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?oe(o):Lt(t)?ae(o):ue(o)}function $e(t,e,r){if(e||(e=or),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return Xe(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return Xe(e,t,r)?r:t}))}function Xe(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Ze(t,e,r,n){var i=nr(t),o=new se(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=qt(t),te(i?t.reverse():t)})),a=0,u=!1;return new Ht((function(){var r;return u||(r=o.map((function(t){return t.next()})),u=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),u?{value:void 0,done:!0}:Qt(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function tr(t,e){return t===e?t:Yt(t)?e:t.constructor(e)}function er(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function rr(t){return Dt(t)?Ut:Lt(t)?Bt:Nt}function nr(t){return Object.create((Dt(t)?oe:Lt(t)?ae:ue).prototype)}function ir(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ie.prototype.cacheResult.call(this)}function or(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function ar(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function ur(t,e){if(!t)throw new Error(e)}function sr(t){ur(t!==1/0,"Cannot perform this action with an infinite size.")}function cr(t){if(ne(t)&&"string"!=typeof t)return t;if(Gt(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}Ue.prototype.cacheResult=qe.prototype.cacheResult=Be.prototype.cacheResult=Ne.prototype.cacheResult=ir;var fr=Object.prototype.toString;function lr(t){if(!t||"object"!=typeof t||"[object Object]"!==fr.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var r=e,n=Object.getPrototypeOf(e);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===e}function pr(t){return"object"==typeof t&&(Jt(t)||Array.isArray(t)||lr(t))}function hr(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function dr(t,e){return Jt(t)?t.has(e):pr(t)&&re.call(t,e)}function yr(t,e,r){return Jt(t)?t.get(e,r):dr(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function vr(t){if(Array.isArray(t))return ar(t);var e={};for(var r in t)re.call(t,r)&&(e[r]=t[r]);return e}function _r(t,e){if(!pr(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(Jt(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!re.call(t,e))return t;var r=vr(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function mr(t,e,r){if(!pr(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(Jt(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(re.call(t,e)&&r===t[e])return t;var n=vr(t);return n[e]=r,n}function gr(t,e,r,n){n||(n=r,r=void 0);var i=function t(e,r,n,i,o,a){var u=r===St;if(i===n.length){var s=u?o:r,c=a(s);return c===s?r:c}if(!u&&!pr(r))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,i).map(hr)+"]: "+r);var f=n[i],l=u?St:yr(r,f,St),p=t(l===St?e:Jt(l),l,n,i+1,o,a);return p===l?r:p===St?_r(r,f):mr(u?e?Xr():{}:r,f,p)}(Jt(t),t,cr(e),0,r,n);return i===St?r:i}function br(t,e,r){return gr(t,e,St,(function(){return r}))}function wr(t,e){return br(this,t,e)}function xr(t,e){return gr(t,e,(function(){return St}))}function Sr(t){return xr(this,t)}function Er(t,e,r,n){return gr(t,[e],r,n)}function Or(t,e,r){return 1===arguments.length?t(this):Er(this,t,e,r)}function kr(t,e,r){return gr(this,t,e,r)}function Ar(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return jr(this,t)}function Ir(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return jr(this,e,t)}function jr(t,e,r){for(var n=[],i=0;i<e.length;i++){var o=Ut(e[i]);0!==o.size&&n.push(o)}return 0===n.length?t:0!==t.toSeq().size||t.__ownerID||1!==n.length?t.withMutations((function(t){for(var e=r?function(e,n){Er(t,n,St,(function(t){return t===St?e:r(t,e,n)}))}:function(e,r){t.set(r,e)},i=0;i<n.length;i++)n[i].forEach(e)})):t.constructor(n[0])}function Rr(t,e,r){return Cr(t,e,function(t){return function e(r,n,i){return pr(r)&&pr(n)&&(o=n,a=ie(r),u=ie(o),Lt(a)===Lt(u)&&Dt(a)===Dt(u))?Cr(r,[n],e):t?t(r,n,i):n;var o,a,u}}(r))}function Cr(t,e,r){if(!pr(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(Jt(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),i=t,o=n?Bt:Ut,a=n?function(e){i===t&&(i=vr(i)),i.push(e)}:function(e,n){var o=re.call(i,n),a=o&&r?r(i[n],e,n):e;o&&a===i[n]||(i===t&&(i=vr(i)),i[n]=a)},u=0;u<e.length;u++)o(e[u]).forEach(a);return i}function Tr(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Rr(this,t)}function zr(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Rr(this,e,t)}function Mr(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return gr(this,t,Xr(),(function(t){return Cr(t,e)}))}function Dr(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return gr(this,t,Xr(),(function(t){return Rr(t,e)}))}function Lr(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Pr(){return this.__ownerID?this:this.__ensureOwner(new Ot)}function qr(){return this.__ensureOwner()}function Ur(){return this.__altered}var Br=function(t){function e(e){return null==e?Xr():ve(e)&&!Gt(e)?e:Xr().withMutations((function(r){var n=t(e);sr(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Xr().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Zr(this,t,e)},e.prototype.remove=function(t){return Zr(this,t,St)},e.prototype.deleteAll=function(t){var e=qt(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xr()},e.prototype.sort=function(t){return En(Qe(this,t))},e.prototype.sortBy=function(t,e){return En(Qe(this,e,t))},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){n.forEach((function(i,o){n.set(o,t.call(e,i,o,r))}))}))},e.prototype.__iterator=function(t,e){return new Wr(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?$r(this.size,this._root,t,this.__hash):0===this.size?Xr():(this.__ownerID=t,this.__altered=!1,this)},e}(Ut);Br.isMap=ve;var Nr=Br.prototype;Nr["@@__IMMUTABLE_MAP__@@"]=!0,Nr.delete=Nr.remove,Nr.removeAll=Nr.deleteAll,Nr.setIn=wr,Nr.removeIn=Nr.deleteIn=Sr,Nr.update=Or,Nr.updateIn=kr,Nr.merge=Nr.concat=Ar,Nr.mergeWith=Ir,Nr.mergeDeep=Tr,Nr.mergeDeepWith=zr,Nr.mergeIn=Mr,Nr.mergeDeepIn=Dr,Nr.withMutations=Lr,Nr.wasAltered=Ur,Nr.asImmutable=qr,Nr["@@transducer/init"]=Nr.asMutable=Pr,Nr["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Nr["@@transducer/result"]=function(t){return t.asImmutable()};var Yr=function(t,e){this.ownerID=t,this.entries=e};Yr.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(r,i[o][0]))return i[o][1];return n},Yr.prototype.update=function(t,e,r,n,i,o,a){for(var u=i===St,s=this.entries,c=0,f=s.length;c<f&&!ge(n,s[c][0]);c++);var l=c<f;if(l?s[c][1]===i:u)return this;if(Et(a),(u||!l)&&Et(o),!u||1!==s.length){if(!l&&!u&&s.length>=an)return function(t,e,r,n){t||(t=new Ot);for(var i=new Gr(t,Se(r),[r,n]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}(t,s,n,i);var p=t&&t===this.ownerID,h=p?s:ar(s);return l?u?c===f-1?h.pop():h[c]=h.pop():h[c]=[n,i]:h.push([n,i]),p?(this.entries=h,this):new Yr(t,h)}};var Fr=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Fr.prototype.get=function(t,e,r,n){void 0===e&&(e=Se(r));var i=1<<(31&(0===t?e:e>>>t)),o=this.bitmap;return 0==(o&i)?n:this.nodes[nn(o&i-1)].get(t+5,e,r,n)},Fr.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Se(n));var u=31&(0===e?r:r>>>e),s=1<<u,c=this.bitmap,f=0!=(c&s);if(!f&&i===St)return this;var l=nn(c&s-1),p=this.nodes,h=f?p[l]:void 0,d=tn(h,t,e+5,r,n,i,o,a);if(d===h)return this;if(!f&&d&&p.length>=un)return function(t,e,r,n,i){for(var o=0,a=new Array(32),u=0;0!==r;u++,r>>>=1)a[u]=1&r?e[o++]:void 0;return a[n]=i,new Jr(t,o+1,a)}(t,p,c,u,d);if(f&&!d&&2===p.length&&en(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&en(d))return d;var y=t&&t===this.ownerID,v=f?d?c:c^s:c|s,_=f?d?on(p,l,d,y):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a<n;a++)a===e&&(o=1),i[a]=t[a+o];return i}(p,l,y):function(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),a=0,u=0;u<i;u++)u===e?(o[u]=r,a=-1):o[u]=t[u+a];return o}(p,l,d,y);return y?(this.bitmap=v,this.nodes=_,this):new Fr(t,v,_)};var Jr=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};Jr.prototype.get=function(t,e,r,n){void 0===e&&(e=Se(r));var i=31&(0===t?e:e>>>t),o=this.nodes[i];return o?o.get(t+5,e,r,n):n},Jr.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Se(n));var u=31&(0===e?r:r>>>e),s=i===St,c=this.nodes,f=c[u];if(s&&!f)return this;var l=tn(f,t,e+5,r,n,i,o,a);if(l===f)return this;var p=this.count;if(f){if(!l&&--p<sn)return function(t,e,r,n){for(var i=0,o=0,a=new Array(r),u=0,s=1,c=e.length;u<c;u++,s<<=1){var f=e[u];void 0!==f&&u!==n&&(i|=s,a[o++]=f)}return new Fr(t,i,a)}(t,c,p,u)}else p++;var h=t&&t===this.ownerID,d=on(c,u,l,h);return h?(this.count=p,this.nodes=d,this):new Jr(t,p,d)};var Kr=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Kr.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(r,i[o][0]))return i[o][1];return n},Kr.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Se(n));var u=i===St;if(r!==this.keyHash)return u?this:(Et(a),Et(o),rn(this,t,e,r,[n,i]));for(var s=this.entries,c=0,f=s.length;c<f&&!ge(n,s[c][0]);c++);var l=c<f;if(l?s[c][1]===i:u)return this;if(Et(a),(u||!l)&&Et(o),u&&2===f)return new Gr(t,this.keyHash,s[1^c]);var p=t&&t===this.ownerID,h=p?s:ar(s);return l?u?c===f-1?h.pop():h[c]=h.pop():h[c]=[n,i]:h.push([n,i]),p?(this.entries=h,this):new Kr(t,this.keyHash,h)};var Gr=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Gr.prototype.get=function(t,e,r,n){return ge(r,this.entry[0])?this.entry[1]:n},Gr.prototype.update=function(t,e,r,n,i,o,a){var u=i===St,s=ge(n,this.entry[0]);return(s?i===this.entry[1]:u)?this:(Et(a),u?void Et(o):s?t&&t===this.ownerID?(this.entry[1]=i,this):new Gr(t,this.keyHash,[n,i]):(Et(o),rn(this,t,e,Se(n),[n,i])))},Yr.prototype.iterate=Kr.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},Fr.prototype.iterate=Jr.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},Gr.prototype.iterate=function(t,e){return t(this.entry)};var Vr,Wr=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Qr(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,i=void 0;if(r.entry){if(0===n)return Hr(t,r.entry)}else if(r.entries){if(n<=(i=r.entries.length-1))return Hr(t,r.entries[this._reverse?i-n:n])}else if(n<=(i=r.nodes.length-1)){var o=r.nodes[this._reverse?i-n:n];if(o){if(o.entry)return Hr(t,o.entry);e=this._stack=Qr(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(Ht);function Hr(t,e){return Qt(t,e[0],e[1])}function Qr(t,e){return{node:t,index:0,__prev:e}}function $r(t,e,r,n){var i=Object.create(Nr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Xr(){return Vr||(Vr=$r(0))}function Zr(t,e,r){var n,i;if(t._root){var o={value:!1},a={value:!1};if(n=tn(t._root,t.__ownerID,0,void 0,e,r,o,a),!a.value)return t;i=t.size+(o.value?r===St?-1:1:0)}else{if(r===St)return t;i=1,n=new Yr(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?$r(i,n):Xr()}function tn(t,e,r,n,i,o,a,u){return t?t.update(e,r,n,i,o,a,u):o===St?t:(Et(u),Et(a),new Gr(e,n,[i,o]))}function en(t){return t.constructor===Gr||t.constructor===Kr}function rn(t,e,r,n,i){if(t.keyHash===n)return new Kr(e,n,[t.entry,i]);var o,a=31&(0===r?t.keyHash:t.keyHash>>>r),u=31&(0===r?n:n>>>r),s=a===u?[rn(t,e,r+5,n,i)]:(o=new Gr(e,n,i),a<u?[t,o]:[o,t]);return new Fr(e,1<<a|1<<u,s)}function nn(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function on(t,e,r,n){var i=n?t:ar(t);return i[e]=r,i}var an=8,un=16,sn=8;function cn(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var fn=function(t){function e(e){var r=_n();if(null==e)return r;if(cn(e))return e;var n=t(e),i=n.size;return 0===i?r:(sr(i),i>0&&i<32?vn(0,i,5,null,new pn(n.toArray())):r.withMutations((function(t){t.setSize(i),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=At(this,t))>=0&&t<this.size){var r=bn(this,t+=this._origin);return r&&r.array[31&t]}return e},e.prototype.set=function(t,e){return function(t,e,r){if((e=At(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?wn(t,e).set(0,r):wn(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=xn(t._capacity)?n=mn(n,t.__ownerID,0,e,r,o):i=mn(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return vn(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):_n()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){wn(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},e.prototype.pop=function(){return wn(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){wn(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},e.prototype.shift=function(){return wn(this,1)},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var i=e[n],o=t("string"!=typeof i&&Xt(i)?i:[i]);0!==o.size&&r.push(o)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(t){r.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(r[0])},e.prototype.setSize=function(t){return wn(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){for(var i=0;i<r.size;i++)n.set(i,t.call(e,n.get(i),i,r))}))},e.prototype.slice=function(t,e){var r=this.size;return jt(t,e,r)?this:wn(this,Rt(t,r),Ct(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=yn(this,e);return new Ht((function(){var i=n();return i===dn?{value:void 0,done:!0}:Qt(t,e?--r:r++,i)}))},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,i=yn(this,e);(r=i())!==dn&&!1!==t(r,e?--n:n++,this););return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?vn(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?_n():(this.__ownerID=t,this.__altered=!1,this)},e}(Bt);fn.isList=cn;var ln=fn.prototype;ln["@@__IMMUTABLE_LIST__@@"]=!0,ln.delete=ln.remove,ln.merge=ln.concat,ln.setIn=wr,ln.deleteIn=ln.removeIn=Sr,ln.update=Or,ln.updateIn=kr,ln.mergeIn=Mr,ln.mergeDeepIn=Dr,ln.withMutations=Lr,ln.wasAltered=Ur,ln.asImmutable=qr,ln["@@transducer/init"]=ln.asMutable=Pr,ln["@@transducer/step"]=function(t,e){return t.push(e)},ln["@@transducer/result"]=function(t){return t.asImmutable()};var pn=function(t,e){this.array=t,this.ownerID=e};pn.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&31;if(n>=this.array.length)return new pn([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!i)return this;var u=gn(this,t);if(!o)for(var s=0;s<n;s++)u.array[s]=void 0;return i&&(u.array[n]=i),u},pn.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,i=r-1>>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=gn(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var hn,dn={};function yn(t,e){var r=t._origin,n=t._capacity,i=xn(n),o=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===i?o&&o.array:t&&t.array,s=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(s===c)return dn;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,i,o){var u,s=t&&t.array,c=o>r?0:r-o>>i,f=1+(n-o>>i);f>32&&(f=32);return function(){for(;;){if(u){var t=u();if(t!==dn)return t;u=null}if(c===f)return dn;var r=e?--f:c++;u=a(s&&s[r],i-5,o+(r<<i))}}}(t,u,s)}}function vn(t,e,r,n,i,o,a){var u=Object.create(ln);return u.size=e-t,u._origin=t,u._capacity=e,u._level=r,u._root=n,u._tail=i,u.__ownerID=o,u.__hash=a,u.__altered=!1,u}function _n(){return hn||(hn=vn(0,0,5))}function mn(t,e,r,n,i,o){var a,u=n>>>r&31,s=t&&u<t.array.length;if(!s&&void 0===i)return t;if(r>0){var c=t&&t.array[u],f=mn(c,e,r-5,n,i,o);return f===c?t:((a=gn(t,e)).array[u]=f,a)}return s&&t.array[u]===i?t:(o&&Et(o),a=gn(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function gn(t,e){return e&&t&&e===t.ownerID?t:new pn(t?t.array.slice():[],e)}function bn(t,e){if(e>=xn(t._capacity))return t._tail;if(e<1<<t._level+5){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&31],n-=5;return r}}function wn(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new Ot,i=t._origin,o=t._capacity,a=i+e,u=void 0===r?o:r<0?o+r:i+r;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,f=0;a+f<0;)c=new pn(c&&c.array.length?[void 0,c]:[],n),f+=1<<(s+=5);f&&(a+=f,i+=f,u+=f,o+=f);for(var l=xn(o),p=xn(u);p>=1<<s+5;)c=new pn(c&&c.array.length?[c]:[],n),s+=5;var h=t._tail,d=p<l?bn(t,u-1):p>l?new pn([],n):h;if(h&&p>l&&a<o&&h.array.length){for(var y=c=gn(c,n),v=s;v>5;v-=5){var _=l>>>v&31;y=y.array[_]=gn(y.array[_],n)}y.array[l>>>5&31]=h}if(u<o&&(d=d&&d.removeAfter(n,0,u)),a>=p)a-=p,u-=p,s=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||p<l){for(f=0;c;){var m=a>>>s&31;if(m!==p>>>s&31)break;m&&(f+=(1<<s)*m),s-=5,c=c.array[m]}c&&a>i&&(c=c.removeBefore(n,s,a-f)),c&&p<l&&(c=c.removeAfter(n,s,p-f)),f&&(a-=f,u-=f)}return t.__ownerID?(t.size=u-a,t._origin=a,t._capacity=u,t._level=s,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):vn(a,u,s,c,d)}function xn(t){return t<32?0:t-1>>>5<<5}var Sn,En=function(t){function e(t){return null==t?kn():_e(t)?t:kn().withMutations((function(e){var r=Ut(t);sr(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):kn()},e.prototype.set=function(t,e){return An(this,t,e)},e.prototype.remove=function(t){return An(this,t,St)},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?On(e,r,t,this.__hash):0===this.size?kn():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Br);function On(t,e,r,n){var i=Object.create(En.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function kn(){return Sn||(Sn=On(Xr(),_n()))}function An(t,e,r){var n,i,o=t._map,a=t._list,u=o.get(e),s=void 0!==u;if(r===St){if(!s)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&u!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(r===a.get(u)[1])return t;n=o,i=a.set(u,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t.__altered=!0,t):On(n,i)}En.isOrderedMap=_e,En.prototype[Kt]=!0,En.prototype.delete=En.prototype.remove;function In(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var jn=function(t){function e(t){return null==t?zn():In(t)?t:zn().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=At(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Tn(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&In(e))return e;sr(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Tn(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):zn()},e.prototype.slice=function(e,r){if(jt(e,r,this.size))return this;var n=Rt(e,this.size);if(Ct(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Tn(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Tn(this.size,this._head,t,this.__hash):0===this.size?zn():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new se(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,this);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new se(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new Ht((function(){if(n){var e=n.value;return n=n.next,Qt(t,r++,e)}return{value:void 0,done:!0}}))},e}(Bt);jn.isStack=In;var Rn,Cn=jn.prototype;function Tn(t,e,r,n){var i=Object.create(Cn);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zn(){return Rn||(Rn=Tn(0))}Cn["@@__IMMUTABLE_STACK__@@"]=!0,Cn.shift=Cn.pop,Cn.unshift=Cn.push,Cn.unshiftAll=Cn.pushAll,Cn.withMutations=Lr,Cn.wasAltered=Ur,Cn.asImmutable=qr,Cn["@@transducer/init"]=Cn.asMutable=Pr,Cn["@@transducer/step"]=function(t,e){return t.unshift(e)},Cn["@@transducer/result"]=function(t){return t.asImmutable()};function Mn(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function Dn(t){return Mn(t)&&Gt(t)}function Ln(t,e){if(t===e)return!0;if(!Mt(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||Dt(t)!==Dt(e)||Lt(t)!==Lt(e)||Gt(t)!==Gt(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!Pt(t);if(Gt(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&ge(i[1],t)&&(r||ge(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,u=e.__iterate((function(e,n){if(r?!t.has(e):i?!ge(e,t.get(n,St)):!ge(t.get(n,St),e))return a=!1,!1}));return a&&t.size===u}function Pn(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function qn(t){if(!t||"object"!=typeof t)return t;if(!Mt(t)){if(!pr(t))return t;t=ie(t)}if(Dt(t)){var e={};return t.__iterate((function(t,r){e[r]=qn(t)})),e}var r=[];return t.__iterate((function(t){r.push(qn(t))})),r}var Un=function(t){function e(e){return null==e?Jn():Mn(e)&&!Gt(e)?e:Jn().withMutations((function(r){var n=t(e);sr(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(Ut(t).keySeq())},e.intersect=function(t){return(t=qt(t).toArray()).length?Nn.intersect.apply(e(t.pop()),t):Jn()},e.union=function(t){return(t=qt(t).toArray()).length?Nn.union.apply(e(t.pop()),t):Jn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Yn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Yn(this,this._map.remove(t))},e.prototype.clear=function(){return Yn(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=!1,i=Yn(this,this._map.mapEntries((function(i){var o=i[1],a=t.call(e,o,o,r);return a!==o&&(n=!0),[a,a]}),e));return n?i:this},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n<e.length;n++)t(e[n]).forEach((function(t){return r.add(t)}))})):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.sort=function(t){return ci(Qe(this,t))},e.prototype.sortBy=function(t,e){return ci(Qe(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(Nt);Un.isSet=Mn;var Bn,Nn=Un.prototype;function Yn(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Fn(t,e){var r=Object.create(Nn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Jn(){return Bn||(Bn=Fn(Xr()))}Nn["@@__IMMUTABLE_SET__@@"]=!0,Nn.delete=Nn.remove,Nn.merge=Nn.concat=Nn.union,Nn.withMutations=Lr,Nn.asImmutable=qr,Nn["@@transducer/init"]=Nn.asMutable=Pr,Nn["@@transducer/step"]=function(t,e){return t.add(e)},Nn["@@transducer/result"]=function(t){return t.asImmutable()},Nn.__empty=Jn,Nn.__make=Fn;var Kn,Gn=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(ur(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(Kn)return Kn;Kn=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+At(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return jt(t,r,this.size)?this:(t=Rt(t,this.size),(r=Ct(r,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==t(i,e?r-++o:o++,this);)i+=e?-n:n;return o},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;return new Ht((function(){if(o===r)return{value:void 0,done:!0};var a=i;return i+=e?-n:n,Qt(t,e?r-++o:o++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:Ln(this,t)},e}(ae);function Vn(t,e,r){for(var n=cr(e),i=0;i!==n.length;)if((t=yr(t,n[i++],St))===St)return r;return t}function Wn(t,e){return Vn(this,t,e)}function Hn(t,e){return Vn(t,e,St)!==St}function Qn(){sr(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t}qt.isIterable=Mt,qt.isKeyed=Dt,qt.isIndexed=Lt,qt.isAssociative=Pt,qt.isOrdered=Gt,qt.Iterator=Ht,Pn(qt,{toArray:function(){sr(this.size);var t=new Array(this.size||0),e=Dt(this),r=0;return this.__iterate((function(n,i){t[r++]=e?[i,n]:n})),t},toIndexedSeq:function(){return new Ue(this)},toJS:function(){return qn(this)},toKeyedSeq:function(){return new qe(this,!0)},toMap:function(){return Br(this.toKeyedSeq())},toObject:Qn,toOrderedMap:function(){return En(this.toKeyedSeq())},toOrderedSet:function(){return ci(Dt(this)?this.valueSeq():this)},toSet:function(){return Un(Dt(this)?this.valueSeq():this)},toSetSeq:function(){return new Be(this)},toSeq:function(){return Lt(this)?this.toIndexedSeq():Dt(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return jn(Dt(this)?this.valueSeq():this)},toList:function(){return fn(Dt(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return tr(this,We(this,t))},includes:function(t){return this.some((function(e){return ge(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){sr(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1})),r},filter:function(t,e){return tr(this,Ke(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return sr(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){sr(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return tr(this,Fe(this,t,e))},reduce:function(t,e,r){return ei(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return ei(this,t,e,r,arguments.length<2,!0)},reverse:function(){return tr(this,Je(this,!0))},slice:function(t,e){return tr(this,Ge(this,t,e,!0))},some:function(t,e){return!this.every(ii(t),e)},sort:function(t){return tr(this,Qe(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return kt(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Br().asMutable();return t.__iterate((function(i,o){n.update(e.call(r,i,o,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return Ln(this,t)},entrySeq:function(){var t=this;if(t._cache)return new se(t._cache);var e=t.toSeq().map(ni).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(ii(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(It,null,t)},flatMap:function(t,e){return tr(this,function(t,e,r){var n=rr(t);return t.toSeq().map((function(i,o){return n(e.call(r,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return tr(this,He(this,t,!0))},fromEntrySeq:function(){return new Ne(this)},get:function(t,e){return this.find((function(e,r){return ge(r,t)}),void 0,e)},getIn:Wn,groupBy:function(t,e){return function(t,e,r){var n=Dt(t),i=(Gt(t)?En():Br()).asMutable();t.__iterate((function(o,a){i.update(e.call(r,o,a,t),(function(t){return(t=t||[]).push(n?[a,o]:o),t}))}));var o=rr(t);return i.map((function(e){return tr(t,o(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,St)!==St},hasIn:function(t){return Hn(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:qt(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:qt(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return ge(e,t)}))},keySeq:function(){return this.toSeq().map(ri).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return $e(this,t)},maxBy:function(t,e){return $e(this,e,t)},min:function(t){return $e(this,t?oi(t):ui)},minBy:function(t,e){return $e(this,e?oi(e):ui,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return tr(this,Ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(ii(t),e)},sortBy:function(t,e){return tr(this,Qe(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return tr(this,function(t,e,r){var n=nr(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return t.__iterate((function(t,i,u){return e.call(r,t,i,u)&&++a&&n(t,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(2,i),u=!0;return new Ht((function(){if(!u)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(r,c,s,o)?2===n?t:Qt(n,s,c,t):(u=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(ii(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=Gt(t),r=Dt(t),n=e?1:0;return function(t,e){return e=be(e,3432918353),e=be(e<<15|e>>>-15,461845907),e=be(e<<13|e>>>-13,5),e=be((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=we((e=be(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+si(Se(t),Se(e))|0}:function(t,e){n=n+si(Se(t),Se(e))|0}:e?function(t){n=31*n+Se(t)|0}:function(t){n=n+Se(t)|0}),n)}(this))}});var $n=qt.prototype;$n["@@__IMMUTABLE_ITERABLE__@@"]=!0,$n[Wt]=$n.values,$n.toJSON=$n.toArray,$n.__toStringMapper=hr,$n.inspect=$n.toSource=function(){return this.toString()},$n.chain=$n.flatMap,$n.contains=$n.includes,Pn(Ut,{flip:function(){return tr(this,Ye(this))},mapEntries:function(t,e){var r=this,n=0;return tr(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return tr(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var Xn=Ut.prototype;Xn["@@__IMMUTABLE_KEYED__@@"]=!0,Xn[Wt]=$n.entries,Xn.toJSON=Qn,Xn.__toStringMapper=function(t,e){return hr(e)+": "+hr(t)},Pn(Bt,{toKeyedSeq:function(){return new qe(this,!1)},filter:function(t,e){return tr(this,Ke(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return tr(this,Je(this,!1))},slice:function(t,e){return tr(this,Ge(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=Rt(t,t<0?this.count():this.size);var n=this.slice(0,t);return tr(this,1===r?n:n.concat(ar(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return tr(this,He(this,t,!1))},get:function(t,e){return(t=At(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=At(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return tr(this,function(t,e){var r=nr(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate((function(t){return(!o||!1!==r(e,o++,i))&&!1!==r(t,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(1,n),a=0;return new Ht((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?Qt(r,a++,e):Qt(r,a++,i.value,i)}))},r}(this,t))},interleave:function(){var t=[this].concat(ar(arguments)),e=Ze(this.toSeq(),ae.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),tr(this,r)},keySeq:function(){return Gn(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return tr(this,Ve(this,t,e,!1))},zip:function(){var t=[this].concat(ar(arguments));return tr(this,Ze(this,ai,t))},zipAll:function(){var t=[this].concat(ar(arguments));return tr(this,Ze(this,ai,t,!0))},zipWith:function(t){var e=ar(arguments);return e[0]=this,tr(this,Ze(this,t,e))}});var Zn=Bt.prototype;Zn["@@__IMMUTABLE_INDEXED__@@"]=!0,Zn[Kt]=!0,Pn(Nt,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var ti=Nt.prototype;function ei(t,e,r,n,i,o){return sr(t.size),t.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),o),r}function ri(t,e){return e}function ni(t,e){return[e,t]}function ii(t){return function(){return!t.apply(this,arguments)}}function oi(t){return function(){return-t.apply(this,arguments)}}function ai(){return ar(arguments)}function ui(t,e){return t<e?1:t>e?-1:0}function si(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}ti.has=$n.includes,ti.contains=ti.includes,ti.keys=ti.values,Pn(oe,Xn),Pn(ae,Zn),Pn(ue,ti);var ci=function(t){function e(t){return null==t?hi():Dn(t)?t:hi().withMutations((function(e){var r=Nt(t);sr(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(Ut(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Un);ci.isOrderedSet=Dn;var fi,li=ci.prototype;function pi(t,e){var r=Object.create(li);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function hi(){return fi||(fi=pi(kn()))}li[Kt]=!0,li.zip=Zn.zip,li.zipWith=Zn.zipWith,li.zipAll=Zn.zipAll,li.__empty=hi,li.__make=pi;var di=function(t,e){var r;!function(t){if(Ft(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Jt(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t),s=i._indices={};i._name=e,i._keys=u,i._defaultValues=t;for(var c=0;c<u.length;c++){var f=u[c];s[f]=c,i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+mi(this)+' with property "'+f+'" since that property name is part of the Record API.'):bi(i,f)}}return this.__ownerID=void 0,this._values=fn().withMutations((function(t){t.setSize(a._keys.length),Ut(o).forEach((function(e,r){t.set(a._indices[r],e===a._defaultValues[r]?void 0:e)}))})),this},i=n.prototype=Object.create(vi);return i.constructor=n,e&&(n.displayName=e),n};di.prototype.toString=function(){for(var t,e=mi(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)e+=(n?", ":"")+(t=r[n])+": "+hr(this.get(t));return e+" }"},di.prototype.equals=function(t){return this===t||t&&gi(this).equals(gi(t))},di.prototype.hashCode=function(){return gi(this).hashCode()},di.prototype.has=function(t){return this._indices.hasOwnProperty(t)},di.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},di.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return _i(this,r)}return this},di.prototype.remove=function(t){return this.set(t)},di.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:_i(this,t)},di.prototype.wasAltered=function(){return this._values.wasAltered()},di.prototype.toSeq=function(){return gi(this)},di.prototype.toJS=function(){return qn(this)},di.prototype.entries=function(){return this.__iterator(2)},di.prototype.__iterator=function(t,e){return gi(this).__iterator(t,e)},di.prototype.__iterate=function(t,e){return gi(this).__iterate(t,e)},di.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?_i(this,e,t):(this.__ownerID=t,this._values=e,this)},di.isRecord=Ft,di.getDescriptiveName=mi;var yi,vi=di.prototype;function _i(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function mi(t){return t.constructor.displayName||t.constructor.name||"Record"}function gi(t){return he(t._keys.map((function(e){return[e,t.get(e)]})))}function bi(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ur(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}function wi(t,e){return Lt(e)?e.toList():Dt(e)?e.toMap():e.toSet()}vi["@@__IMMUTABLE_RECORD__@@"]=!0,vi.delete=vi.remove,vi.deleteIn=vi.removeIn=Sr,vi.getIn=Wn,vi.hasIn=$n.hasIn,vi.merge=Ar,vi.mergeWith=Ir,vi.mergeIn=Mr,vi.mergeDeep=Tr,vi.mergeDeepWith=zr,vi.mergeDeepIn=Dr,vi.setIn=wr,vi.update=Or,vi.updateIn=kr,vi.withMutations=Lr,vi.asMutable=Pr,vi.asImmutable=qr,vi[Wt]=vi.entries,vi.toJSON=vi.toObject=$n.toObject,vi.inspect=vi.toSource=function(){return this.toString()};var xi={version:"4.0.0",Collection:qt,Iterable:qt,Seq:ie,Map:Br,OrderedMap:En,List:fn,Stack:jn,Set:Un,OrderedSet:ci,Record:di,Range:Gn,Repeat:function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(yi)return yi;yi=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return ge(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return jt(t,r,n)?this:new e(this._value,Ct(r,n)-Rt(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return ge(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return ge(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new Ht((function(){return i===n?{value:void 0,done:!0}:Qt(t,e?n-++i:i++,r._value)}))},e.prototype.equals=function(t){return t instanceof e?ge(this._value,t._value):Ln(t)},e}(ae),is:ge,fromJS:function(t,e){return function t(e,r,n,i,o,a){if("string"!=typeof n&&!Jt(n)&&(ne(n)||Xt(n)||lr(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),o&&""!==i&&o.push(i);var u=r.call(a,i,ie(n).map((function(i,a){return t(e,r,i,a,o,n)})),o&&o.slice());return e.pop(),o&&o.pop(),u}return n}([],e||wi,t,"",e&&e.length>2?[]:void 0,{"":t})},hash:Se,isImmutable:Jt,isCollection:Mt,isKeyed:Dt,isIndexed:Lt,isAssociative:Pt,isOrdered:Gt,isValueObject:me,isPlainObject:lr,isSeq:Yt,isList:cn,isMap:ve,isOrderedMap:_e,isStack:In,isSet:Mn,isOrderedSet:Dn,isRecord:Ft,get:yr,getIn:Vn,has:dr,hasIn:Hn,merge:function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Cr(t,e)},mergeDeep:function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Rr(t,e)},mergeWith:function(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Cr(e,r,t)},mergeDeepWith:function(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Rr(e,r,t)},remove:_r,removeIn:xr,set:mr,setIn:br,update:Er,updateIn:gr},Si={keysColor:"red",dashColor:"bold",stringColor:"red"},Ei={keysColor:"cyan",dashColor:"bold",stringColor:"bold"},Oi={keysColor:"magenta",dashColor:"black",stringColor:"bold"};var ki=function(t,e){var r=t.items("tablesByName",e);if(null!==r){var n=r.get("rows"),i=[];r.get("schema").map((function(t){i.push(t.get("name"))})),qi.object(i,"Columns"),qi.titleLine("Data Rows");var o=n.map((function(t,e){var r={};return t.map((function(t,e){r[i[e]]=t})),r}));qi.object(o,"Data for ".concat(e))}},Ai=r(12),Ii=r.n(Ai);function ji(){return(ji=s()(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.map((function(t){var e=t.line.replace(/(\r\n|\n|\r)/gm,"");0===e.length&&console.log(" "),"title"===t.type?console.log(Ii.a.bold(e)):console.log(e)})),t.abrupt("return");case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ri=function(t){return ji.apply(this,arguments)},Ci=r(9),Ti=r.n(Ci);function zi(t){console.log(" ","\n======================================="),console.log(Ti.a.render({title:t},Oi)),console.log(" ","=======================================\n")}function Mi(t,e){zi("".concat(e," size: ").concat(t.itemsList().size)),t.itemsList().size>0?Pi(t.itemsList().toJS()):Pi({info:"List is empty"})}function Di(t,e){zi("".concat(e," size: ").concat(t.links().size)),t.links().forEach((function(t,e){Pi({rel:e})}))}function Li(t,e){zi("".concat(e," size: ").concat(Mi.size)),Pi(t.items().toJS())}function Pi(t,e){!function(t,e){e&&zi(e);console.log(Ti.a.render(t,Ei))}(xi.Iterable.isIterable(t)?t.toJS():"object"===xt()(t)||Array.isArray(t)?t:{value:t},e)}var qi={result:function(t,e){t.itemsList().size>0&&Mi(t,"".concat(e,": ItemList")),t.links().size>0&&Di(t,"".concat(e,": links")),null!==t.items()&&Li(t,"".concat(e,": items"))},itemsList:Mi,links:Di,items:Li,itemsCmd:function(t,e,r){zi("".concat(r," size: ").concat(t.itemsCmd(e).size)),t.itemsCmd(e).forEach((function(t,e){Pi({rel:e})}))},object:Pi,errMsg:function(t){var e="object"===xt()(t)?t:{Error:t};console.log(Ti.a.render(e,Si))},msg:function(t,e){e&&zi(e),console.log(Ti.a.render(t,Ei))},titleLine:zi,casTable:ki,logListLines:Ri},Ui=r(10),Bi=r.n(Ui),Ni=r(14),Yi=r(8),Fi=r(38).promises;function Ji(){return(Ji=s()(f.a.mark((function t(e,r,n,i,o,a){var u,s,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=Object(Ni.a)(n,i),null==a){t.next=5;break}t.t0=a,t.next=8;break;case 5:return t.next=7,Fi.readFile(n,u.fileOptions);case 7:t.t0=t.sent;case 8:return s=t.t0,null!==u.transform&&(s=u.transform(s,u)),t.next=12,u.handler(e,r,s,u,o);case 12:if(c=t.sent,!0!==o){t.next=18;break}return l=i.split("."),p=Bi()(l,2),h=p[0],d=p[1],t.next=17,Object(Yi.a)(e,r,h,d);case 17:c=c+"\n"+" ".concat(i," was saved");case 18:return t.abrupt("return",c);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ki=function(t,e,r,n,i,o){return Ji.apply(this,arguments)},Gi=r(43);function Vi(){return(Vi=s()(f.a.mark((function t(e,r,n,i,o,a){var u,s,c,l,p,h,d,y,v,_,m,g,b,w,x;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.addServices("casManagement");case 2:return u=t.sent,s=u.casManagement,t.next=6,o.apiCall(s.links("servers"));case 6:if(0!==(c=t.sent).itemsList().size){t.next=9;break}throw{Error:"No cas servers were found"};case 9:return l=c.itemsList(0),p={qs:{filter:"eq(name,".concat(e,")")}},t.next=13,o.apiCall(c.itemsCmd(l,"caslibs"),p);case 13:return h=t.sent,t.next=16,o.apiCall(h.itemsCmd(e,"tables"));case 16:return d=t.sent,y={qs:{filter:"eq(name, ".concat(r.trim().toUpperCase(),")")}},t.next=20,o.apiCall(h.itemsCmd(e,"tables"),y);case 20:if(1!==(v=t.sent).itemsList().size){t.next=25;break}return _=v.itemsList(0),m=v.items(_,"data","tableReference","tableUri"),t.abrupt("return",m);case 25:return(g=new Gi).append("tableName",r),g.append("format",i),g.append("scope",null==a?"global":a),g.append("containsHeaderRow",!0),g.append("file",n),b={data:g,headers:{"content-type":'multipart/form-data; boundary="----------12345678901234567"'}},t.next=34,o.apiCall(d.links("upload"),b);case 34:return w=t.sent,x=w.items("tableReference","tableUri"),t.abrupt("return",x);case 37:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Wi=function(t,e,r,n,i,o){return Vi.apply(this,arguments)};var Hi=function(){return{caslRun:n.a,caslRunBase:i.a,casSetup:w,casActionRun:S,casFetchData:O,casUpdateData:j,computeRun:L,computeSetup:q,computeSummary:T,computeFetchData:Y,computeFileContent:J,computeResults:B,findReport:G,getReportImage:W,getReportUri:Q,getSASTableRows:X,jesSetup:tt,jesRun:st,jesSummary:rt,jsonToDict:ct.a,casTableToJson:R,caslScore:y,caslDescribe:g,masSetup:yt,masAddModel:lt,masDescribe:vt,masRun:mt,casUpload:Ki,uploadData:Wi}}()}])}));
|
package/lib/restaflib.js
CHANGED
|
@@ -679,7 +679,7 @@ eval("/*\r\n * Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights
|
|
|
679
679
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
680
680
|
|
|
681
681
|
"use strict";
|
|
682
|
-
eval("/* harmony import */ var
|
|
682
|
+
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\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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 */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\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, set, tbl, updateRow, pl, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, where = payload.where, table = payload.table;\n swhere = '';\n\n if (where.length > 0) {\n andbit = ' ';\n debugger;\n where.map(function (w) {\n var valString = typeof w.dataValue === \"string\" ? \"'\".concat(w.dataValue.toString(), \"'\") : w.dataValue;\n swhere = swhere + andbit + w.value + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n });\n }\n\n set = []; // let data = fdata.filter ( (r) => where.findIndex((k) => r.name === k.value));\n\n data.map(function (e, i) {\n if (e.name !== '_Index_') {\n var valueString;\n\n if (e.value == null) {\n valueString = '.';\n } else if (typeof e.value === 'string') {\n valueString = JSON.stringify(e.value)\n /*`${JSON.stringify(e.value)}`*/\n ;\n } else {\n valueString = e.value.toString();\n }\n\n console.log(valueString);\n set.push({\n var: e.name,\n value: valueString\n });\n }\n });\n tbl = _objectSpread(_objectSpread({}, table), {}, {\n where: \"\".concat(swhere)\n });\n updateRow = {\n table: tbl,\n set: set\n };\n console.log(updateRow);\n pl = {\n action: 'table.update',\n data: updateRow\n };\n _context.next = 11;\n return store.runAction(session, pl);\n\n case 11:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casUpdateData.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpdateData);\n\n//# sourceURL=webpack://restaflib/./casUpdateData.js?");
|
|
683
683
|
|
|
684
684
|
/***/ }),
|
|
685
685
|
|