@sassoftware/restaflib 4.5.3 → 4.5.4
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 +1 -1
- package/lib/restaflib.js +1 -1
- package/package.json +3 -2
package/dist/restaflib.js
CHANGED
|
@@ -633,7 +633,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
633
633
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
634
634
|
|
|
635
635
|
"use strict";
|
|
636
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2) {\n return _casSetup.apply(this, arguments);\n}\n\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, logonPayload) {\n var _yield$store$addServi, casManagement, servers, casserver, session;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(logonPayload);\n debugger;\n\n if (!(logonPayload != null)) {\n _context.next =
|
|
636
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2) {\n return _casSetup.apply(this, arguments);\n}\n\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, logonPayload) {\n var msg, _yield$store$addServi, casManagement, servers, casserver, session;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(logonPayload);\n debugger;\n\n if (!(logonPayload != null)) {\n _context.next = 8;\n break;\n }\n\n debugger;\n _context.next = 6;\n return store.logon(logonPayload);\n\n case 6:\n msg = _context.sent;\n console.log(msg);\n\n case 8:\n _context.next = 10;\n return store.addServices('casManagement');\n\n case 10:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 14;\n return store.apiCall(casManagement.links('servers'));\n\n case 14:\n servers = _context.sent;\n\n if (!(servers.itemsList().size === 0)) {\n _context.next = 17;\n break;\n }\n\n throw {\n Error: 'No cas servers were found'\n };\n\n case 17:\n debugger;\n casserver = servers.itemsList(0);\n debugger;\n _context.next = 22;\n return store.apiCall(servers.itemsCmd(casserver, 'createSession'));\n\n case 22:\n session = _context.sent;\n debugger;\n console.log('returning from casSetup');\n return _context.abrupt(\"return\", {\n servers: servers,\n session: session\n });\n\n case 26:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casSetup.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSetup);\n\n//# sourceURL=webpack://restaflib/./casSetup.js?");
|
|
637
637
|
|
|
638
638
|
/***/ }),
|
|
639
639
|
|
package/dist/restaflib.min.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* @license MIT
|
|
8
8
|
*/var r=n(24),o=n(25),i=n(26);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(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);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.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(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=s(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(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?s(t,0):p(t,e);if("Buffer"===e.type&&i(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=s(t,e<0?0:0|h(e)),!u.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=s(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(u.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 T(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(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,o){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=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,o){var i,a=1,s=t.length,u=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,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=n;i<s;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var l=!0,p=0;p<u;p++)if(c(t,i+p)!==c(e,p)){l=!1;break}if(l)return i}return-1}function b(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function g(t,e,n,r){return F(B(e,t.length-n),t,n,r)}function w(t,e,n,r){return F(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 F(N(e),t,n,r)}function E(t,e,n,r){return F(function(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(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 k(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,a,s,u,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=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=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.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(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.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},u.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},u.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},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.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+">"},u.prototype.compare=function(t,e,n,r,o){if(!u.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===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(r,o),f=t.slice(e,n),l=0;l<s;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},u.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 o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return g(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(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function j(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=q(t[i]);return o}function I(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}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 R(t,e,n,r,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)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 o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function M(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function D(t,e,n,r,o,i){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,i){return i||D(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function P(t,e,n,r,i){return i||D(t,0,n,8),o.write(t,e,n,r,52,8),n+8}u.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),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.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]},u.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])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.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},u.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},u.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},u.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]},u.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.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},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.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},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);R(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):z(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):z(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.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},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.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},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},u.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 o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},u.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 o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.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 i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var a=u.isBuffer(t)?t:B(new u(t,r).toString()),s=a.length;for(i=0;i<n-e;++i)this[i+e]=a[i%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function q(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,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function N(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}},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],s=r[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,u[f++]=255&e);1===s&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(f(t,a,a+16383>s?s:a+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;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 o,i,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
|
|
9
9
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
-
e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?o-1:0,p=n?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-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?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;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,n){var r={};t.exports=r,r.themes={};var o=n(28),i=r.styles=n(31),a=Object.defineProperties,s=new RegExp(/[\r\n]+/g);r.supportsColor=n(32).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=i[e];return!n&&e in r?r[e](t):n.open+t+n.close};var u=/[|\\{}()[\]^$+*?.]/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={},i.grey=i.gray,Object.keys(i).forEach((function(t){i[t].closeRe=new RegExp(function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(u,"\\$&")}(i[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:o.inspect(t)})).join(" ");if(!r.enabled||!e)return e;for(var n=-1!=e.indexOf("\n"),a=this._styles,u=a.length;u--;){var c=i[a[u]];e=c.open+e.replace(c.closeRe,c.open)+c.close,n&&(e=e.replace(s,(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 o=n;for(var i in t[e])o=r[t[e][i]](o);return o}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(35),r.zalgo=n(36),r.maps={},r.maps.america=n(37)(r),r.maps.zebra=n(38)(r),r.maps.rainbow=n(39)(r),r.maps.random=n(40)(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},o=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)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}})),u=r[n];n<i;u=r[++n])y(u)||!g(u)?a+=" "+u:a+=" "+s(u);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 o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,a={};function s(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=u),f(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.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 o=n.inspect(r,t);return _(o)||(o=f(t,o,r)),o}var i=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(i)return i;var a=Object.keys(n),s=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 u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(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,g="",E=!1,O=["{","}"];(h(n)&&(E=!0,O=["[","]"]),S(n))&&(g=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(g=" "+RegExp.prototype.toString.call(n)),w(n)&&(g=" "+Date.prototype.toUTCString.call(n)),x(n)&&(g=" "+l(n)),0!==a.length||E&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=E?function(t,e,n,r,o){for(var i=[],a=0,s=e.length;a<s;++a)j(e,String(a))?i.push(p(t,e,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(p(t,e,n,r,o,!0))})),i}(t,n,r,s,a):a.map((function(e){return p(t,n,r,s,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,g,O)):O[0]+g+O[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),j(r,o)||(a="["+o+"]"),s||(t.seen.indexOf(u.value)<0?(s=y(n)?f(t,u.value,null):f(t,u.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),m(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).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+": "+s}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 b(t){return g(t)&&"[object RegExp]"===E(t)}function g(t){return"object"==typeof t&&null!==t}function w(t){return g(t)&&"[object Date]"===E(t)}function x(t){return g(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(i)&&(i=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){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=s,s.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]},s.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=b,e.isObject=g,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(29);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 j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=n(30),e._extend=function(t,e){if(!e||!g(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(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(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{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})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,o)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=T,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 o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(I,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],o=n[t]=[];o.open="["+e[0]+"m",o.close="["+e[1]+"m"}))},function(t,e,n){"use strict";(function(e){var r=n(33),o=n(34),i=e.env,a=void 0;function s(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(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!t.isTTY&&!0!==a)return 0;var n=a?1:0;if("win32"===e.platform){var s=r.release().split(".");return Number(e.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(t){return t in i}))||"codeship"===i.CI_NAME?1:n;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in i){var u=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,n)}(t))}o("no-color")||o("no-colors")||o("color=false")?a=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=!0),"FORCE_COLOR"in i&&(a=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),t.exports={supportsColor:s,stdout:s(e.stdout),stderr:s(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("--"),o=/^-{1,2}/.test(t)?"":"--",i=n.indexOf(o+t);return-1!==i&&(-1===r||i<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]||[" "],o=Math.floor(Math.random()*e.length);n+=void 0!==r[t]?r[t][o]: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 o(t){return Math.floor(Math.random()*t)}function i(t){var e=!1;return r.filter((function(n){e=n===t})),e}return function(t,e){var r,a,s="";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(!i(a)){switch(s+=t[a],r={up:0,down:0,mid:0},e.size){case"mini":r.up=o(8),r.mid=o(2),r.down=o(8);break;case"maxi":r.up=o(16)+3,r.mid=o(4)+1,r.down=o(64)+3;break;default:r.up=o(8)+1,r.mid=o(6)/2,r.down=o(8)+1}var u=["up","mid","down"];for(var c in u)for(var f=u[c],l=0;l<=r[f];l++)e[f]&&(s+=n[f][o(n[f].length)])}return s}(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,o){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,o){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="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 o.a})),n.d(e,"casSetup",(function(){return w})),n.d(e,"casActionRun",(function(){return S})),n.d(e,"casTableToJson",(function(){return M})),n.d(e,"casFetchData",(function(){return O})),n.d(e,"casFetchRows",(function(){return Ho})),n.d(e,"casAppendTable",(function(){return z})),n.d(e,"casUpdateData",(function(){return T})),n.d(e,"casUpload",(function(){return Y})),n.d(e,"casSaveTable",(function(){return C})),n.d(e,"computeRun",(function(){return Z})),n.d(e,"computeSetup",(function(){return et})),n.d(e,"computeSummary",(function(){return H})),n.d(e,"computeSetupTables",(function(){return it})),n.d(e,"computeFetchData",(function(){return st})),n.d(e,"computeFileContent",(function(){return ct})),n.d(e,"computeResults",(function(){return rt})),n.d(e,"computeAppendTable",(function(){return lt})),n.d(e,"computeUpdateData",(function(){return dt})),n.d(e,"computeUpload",(function(){return vt})),n.d(e,"findReport",(function(){return mt})),n.d(e,"getReportImage",(function(){return gt})),n.d(e,"getReportUri",(function(){return xt})),n.d(e,"getSasTableRows",(function(){return Et})),n.d(e,"jesSetup",(function(){return kt})),n.d(e,"jesRun",(function(){return Mt})),n.d(e,"jesSummary",(function(){return jt})),n.d(e,"jsonToDict",(function(){return Dt.a})),n.d(e,"caslScore",(function(){return y})),n.d(e,"caslDescribe",(function(){return b})),n.d(e,"masSetup",(function(){return Nt})),n.d(e,"masAddModel",(function(){return Pt})),n.d(e,"masDescribe",(function(){return Ft})),n.d(e,"masRun",(function(){return Jt})),n.d(e,"masScore",(function(){return Gt})),n.d(e,"uploadData",(function(){return Wo})),n.d(e,"lib",(function(){return Qo}));var r=n(5),o=n(3),i=n(7),a=n.n(i),s=n(1),u=n.n(s),c=n(0),f=n.n(c),l=n(2);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=u()(f.a.mark((function t(e,n,r){var i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.scoreCasl(),a=h({path:"/score"},r),t.next=4,Object(o.a)(e,n,i,a);case 4:return s=t.sent,u=s.items("results","casResults").toJS()[0],t.abrupt("return",u);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=u()(f.a.mark((function t(e,n,r){var i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.scoreCasl(),a=_({path:"/describe"},r),t.next=4,Object(o.a)(e,n,i,a);case 4:return s=t.sent,u=s.items("results").toJS(),t.abrupt("return",u);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var b=function(t,e,n){return m.apply(this,arguments)};function g(){return(g=u()(f.a.mark((function t(e,n){var r,o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(n),null==n){t.next=5;break}return t.next=5,e.logon(n);case 5:return t.next=7,e.addServices("casManagement");case 7:return r=t.sent,o=r.casManagement,t.next=11,e.apiCall(o.links("servers"));case 11:if(0!==(i=t.sent).itemsList().size){t.next=14;break}throw{Error:"No cas servers were found"};case 14:return a=i.itemsList(0),t.next=17,e.apiCall(i.itemsCmd(a,"createSession"));case 17:return s=t.sent,t.abrupt("return",{servers:i,session:s});case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var w=function(t,e){return g.apply(this,arguments)};function x(){return(x=u()(f.a.mark((function t(e){var n,r,o,i,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),o=1;o<n;o++)r[o-1]=a[o];return t.next=3,e.runAction.apply(e,r);case 3:return i=t.sent,t.abrupt("return",i.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=u()(f.a.mark((function t(e,n,r){var i,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.casFetchData(),t.next=3,Object(o.a)(e,n,i,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 k(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(){return(j=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_,m,b,g,w;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in o=r.data,i=r.where,a=r.table,s="",u=" ",i)l=i[c],p="string"==typeof l?"'".concat(l.toString(),"'"):l,s=s+u+c+"= ".concat(p," "),u=" AND ";for(d in h=[],o)y=o[d],v=void 0,v=null==y?".":"string"==typeof y?JSON.stringify(y):y.toString(),h.push({var:d,value:v});return _=A(A({},a),{},{where:"".concat(s)}),m={action:"table.update",data:{table:_,set:h}},t.next=11,e.runAction(n,m);case 11:return b=t.sent,g={msg:"Update completed",statusCode:0},0!==(w=b.items().toJS().disposition).statusCode&&(g.statusCode=w.statusCode,g.msg=w.reason),t.abrupt("return",g);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var T=function(t,e,n){return j.apply(this,arguments)};function I(){return(I=u()(f.a.mark((function t(e,n,r,o){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.caslib,a=r.name,s={action:"table.save",data:{name:"".concat(a),caslib:"".concat(i),replace:!1!==o,table:r}},t.next=4,e.runAction(n,s);case 4:return t.abrupt("return",{msg:"".concat(i,".").concat(a," saved}"),statusCode:0});case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=function(t,e,n,r){return I.apply(this,arguments)};function R(){return(R=u()(f.a.mark((function t(e,n,r,i,a){var s,u,c,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=l.a.commonCasl()+" "+l.a.casAppendTable(),u={masterTable:i,setTable:r,save:null!=a&&a},t.next=4,Object(o.a)(e,n,s,u);case 4:if(c=t.sent,p=c.items("results","casResults").toJS(),!0!==a){t.next=9;break}return t.next=9,C(e,n,i);case 9:return t.abrupt("return",p);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var z=function(t,e,n,r,o){return R.apply(this,arguments)};var M=function(t,e){var n=t.items("tables",e),r=n.get("rows"),o=[];n.get("schema").map((function(t){o.push(t.get("name"))}));var i=[];return r.map((function(t){var e={};t.map((function(t,n){e[o[n]]=t})),i.push(e)})),i},D=n(10),L=n.n(D),P=n(4),U=n.n(P),q=n(15),B=n(8),N=n(13).promises;function F(){return(F=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=o,"object"===U()(o)&&(s="".concat(o.caslib,".").concat(o.name)),u=Object(q.a)(r,s),null==a){t.next=8;break}t.t0=a,t.next=11;break;case 8:return t.next=10,N.readFile(r,u.fileOptions);case 10:t.t0=t.sent;case 11:return c=t.t0,null!==u.transform&&(c=u.transform(c,u)),t.next=15,u.handler(e,n,c,u,i);case 15:if(l=t.sent,!0!==i){t.next=21;break}return p=s.split("."),h=L()(p,2),d=h[0],y=h[1],t.next=20,Object(B.a)(e,n,d,y);case 20:l=l+"\n"+" ".concat(o," was saved");case 21:return t.abrupt("return",l);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=function(t,e,n,r,o,i){return F.apply(this,arguments)};function J(){return(J=u()(f.a.mark((function t(e,n,r,o){var i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r||null!=o){t.next=6;break}return t.next=3,K(e,n,r);case 3:i=t.sent,t.next=9;break;case 6:return t.next=8,W(e,n,o);case 8:i=t.sent;case 9:return t.abrupt("return",i);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t,e,n){return G.apply(this,arguments)}function G(){return(G=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}}).log=r.links("log"),o.listing=r.links("listing"),null===(i=r.links("results"))){t.next=10;break}return t.next=7,e.apiCall(i);case 7:if(a=t.sent,(s=a.itemsList().size)>0)for(u=0;u<s;u++)c=a.itemsList(u),"ods"===(l=a.items(c,"data","type").toLowerCase())?o.ods=a.itemsCmd(c,"self"):"table"===l?(p={self:a.itemsCmd(c,"self"),current:null},o.tables[c.toUpperCase()]=p):"file"===l?(h={self:c,current:null,data:null},o.files[c]=h):(d={self:c,current:null,data:null},o[l]=d);case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,e,n){return V.apply(this,arguments)}function V(){return(V=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},i="object"===U()(r)?[r]:r,a=0;case 3:if(!(a<i.length)){t.next=29;break}return s=i[a],u=s.libref.toUpperCase(),c=s.name.toUpperCase(),l={qs:{filter:"eq(name,'".concat(u,"')")}},t.next=10,e.apiCall(n.links("librefs"),l);case 10:if(0!==(p=t.sent).itemsList().size){t.next=13;break}throw"Libref ".concat(u," not found");case 13:return h=p.itemsCmd(u,"self"),t.next=16,e.apiCall(h);case 16:return d=t.sent,l={qs:{filter:"eq(name,'".concat(c,"')")}},t.next=20,e.apiCall(d.links("tables"));case 20:if(0!==(y=t.sent).itemsList().size){t.next=23;break}throw"Table ".concat(c," not found");case 23:v="".concat(u,".").concat(c).toLowerCase(),_={self:y.itemsCmd(c,"self"),current:null},o.tables[v.toUpperCase()]=_;case 26:a++,t.next=3;break;case 29:return t.abrupt("return",o);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var H=function(t,e,n,r){return J.apply(this,arguments)};function Q(){return(Q=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={data:{code:r}},t.next=3,e.apiCall(n.links("execute"),s);case 3:return u=t.sent,c={qs:{wait:null!=o?o:5},headers:{"If-None-Match":u.headers("etag")}},t.next=7,e.jobState(u,c,"longpoll",0,i,a);case 7:if("running"!==(l=t.sent).data){t.next=12;break}throw"ERROR: Job did not complete in allotted time";case 12:return t.next=14,H(e,n,l.job);case 14:return(p=t.sent).SASJobStatus=l.data,p.jobStateStatus=l,t.abrupt("return",p);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $=function(t,e,n,r,o,i){return Q.apply(this,arguments)};function X(){return(X=u()(f.a.mark((function t(e,n,r,o,i,a,s){var u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=[],null!=o)for(c in o)l="%let ".concat(c," = ").concat(o[c],";"),u.push(l);return p=r.split(/\r?\n/),u=u.concat(p),t.next=6,$(e,n,u,i,a,s);case 6:return h=t.sent,t.abrupt("return",h);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Z=function(t,e,n,r,o,i,a){return X.apply(this,arguments)};function tt(){return(tt=u()(f.a.mark((function t(e,n,r,o){var i,a,s,u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=6;break}return t.next=4,e.logon(r);case 4:i=t.sent,console.log("======================",i);case 6:return t.next=8,e.addServices("compute");case 8:if(a=t.sent,s=a.compute,null!=e.store.config.options.computeServerId){t.next=27;break}return null==n&&(n="SAS Job Execution"),u={qs:{filter:"contains(name,'".concat(n,"')")}},t.next=16,e.apiCall(s.links("contexts"),u);case 16:if(0!==(c=t.sent).itemsList().size){t.next=19;break}throw"Context ".concat(n," not found");case 19:return u=null==o?null:o,l=c.itemsCmd(c.itemsList(0),"createSession"),t.next=23,e.apiCall(l,o);case 23:return p=t.sent,t.abrupt("return",p);case 27:return t.next=29,e.apiCall(s.links("createSession"));case 29:return h=t.sent,t.abrupt("return",h);case 32:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var et=function(t,e,n,r){return tt.apply(this,arguments)};function nt(){return(nt=u()(f.a.mark((function t(e,n,r){var o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("log"!==r&&"listing"!==r){t.next=20;break}if(o=[],null===n[r]){t.next=16;break}return t.next=5,e.apiCall(n[r]);case 5:i=t.sent,o=o.concat(i.items().toJS());case 7:if(null===(a=i.scrollCmds("next"))){t.next=14;break}return t.next=10,e.apiCall(a);case 10:i=t.sent,o=o.concat(i.items().toJS()),t.next=7;break;case 14:t.next=17;break;case 16:o[0]="Note: No ".concat(r);case 17:return t.abrupt("return",o);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 s=t.sent,t.abrupt("return",s.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 rt=function(t,e,n){return nt.apply(this,arguments)};function ot(){return(ot=u()(f.a.mark((function t(e,n,r,o){var i,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==o){t.next=6;break}return t.next=3,Z(e,n,o);case 3:if("completed"===(i=t.sent).SASJobStatus){t.next=6;break}throw"Error: Preamble failed with completion code of ".concat(i.SASJobStatus);case 6:return t.next=8,H(e,n,null,r);case 8:return a=t.sent,t.abrupt("return",a);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var it=function(t,e,n,r){return ot.apply(this,arguments)};function at(){return(at=u()(f.a.mark((function t(e,n,r,o,i){var a,s,u,c,l,p,h,d,y,v,_,m,b,g,w,x,S;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,s=(s="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),u=null!=i&&null==o,null==(c=n.tables[s])){t.next=37;break}if(!0===u&&(c.current=null),null!==c.current&&null!=o&&"first"!==o){t.next=26;break}return t.next=10,e.apiCall(c.self);case 10:return l=t.sent,t.next=13,e.apiCall(l.links("rowSet"),i);case 13:return p=t.sent,t.next=16,e.apiCall(l.links("columns"));case 16:for(v in h=t.sent,d=[],y=h.items().toJS())_=y[v],m={name:_.name.toLowerCase(),Column:_.name.toLowerCase(),Label:_.data.label,length:_.data.length,type:_.data.type,custom:!1},d.push(m);c.current=p,c.schema=d,b=p.items().toJS(),a={columns:b.columns,schema:d,rows:b.rows,scrollOptions:p.scrollCmds().keySeq().toJS()},t.next=37;break;case 26:if(g=c.current,w=o,i&&"next"===o&&null===g.scrollCmds("next")&&(w=null!==g.links("last")?"last":null),"prev"===o&&null===g.scrollCmds("prev")&&(w=null!==g.links("first")?"first":null),null===w||null===g.scrollCmds(w)){t.next=37;break}return t.next=33,e.apiCall(g.scrollCmds(w),i);case 33:x=t.sent,c.current=x,S=x.items().toJS(),a={schema:c.schema,columns:S.columns,rows:S.rows,scrollOptions:x.scrollCmds().keySeq().toJS()};case 37:return t.abrupt("return",a);case 38:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var st=function(t,e,n,r,o){return at.apply(this,arguments)};function ut(){return(ut=u()(f.a.mark((function t(e,n,r,o){var i,a,s,u,c,l;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(i=n.files[r])){t.next=3;break}throw"Invalid fileref ".concat(r);case 3:if(null!==i.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 s=t.sent,t.next=10,e.apiCall(s.itemsCmd(r,"self"));case 10:s=t.sent,i.current=s;case 12:if(!0!==o){t.next=17;break}return u="".concat(n.session.host).concat(i.current.links("content","link","uri")),t.abrupt("return",u);case 17:if(null!==i.data){t.next=26;break}return t.next=20,e.apiCall(i.current.links("content"));case 20:return c=t.sent,l=c.items(),i.data=l,t.abrupt("return",l);case 26:return t.abrupt("return",i.data);case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ct=function(t,e,n,r){return ut.apply(this,arguments)};function ft(){return(ft=u()(f.a.mark((function t(e,n,r,o){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="\n proc append base=".concat(o.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),t.next=3,Z(e,n,i);case 3:return a=t.sent,s="completed"===a.SASJobStatus?0:1,t.abrupt("return",{msg:"Append Completed. Status is: ".concat(a.SASJobStatus),statusCode:s});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var lt=function(t,e,n,r){return ft.apply(this,arguments)};function pt(){return(pt=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_,m,b,g,w,x;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(l in o=r.data,i=r.table,a=r.where,s="proc sql; update ".concat(i.libref,".").concat(i.name),u="SET ",c=" ",o)u=u+c+l+"="+ht(o[l]),c=", ";for(d in s=s+" "+u,p=" WHERE ",h=" ",a)y=a[d],v=ht(y),p=p+h+d+"= ".concat(v," "),h=" AND ";return _=(s=s+" "+p+";run;").split(/\r?\n/),m={data:{code:_}},t.next=15,e.apiCall(n.links("execute"),m);case 15:return b=t.sent,g={qs:{newState:"Completed",timeout:1}},t.next=19,e.jobState(b,g);case 19:return w=t.sent,x="completed"===w.data?0:1,t.abrupt("return",{statusCode:x,msg:w.data});case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(t){return null==t?".":"string"==typeof t?JSON.stringify(t):t.toString()}var dt=function(t,e,n){return pt.apply(this,arguments)};n(13).promises;function yt(){return(yt=u()(f.a.mark((function t(e,n,r,o,i){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{msg:"Placeholder",statusCode:0});case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt=function(t,e,n,r,o){return yt.apply(this,arguments)};function _t(){return(_t=u()(f.a.mark((function t(e,n){var r,o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.getService("reports"),o=null,null!==n&&(o={qs:{filter:"eq(name,'".concat(n,"')")}}),t.next=5,e.apiCall(r.links("reports"),o);case 5:return i=t.sent,t.abrupt("return",0===i.itemsList().size?null:i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt=function(t,e){return _t.apply(this,arguments)};function bt(){return(bt=u()(f.a.mark((function t(e,n){var r,o,i,a,s,u,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.rafObject("reportImages"),t.next=3,mt(e,n);case 3:if(null!==(o=t.sent)){t.next=6;break}return t.abrupt("return","".concat(n," was not found"));case 6:return i=o.itemsCmd(o.itemsList(0),"self","link","uri"),a={data:{reportUri:i,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},t.next=11,e.apiCall(r.links("createJob"),a);case 11:return s=t.sent,t.next=14,e.jobState(s,{qs:{wait:1.5}},10,2);case 14:if("completed"===(u=t.sent).data){t.next=17;break}return t.abrupt("return","Job failed ".concat(u.data));case 17:return t.next=19,e.apiCall(u.job.itemsCmd(u.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 gt=function(t,e){return bt.apply(this,arguments)};function wt(){return(wt=u()(f.a.mark((function t(e,n){var r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mt(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 o=[],r.items().map((function(t,e){var n={name:e,uri:r.itemsCmd(e,"self","link","uri")};o.push(n)})),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var xt=function(t,e){return wt.apply(this,arguments)};function St(){return(St=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n.tables[r],t.next=3,e.apiCall(o);case 3:return i=t.sent,t.next=6,e.apiCall(i.links("rowSet"));case 6:for(a=t.sent,s=a.items("columns"),u=a.items("rows"),c=[],l=u.size,p=function(t){var e=u.get(t),n={};s.map((function(t,r){var o=t.toLowerCase();n[o]=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 Et=function(t,e,n){return St.apply(this,arguments)};function Ot(){return(Ot=u()(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 kt=function(t,e){return Ot.apply(this,arguments)};function At(){return(At=u()(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 jt=function(t,e){return At.apply(this,arguments)};function Tt(){return(Tt=u()(f.a.mark((function t(e,n,r){var o,i,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 o=t.sent,t.next=5,e.jobState(o,null,5,2);case 5:if("running"!==(i=t.sent).data){t.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==i.data){t.next=14;break}throw JSON.stringify(i);case 14:return t.next=16,jt(e,i.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,n){return Tt.apply(this,arguments)};function Ct(){return(Ct=u()(f.a.mark((function t(e,n,r,o,i){var a,s,u,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={},s={},null===o){t.next=6;break}return t.next=5,Rt(e,o);case 5:a.jobDefinitionUri=t.sent;case 6:return-0!=r&&(s.code=r),s.type="Compute",a.arguments=i,a.jobDefinition=s,u={data:a},t.next=13,It(e,n,u);case 13:return c=t.sent,t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rt(t,e){return zt.apply(this,arguments)}function zt(){return(zt=u()(f.a.mark((function t(e,n){var r,o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.getService("jobDefinitions"),r=null,o={qs:{filter:"eq(name,'".concat(n,"')")}},t.next=5,It(e,o);case 5:if(0!==(i=t.sent).itemsList().size){t.next=10;break}throw"Error: ".concat(n," not found in the system");case 10:r=i.itemsCmd(n,"self","link","uri");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Mt=function(t,e,n,r,o){return Ct.apply(this,arguments)},Dt=n(6);function Lt(){return(Lt=u()(f.a.mark((function t(e,n,r){var o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n.service,i=0;case 2:if(!(i<r.length)){t.next=12;break}if(a=r[i],null!=n.steps[a]){t.next=9;break}return t.next=7,qt(e,o,a);case 7:s=t.sent,n.steps[a]=s;case 9:i++,t.next=2;break;case 12:return t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Pt=function(t,e,n){return Lt.apply(this,arguments)};function Ut(){return(Ut=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},t.next=3,e.apiCall(n.links("modules"),o);case 3:if(0!==(i=t.sent).itemsList().size){t.next=6;break}return t.abrupt("return",null);case 6:return a=i.itemsCmd(r,"steps"),t.next=9,e.apiCall(a);case 9:return s=t.sent,u={name:r,stepsRafLink:s,stepIds:i.items(r,"data","stepIds").toJS(),microanalyticScore:n},t.abrupt("return",u);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qt=function(t,e,n){return Ut.apply(this,arguments)};function Bt(){return(Bt=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,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:o=t.sent,i=o.microanalyticScore,a={service:i,steps:{}},s=0;case 9:if(!(s<n.length)){t.next=18;break}return u=n[s],t.next=13,qt(e,i,u);case 13:c=t.sent,a.steps[u]=c;case 15:s++,t.next=9;break;case 18:return t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Nt=function(t,e,n){return Bt.apply(this,arguments)};var Ft=function(t,e,n){var r=t.steps[e];if(null===r)return[];var o=null;if(null==n){var i=r.stepIds.findIndex((function(t){return"execute"===t||"score"===t}));if(-1===i)return[];o=r.stepIds[i]}else{if(-1===r.stepIds.findIndex((function(t){return t===n})))return[];o=n}var a=r.stepsRafLink.items(o,"data","inputs");return null===a?[]:a.toJS()};function Yt(){return(Yt=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y,v,_,m,b,g;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=n.steps[r],u=!1,c=[],!1===Array.isArray(o))for(l in o)p={name:l,value:o[l]},c.push(p);else u=!0;if(h={data:{inputs:!0===u?o:c}},d=null,null!=i){t.next=15;break}if(-1!==(y=s.stepIds.findIndex((function(t){return"execute"===t||"score"===t})))){t.next=12;break}return t.abrupt("return",[]);case 12:d=s.stepIds[y];case 13:t.next=21;break;case 15:if(-1!==s.stepIds.findIndex((function(t){return t===i}))){t.next=20;break}return t.abrupt("return",[]);case 20:d=i;case 21:if(null!==(v=s.stepsRafLink.itemsCmd(d,a))){t.next=25;break}return _=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(i," 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,b=m.items("outputs").toJS(),!0===u?g=b:(g={},b.map((function(t){g[t.name]=t.value}))),t.abrupt("return",g);case 31:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Jt=function(t,e,n,r,o,i){return Yt.apply(this,arguments)};function Kt(){return(Kt=u()(f.a.mark((function t(e,n,r){var o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Nt(e,[n]);case 2:return o=t.sent,t.next=5,Jt(e,o,n,r,"score","execute");case 5:return i=t.sent,t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Gt=function(t,e,n){return Kt.apply(this,arguments)},Wt={};function Vt(t){t&&(t.value=!0)}function Ht(){}function Qt(t){return void 0===t.size&&(t.size=t.__iterate(Xt)),t.size}function $t(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?Qt(t)+e:e}function Xt(){return!0}function Zt(t,e,n){return(0===t&&!re(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function te(t,e){return ne(t,e,0)}function ee(t,e){return ne(t,e,e)}function ne(t,e,n){return void 0===t?n:re(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function re(t){return t<0||0===t&&1/t==-1/0}function oe(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function ie(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function ae(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function se(t){return ie(t)||ae(t)}var ue=function(t){return oe(t)?t:je(t)},ce=function(t){function e(t){return ie(t)?t:Te(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue),fe=function(t){function e(t){return ae(t)?t:Ie(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue),le=function(t){function e(t){return oe(t)&&!se(t)?t:Ce(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue);ue.Keyed=ce,ue.Indexed=fe,ue.Set=le;function pe(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function he(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function de(t){return oe(t)||he(t)}var ye="@@__IMMUTABLE_ORDERED__@@";function ve(t){return Boolean(t&&t[ye])}var _e="function"==typeof Symbol&&Symbol.iterator,me=_e||"@@iterator",be=function(t){this.next=t};function ge(t,e,n,r){var o=0===t?e:1===t?n:[e,n];return r?r.value=o:r={value:o,done:!1},r}function we(){return{value:void 0,done:!0}}function xe(t){return!!Array.isArray(t)||!!Oe(t)}function Se(t){return t&&"function"==typeof t.next}function Ee(t){var e=Oe(t);return e&&e.call(t)}function Oe(t){var e=t&&(_e&&t[_e]||t["@@iterator"]);if("function"==typeof e)return e}be.prototype.toString=function(){return"[Iterator]"},be.KEYS=0,be.VALUES=1,be.ENTRIES=2,be.prototype.inspect=be.prototype.toSource=function(){return this.toString()},be.prototype[me]=function(){return this};var ke=Object.prototype.hasOwnProperty;function Ae(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 je=function(t){function e(t){return null==t?Le():de(t)?t.toSeq():function(t){var e=qe(t);if(e)return(r=Oe(n=t))&&r===n.entries?e.fromEntrySeq():function(t){var e=Oe(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var n,r;if("object"==typeof t)return new ze(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,o=0;o!==r;){var i=n[e?r-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,o=0;return new be((function(){if(o===r)return{value:void 0,done:!0};var i=n[e?r-++o:o++];return ge(t,i[0],i[1])}))}return this.__iteratorUncached(t,e)},e}(ue),Te=function(t){function e(t){return null==t?Le().toKeyedSeq():oe(t)?ie(t)?t.toSeq():t.fromEntrySeq():he(t)?t.toSeq():Pe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(je),Ie=function(t){function e(t){return null==t?Le():oe(t)?ie(t)?t.entrySeq():t.toIndexedSeq():he(t)?t.toSeq().entrySeq():Ue(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}(je),Ce=function(t){function e(t){return(oe(t)&&!se(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}(je);je.isSeq=pe,je.Keyed=Te,je.Set=Ce,je.Indexed=Ie,je.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var Re=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[$t(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,o=0;o!==r;){var i=e?r-++o:o++;if(!1===t(n[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,o=0;return new be((function(){if(o===r)return{value:void 0,done:!0};var i=e?r-++o:o++;return ge(t,i,n[i])}))},e}(Ie),ze=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(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 ke.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,o=r.length,i=0;i!==o;){var a=r[e?o-++i:i++];if(!1===t(n[a],a,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,o=r.length,i=0;return new be((function(){if(i===o)return{value:void 0,done:!0};var a=r[e?o-++i:i++];return ge(t,a,n[a])}))},e}(Te);ze.prototype[ye]=!0;var Me,De=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=Ee(this._collection),r=0;if(Se(n))for(var o;!(o=n.next()).done&&!1!==t(o.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=Ee(this._collection);if(!Se(n))return new be(we);var r=0;return new be((function(){var e=n.next();return e.done?e:ge(t,r++,e.value)}))},e}(Ie);function Le(){return Me||(Me=new Re([]))}function Pe(t){var e=qe(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new ze(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Ue(t){var e=qe(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function qe(t){return Ae(t)?new Re(t):xe(t)?new De(t):void 0}function Be(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Ne(t){return Be(t)&&ve(t)}function Fe(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Ye(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!!(Fe(t)&&Fe(e)&&t.equals(e))}var Je="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 Ke(t){return t>>>1&1073741824|3221225471&t}var Ge=Object.prototype.valueOf;function We(t){if(null==t)return Ve(t);if("function"==typeof t.hashCode)return Ke(t.hashCode(t));var e,n=(e=t).valueOf!==Ge&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==n)return Ve(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 Ke(e)}(n);case"string":return n.length>on?function(t){var e=un[t];void 0===e&&(e=He(t),sn===an&&(sn=0,un={}),sn++,un[t]=e);return e}(n):He(n);case"object":case"function":return function(t){var e;if(tn&&void 0!==(e=Ze.get(t)))return e;if(void 0!==(e=t[rn]))return e;if(!$e){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[rn]))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=Xe(),tn)Ze.set(t,e);else{if(void 0!==Qe&&!1===Qe(t))throw new Error("Non-extensible objects are not allowed as keys.");if($e)Object.defineProperty(t,rn,{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[rn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[rn]=e}}return e}(n);case"symbol":return function(t){var e=en[t];if(void 0!==e)return e;return e=Xe(),en[t]=e,e}(n);default:if("function"==typeof n.toString)return He(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function Ve(t){return null===t?1108378658:1108378659}function He(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return Ke(e)}var Qe=Object.isExtensible,$e=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Xe(){var t=++nn;return 1073741824&nn&&(nn=0),t}var Ze,tn="function"==typeof WeakMap;tn&&(Ze=new WeakMap);var en=Object.create(null),nn=0,rn="__immutablehash__";"function"==typeof Symbol&&(rn=Symbol(rn));var on=16,an=255,sn=0,un={},cn=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=yn(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var n=this,r=dn(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}(Te);cn.prototype[ye]=!0;var fn=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&&Qt(this),this._iter.__iterate((function(o){return t(o,e?n.size-++r:r++,n)}),e)},e.prototype.__iterator=function(t,e){var n=this,r=this._iter.__iterator(1,e),o=0;return e&&Qt(this),new be((function(){var i=r.next();return i.done?i:ge(t,e?n.size-++o:o++,i.value,i)}))},e}(Ie),ln=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 be((function(){var e=n.next();return e.done?e:ge(t,e.value,e.value,e)}))},e}(Ce),pn=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){kn(e);var r=oe(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 be((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){kn(r);var o=oe(r);return ge(t,o?r.get(0):r[0],o?r.get(1):r[1],e)}}}))},e}(Te);function hn(t){var e=jn(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=Tn,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 be((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 dn(t,e,n){var r=jn(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,o){var i=t.get(r,Wt);return i===Wt?o:e.call(n,i,r,t)},r.__iterateUncached=function(r,o){var i=this;return t.__iterate((function(t,o,a){return!1!==r(e.call(n,t,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=t.__iterator(2,o);return new be((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return ge(r,s,e.call(n,a[1],s,t),o)}))},r}function yn(t,e){var n=this,r=jn(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=hn(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=Tn,r.__iterate=function(n,r){var o=this,i=0;return r&&Qt(t),t.__iterate((function(t,a){return n(t,e?a:r?o.size-++i:i++,o)}),!r)},r.__iterator=function(r,o){var i=0;o&&Qt(t);var a=t.__iterator(2,!o);return new be((function(){var t=a.next();if(t.done)return t;var s=t.value;return ge(r,e?s[0]:o?n.size-++i:i++,s[1],t)}))},r}function vn(t,e,n,r){var o=jn(t);return r&&(o.has=function(r){var o=t.get(r,Wt);return o!==Wt&&!!e.call(n,o,r,t)},o.get=function(r,o){var i=t.get(r,Wt);return i!==Wt&&e.call(n,i,r,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return t.__iterate((function(t,i,u){if(e.call(n,t,i,u))return s++,o(t,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=t.__iterator(2,i),s=0;return new be((function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return ge(o,r?c:s++,f,i)}}))},o}function _n(t,e,n,r){var o=t.size;if(Zt(e,n,o))return t;var i=te(e,o),a=ee(n,o);if(i!=i||a!=a)return _n(t.toSeq().cacheResult(),e,n,r);var s,u=a-i;u==u&&(s=u<0?0:u);var c=jn(t);return c.size=0===s?s:t.size&&s||void 0,!r&&pe(t)&&s>=0&&(c.get=function(e,n){return(e=$t(this,e))>=0&&e<s?t.get(e+i,n):n}),c.__iterateUncached=function(e,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,u=!0,c=0;return t.__iterate((function(t,n){if(!u||!(u=a++<i))return c++,!1!==e(t,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(e,n){if(0!==s&&n)return this.cacheResult().__iterator(e,n);if(0===s)return new be(we);var o=t.__iterator(e,n),a=0,u=0;return new be((function(){for(;a++<i;)o.next();if(++u>s)return{value:void 0,done:!0};var t=o.next();return r||1===e||t.done?t:ge(e,u-1,0===e?void 0:t.value[1],t)}))},c}function mn(t,e,n,r){var o=jn(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return t.__iterate((function(t,i,c){if(!s||!(s=e.call(n,t,i,c)))return u++,o(t,r?i:u-1,a)})),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=t.__iterator(2,i),u=!0,c=0;return new be((function(){var t,i,f;do{if((t=s.next()).done)return r||1===o?t:ge(o,c++,0===o?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],u&&(u=e.call(n,f,i,a))}while(u);return 2===o?t:ge(o,i,f,t)}))},o}function bn(t,e){var n=ie(t),r=[t].concat(e).map((function(t){return oe(t)?n&&(t=ce(t)):t=n?Pe(t):Ue(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var o=r[0];if(o===t||n&&ie(o)||ae(t)&&ae(o))return o}var i=new Re(r);return n?i=i.toKeyedSeq():ae(t)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),i}function gn(t,e,n){var r=jn(t);return r.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var a=0,s=!1;return function t(u,c){u.__iterate((function(i,u){return(!e||c<e)&&oe(i)?t(i,c+1):(a++,!1===o(i,n?u:a-1,r)&&(s=!0)),!s}),i)}(t,0),a},r.__iteratorUncached=function(r,o){if(o)return this.cacheResult().__iterator(r,o);var i=t.__iterator(r,o),a=[],s=0;return new be((function(){for(;i;){var t=i.next();if(!1===t.done){var u=t.value;if(2===r&&(u=u[1]),e&&!(a.length<e)||!oe(u))return n?t:ge(r,s++,u,t);a.push(i),i=u.__iterator(r,o)}else i=a.pop()}return{value:void 0,done:!0}}))},r}function wn(t,e,n){e||(e=In);var r=ie(t),o=0,i=t.toSeq().map((function(e,r){return[r,e,o++,n?n(e,r,t):e]})).valueSeq().toArray();return i.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),r?Te(i):ae(t)?Ie(i):Ce(i)}function xn(t,e,n){if(e||(e=In),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return Sn(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return Sn(e,t,n)?n:t}))}function Sn(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function En(t,e,n,r){var o=jn(t),i=new Re(n).map((function(t){return t.size}));return o.size=r?i.max():i.min(),o.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),o=0;!(n=r.next()).done&&!1!==t(n.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=n.map((function(t){return t=ue(t),Ee(o?t.reverse():t)})),a=0,s=!1;return new be((function(){var n;return s||(n=i.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:ge(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},o}function On(t,e){return t===e?t:pe(t)?e:t.constructor(e)}function kn(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function An(t){return ie(t)?ce:ae(t)?fe:le}function jn(t){return Object.create((ie(t)?Te:ae(t)?Ie:Ce).prototype)}function Tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):je.prototype.cacheResult.call(this)}function In(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 Cn(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),o=0;o<n;o++)r[o]=t[o+e];return r}function Rn(t,e){if(!t)throw new Error(e)}function zn(t){Rn(t!==1/0,"Cannot perform this action with an infinite size.")}function Mn(t){if(Ae(t)&&"string"!=typeof t)return t;if(ve(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}fn.prototype.cacheResult=cn.prototype.cacheResult=ln.prototype.cacheResult=pn.prototype.cacheResult=Tn;var Dn=Object.prototype.toString;function Ln(t){if(!t||"object"!=typeof t||"[object Object]"!==Dn.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 Pn(t){return"object"==typeof t&&(de(t)||Array.isArray(t)||Ln(t))}function Un(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function qn(t,e){return de(t)?t.has(e):Pn(t)&&ke.call(t,e)}function Bn(t,e,n){return de(t)?t.get(e,n):qn(t,e)?"function"==typeof t.get?t.get(e):t[e]:n}function Nn(t){if(Array.isArray(t))return Cn(t);var e={};for(var n in t)ke.call(t,n)&&(e[n]=t[n]);return e}function Fn(t,e){if(!Pn(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(de(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!ke.call(t,e))return t;var n=Nn(t);return Array.isArray(n)?n.splice(e,1):delete n[e],n}function Yn(t,e,n){if(!Pn(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(de(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,n)}if(ke.call(t,e)&&n===t[e])return t;var r=Nn(t);return r[e]=n,r}function Jn(t,e,n,r){r||(r=n,n=void 0);var o=function t(e,n,r,o,i,a){var s=n===Wt;if(o===r.length){var u=s?i:n,c=a(u);return c===u?n:c}if(!s&&!Pn(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,o).map(Un)+"]: "+n);var f=r[o],l=s?Wt:Bn(n,f,Wt),p=t(l===Wt?e:de(l),l,r,o+1,i,a);return p===l?n:p===Wt?Fn(n,f):Yn(s?e?Sr():{}:n,f,p)}(de(t),t,Mn(e),0,n,r);return o===Wt?n:o}function Kn(t,e,n){return Jn(t,e,Wt,(function(){return n}))}function Gn(t,e){return Kn(this,t,e)}function Wn(t,e){return Jn(t,e,(function(){return Wt}))}function Vn(t){return Wn(this,t)}function Hn(t,e,n,r){return Jn(t,[e],n,r)}function Qn(t,e,n){return 1===arguments.length?t(this):Hn(this,t,e,n)}function $n(t,e,n){return Jn(this,t,e,n)}function Xn(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return tr(this,t)}function Zn(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 tr(this,e,t)}function tr(t,e,n){for(var r=[],o=0;o<e.length;o++){var i=ce(e[o]);0!==i.size&&r.push(i)}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){Hn(t,r,Wt,(function(t){return t===Wt?e:n(t,e,r)}))}:function(e,n){t.set(n,e)},o=0;o<r.length;o++)r[o].forEach(e)})):t.constructor(r[0])}function er(t,e,n){return nr(t,e,function(t){return function e(n,r,o){return Pn(n)&&Pn(r)&&(i=r,a=je(n),s=je(i),ae(a)===ae(s)&&ie(a)===ie(s))?nr(n,[r],e):t?t(n,r,o):r;var i,a,s}}(n))}function nr(t,e,n){if(!Pn(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(de(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),o=t,i=r?fe:ce,a=r?function(e){o===t&&(o=Nn(o)),o.push(e)}:function(e,r){var i=ke.call(o,r),a=i&&n?n(o[r],e,r):e;i&&a===o[r]||(o===t&&(o=Nn(o)),o[r]=a)},s=0;s<e.length;s++)i(e[s]).forEach(a);return o}function rr(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er(this,t)}function or(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return er(this,e,t)}function ir(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return Jn(this,t,Sr(),(function(t){return nr(t,e)}))}function ar(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return Jn(this,t,Sr(),(function(t){return er(t,e)}))}function sr(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function ur(){return this.__ownerID?this:this.__ensureOwner(new Ht)}function cr(){return this.__ensureOwner()}function fr(){return this.__altered}var lr=function(t){function e(e){return null==e?Sr():Be(e)&&!ve(e)?e:Sr().withMutations((function(n){var r=t(e);zn(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 Sr().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 Er(this,t,e)},e.prototype.remove=function(t){return Er(this,t,Wt)},e.prototype.deleteAll=function(t){var e=ue(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):Sr()},e.prototype.sort=function(t){return Vr(wn(this,t))},e.prototype.sortBy=function(t,e){return Vr(wn(this,e,t))},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){r.forEach((function(o,i){r.set(i,t.call(e,o,i,n))}))}))},e.prototype.__iterator=function(t,e){return new br(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?xr(this.size,this._root,t,this.__hash):0===this.size?Sr():(this.__ownerID=t,this.__altered=!1,this)},e}(ce);lr.isMap=Be;var pr=lr.prototype;pr["@@__IMMUTABLE_MAP__@@"]=!0,pr.delete=pr.remove,pr.removeAll=pr.deleteAll,pr.setIn=Gn,pr.removeIn=pr.deleteIn=Vn,pr.update=Qn,pr.updateIn=$n,pr.merge=pr.concat=Xn,pr.mergeWith=Zn,pr.mergeDeep=rr,pr.mergeDeepWith=or,pr.mergeIn=ir,pr.mergeDeepIn=ar,pr.withMutations=sr,pr.wasAltered=fr,pr.asImmutable=cr,pr["@@transducer/init"]=pr.asMutable=ur,pr["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},pr["@@transducer/result"]=function(t){return t.asImmutable()};var hr=function(t,e){this.ownerID=t,this.entries=e};hr.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Ye(n,o[i][0]))return o[i][1];return r},hr.prototype.update=function(t,e,n,r,o,i,a){for(var s=o===Wt,u=this.entries,c=0,f=u.length;c<f&&!Ye(r,u[c][0]);c++);var l=c<f;if(l?u[c][1]===o:s)return this;if(Vt(a),(s||!l)&&Vt(i),!s||1!==u.length){if(!l&&!s&&u.length>=Ir)return function(t,e,n,r){t||(t=new Ht);for(var o=new _r(t,We(n),[n,r]),i=0;i<e.length;i++){var a=e[i];o=o.update(t,0,void 0,a[0],a[1])}return o}(t,u,r,o);var p=t&&t===this.ownerID,h=p?u:Cn(u);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),p?(this.entries=h,this):new hr(t,h)}};var dr=function(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n};dr.prototype.get=function(t,e,n,r){void 0===e&&(e=We(n));var o=1<<(31&(0===t?e:e>>>t)),i=this.bitmap;return 0==(i&o)?r:this.nodes[jr(i&o-1)].get(t+5,e,n,r)},dr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=31&(0===e?n:n>>>e),u=1<<s,c=this.bitmap,f=0!=(c&u);if(!f&&o===Wt)return this;var l=jr(c&u-1),p=this.nodes,h=f?p[l]:void 0,d=Or(h,t,e+5,n,r,o,i,a);if(d===h)return this;if(!f&&d&&p.length>=Cr)return function(t,e,n,r,o){for(var i=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[i++]:void 0;return a[r]=o,new yr(t,i+1,a)}(t,p,c,s,d);if(f&&!d&&2===p.length&&kr(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&kr(d))return d;var y=t&&t===this.ownerID,v=f?d?c:c^u:c|u,_=f?d?Tr(p,l,d,y):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var o=new Array(r),i=0,a=0;a<r;a++)a===e&&(i=1),o[a]=t[a+i];return o}(p,l,y):function(t,e,n,r){var o=t.length+1;if(r&&e+1===o)return t[e]=n,t;for(var i=new Array(o),a=0,s=0;s<o;s++)s===e?(i[s]=n,a=-1):i[s]=t[s+a];return i}(p,l,d,y);return y?(this.bitmap=v,this.nodes=_,this):new dr(t,v,_)};var yr=function(t,e,n){this.ownerID=t,this.count=e,this.nodes=n};yr.prototype.get=function(t,e,n,r){void 0===e&&(e=We(n));var o=31&(0===t?e:e>>>t),i=this.nodes[o];return i?i.get(t+5,e,n,r):r},yr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=31&(0===e?n:n>>>e),u=o===Wt,c=this.nodes,f=c[s];if(u&&!f)return this;var l=Or(f,t,e+5,n,r,o,i,a);if(l===f)return this;var p=this.count;if(f){if(!l&&--p<Rr)return function(t,e,n,r){for(var o=0,i=0,a=new Array(n),s=0,u=1,c=e.length;s<c;s++,u<<=1){var f=e[s];void 0!==f&&s!==r&&(o|=u,a[i++]=f)}return new dr(t,o,a)}(t,c,p,s)}else p++;var h=t&&t===this.ownerID,d=Tr(c,s,l,h);return h?(this.count=p,this.nodes=d,this):new yr(t,p,d)};var vr=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n};vr.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Ye(n,o[i][0]))return o[i][1];return r},vr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=o===Wt;if(n!==this.keyHash)return s?this:(Vt(a),Vt(i),Ar(this,t,e,n,[r,o]));for(var u=this.entries,c=0,f=u.length;c<f&&!Ye(r,u[c][0]);c++);var l=c<f;if(l?u[c][1]===o:s)return this;if(Vt(a),(s||!l)&&Vt(i),s&&2===f)return new _r(t,this.keyHash,u[1^c]);var p=t&&t===this.ownerID,h=p?u:Cn(u);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),p?(this.entries=h,this):new vr(t,this.keyHash,h)};var _r=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n};_r.prototype.get=function(t,e,n,r){return Ye(n,this.entry[0])?this.entry[1]:r},_r.prototype.update=function(t,e,n,r,o,i,a){var s=o===Wt,u=Ye(r,this.entry[0]);return(u?o===this.entry[1]:s)?this:(Vt(a),s?void Vt(i):u?t&&t===this.ownerID?(this.entry[1]=o,this):new _r(t,this.keyHash,[r,o]):(Vt(i),Ar(this,t,e,We(r),[r,o])))},hr.prototype.iterate=vr.prototype.iterate=function(t,e){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===t(n[e?o-r:r]))return!1},dr.prototype.iterate=yr.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[e?o-r:r];if(i&&!1===i.iterate(t,e))return!1}},_r.prototype.iterate=function(t,e){return t(this.entry)};var mr,br=function(t){function e(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&wr(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++,o=void 0;if(n.entry){if(0===r)return gr(t,n.entry)}else if(n.entries){if(r<=(o=n.entries.length-1))return gr(t,n.entries[this._reverse?o-r:r])}else if(r<=(o=n.nodes.length-1)){var i=n.nodes[this._reverse?o-r:r];if(i){if(i.entry)return gr(t,i.entry);e=this._stack=wr(i,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(be);function gr(t,e){return ge(t,e[0],e[1])}function wr(t,e){return{node:t,index:0,__prev:e}}function xr(t,e,n,r){var o=Object.create(pr);return o.size=t,o._root=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Sr(){return mr||(mr=xr(0))}function Er(t,e,n){var r,o;if(t._root){var i={value:!1},a={value:!1};if(r=Or(t._root,t.__ownerID,0,void 0,e,n,i,a),!a.value)return t;o=t.size+(i.value?n===Wt?-1:1:0)}else{if(n===Wt)return t;o=1,r=new hr(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?xr(o,r):Sr()}function Or(t,e,n,r,o,i,a,s){return t?t.update(e,n,r,o,i,a,s):i===Wt?t:(Vt(s),Vt(a),new _r(e,r,[o,i]))}function kr(t){return t.constructor===_r||t.constructor===vr}function Ar(t,e,n,r,o){if(t.keyHash===r)return new vr(e,r,[t.entry,o]);var i,a=31&(0===n?t.keyHash:t.keyHash>>>n),s=31&(0===n?r:r>>>n),u=a===s?[Ar(t,e,n+5,r,o)]:(i=new _r(e,r,o),a<s?[t,i]:[i,t]);return new dr(e,1<<a|1<<s,u)}function jr(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Tr(t,e,n,r){var o=r?t:Cn(t);return o[e]=n,o}var Ir=8,Cr=16,Rr=8;function zr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var Mr=function(t){function e(e){var n=Nr();if(null==e)return n;if(zr(e))return e;var r=t(e),o=r.size;return 0===o?n:(zn(o),o>0&&o<32?Br(0,o,5,null,new Lr(r.toArray())):n.withMutations((function(t){t.setSize(o),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=$t(this,t))>=0&&t<this.size){var n=Jr(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=$t(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Kr(t,e).set(0,n):Kr(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,o=t._root,i={value:!1};e>=Gr(t._capacity)?r=Fr(r,t.__ownerID,0,e,n,i):o=Fr(o,t.__ownerID,t._level,e,n,i);if(!i.value)return t;if(t.__ownerID)return t._root=o,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return Br(t._origin,t._capacity,t._level,o,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):Nr()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Kr(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},e.prototype.pop=function(){return Kr(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Kr(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},e.prototype.shift=function(){return Kr(this,1)},e.prototype.concat=function(){for(var e=arguments,n=[],r=0;r<arguments.length;r++){var o=e[r],i=t("string"!=typeof o&&xe(o)?o:[o]);0!==i.size&&n.push(i)}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 Kr(this,0,t)},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){for(var o=0;o<n.size;o++)r.set(o,t.call(e,r.get(o),o,n))}))},e.prototype.slice=function(t,e){var n=this.size;return Zt(t,e,n)?this:Kr(this,te(t,n),ee(e,n))},e.prototype.__iterator=function(t,e){var n=e?this.size:0,r=qr(this,e);return new be((function(){var o=r();return o===Ur?{value:void 0,done:!0}:ge(t,e?--n:n++,o)}))},e.prototype.__iterate=function(t,e){for(var n,r=e?this.size:0,o=qr(this,e);(n=o())!==Ur&&!1!==t(n,e?--r:r++,this););return r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Br(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?Nr():(this.__ownerID=t,this.__altered=!1,this)},e}(fe);Mr.isList=zr;var Dr=Mr.prototype;Dr["@@__IMMUTABLE_LIST__@@"]=!0,Dr.delete=Dr.remove,Dr.merge=Dr.concat,Dr.setIn=Gn,Dr.deleteIn=Dr.removeIn=Vn,Dr.update=Qn,Dr.updateIn=$n,Dr.mergeIn=ir,Dr.mergeDeepIn=ar,Dr.withMutations=sr,Dr.wasAltered=fr,Dr.asImmutable=cr,Dr["@@transducer/init"]=Dr.asMutable=ur,Dr["@@transducer/step"]=function(t,e){return t.push(e)},Dr["@@transducer/result"]=function(t){return t.asImmutable()};var Lr=function(t,e){this.array=t,this.ownerID=e};Lr.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 Lr([],t);var o,i=0===r;if(e>0){var a=this.array[r];if((o=a&&a.removeBefore(t,e-5,n))===a&&i)return this}if(i&&!o)return this;var s=Yr(this,t);if(!i)for(var u=0;u<r;u++)s.array[u]=void 0;return o&&(s.array[r]=o),s},Lr.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,o=n-1>>>e&31;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((r=i&&i.removeAfter(t,e-5,n))===i&&o===this.array.length-1)return this}var a=Yr(this,t);return a.array.splice(o+1),r&&(a.array[o]=r),a};var Pr,Ur={};function qr(t,e){var n=t._origin,r=t._capacity,o=Gr(r),i=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===o?i&&i.array:t&&t.array,u=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(u===c)return Ur;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,o,i){var s,u=t&&t.array,c=i>n?0:n-i>>o,f=1+(r-i>>o);f>32&&(f=32);return function(){for(;;){if(s){var t=s();if(t!==Ur)return t;s=null}if(c===f)return Ur;var n=e?--f:c++;s=a(u&&u[n],o-5,i+(n<<o))}}}(t,s,u)}}function Br(t,e,n,r,o,i,a){var s=Object.create(Dr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function Nr(){return Pr||(Pr=Br(0,0,5))}function Fr(t,e,n,r,o,i){var a,s=r>>>n&31,u=t&&s<t.array.length;if(!u&&void 0===o)return t;if(n>0){var c=t&&t.array[s],f=Fr(c,e,n-5,r,o,i);return f===c?t:((a=Yr(t,e)).array[s]=f,a)}return u&&t.array[s]===o?t:(i&&Vt(i),a=Yr(t,e),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function Yr(t,e){return e&&t&&e===t.ownerID?t:new Lr(t?t.array.slice():[],e)}function Jr(t,e){if(e>=Gr(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 Kr(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new Ht,o=t._origin,i=t._capacity,a=o+e,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,f=0;a+f<0;)c=new Lr(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(a+=f,o+=f,s+=f,i+=f);for(var l=Gr(i),p=Gr(s);p>=1<<u+5;)c=new Lr(c&&c.array.length?[c]:[],r),u+=5;var h=t._tail,d=p<l?Jr(t,s-1):p>l?new Lr([],r):h;if(h&&p>l&&a<i&&h.array.length){for(var y=c=Yr(c,r),v=u;v>5;v-=5){var _=l>>>v&31;y=y.array[_]=Yr(y.array[_],r)}y.array[l>>>5&31]=h}if(s<i&&(d=d&&d.removeAfter(r,0,s)),a>=p)a-=p,s-=p,u=5,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||p<l){for(f=0;c;){var m=a>>>u&31;if(m!==p>>>u&31)break;m&&(f+=(1<<u)*m),u-=5,c=c.array[m]}c&&a>o&&(c=c.removeBefore(r,u,a-f)),c&&p<l&&(c=c.removeAfter(r,u,p-f)),f&&(a-=f,s-=f)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Br(a,s,u,c,d)}function Gr(t){return t<32?0:t-1>>>5<<5}var Wr,Vr=function(t){function e(t){return null==t?Qr():Ne(t)?t:Qr().withMutations((function(e){var n=ce(t);zn(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):Qr()},e.prototype.set=function(t,e){return $r(this,t,e)},e.prototype.remove=function(t){return $r(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?Hr(e,n,t,this.__hash):0===this.size?Qr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=n,this)},e}(lr);function Hr(t,e,n,r){var o=Object.create(Vr.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Qr(){return Wr||(Wr=Hr(Sr(),Nr()))}function $r(t,e,n){var r,o,i=t._map,a=t._list,s=i.get(e),u=void 0!==s;if(n===Wt){if(!u)return t;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=i.remove(e),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=i,o=a.set(s,[e,n])}else r=i.set(e,a.size),o=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t.__altered=!0,t):Hr(r,o)}Vr.isOrderedMap=Ne,Vr.prototype[ye]=!0,Vr.prototype.delete=Vr.prototype.remove;function Xr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Zr=function(t){function e(t){return null==t?ro():Xr(t)?t:ro().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=$t(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):no(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Xr(e))return e;zn(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):no(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):ro()},e.prototype.slice=function(e,n){if(Zt(e,n,this.size))return this;var r=te(e,this.size);if(ee(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var o=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):no(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?no(this.size,this._head,t,this.__hash):0===this.size?ro():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Re(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,o=this._head;o&&!1!==t(o.value,r++,this);)o=o.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Re(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new be((function(){if(r){var e=r.value;return r=r.next,ge(t,n++,e)}return{value:void 0,done:!0}}))},e}(fe);Zr.isStack=Xr;var to,eo=Zr.prototype;function no(t,e,n,r){var o=Object.create(eo);return o.size=t,o._head=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ro(){return to||(to=no(0))}eo["@@__IMMUTABLE_STACK__@@"]=!0,eo.shift=eo.pop,eo.unshift=eo.push,eo.unshiftAll=eo.pushAll,eo.withMutations=sr,eo.wasAltered=fr,eo.asImmutable=cr,eo["@@transducer/init"]=eo.asMutable=ur,eo["@@transducer/step"]=function(t,e){return t.unshift(e)},eo["@@transducer/result"]=function(t){return t.asImmutable()};function oo(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function io(t){return oo(t)&&ve(t)}function ao(t,e){if(t===e)return!0;if(!oe(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||ie(t)!==ie(e)||ae(t)!==ae(e)||ve(t)!==ve(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!se(t);if(ve(t)){var r=t.entries();return e.every((function(t,e){var o=r.next().value;return o&&Ye(o[1],t)&&(n||Ye(o[0],e))}))&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var i=t;t=e,e=i}var a=!0,s=e.__iterate((function(e,r){if(n?!t.has(e):o?!Ye(e,t.get(r,Wt)):!Ye(t.get(r,Wt),e))return a=!1,!1}));return a&&t.size===s}function so(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 uo(t){if(!t||"object"!=typeof t)return t;if(!oe(t)){if(!Pn(t))return t;t=je(t)}if(ie(t)){var e={};return t.__iterate((function(t,n){e[n]=uo(t)})),e}var n=[];return t.__iterate((function(t){n.push(uo(t))})),n}var co=function(t){function e(e){return null==e?yo():oo(e)&&!ve(e)?e:yo().withMutations((function(n){var r=t(e);zn(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(ce(t).keySeq())},e.intersect=function(t){return(t=ue(t).toArray()).length?lo.intersect.apply(e(t.pop()),t):yo()},e.union=function(t){return(t=ue(t).toArray()).length?lo.union.apply(e(t.pop()),t):yo()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return po(this,this._map.set(t,t))},e.prototype.remove=function(t){return po(this,this._map.remove(t))},e.prototype.clear=function(){return po(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=!1,o=po(this,this._map.mapEntries((function(o){var i=o[1],a=t.call(e,i,i,n);return a!==i&&(r=!0),[a,a]}),e));return r?o: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 Mo(wn(this,t))},e.prototype.sortBy=function(t,e){return Mo(wn(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}(le);co.isSet=oo;var fo,lo=co.prototype;function po(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 ho(t,e){var n=Object.create(lo);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function yo(){return fo||(fo=ho(Sr()))}lo["@@__IMMUTABLE_SET__@@"]=!0,lo.delete=lo.remove,lo.merge=lo.concat=lo.union,lo.withMutations=sr,lo.asImmutable=cr,lo["@@transducer/init"]=lo.asMutable=ur,lo["@@transducer/step"]=function(t,e){return t.add(e)},lo["@@transducer/result"]=function(t){return t.asImmutable()},lo.__empty=yo,lo.__make=ho;var vo,_o=function(t){function e(t,n,r){if(!(this instanceof e))return new e(t,n,r);if(Rn(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(vo)return vo;vo=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+$t(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 Zt(t,n,this.size)?this:(t=te(t,this.size),(n=ee(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,o=e?this._start+(n-1)*r:this._start,i=0;i!==n&&!1!==t(o,e?n-++i:i++,this);)o+=e?-r:r;return i},e.prototype.__iterator=function(t,e){var n=this.size,r=this._step,o=e?this._start+(n-1)*r:this._start,i=0;return new be((function(){if(i===n)return{value:void 0,done:!0};var a=o;return o+=e?-r:r,ge(t,e?n-++i:i++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:ao(this,t)},e}(Ie);function mo(t,e,n){for(var r=Mn(e),o=0;o!==r.length;)if((t=Bn(t,r[o++],Wt))===Wt)return n;return t}function bo(t,e){return mo(this,t,e)}function go(t,e){return mo(t,e,Wt)!==Wt}function wo(){zn(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t}ue.isIterable=oe,ue.isKeyed=ie,ue.isIndexed=ae,ue.isAssociative=se,ue.isOrdered=ve,ue.Iterator=be,so(ue,{toArray:function(){zn(this.size);var t=new Array(this.size||0),e=ie(this),n=0;return this.__iterate((function(r,o){t[n++]=e?[o,r]:r})),t},toIndexedSeq:function(){return new fn(this)},toJS:function(){return uo(this)},toKeyedSeq:function(){return new cn(this,!0)},toMap:function(){return lr(this.toKeyedSeq())},toObject:wo,toOrderedMap:function(){return Vr(this.toKeyedSeq())},toOrderedSet:function(){return Mo(ie(this)?this.valueSeq():this)},toSet:function(){return co(ie(this)?this.valueSeq():this)},toSetSeq:function(){return new ln(this)},toSeq:function(){return ae(this)?this.toIndexedSeq():ie(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Zr(ie(this)?this.valueSeq():this)},toList:function(){return Mr(ie(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 On(this,bn(this,t))},includes:function(t){return this.some((function(e){return Ye(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){zn(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!t.call(e,r,o,i))return n=!1,!1})),n},filter:function(t,e){return On(this,vn(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 zn(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){zn(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 On(this,dn(this,t,e))},reduce:function(t,e,n){return ko(this,t,e,n,arguments.length<2,!1)},reduceRight:function(t,e,n){return ko(this,t,e,n,arguments.length<2,!0)},reverse:function(){return On(this,yn(this,!0))},slice:function(t,e){return On(this,_n(this,t,e,!0))},some:function(t,e){return!this.every(To(t),e)},sort:function(t){return On(this,wn(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 Qt(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=lr().asMutable();return t.__iterate((function(o,i){r.update(e.call(n,o,i,t),0,(function(t){return t+1}))})),r.asImmutable()}(this,t,e)},equals:function(t){return ao(this,t)},entrySeq:function(){var t=this;if(t._cache)return new Re(t._cache);var e=t.toSeq().map(jo).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(To(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate((function(n,o,i){if(t.call(e,n,o,i))return r=[o,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(Xt,null,t)},flatMap:function(t,e){return On(this,function(t,e,n){var r=An(t);return t.toSeq().map((function(o,i){return r(e.call(n,o,i,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return On(this,gn(this,t,!0))},fromEntrySeq:function(){return new pn(this)},get:function(t,e){return this.find((function(e,n){return Ye(n,t)}),void 0,e)},getIn:bo,groupBy:function(t,e){return function(t,e,n){var r=ie(t),o=(ve(t)?Vr():lr()).asMutable();t.__iterate((function(i,a){o.update(e.call(n,i,a,t),(function(t){return(t=t||[]).push(r?[a,i]:i),t}))}));var i=An(t);return o.map((function(e){return On(t,i(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,Wt)!==Wt},hasIn:function(t){return go(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:ue(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:ue(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return Ye(e,t)}))},keySeq:function(){return this.toSeq().map(Ao).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return xn(this,t)},maxBy:function(t,e){return xn(this,e,t)},min:function(t){return xn(this,t?Io(t):Ro)},minBy:function(t,e){return xn(this,e?Io(e):Ro,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 On(this,mn(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(To(t),e)},sortBy:function(t,e){return On(this,wn(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 On(this,function(t,e,n){var r=jn(t);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return t.__iterate((function(t,o,s){return e.call(n,t,o,s)&&++a&&r(t,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=t.__iterator(2,o),s=!0;return new be((function(){if(!s)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var o=t.value,u=o[0],c=o[1];return e.call(n,c,u,i)?2===r?t:ge(r,u,c,t):(s=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(To(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=ve(t),n=ie(t),r=e?1:0;return function(t,e){return e=Je(e,3432918353),e=Je(e<<15|e>>>-15,461845907),e=Je(e<<13|e>>>-13,5),e=Je((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ke((e=Je(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+zo(We(t),We(e))|0}:function(t,e){r=r+zo(We(t),We(e))|0}:e?function(t){r=31*r+We(t)|0}:function(t){r=r+We(t)|0}),r)}(this))}});var xo=ue.prototype;xo["@@__IMMUTABLE_ITERABLE__@@"]=!0,xo[me]=xo.values,xo.toJSON=xo.toArray,xo.__toStringMapper=Un,xo.inspect=xo.toSource=function(){return this.toString()},xo.chain=xo.flatMap,xo.contains=xo.includes,so(ce,{flip:function(){return On(this,hn(this))},mapEntries:function(t,e){var n=this,r=0;return On(this,this.toSeq().map((function(o,i){return t.call(e,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return On(this,this.toSeq().flip().map((function(r,o){return t.call(e,r,o,n)})).flip())}});var So=ce.prototype;So["@@__IMMUTABLE_KEYED__@@"]=!0,So[me]=xo.entries,So.toJSON=wo,So.__toStringMapper=function(t,e){return Un(e)+": "+Un(t)},so(fe,{toKeyedSeq:function(){return new cn(this,!1)},filter:function(t,e){return On(this,vn(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 On(this,yn(this,!1))},slice:function(t,e){return On(this,_n(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=te(t,t<0?this.count():this.size);var r=this.slice(0,t);return On(this,1===n?r:r.concat(Cn(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 On(this,gn(this,t,!1))},get:function(t,e){return(t=$t(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=$t(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return On(this,function(t,e){var n=jn(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return t.__iterate((function(t){return(!i||!1!==n(e,i++,o))&&!1!==n(t,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=t.__iterator(1,r),a=0;return new be((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?ge(n,a++,e):ge(n,a++,o.value,o)}))},n}(this,t))},interleave:function(){var t=[this].concat(Cn(arguments)),e=En(this.toSeq(),Ie.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),On(this,n)},keySeq:function(){return _o(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return On(this,mn(this,t,e,!1))},zip:function(){var t=[this].concat(Cn(arguments));return On(this,En(this,Co,t))},zipAll:function(){var t=[this].concat(Cn(arguments));return On(this,En(this,Co,t,!0))},zipWith:function(t){var e=Cn(arguments);return e[0]=this,On(this,En(this,t,e))}});var Eo=fe.prototype;Eo["@@__IMMUTABLE_INDEXED__@@"]=!0,Eo[ye]=!0,so(le,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Oo=le.prototype;function ko(t,e,n,r,o,i){return zn(t.size),t.__iterate((function(t,i,a){o?(o=!1,n=t):n=e.call(r,n,t,i,a)}),i),n}function Ao(t,e){return e}function jo(t,e){return[e,t]}function To(t){return function(){return!t.apply(this,arguments)}}function Io(t){return function(){return-t.apply(this,arguments)}}function Co(){return Cn(arguments)}function Ro(t,e){return t<e?1:t>e?-1:0}function zo(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Oo.has=xo.includes,Oo.contains=Oo.includes,Oo.keys=Oo.values,so(Te,So),so(Ie,Eo),so(Ce,Oo);var Mo=function(t){function e(t){return null==t?Uo():io(t)?t:Uo().withMutations((function(e){var n=le(t);zn(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(ce(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(co);Mo.isOrderedSet=io;var Do,Lo=Mo.prototype;function Po(t,e){var n=Object.create(Lo);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Uo(){return Do||(Do=Po(Qr()))}Lo[ye]=!0,Lo.zip=Eo.zip,Lo.zipWith=Eo.zipWith,Lo.zipAll=Eo.zipAll,Lo.__empty=Uo,Lo.__make=Po;var qo=function(t,e){var n;!function(t){if(he(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(de(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(i){var a=this;if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var s=Object.keys(t),u=o._indices={};o._name=e,o._keys=s,o._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];u[f]=c,o[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Fo(this)+' with property "'+f+'" since that property name is part of the Record API.'):Jo(o,f)}}return this.__ownerID=void 0,this._values=Mr().withMutations((function(t){t.setSize(a._keys.length),ce(i).forEach((function(e,n){t.set(a._indices[n],e===a._defaultValues[n]?void 0:e)}))})),this},o=r.prototype=Object.create(Bo);return o.constructor=r,e&&(r.displayName=e),r};qo.prototype.toString=function(){for(var t,e=Fo(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)e+=(r?", ":"")+(t=n[r])+": "+Un(this.get(t));return e+" }"},qo.prototype.equals=function(t){return this===t||he(t)&&Yo(this).equals(Yo(t))},qo.prototype.hashCode=function(){return Yo(this).hashCode()},qo.prototype.has=function(t){return this._indices.hasOwnProperty(t)},qo.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},qo.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 No(this,n)}return this},qo.prototype.remove=function(t){return this.set(t)},qo.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:No(this,t)},qo.prototype.wasAltered=function(){return this._values.wasAltered()},qo.prototype.toSeq=function(){return Yo(this)},qo.prototype.toJS=function(){return uo(this)},qo.prototype.entries=function(){return this.__iterator(2)},qo.prototype.__iterator=function(t,e){return Yo(this).__iterator(t,e)},qo.prototype.__iterate=function(t,e){return Yo(this).__iterate(t,e)},qo.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?No(this,e,t):(this.__ownerID=t,this._values=e,this)},qo.isRecord=he,qo.getDescriptiveName=Fo;var Bo=qo.prototype;function No(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._values=e,r.__ownerID=n,r}function Fo(t){return t.constructor.displayName||t.constructor.name||"Record"}function Yo(t){return Pe(t._keys.map((function(e){return[e,t.get(e)]})))}function Jo(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Rn(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}Bo["@@__IMMUTABLE_RECORD__@@"]=!0,Bo.delete=Bo.remove,Bo.deleteIn=Bo.removeIn=Vn,Bo.getIn=bo,Bo.hasIn=xo.hasIn,Bo.merge=Xn,Bo.mergeWith=Zn,Bo.mergeIn=ir,Bo.mergeDeep=rr,Bo.mergeDeepWith=or,Bo.mergeDeepIn=ar,Bo.setIn=Gn,Bo.update=Qn,Bo.updateIn=$n,Bo.withMutations=sr,Bo.asMutable=ur,Bo.asImmutable=cr,Bo[me]=Bo.entries,Bo.toJSON=Bo.toObject=xo.toObject,Bo.inspect=Bo.toSource=function(){return this.toString()};n(12);n(9);var Ko=n(43);function Go(){return(Go=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y,v,_,m,b,g,w;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.addServices("casManagement");case 2:return s=t.sent,u=s.casManagement,t.next=6,i.apiCall(u.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,i.apiCall(c.itemsCmd(l,"caslibs"),p);case 13:return h=t.sent,t.next=16,i.apiCall(h.itemsCmd(e,"tables"));case 16:return d=t.sent,y={qs:{filter:"eq(name, ".concat(n.trim().toUpperCase(),")")}},t.next=20,i.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(b=new Ko).append("tableName",n),b.append("format",o),b.append("scope",null==a?"global":a),b.append("replace",!0),b.append("containsHeaderRow",!0),b.append("file",r),g={data:b,headers:{"content-type":'multipart/form-data; boundary="----------12345678901234567"'}},t.next=35,i.apiCall(d.links("upload"),g);case 35:return w=t.sent,t.abrupt("return",w);case 37:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Wo=function(t,e,n,r,o,i){return Go.apply(this,arguments)};function Vo(){return(Vo=u()(f.a.mark((function t(e,n,r){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null==r.where&&(r.where=" "),i=l.a.commonCasl()+" "+l.a.casFetchRows(),t.next=4,Object(o.a)(e,n,i,r);case 4:return a=t.sent,null==(s=a.items("results","casResults").toJS()).data&&(s.data={rows:[]}),t.abrupt("return",s);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ho=function(t,e,n){return Vo.apply(this,arguments)};var Qo=function(){return{caslRun:r.a,caslRunBase:o.a,casSetup:w,casActionRun:S,casFetchData:O,casUpdateData:T,computeRun:Z,computeSetup:et,computeSummary:H,computeFetchData:st,computeFileContent:ct,computeResults:rt,findReport:mt,getReportImage:gt,getReportUri:xt,getSASTableRows:Et,jesSetup:kt,jesRun:Mt,jesSummary:jt,jsonToDict:Dt.a,casTableToJson:M,caslScore:y,caslDescribe:b,masSetup:Nt,masAddModel:Pt,masDescribe:Ft,masRun:Jt,casUpload:Y,uploadData:Wo}}()}])}));
|
|
10
|
+
e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?o-1:0,p=n?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-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?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;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,n){var r={};t.exports=r,r.themes={};var o=n(28),i=r.styles=n(31),a=Object.defineProperties,s=new RegExp(/[\r\n]+/g);r.supportsColor=n(32).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=i[e];return!n&&e in r?r[e](t):n.open+t+n.close};var u=/[|\\{}()[\]^$+*?.]/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={},i.grey=i.gray,Object.keys(i).forEach((function(t){i[t].closeRe=new RegExp(function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(u,"\\$&")}(i[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:o.inspect(t)})).join(" ");if(!r.enabled||!e)return e;for(var n=-1!=e.indexOf("\n"),a=this._styles,u=a.length;u--;){var c=i[a[u]];e=c.open+e.replace(c.closeRe,c.open)+c.close,n&&(e=e.replace(s,(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 o=n;for(var i in t[e])o=r[t[e][i]](o);return o}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(35),r.zalgo=n(36),r.maps={},r.maps.america=n(37)(r),r.maps.zebra=n(38)(r),r.maps.rainbow=n(39)(r),r.maps.random=n(40)(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},o=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)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}})),u=r[n];n<i;u=r[++n])y(u)||!g(u)?a+=" "+u:a+=" "+s(u);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 o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,a={};function s(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=u),f(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.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 o=n.inspect(r,t);return _(o)||(o=f(t,o,r)),o}var i=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(i)return i;var a=Object.keys(n),s=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 u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(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,g="",E=!1,O=["{","}"];(h(n)&&(E=!0,O=["[","]"]),S(n))&&(g=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(g=" "+RegExp.prototype.toString.call(n)),w(n)&&(g=" "+Date.prototype.toUTCString.call(n)),x(n)&&(g=" "+l(n)),0!==a.length||E&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=E?function(t,e,n,r,o){for(var i=[],a=0,s=e.length;a<s;++a)j(e,String(a))?i.push(p(t,e,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(p(t,e,n,r,o,!0))})),i}(t,n,r,s,a):a.map((function(e){return p(t,n,r,s,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,g,O)):O[0]+g+O[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),j(r,o)||(a="["+o+"]"),s||(t.seen.indexOf(u.value)<0?(s=y(n)?f(t,u.value,null):f(t,u.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),m(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).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+": "+s}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 b(t){return g(t)&&"[object RegExp]"===E(t)}function g(t){return"object"==typeof t&&null!==t}function w(t){return g(t)&&"[object Date]"===E(t)}function x(t){return g(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(i)&&(i=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){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=s,s.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]},s.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=b,e.isObject=g,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(29);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 j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=n(30),e._extend=function(t,e){if(!e||!g(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(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(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{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})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,o)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=T,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 o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(I,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],o=n[t]=[];o.open="["+e[0]+"m",o.close="["+e[1]+"m"}))},function(t,e,n){"use strict";(function(e){var r=n(33),o=n(34),i=e.env,a=void 0;function s(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(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!t.isTTY&&!0!==a)return 0;var n=a?1:0;if("win32"===e.platform){var s=r.release().split(".");return Number(e.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(t){return t in i}))||"codeship"===i.CI_NAME?1:n;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in i){var u=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,n)}(t))}o("no-color")||o("no-colors")||o("color=false")?a=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=!0),"FORCE_COLOR"in i&&(a=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),t.exports={supportsColor:s,stdout:s(e.stdout),stderr:s(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("--"),o=/^-{1,2}/.test(t)?"":"--",i=n.indexOf(o+t);return-1!==i&&(-1===r||i<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]||[" "],o=Math.floor(Math.random()*e.length);n+=void 0!==r[t]?r[t][o]: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 o(t){return Math.floor(Math.random()*t)}function i(t){var e=!1;return r.filter((function(n){e=n===t})),e}return function(t,e){var r,a,s="";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(!i(a)){switch(s+=t[a],r={up:0,down:0,mid:0},e.size){case"mini":r.up=o(8),r.mid=o(2),r.down=o(8);break;case"maxi":r.up=o(16)+3,r.mid=o(4)+1,r.down=o(64)+3;break;default:r.up=o(8)+1,r.mid=o(6)/2,r.down=o(8)+1}var u=["up","mid","down"];for(var c in u)for(var f=u[c],l=0;l<=r[f];l++)e[f]&&(s+=n[f][o(n[f].length)])}return s}(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,o){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,o){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="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 o.a})),n.d(e,"casSetup",(function(){return w})),n.d(e,"casActionRun",(function(){return S})),n.d(e,"casTableToJson",(function(){return M})),n.d(e,"casFetchData",(function(){return O})),n.d(e,"casFetchRows",(function(){return Ho})),n.d(e,"casAppendTable",(function(){return z})),n.d(e,"casUpdateData",(function(){return T})),n.d(e,"casUpload",(function(){return Y})),n.d(e,"casSaveTable",(function(){return C})),n.d(e,"computeRun",(function(){return Z})),n.d(e,"computeSetup",(function(){return et})),n.d(e,"computeSummary",(function(){return H})),n.d(e,"computeSetupTables",(function(){return it})),n.d(e,"computeFetchData",(function(){return st})),n.d(e,"computeFileContent",(function(){return ct})),n.d(e,"computeResults",(function(){return rt})),n.d(e,"computeAppendTable",(function(){return lt})),n.d(e,"computeUpdateData",(function(){return dt})),n.d(e,"computeUpload",(function(){return vt})),n.d(e,"findReport",(function(){return mt})),n.d(e,"getReportImage",(function(){return gt})),n.d(e,"getReportUri",(function(){return xt})),n.d(e,"getSasTableRows",(function(){return Et})),n.d(e,"jesSetup",(function(){return kt})),n.d(e,"jesRun",(function(){return Mt})),n.d(e,"jesSummary",(function(){return jt})),n.d(e,"jsonToDict",(function(){return Dt.a})),n.d(e,"caslScore",(function(){return y})),n.d(e,"caslDescribe",(function(){return b})),n.d(e,"masSetup",(function(){return Nt})),n.d(e,"masAddModel",(function(){return Pt})),n.d(e,"masDescribe",(function(){return Ft})),n.d(e,"masRun",(function(){return Jt})),n.d(e,"masScore",(function(){return Gt})),n.d(e,"uploadData",(function(){return Wo})),n.d(e,"lib",(function(){return Qo}));var r=n(5),o=n(3),i=n(7),a=n.n(i),s=n(1),u=n.n(s),c=n(0),f=n.n(c),l=n(2);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=u()(f.a.mark((function t(e,n,r){var i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.scoreCasl(),a=h({path:"/score"},r),t.next=4,Object(o.a)(e,n,i,a);case 4:return s=t.sent,u=s.items("results","casResults").toJS()[0],t.abrupt("return",u);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=u()(f.a.mark((function t(e,n,r){var i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.scoreCasl(),a=_({path:"/describe"},r),t.next=4,Object(o.a)(e,n,i,a);case 4:return s=t.sent,u=s.items("results").toJS(),t.abrupt("return",u);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var b=function(t,e,n){return m.apply(this,arguments)};function g(){return(g=u()(f.a.mark((function t(e,n){var r,o,i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(n),null==n){t.next=8;break}return t.next=6,e.logon(n);case 6:r=t.sent,console.log(r);case 8:return t.next=10,e.addServices("casManagement");case 10:return o=t.sent,i=o.casManagement,t.next=14,e.apiCall(i.links("servers"));case 14:if(0!==(a=t.sent).itemsList().size){t.next=17;break}throw{Error:"No cas servers were found"};case 17:return s=a.itemsList(0),t.next=22,e.apiCall(a.itemsCmd(s,"createSession"));case 22:return u=t.sent,console.log("returning from casSetup"),t.abrupt("return",{servers:a,session:u});case 26:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var w=function(t,e){return g.apply(this,arguments)};function x(){return(x=u()(f.a.mark((function t(e){var n,r,o,i,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),o=1;o<n;o++)r[o-1]=a[o];return t.next=3,e.runAction.apply(e,r);case 3:return i=t.sent,t.abrupt("return",i.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=u()(f.a.mark((function t(e,n,r){var i,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.a.commonCasl()+" "+l.a.casFetchData(),t.next=3,Object(o.a)(e,n,i,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 k(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 A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){a()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(){return(j=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_,m,b,g,w;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in o=r.data,i=r.where,a=r.table,s="",u=" ",i)l=i[c],p="string"==typeof l?"'".concat(l.toString(),"'"):l,s=s+u+c+"= ".concat(p," "),u=" AND ";for(d in h=[],o)y=o[d],v=void 0,v=null==y?".":"string"==typeof y?JSON.stringify(y):y.toString(),h.push({var:d,value:v});return _=A(A({},a),{},{where:"".concat(s)}),m={action:"table.update",data:{table:_,set:h}},t.next=11,e.runAction(n,m);case 11:return b=t.sent,g={msg:"Update completed",statusCode:0},0!==(w=b.items().toJS().disposition).statusCode&&(g.statusCode=w.statusCode,g.msg=w.reason),t.abrupt("return",g);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var T=function(t,e,n){return j.apply(this,arguments)};function I(){return(I=u()(f.a.mark((function t(e,n,r,o){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.caslib,a=r.name,s={action:"table.save",data:{name:"".concat(a),caslib:"".concat(i),replace:!1!==o,table:r}},t.next=4,e.runAction(n,s);case 4:return t.abrupt("return",{msg:"".concat(i,".").concat(a," saved}"),statusCode:0});case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=function(t,e,n,r){return I.apply(this,arguments)};function R(){return(R=u()(f.a.mark((function t(e,n,r,i,a){var s,u,c,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=l.a.commonCasl()+" "+l.a.casAppendTable(),u={masterTable:i,setTable:r,save:null!=a&&a},t.next=4,Object(o.a)(e,n,s,u);case 4:if(c=t.sent,p=c.items("results","casResults").toJS(),!0!==a){t.next=9;break}return t.next=9,C(e,n,i);case 9:return t.abrupt("return",p);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var z=function(t,e,n,r,o){return R.apply(this,arguments)};var M=function(t,e){var n=t.items("tables",e),r=n.get("rows"),o=[];n.get("schema").map((function(t){o.push(t.get("name"))}));var i=[];return r.map((function(t){var e={};t.map((function(t,n){e[o[n]]=t})),i.push(e)})),i},D=n(10),L=n.n(D),P=n(4),U=n.n(P),q=n(15),B=n(8),N=n(13).promises;function F(){return(F=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=o,"object"===U()(o)&&(s="".concat(o.caslib,".").concat(o.name)),u=Object(q.a)(r,s),null==a){t.next=8;break}t.t0=a,t.next=11;break;case 8:return t.next=10,N.readFile(r,u.fileOptions);case 10:t.t0=t.sent;case 11:return c=t.t0,null!==u.transform&&(c=u.transform(c,u)),t.next=15,u.handler(e,n,c,u,i);case 15:if(l=t.sent,!0!==i){t.next=21;break}return p=s.split("."),h=L()(p,2),d=h[0],y=h[1],t.next=20,Object(B.a)(e,n,d,y);case 20:l=l+"\n"+" ".concat(o," was saved");case 21:return t.abrupt("return",l);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=function(t,e,n,r,o,i){return F.apply(this,arguments)};function J(){return(J=u()(f.a.mark((function t(e,n,r,o){var i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r||null!=o){t.next=6;break}return t.next=3,K(e,n,r);case 3:i=t.sent,t.next=9;break;case 6:return t.next=8,W(e,n,o);case 8:i=t.sent;case 9:return t.abrupt("return",i);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(t,e,n){return G.apply(this,arguments)}function G(){return(G=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}}).log=r.links("log"),o.listing=r.links("listing"),null===(i=r.links("results"))){t.next=10;break}return t.next=7,e.apiCall(i);case 7:if(a=t.sent,(s=a.itemsList().size)>0)for(u=0;u<s;u++)c=a.itemsList(u),"ods"===(l=a.items(c,"data","type").toLowerCase())?o.ods=a.itemsCmd(c,"self"):"table"===l?(p={self:a.itemsCmd(c,"self"),current:null},o.tables[c.toUpperCase()]=p):"file"===l?(h={self:c,current:null,data:null},o.files[c]=h):(d={self:c,current:null,data:null},o[l]=d);case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,e,n){return V.apply(this,arguments)}function V(){return(V=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o={session:n,log:null,listing:null,ods:null,job:null,tables:{},files:{}},i="object"===U()(r)?[r]:r,a=0;case 3:if(!(a<i.length)){t.next=29;break}return s=i[a],u=s.libref.toUpperCase(),c=s.name.toUpperCase(),l={qs:{filter:"eq(name,'".concat(u,"')")}},t.next=10,e.apiCall(n.links("librefs"),l);case 10:if(0!==(p=t.sent).itemsList().size){t.next=13;break}throw"Libref ".concat(u," not found");case 13:return h=p.itemsCmd(u,"self"),t.next=16,e.apiCall(h);case 16:return d=t.sent,l={qs:{filter:"eq(name,'".concat(c,"')")}},t.next=20,e.apiCall(d.links("tables"));case 20:if(0!==(y=t.sent).itemsList().size){t.next=23;break}throw"Table ".concat(c," not found");case 23:v="".concat(u,".").concat(c).toLowerCase(),_={self:y.itemsCmd(c,"self"),current:null},o.tables[v.toUpperCase()]=_;case 26:a++,t.next=3;break;case 29:return t.abrupt("return",o);case 30:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var H=function(t,e,n,r){return J.apply(this,arguments)};function Q(){return(Q=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={data:{code:r}},t.next=3,e.apiCall(n.links("execute"),s);case 3:return u=t.sent,c={qs:{wait:null!=o?o:5},headers:{"If-None-Match":u.headers("etag")}},t.next=7,e.jobState(u,c,"longpoll",0,i,a);case 7:if("running"!==(l=t.sent).data){t.next=12;break}throw"ERROR: Job did not complete in allotted time";case 12:return t.next=14,H(e,n,l.job);case 14:return(p=t.sent).SASJobStatus=l.data,p.jobStateStatus=l,t.abrupt("return",p);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $=function(t,e,n,r,o,i){return Q.apply(this,arguments)};function X(){return(X=u()(f.a.mark((function t(e,n,r,o,i,a,s){var u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=[],null!=o)for(c in o)l="%let ".concat(c," = ").concat(o[c],";"),u.push(l);return p=r.split(/\r?\n/),u=u.concat(p),t.next=6,$(e,n,u,i,a,s);case 6:return h=t.sent,t.abrupt("return",h);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Z=function(t,e,n,r,o,i,a){return X.apply(this,arguments)};function tt(){return(tt=u()(f.a.mark((function t(e,n,r,o){var i,a,s,u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==r){t.next=6;break}return t.next=4,e.logon(r);case 4:i=t.sent,console.log("======================",i);case 6:return t.next=8,e.addServices("compute");case 8:if(a=t.sent,s=a.compute,null!=e.store.config.options.computeServerId){t.next=27;break}return null==n&&(n="SAS Job Execution"),u={qs:{filter:"contains(name,'".concat(n,"')")}},t.next=16,e.apiCall(s.links("contexts"),u);case 16:if(0!==(c=t.sent).itemsList().size){t.next=19;break}throw"Context ".concat(n," not found");case 19:return u=null==o?null:o,l=c.itemsCmd(c.itemsList(0),"createSession"),t.next=23,e.apiCall(l,o);case 23:return p=t.sent,t.abrupt("return",p);case 27:return t.next=29,e.apiCall(s.links("createSession"));case 29:return h=t.sent,t.abrupt("return",h);case 32:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var et=function(t,e,n,r){return tt.apply(this,arguments)};function nt(){return(nt=u()(f.a.mark((function t(e,n,r){var o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("log"!==r&&"listing"!==r){t.next=20;break}if(o=[],null===n[r]){t.next=16;break}return t.next=5,e.apiCall(n[r]);case 5:i=t.sent,o=o.concat(i.items().toJS());case 7:if(null===(a=i.scrollCmds("next"))){t.next=14;break}return t.next=10,e.apiCall(a);case 10:i=t.sent,o=o.concat(i.items().toJS()),t.next=7;break;case 14:t.next=17;break;case 16:o[0]="Note: No ".concat(r);case 17:return t.abrupt("return",o);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 s=t.sent,t.abrupt("return",s.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 rt=function(t,e,n){return nt.apply(this,arguments)};function ot(){return(ot=u()(f.a.mark((function t(e,n,r,o){var i,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==o){t.next=6;break}return t.next=3,Z(e,n,o);case 3:if("completed"===(i=t.sent).SASJobStatus){t.next=6;break}throw"Error: Preamble failed with completion code of ".concat(i.SASJobStatus);case 6:return t.next=8,H(e,n,null,r);case 8:return a=t.sent,t.abrupt("return",a);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var it=function(t,e,n,r){return ot.apply(this,arguments)};function at(){return(at=u()(f.a.mark((function t(e,n,r,o,i){var a,s,u,c,l,p,h,d,y,v,_,m,b,g,w,x,S;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,s=(s="string"==typeof r?r:"".concat(r.libref,".").concat(r.name)).toUpperCase(),u=null!=i&&null==o,null==(c=n.tables[s])){t.next=37;break}if(!0===u&&(c.current=null),null!==c.current&&null!=o&&"first"!==o){t.next=26;break}return t.next=10,e.apiCall(c.self);case 10:return l=t.sent,t.next=13,e.apiCall(l.links("rowSet"),i);case 13:return p=t.sent,t.next=16,e.apiCall(l.links("columns"));case 16:for(v in h=t.sent,d=[],y=h.items().toJS())_=y[v],m={name:_.name.toLowerCase(),Column:_.name.toLowerCase(),Label:_.data.label,length:_.data.length,type:_.data.type,custom:!1},d.push(m);c.current=p,c.schema=d,b=p.items().toJS(),a={columns:b.columns,schema:d,rows:b.rows,scrollOptions:p.scrollCmds().keySeq().toJS()},t.next=37;break;case 26:if(g=c.current,w=o,i&&"next"===o&&null===g.scrollCmds("next")&&(w=null!==g.links("last")?"last":null),"prev"===o&&null===g.scrollCmds("prev")&&(w=null!==g.links("first")?"first":null),null===w||null===g.scrollCmds(w)){t.next=37;break}return t.next=33,e.apiCall(g.scrollCmds(w),i);case 33:x=t.sent,c.current=x,S=x.items().toJS(),a={schema:c.schema,columns:S.columns,rows:S.rows,scrollOptions:x.scrollCmds().keySeq().toJS()};case 37:return t.abrupt("return",a);case 38:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var st=function(t,e,n,r,o){return at.apply(this,arguments)};function ut(){return(ut=u()(f.a.mark((function t(e,n,r,o){var i,a,s,u,c,l;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(i=n.files[r])){t.next=3;break}throw"Invalid fileref ".concat(r);case 3:if(null!==i.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 s=t.sent,t.next=10,e.apiCall(s.itemsCmd(r,"self"));case 10:s=t.sent,i.current=s;case 12:if(!0!==o){t.next=17;break}return u="".concat(n.session.host).concat(i.current.links("content","link","uri")),t.abrupt("return",u);case 17:if(null!==i.data){t.next=26;break}return t.next=20,e.apiCall(i.current.links("content"));case 20:return c=t.sent,l=c.items(),i.data=l,t.abrupt("return",l);case 26:return t.abrupt("return",i.data);case 27:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ct=function(t,e,n,r){return ut.apply(this,arguments)};function ft(){return(ft=u()(f.a.mark((function t(e,n,r,o){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="\n proc append base=".concat(o.libref,".{output.name} \n data= ").concat(r.libref,".").concat(r.name,"; run;\n "),t.next=3,Z(e,n,i);case 3:return a=t.sent,s="completed"===a.SASJobStatus?0:1,t.abrupt("return",{msg:"Append Completed. Status is: ".concat(a.SASJobStatus),statusCode:s});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var lt=function(t,e,n,r){return ft.apply(this,arguments)};function pt(){return(pt=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h,d,y,v,_,m,b,g,w,x;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(l in o=r.data,i=r.table,a=r.where,s="proc sql; update ".concat(i.libref,".").concat(i.name),u="SET ",c=" ",o)u=u+c+l+"="+ht(o[l]),c=", ";for(d in s=s+" "+u,p=" WHERE ",h=" ",a)y=a[d],v=ht(y),p=p+h+d+"= ".concat(v," "),h=" AND ";return _=(s=s+" "+p+";run;").split(/\r?\n/),m={data:{code:_}},t.next=15,e.apiCall(n.links("execute"),m);case 15:return b=t.sent,g={qs:{newState:"Completed",timeout:1}},t.next=19,e.jobState(b,g);case 19:return w=t.sent,x="completed"===w.data?0:1,t.abrupt("return",{statusCode:x,msg:w.data});case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(t){return null==t?".":"string"==typeof t?JSON.stringify(t):t.toString()}var dt=function(t,e,n){return pt.apply(this,arguments)};n(13).promises;function yt(){return(yt=u()(f.a.mark((function t(e,n,r,o,i){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{msg:"Placeholder",statusCode:0});case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt=function(t,e,n,r,o){return yt.apply(this,arguments)};function _t(){return(_t=u()(f.a.mark((function t(e,n){var r,o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.getService("reports"),o=null,null!==n&&(o={qs:{filter:"eq(name,'".concat(n,"')")}}),t.next=5,e.apiCall(r.links("reports"),o);case 5:return i=t.sent,t.abrupt("return",0===i.itemsList().size?null:i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt=function(t,e){return _t.apply(this,arguments)};function bt(){return(bt=u()(f.a.mark((function t(e,n){var r,o,i,a,s,u,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.rafObject("reportImages"),t.next=3,mt(e,n);case 3:if(null!==(o=t.sent)){t.next=6;break}return t.abrupt("return","".concat(n," was not found"));case 6:return i=o.itemsCmd(o.itemsList(0),"self","link","uri"),a={data:{reportUri:i,sectionIndex:0,layoutType:"entireSection",size:"400x400"}},t.next=11,e.apiCall(r.links("createJob"),a);case 11:return s=t.sent,t.next=14,e.jobState(s,{qs:{wait:1.5}},10,2);case 14:if("completed"===(u=t.sent).data){t.next=17;break}return t.abrupt("return","Job failed ".concat(u.data));case 17:return t.next=19,e.apiCall(u.job.itemsCmd(u.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 gt=function(t,e){return bt.apply(this,arguments)};function wt(){return(wt=u()(f.a.mark((function t(e,n){var r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mt(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 o=[],r.items().map((function(t,e){var n={name:e,uri:r.itemsCmd(e,"self","link","uri")};o.push(n)})),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var xt=function(t,e){return wt.apply(this,arguments)};function St(){return(St=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,c,l,p,h;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n.tables[r],t.next=3,e.apiCall(o);case 3:return i=t.sent,t.next=6,e.apiCall(i.links("rowSet"));case 6:for(a=t.sent,s=a.items("columns"),u=a.items("rows"),c=[],l=u.size,p=function(t){var e=u.get(t),n={};s.map((function(t,r){var o=t.toLowerCase();n[o]=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 Et=function(t,e,n){return St.apply(this,arguments)};function Ot(){return(Ot=u()(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 kt=function(t,e){return Ot.apply(this,arguments)};function At(){return(At=u()(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 jt=function(t,e){return At.apply(this,arguments)};function Tt(){return(Tt=u()(f.a.mark((function t(e,n,r){var o,i,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 o=t.sent,t.next=5,e.jobState(o,null,5,2);case 5:if("running"!==(i=t.sent).data){t.next=10;break}throw"ERROR: Job did not complete in allotted time";case 10:if("failed"!==i.data){t.next=14;break}throw JSON.stringify(i);case 14:return t.next=16,jt(e,i.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,n){return Tt.apply(this,arguments)};function Ct(){return(Ct=u()(f.a.mark((function t(e,n,r,o,i){var a,s,u,c;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={},s={},null===o){t.next=6;break}return t.next=5,Rt(e,o);case 5:a.jobDefinitionUri=t.sent;case 6:return-0!=r&&(s.code=r),s.type="Compute",a.arguments=i,a.jobDefinition=s,u={data:a},t.next=13,It(e,n,u);case 13:return c=t.sent,t.abrupt("return",c);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rt(t,e){return zt.apply(this,arguments)}function zt(){return(zt=u()(f.a.mark((function t(e,n){var r,o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.getService("jobDefinitions"),r=null,o={qs:{filter:"eq(name,'".concat(n,"')")}},t.next=5,It(e,o);case 5:if(0!==(i=t.sent).itemsList().size){t.next=10;break}throw"Error: ".concat(n," not found in the system");case 10:r=i.itemsCmd(n,"self","link","uri");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Mt=function(t,e,n,r,o){return Ct.apply(this,arguments)},Dt=n(6);function Lt(){return(Lt=u()(f.a.mark((function t(e,n,r){var o,i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n.service,i=0;case 2:if(!(i<r.length)){t.next=12;break}if(a=r[i],null!=n.steps[a]){t.next=9;break}return t.next=7,qt(e,o,a);case 7:s=t.sent,n.steps[a]=s;case 9:i++,t.next=2;break;case 12:return t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Pt=function(t,e,n){return Lt.apply(this,arguments)};function Ut(){return(Ut=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={qs:{filter:"eq(name,'".concat(r.trim(),"')")}},t.next=3,e.apiCall(n.links("modules"),o);case 3:if(0!==(i=t.sent).itemsList().size){t.next=6;break}return t.abrupt("return",null);case 6:return a=i.itemsCmd(r,"steps"),t.next=9,e.apiCall(a);case 9:return s=t.sent,u={name:r,stepsRafLink:s,stepIds:i.items(r,"data","stepIds").toJS(),microanalyticScore:n},t.abrupt("return",u);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qt=function(t,e,n){return Ut.apply(this,arguments)};function Bt(){return(Bt=u()(f.a.mark((function t(e,n,r){var o,i,a,s,u,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:o=t.sent,i=o.microanalyticScore,a={service:i,steps:{}},s=0;case 9:if(!(s<n.length)){t.next=18;break}return u=n[s],t.next=13,qt(e,i,u);case 13:c=t.sent,a.steps[u]=c;case 15:s++,t.next=9;break;case 18:return t.abrupt("return",a);case 19:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Nt=function(t,e,n){return Bt.apply(this,arguments)};var Ft=function(t,e,n){var r=t.steps[e];if(null===r)return[];var o=null;if(null==n){var i=r.stepIds.findIndex((function(t){return"execute"===t||"score"===t}));if(-1===i)return[];o=r.stepIds[i]}else{if(-1===r.stepIds.findIndex((function(t){return t===n})))return[];o=n}var a=r.stepsRafLink.items(o,"data","inputs");return null===a?[]:a.toJS()};function Yt(){return(Yt=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y,v,_,m,b,g;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=n.steps[r],u=!1,c=[],!1===Array.isArray(o))for(l in o)p={name:l,value:o[l]},c.push(p);else u=!0;if(h={data:{inputs:!0===u?o:c}},d=null,null!=i){t.next=15;break}if(-1!==(y=s.stepIds.findIndex((function(t){return"execute"===t||"score"===t})))){t.next=12;break}return t.abrupt("return",[]);case 12:d=s.stepIds[y];case 13:t.next=21;break;case 15:if(-1!==s.stepIds.findIndex((function(t){return t===i}))){t.next=20;break}return t.abrupt("return",[]);case 20:d=i;case 21:if(null!==(v=s.stepsRafLink.itemsCmd(d,a))){t.next=25;break}return _=[{name:"Error",type:"string",value:"name: ".concat(r," step: ").concat(i," 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,b=m.items("outputs").toJS(),!0===u?g=b:(g={},b.map((function(t){g[t.name]=t.value}))),t.abrupt("return",g);case 31:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Jt=function(t,e,n,r,o,i){return Yt.apply(this,arguments)};function Kt(){return(Kt=u()(f.a.mark((function t(e,n,r){var o,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Nt(e,[n]);case 2:return o=t.sent,t.next=5,Jt(e,o,n,r,"score","execute");case 5:return i=t.sent,t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Gt=function(t,e,n){return Kt.apply(this,arguments)},Wt={};function Vt(t){t&&(t.value=!0)}function Ht(){}function Qt(t){return void 0===t.size&&(t.size=t.__iterate(Xt)),t.size}function $t(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?Qt(t)+e:e}function Xt(){return!0}function Zt(t,e,n){return(0===t&&!re(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function te(t,e){return ne(t,e,0)}function ee(t,e){return ne(t,e,e)}function ne(t,e,n){return void 0===t?n:re(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function re(t){return t<0||0===t&&1/t==-1/0}function oe(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function ie(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function ae(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function se(t){return ie(t)||ae(t)}var ue=function(t){return oe(t)?t:je(t)},ce=function(t){function e(t){return ie(t)?t:Te(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue),fe=function(t){function e(t){return ae(t)?t:Ie(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue),le=function(t){function e(t){return oe(t)&&!se(t)?t:Ce(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ue);ue.Keyed=ce,ue.Indexed=fe,ue.Set=le;function pe(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function he(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function de(t){return oe(t)||he(t)}var ye="@@__IMMUTABLE_ORDERED__@@";function ve(t){return Boolean(t&&t[ye])}var _e="function"==typeof Symbol&&Symbol.iterator,me=_e||"@@iterator",be=function(t){this.next=t};function ge(t,e,n,r){var o=0===t?e:1===t?n:[e,n];return r?r.value=o:r={value:o,done:!1},r}function we(){return{value:void 0,done:!0}}function xe(t){return!!Array.isArray(t)||!!Oe(t)}function Se(t){return t&&"function"==typeof t.next}function Ee(t){var e=Oe(t);return e&&e.call(t)}function Oe(t){var e=t&&(_e&&t[_e]||t["@@iterator"]);if("function"==typeof e)return e}be.prototype.toString=function(){return"[Iterator]"},be.KEYS=0,be.VALUES=1,be.ENTRIES=2,be.prototype.inspect=be.prototype.toSource=function(){return this.toString()},be.prototype[me]=function(){return this};var ke=Object.prototype.hasOwnProperty;function Ae(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 je=function(t){function e(t){return null==t?Le():de(t)?t.toSeq():function(t){var e=qe(t);if(e)return(r=Oe(n=t))&&r===n.entries?e.fromEntrySeq():function(t){var e=Oe(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var n,r;if("object"==typeof t)return new ze(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,o=0;o!==r;){var i=n[e?r-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,o=0;return new be((function(){if(o===r)return{value:void 0,done:!0};var i=n[e?r-++o:o++];return ge(t,i[0],i[1])}))}return this.__iteratorUncached(t,e)},e}(ue),Te=function(t){function e(t){return null==t?Le().toKeyedSeq():oe(t)?ie(t)?t.toSeq():t.fromEntrySeq():he(t)?t.toSeq():Pe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(je),Ie=function(t){function e(t){return null==t?Le():oe(t)?ie(t)?t.entrySeq():t.toIndexedSeq():he(t)?t.toSeq().entrySeq():Ue(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}(je),Ce=function(t){function e(t){return(oe(t)&&!se(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}(je);je.isSeq=pe,je.Keyed=Te,je.Set=Ce,je.Indexed=Ie,je.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var Re=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[$t(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,o=0;o!==r;){var i=e?r-++o:o++;if(!1===t(n[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,o=0;return new be((function(){if(o===r)return{value:void 0,done:!0};var i=e?r-++o:o++;return ge(t,i,n[i])}))},e}(Ie),ze=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(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 ke.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,o=r.length,i=0;i!==o;){var a=r[e?o-++i:i++];if(!1===t(n[a],a,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,o=r.length,i=0;return new be((function(){if(i===o)return{value:void 0,done:!0};var a=r[e?o-++i:i++];return ge(t,a,n[a])}))},e}(Te);ze.prototype[ye]=!0;var Me,De=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=Ee(this._collection),r=0;if(Se(n))for(var o;!(o=n.next()).done&&!1!==t(o.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=Ee(this._collection);if(!Se(n))return new be(we);var r=0;return new be((function(){var e=n.next();return e.done?e:ge(t,r++,e.value)}))},e}(Ie);function Le(){return Me||(Me=new Re([]))}function Pe(t){var e=qe(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new ze(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Ue(t){var e=qe(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function qe(t){return Ae(t)?new Re(t):xe(t)?new De(t):void 0}function Be(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Ne(t){return Be(t)&&ve(t)}function Fe(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Ye(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!!(Fe(t)&&Fe(e)&&t.equals(e))}var Je="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 Ke(t){return t>>>1&1073741824|3221225471&t}var Ge=Object.prototype.valueOf;function We(t){if(null==t)return Ve(t);if("function"==typeof t.hashCode)return Ke(t.hashCode(t));var e,n=(e=t).valueOf!==Ge&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==n)return Ve(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 Ke(e)}(n);case"string":return n.length>on?function(t){var e=un[t];void 0===e&&(e=He(t),sn===an&&(sn=0,un={}),sn++,un[t]=e);return e}(n):He(n);case"object":case"function":return function(t){var e;if(tn&&void 0!==(e=Ze.get(t)))return e;if(void 0!==(e=t[rn]))return e;if(!$e){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[rn]))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=Xe(),tn)Ze.set(t,e);else{if(void 0!==Qe&&!1===Qe(t))throw new Error("Non-extensible objects are not allowed as keys.");if($e)Object.defineProperty(t,rn,{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[rn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[rn]=e}}return e}(n);case"symbol":return function(t){var e=en[t];if(void 0!==e)return e;return e=Xe(),en[t]=e,e}(n);default:if("function"==typeof n.toString)return He(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function Ve(t){return null===t?1108378658:1108378659}function He(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return Ke(e)}var Qe=Object.isExtensible,$e=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Xe(){var t=++nn;return 1073741824&nn&&(nn=0),t}var Ze,tn="function"==typeof WeakMap;tn&&(Ze=new WeakMap);var en=Object.create(null),nn=0,rn="__immutablehash__";"function"==typeof Symbol&&(rn=Symbol(rn));var on=16,an=255,sn=0,un={},cn=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=yn(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var n=this,r=dn(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}(Te);cn.prototype[ye]=!0;var fn=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&&Qt(this),this._iter.__iterate((function(o){return t(o,e?n.size-++r:r++,n)}),e)},e.prototype.__iterator=function(t,e){var n=this,r=this._iter.__iterator(1,e),o=0;return e&&Qt(this),new be((function(){var i=r.next();return i.done?i:ge(t,e?n.size-++o:o++,i.value,i)}))},e}(Ie),ln=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 be((function(){var e=n.next();return e.done?e:ge(t,e.value,e.value,e)}))},e}(Ce),pn=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){kn(e);var r=oe(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 be((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){kn(r);var o=oe(r);return ge(t,o?r.get(0):r[0],o?r.get(1):r[1],e)}}}))},e}(Te);function hn(t){var e=jn(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=Tn,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 be((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 dn(t,e,n){var r=jn(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,o){var i=t.get(r,Wt);return i===Wt?o:e.call(n,i,r,t)},r.__iterateUncached=function(r,o){var i=this;return t.__iterate((function(t,o,a){return!1!==r(e.call(n,t,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=t.__iterator(2,o);return new be((function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return ge(r,s,e.call(n,a[1],s,t),o)}))},r}function yn(t,e){var n=this,r=jn(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=hn(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=Tn,r.__iterate=function(n,r){var o=this,i=0;return r&&Qt(t),t.__iterate((function(t,a){return n(t,e?a:r?o.size-++i:i++,o)}),!r)},r.__iterator=function(r,o){var i=0;o&&Qt(t);var a=t.__iterator(2,!o);return new be((function(){var t=a.next();if(t.done)return t;var s=t.value;return ge(r,e?s[0]:o?n.size-++i:i++,s[1],t)}))},r}function vn(t,e,n,r){var o=jn(t);return r&&(o.has=function(r){var o=t.get(r,Wt);return o!==Wt&&!!e.call(n,o,r,t)},o.get=function(r,o){var i=t.get(r,Wt);return i!==Wt&&e.call(n,i,r,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return t.__iterate((function(t,i,u){if(e.call(n,t,i,u))return s++,o(t,r?i:s-1,a)}),i),s},o.__iteratorUncached=function(o,i){var a=t.__iterator(2,i),s=0;return new be((function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return ge(o,r?c:s++,f,i)}}))},o}function _n(t,e,n,r){var o=t.size;if(Zt(e,n,o))return t;var i=te(e,o),a=ee(n,o);if(i!=i||a!=a)return _n(t.toSeq().cacheResult(),e,n,r);var s,u=a-i;u==u&&(s=u<0?0:u);var c=jn(t);return c.size=0===s?s:t.size&&s||void 0,!r&&pe(t)&&s>=0&&(c.get=function(e,n){return(e=$t(this,e))>=0&&e<s?t.get(e+i,n):n}),c.__iterateUncached=function(e,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,u=!0,c=0;return t.__iterate((function(t,n){if(!u||!(u=a++<i))return c++,!1!==e(t,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(e,n){if(0!==s&&n)return this.cacheResult().__iterator(e,n);if(0===s)return new be(we);var o=t.__iterator(e,n),a=0,u=0;return new be((function(){for(;a++<i;)o.next();if(++u>s)return{value:void 0,done:!0};var t=o.next();return r||1===e||t.done?t:ge(e,u-1,0===e?void 0:t.value[1],t)}))},c}function mn(t,e,n,r){var o=jn(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return t.__iterate((function(t,i,c){if(!s||!(s=e.call(n,t,i,c)))return u++,o(t,r?i:u-1,a)})),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=t.__iterator(2,i),u=!0,c=0;return new be((function(){var t,i,f;do{if((t=s.next()).done)return r||1===o?t:ge(o,c++,0===o?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],u&&(u=e.call(n,f,i,a))}while(u);return 2===o?t:ge(o,i,f,t)}))},o}function bn(t,e){var n=ie(t),r=[t].concat(e).map((function(t){return oe(t)?n&&(t=ce(t)):t=n?Pe(t):Ue(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var o=r[0];if(o===t||n&&ie(o)||ae(t)&&ae(o))return o}var i=new Re(r);return n?i=i.toKeyedSeq():ae(t)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),i}function gn(t,e,n){var r=jn(t);return r.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var a=0,s=!1;return function t(u,c){u.__iterate((function(i,u){return(!e||c<e)&&oe(i)?t(i,c+1):(a++,!1===o(i,n?u:a-1,r)&&(s=!0)),!s}),i)}(t,0),a},r.__iteratorUncached=function(r,o){if(o)return this.cacheResult().__iterator(r,o);var i=t.__iterator(r,o),a=[],s=0;return new be((function(){for(;i;){var t=i.next();if(!1===t.done){var u=t.value;if(2===r&&(u=u[1]),e&&!(a.length<e)||!oe(u))return n?t:ge(r,s++,u,t);a.push(i),i=u.__iterator(r,o)}else i=a.pop()}return{value:void 0,done:!0}}))},r}function wn(t,e,n){e||(e=In);var r=ie(t),o=0,i=t.toSeq().map((function(e,r){return[r,e,o++,n?n(e,r,t):e]})).valueSeq().toArray();return i.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),r?Te(i):ae(t)?Ie(i):Ce(i)}function xn(t,e,n){if(e||(e=In),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return Sn(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return Sn(e,t,n)?n:t}))}function Sn(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function En(t,e,n,r){var o=jn(t),i=new Re(n).map((function(t){return t.size}));return o.size=r?i.max():i.min(),o.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),o=0;!(n=r.next()).done&&!1!==t(n.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=n.map((function(t){return t=ue(t),Ee(o?t.reverse():t)})),a=0,s=!1;return new be((function(){var n;return s||(n=i.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:ge(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},o}function On(t,e){return t===e?t:pe(t)?e:t.constructor(e)}function kn(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function An(t){return ie(t)?ce:ae(t)?fe:le}function jn(t){return Object.create((ie(t)?Te:ae(t)?Ie:Ce).prototype)}function Tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):je.prototype.cacheResult.call(this)}function In(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 Cn(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),o=0;o<n;o++)r[o]=t[o+e];return r}function Rn(t,e){if(!t)throw new Error(e)}function zn(t){Rn(t!==1/0,"Cannot perform this action with an infinite size.")}function Mn(t){if(Ae(t)&&"string"!=typeof t)return t;if(ve(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}fn.prototype.cacheResult=cn.prototype.cacheResult=ln.prototype.cacheResult=pn.prototype.cacheResult=Tn;var Dn=Object.prototype.toString;function Ln(t){if(!t||"object"!=typeof t||"[object Object]"!==Dn.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 Pn(t){return"object"==typeof t&&(de(t)||Array.isArray(t)||Ln(t))}function Un(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function qn(t,e){return de(t)?t.has(e):Pn(t)&&ke.call(t,e)}function Bn(t,e,n){return de(t)?t.get(e,n):qn(t,e)?"function"==typeof t.get?t.get(e):t[e]:n}function Nn(t){if(Array.isArray(t))return Cn(t);var e={};for(var n in t)ke.call(t,n)&&(e[n]=t[n]);return e}function Fn(t,e){if(!Pn(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(de(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!ke.call(t,e))return t;var n=Nn(t);return Array.isArray(n)?n.splice(e,1):delete n[e],n}function Yn(t,e,n){if(!Pn(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(de(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,n)}if(ke.call(t,e)&&n===t[e])return t;var r=Nn(t);return r[e]=n,r}function Jn(t,e,n,r){r||(r=n,n=void 0);var o=function t(e,n,r,o,i,a){var s=n===Wt;if(o===r.length){var u=s?i:n,c=a(u);return c===u?n:c}if(!s&&!Pn(n))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,o).map(Un)+"]: "+n);var f=r[o],l=s?Wt:Bn(n,f,Wt),p=t(l===Wt?e:de(l),l,r,o+1,i,a);return p===l?n:p===Wt?Fn(n,f):Yn(s?e?Sr():{}:n,f,p)}(de(t),t,Mn(e),0,n,r);return o===Wt?n:o}function Kn(t,e,n){return Jn(t,e,Wt,(function(){return n}))}function Gn(t,e){return Kn(this,t,e)}function Wn(t,e){return Jn(t,e,(function(){return Wt}))}function Vn(t){return Wn(this,t)}function Hn(t,e,n,r){return Jn(t,[e],n,r)}function Qn(t,e,n){return 1===arguments.length?t(this):Hn(this,t,e,n)}function $n(t,e,n){return Jn(this,t,e,n)}function Xn(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return tr(this,t)}function Zn(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 tr(this,e,t)}function tr(t,e,n){for(var r=[],o=0;o<e.length;o++){var i=ce(e[o]);0!==i.size&&r.push(i)}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){Hn(t,r,Wt,(function(t){return t===Wt?e:n(t,e,r)}))}:function(e,n){t.set(n,e)},o=0;o<r.length;o++)r[o].forEach(e)})):t.constructor(r[0])}function er(t,e,n){return nr(t,e,function(t){return function e(n,r,o){return Pn(n)&&Pn(r)&&(i=r,a=je(n),s=je(i),ae(a)===ae(s)&&ie(a)===ie(s))?nr(n,[r],e):t?t(n,r,o):r;var i,a,s}}(n))}function nr(t,e,n){if(!Pn(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(de(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),o=t,i=r?fe:ce,a=r?function(e){o===t&&(o=Nn(o)),o.push(e)}:function(e,r){var i=ke.call(o,r),a=i&&n?n(o[r],e,r):e;i&&a===o[r]||(o===t&&(o=Nn(o)),o[r]=a)},s=0;s<e.length;s++)i(e[s]).forEach(a);return o}function rr(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er(this,t)}function or(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return er(this,e,t)}function ir(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return Jn(this,t,Sr(),(function(t){return nr(t,e)}))}function ar(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return Jn(this,t,Sr(),(function(t){return er(t,e)}))}function sr(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function ur(){return this.__ownerID?this:this.__ensureOwner(new Ht)}function cr(){return this.__ensureOwner()}function fr(){return this.__altered}var lr=function(t){function e(e){return null==e?Sr():Be(e)&&!ve(e)?e:Sr().withMutations((function(n){var r=t(e);zn(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 Sr().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 Er(this,t,e)},e.prototype.remove=function(t){return Er(this,t,Wt)},e.prototype.deleteAll=function(t){var e=ue(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):Sr()},e.prototype.sort=function(t){return Vr(wn(this,t))},e.prototype.sortBy=function(t,e){return Vr(wn(this,e,t))},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){r.forEach((function(o,i){r.set(i,t.call(e,o,i,n))}))}))},e.prototype.__iterator=function(t,e){return new br(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?xr(this.size,this._root,t,this.__hash):0===this.size?Sr():(this.__ownerID=t,this.__altered=!1,this)},e}(ce);lr.isMap=Be;var pr=lr.prototype;pr["@@__IMMUTABLE_MAP__@@"]=!0,pr.delete=pr.remove,pr.removeAll=pr.deleteAll,pr.setIn=Gn,pr.removeIn=pr.deleteIn=Vn,pr.update=Qn,pr.updateIn=$n,pr.merge=pr.concat=Xn,pr.mergeWith=Zn,pr.mergeDeep=rr,pr.mergeDeepWith=or,pr.mergeIn=ir,pr.mergeDeepIn=ar,pr.withMutations=sr,pr.wasAltered=fr,pr.asImmutable=cr,pr["@@transducer/init"]=pr.asMutable=ur,pr["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},pr["@@transducer/result"]=function(t){return t.asImmutable()};var hr=function(t,e){this.ownerID=t,this.entries=e};hr.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Ye(n,o[i][0]))return o[i][1];return r},hr.prototype.update=function(t,e,n,r,o,i,a){for(var s=o===Wt,u=this.entries,c=0,f=u.length;c<f&&!Ye(r,u[c][0]);c++);var l=c<f;if(l?u[c][1]===o:s)return this;if(Vt(a),(s||!l)&&Vt(i),!s||1!==u.length){if(!l&&!s&&u.length>=Ir)return function(t,e,n,r){t||(t=new Ht);for(var o=new _r(t,We(n),[n,r]),i=0;i<e.length;i++){var a=e[i];o=o.update(t,0,void 0,a[0],a[1])}return o}(t,u,r,o);var p=t&&t===this.ownerID,h=p?u:Cn(u);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),p?(this.entries=h,this):new hr(t,h)}};var dr=function(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n};dr.prototype.get=function(t,e,n,r){void 0===e&&(e=We(n));var o=1<<(31&(0===t?e:e>>>t)),i=this.bitmap;return 0==(i&o)?r:this.nodes[jr(i&o-1)].get(t+5,e,n,r)},dr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=31&(0===e?n:n>>>e),u=1<<s,c=this.bitmap,f=0!=(c&u);if(!f&&o===Wt)return this;var l=jr(c&u-1),p=this.nodes,h=f?p[l]:void 0,d=Or(h,t,e+5,n,r,o,i,a);if(d===h)return this;if(!f&&d&&p.length>=Cr)return function(t,e,n,r,o){for(var i=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[i++]:void 0;return a[r]=o,new yr(t,i+1,a)}(t,p,c,s,d);if(f&&!d&&2===p.length&&kr(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&kr(d))return d;var y=t&&t===this.ownerID,v=f?d?c:c^u:c|u,_=f?d?Tr(p,l,d,y):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var o=new Array(r),i=0,a=0;a<r;a++)a===e&&(i=1),o[a]=t[a+i];return o}(p,l,y):function(t,e,n,r){var o=t.length+1;if(r&&e+1===o)return t[e]=n,t;for(var i=new Array(o),a=0,s=0;s<o;s++)s===e?(i[s]=n,a=-1):i[s]=t[s+a];return i}(p,l,d,y);return y?(this.bitmap=v,this.nodes=_,this):new dr(t,v,_)};var yr=function(t,e,n){this.ownerID=t,this.count=e,this.nodes=n};yr.prototype.get=function(t,e,n,r){void 0===e&&(e=We(n));var o=31&(0===t?e:e>>>t),i=this.nodes[o];return i?i.get(t+5,e,n,r):r},yr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=31&(0===e?n:n>>>e),u=o===Wt,c=this.nodes,f=c[s];if(u&&!f)return this;var l=Or(f,t,e+5,n,r,o,i,a);if(l===f)return this;var p=this.count;if(f){if(!l&&--p<Rr)return function(t,e,n,r){for(var o=0,i=0,a=new Array(n),s=0,u=1,c=e.length;s<c;s++,u<<=1){var f=e[s];void 0!==f&&s!==r&&(o|=u,a[i++]=f)}return new dr(t,o,a)}(t,c,p,s)}else p++;var h=t&&t===this.ownerID,d=Tr(c,s,l,h);return h?(this.count=p,this.nodes=d,this):new yr(t,p,d)};var vr=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n};vr.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Ye(n,o[i][0]))return o[i][1];return r},vr.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=We(r));var s=o===Wt;if(n!==this.keyHash)return s?this:(Vt(a),Vt(i),Ar(this,t,e,n,[r,o]));for(var u=this.entries,c=0,f=u.length;c<f&&!Ye(r,u[c][0]);c++);var l=c<f;if(l?u[c][1]===o:s)return this;if(Vt(a),(s||!l)&&Vt(i),s&&2===f)return new _r(t,this.keyHash,u[1^c]);var p=t&&t===this.ownerID,h=p?u:Cn(u);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),p?(this.entries=h,this):new vr(t,this.keyHash,h)};var _r=function(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n};_r.prototype.get=function(t,e,n,r){return Ye(n,this.entry[0])?this.entry[1]:r},_r.prototype.update=function(t,e,n,r,o,i,a){var s=o===Wt,u=Ye(r,this.entry[0]);return(u?o===this.entry[1]:s)?this:(Vt(a),s?void Vt(i):u?t&&t===this.ownerID?(this.entry[1]=o,this):new _r(t,this.keyHash,[r,o]):(Vt(i),Ar(this,t,e,We(r),[r,o])))},hr.prototype.iterate=vr.prototype.iterate=function(t,e){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===t(n[e?o-r:r]))return!1},dr.prototype.iterate=yr.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[e?o-r:r];if(i&&!1===i.iterate(t,e))return!1}},_r.prototype.iterate=function(t,e){return t(this.entry)};var mr,br=function(t){function e(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&wr(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++,o=void 0;if(n.entry){if(0===r)return gr(t,n.entry)}else if(n.entries){if(r<=(o=n.entries.length-1))return gr(t,n.entries[this._reverse?o-r:r])}else if(r<=(o=n.nodes.length-1)){var i=n.nodes[this._reverse?o-r:r];if(i){if(i.entry)return gr(t,i.entry);e=this._stack=wr(i,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(be);function gr(t,e){return ge(t,e[0],e[1])}function wr(t,e){return{node:t,index:0,__prev:e}}function xr(t,e,n,r){var o=Object.create(pr);return o.size=t,o._root=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Sr(){return mr||(mr=xr(0))}function Er(t,e,n){var r,o;if(t._root){var i={value:!1},a={value:!1};if(r=Or(t._root,t.__ownerID,0,void 0,e,n,i,a),!a.value)return t;o=t.size+(i.value?n===Wt?-1:1:0)}else{if(n===Wt)return t;o=1,r=new hr(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?xr(o,r):Sr()}function Or(t,e,n,r,o,i,a,s){return t?t.update(e,n,r,o,i,a,s):i===Wt?t:(Vt(s),Vt(a),new _r(e,r,[o,i]))}function kr(t){return t.constructor===_r||t.constructor===vr}function Ar(t,e,n,r,o){if(t.keyHash===r)return new vr(e,r,[t.entry,o]);var i,a=31&(0===n?t.keyHash:t.keyHash>>>n),s=31&(0===n?r:r>>>n),u=a===s?[Ar(t,e,n+5,r,o)]:(i=new _r(e,r,o),a<s?[t,i]:[i,t]);return new dr(e,1<<a|1<<s,u)}function jr(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Tr(t,e,n,r){var o=r?t:Cn(t);return o[e]=n,o}var Ir=8,Cr=16,Rr=8;function zr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var Mr=function(t){function e(e){var n=Nr();if(null==e)return n;if(zr(e))return e;var r=t(e),o=r.size;return 0===o?n:(zn(o),o>0&&o<32?Br(0,o,5,null,new Lr(r.toArray())):n.withMutations((function(t){t.setSize(o),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=$t(this,t))>=0&&t<this.size){var n=Jr(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=$t(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Kr(t,e).set(0,n):Kr(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,o=t._root,i={value:!1};e>=Gr(t._capacity)?r=Fr(r,t.__ownerID,0,e,n,i):o=Fr(o,t.__ownerID,t._level,e,n,i);if(!i.value)return t;if(t.__ownerID)return t._root=o,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return Br(t._origin,t._capacity,t._level,o,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):Nr()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Kr(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},e.prototype.pop=function(){return Kr(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Kr(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},e.prototype.shift=function(){return Kr(this,1)},e.prototype.concat=function(){for(var e=arguments,n=[],r=0;r<arguments.length;r++){var o=e[r],i=t("string"!=typeof o&&xe(o)?o:[o]);0!==i.size&&n.push(i)}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 Kr(this,0,t)},e.prototype.map=function(t,e){var n=this;return this.withMutations((function(r){for(var o=0;o<n.size;o++)r.set(o,t.call(e,r.get(o),o,n))}))},e.prototype.slice=function(t,e){var n=this.size;return Zt(t,e,n)?this:Kr(this,te(t,n),ee(e,n))},e.prototype.__iterator=function(t,e){var n=e?this.size:0,r=qr(this,e);return new be((function(){var o=r();return o===Ur?{value:void 0,done:!0}:ge(t,e?--n:n++,o)}))},e.prototype.__iterate=function(t,e){for(var n,r=e?this.size:0,o=qr(this,e);(n=o())!==Ur&&!1!==t(n,e?--r:r++,this););return r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Br(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?Nr():(this.__ownerID=t,this.__altered=!1,this)},e}(fe);Mr.isList=zr;var Dr=Mr.prototype;Dr["@@__IMMUTABLE_LIST__@@"]=!0,Dr.delete=Dr.remove,Dr.merge=Dr.concat,Dr.setIn=Gn,Dr.deleteIn=Dr.removeIn=Vn,Dr.update=Qn,Dr.updateIn=$n,Dr.mergeIn=ir,Dr.mergeDeepIn=ar,Dr.withMutations=sr,Dr.wasAltered=fr,Dr.asImmutable=cr,Dr["@@transducer/init"]=Dr.asMutable=ur,Dr["@@transducer/step"]=function(t,e){return t.push(e)},Dr["@@transducer/result"]=function(t){return t.asImmutable()};var Lr=function(t,e){this.array=t,this.ownerID=e};Lr.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 Lr([],t);var o,i=0===r;if(e>0){var a=this.array[r];if((o=a&&a.removeBefore(t,e-5,n))===a&&i)return this}if(i&&!o)return this;var s=Yr(this,t);if(!i)for(var u=0;u<r;u++)s.array[u]=void 0;return o&&(s.array[r]=o),s},Lr.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,o=n-1>>>e&31;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((r=i&&i.removeAfter(t,e-5,n))===i&&o===this.array.length-1)return this}var a=Yr(this,t);return a.array.splice(o+1),r&&(a.array[o]=r),a};var Pr,Ur={};function qr(t,e){var n=t._origin,r=t._capacity,o=Gr(r),i=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===o?i&&i.array:t&&t.array,u=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(u===c)return Ur;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,o,i){var s,u=t&&t.array,c=i>n?0:n-i>>o,f=1+(r-i>>o);f>32&&(f=32);return function(){for(;;){if(s){var t=s();if(t!==Ur)return t;s=null}if(c===f)return Ur;var n=e?--f:c++;s=a(u&&u[n],o-5,i+(n<<o))}}}(t,s,u)}}function Br(t,e,n,r,o,i,a){var s=Object.create(Dr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=n,s._root=r,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function Nr(){return Pr||(Pr=Br(0,0,5))}function Fr(t,e,n,r,o,i){var a,s=r>>>n&31,u=t&&s<t.array.length;if(!u&&void 0===o)return t;if(n>0){var c=t&&t.array[s],f=Fr(c,e,n-5,r,o,i);return f===c?t:((a=Yr(t,e)).array[s]=f,a)}return u&&t.array[s]===o?t:(i&&Vt(i),a=Yr(t,e),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function Yr(t,e){return e&&t&&e===t.ownerID?t:new Lr(t?t.array.slice():[],e)}function Jr(t,e){if(e>=Gr(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 Kr(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new Ht,o=t._origin,i=t._capacity,a=o+e,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,f=0;a+f<0;)c=new Lr(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(a+=f,o+=f,s+=f,i+=f);for(var l=Gr(i),p=Gr(s);p>=1<<u+5;)c=new Lr(c&&c.array.length?[c]:[],r),u+=5;var h=t._tail,d=p<l?Jr(t,s-1):p>l?new Lr([],r):h;if(h&&p>l&&a<i&&h.array.length){for(var y=c=Yr(c,r),v=u;v>5;v-=5){var _=l>>>v&31;y=y.array[_]=Yr(y.array[_],r)}y.array[l>>>5&31]=h}if(s<i&&(d=d&&d.removeAfter(r,0,s)),a>=p)a-=p,s-=p,u=5,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||p<l){for(f=0;c;){var m=a>>>u&31;if(m!==p>>>u&31)break;m&&(f+=(1<<u)*m),u-=5,c=c.array[m]}c&&a>o&&(c=c.removeBefore(r,u,a-f)),c&&p<l&&(c=c.removeAfter(r,u,p-f)),f&&(a-=f,s-=f)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Br(a,s,u,c,d)}function Gr(t){return t<32?0:t-1>>>5<<5}var Wr,Vr=function(t){function e(t){return null==t?Qr():Ne(t)?t:Qr().withMutations((function(e){var n=ce(t);zn(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):Qr()},e.prototype.set=function(t,e){return $r(this,t,e)},e.prototype.remove=function(t){return $r(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?Hr(e,n,t,this.__hash):0===this.size?Qr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=n,this)},e}(lr);function Hr(t,e,n,r){var o=Object.create(Vr.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Qr(){return Wr||(Wr=Hr(Sr(),Nr()))}function $r(t,e,n){var r,o,i=t._map,a=t._list,s=i.get(e),u=void 0!==s;if(n===Wt){if(!u)return t;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=i.remove(e),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=i,o=a.set(s,[e,n])}else r=i.set(e,a.size),o=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t.__altered=!0,t):Hr(r,o)}Vr.isOrderedMap=Ne,Vr.prototype[ye]=!0,Vr.prototype.delete=Vr.prototype.remove;function Xr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Zr=function(t){function e(t){return null==t?ro():Xr(t)?t:ro().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=$t(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):no(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Xr(e))return e;zn(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):no(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):ro()},e.prototype.slice=function(e,n){if(Zt(e,n,this.size))return this;var r=te(e,this.size);if(ee(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var o=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):no(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?no(this.size,this._head,t,this.__hash):0===this.size?ro():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Re(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,o=this._head;o&&!1!==t(o.value,r++,this);)o=o.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Re(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new be((function(){if(r){var e=r.value;return r=r.next,ge(t,n++,e)}return{value:void 0,done:!0}}))},e}(fe);Zr.isStack=Xr;var to,eo=Zr.prototype;function no(t,e,n,r){var o=Object.create(eo);return o.size=t,o._head=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ro(){return to||(to=no(0))}eo["@@__IMMUTABLE_STACK__@@"]=!0,eo.shift=eo.pop,eo.unshift=eo.push,eo.unshiftAll=eo.pushAll,eo.withMutations=sr,eo.wasAltered=fr,eo.asImmutable=cr,eo["@@transducer/init"]=eo.asMutable=ur,eo["@@transducer/step"]=function(t,e){return t.unshift(e)},eo["@@transducer/result"]=function(t){return t.asImmutable()};function oo(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function io(t){return oo(t)&&ve(t)}function ao(t,e){if(t===e)return!0;if(!oe(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||ie(t)!==ie(e)||ae(t)!==ae(e)||ve(t)!==ve(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!se(t);if(ve(t)){var r=t.entries();return e.every((function(t,e){var o=r.next().value;return o&&Ye(o[1],t)&&(n||Ye(o[0],e))}))&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var i=t;t=e,e=i}var a=!0,s=e.__iterate((function(e,r){if(n?!t.has(e):o?!Ye(e,t.get(r,Wt)):!Ye(t.get(r,Wt),e))return a=!1,!1}));return a&&t.size===s}function so(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 uo(t){if(!t||"object"!=typeof t)return t;if(!oe(t)){if(!Pn(t))return t;t=je(t)}if(ie(t)){var e={};return t.__iterate((function(t,n){e[n]=uo(t)})),e}var n=[];return t.__iterate((function(t){n.push(uo(t))})),n}var co=function(t){function e(e){return null==e?yo():oo(e)&&!ve(e)?e:yo().withMutations((function(n){var r=t(e);zn(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(ce(t).keySeq())},e.intersect=function(t){return(t=ue(t).toArray()).length?lo.intersect.apply(e(t.pop()),t):yo()},e.union=function(t){return(t=ue(t).toArray()).length?lo.union.apply(e(t.pop()),t):yo()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return po(this,this._map.set(t,t))},e.prototype.remove=function(t){return po(this,this._map.remove(t))},e.prototype.clear=function(){return po(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=!1,o=po(this,this._map.mapEntries((function(o){var i=o[1],a=t.call(e,i,i,n);return a!==i&&(r=!0),[a,a]}),e));return r?o: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 Mo(wn(this,t))},e.prototype.sortBy=function(t,e){return Mo(wn(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}(le);co.isSet=oo;var fo,lo=co.prototype;function po(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 ho(t,e){var n=Object.create(lo);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function yo(){return fo||(fo=ho(Sr()))}lo["@@__IMMUTABLE_SET__@@"]=!0,lo.delete=lo.remove,lo.merge=lo.concat=lo.union,lo.withMutations=sr,lo.asImmutable=cr,lo["@@transducer/init"]=lo.asMutable=ur,lo["@@transducer/step"]=function(t,e){return t.add(e)},lo["@@transducer/result"]=function(t){return t.asImmutable()},lo.__empty=yo,lo.__make=ho;var vo,_o=function(t){function e(t,n,r){if(!(this instanceof e))return new e(t,n,r);if(Rn(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(vo)return vo;vo=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+$t(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 Zt(t,n,this.size)?this:(t=te(t,this.size),(n=ee(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,o=e?this._start+(n-1)*r:this._start,i=0;i!==n&&!1!==t(o,e?n-++i:i++,this);)o+=e?-r:r;return i},e.prototype.__iterator=function(t,e){var n=this.size,r=this._step,o=e?this._start+(n-1)*r:this._start,i=0;return new be((function(){if(i===n)return{value:void 0,done:!0};var a=o;return o+=e?-r:r,ge(t,e?n-++i:i++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:ao(this,t)},e}(Ie);function mo(t,e,n){for(var r=Mn(e),o=0;o!==r.length;)if((t=Bn(t,r[o++],Wt))===Wt)return n;return t}function bo(t,e){return mo(this,t,e)}function go(t,e){return mo(t,e,Wt)!==Wt}function wo(){zn(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t}ue.isIterable=oe,ue.isKeyed=ie,ue.isIndexed=ae,ue.isAssociative=se,ue.isOrdered=ve,ue.Iterator=be,so(ue,{toArray:function(){zn(this.size);var t=new Array(this.size||0),e=ie(this),n=0;return this.__iterate((function(r,o){t[n++]=e?[o,r]:r})),t},toIndexedSeq:function(){return new fn(this)},toJS:function(){return uo(this)},toKeyedSeq:function(){return new cn(this,!0)},toMap:function(){return lr(this.toKeyedSeq())},toObject:wo,toOrderedMap:function(){return Vr(this.toKeyedSeq())},toOrderedSet:function(){return Mo(ie(this)?this.valueSeq():this)},toSet:function(){return co(ie(this)?this.valueSeq():this)},toSetSeq:function(){return new ln(this)},toSeq:function(){return ae(this)?this.toIndexedSeq():ie(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Zr(ie(this)?this.valueSeq():this)},toList:function(){return Mr(ie(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 On(this,bn(this,t))},includes:function(t){return this.some((function(e){return Ye(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){zn(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!t.call(e,r,o,i))return n=!1,!1})),n},filter:function(t,e){return On(this,vn(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 zn(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){zn(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 On(this,dn(this,t,e))},reduce:function(t,e,n){return ko(this,t,e,n,arguments.length<2,!1)},reduceRight:function(t,e,n){return ko(this,t,e,n,arguments.length<2,!0)},reverse:function(){return On(this,yn(this,!0))},slice:function(t,e){return On(this,_n(this,t,e,!0))},some:function(t,e){return!this.every(To(t),e)},sort:function(t){return On(this,wn(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 Qt(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=lr().asMutable();return t.__iterate((function(o,i){r.update(e.call(n,o,i,t),0,(function(t){return t+1}))})),r.asImmutable()}(this,t,e)},equals:function(t){return ao(this,t)},entrySeq:function(){var t=this;if(t._cache)return new Re(t._cache);var e=t.toSeq().map(jo).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(To(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate((function(n,o,i){if(t.call(e,n,o,i))return r=[o,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(Xt,null,t)},flatMap:function(t,e){return On(this,function(t,e,n){var r=An(t);return t.toSeq().map((function(o,i){return r(e.call(n,o,i,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return On(this,gn(this,t,!0))},fromEntrySeq:function(){return new pn(this)},get:function(t,e){return this.find((function(e,n){return Ye(n,t)}),void 0,e)},getIn:bo,groupBy:function(t,e){return function(t,e,n){var r=ie(t),o=(ve(t)?Vr():lr()).asMutable();t.__iterate((function(i,a){o.update(e.call(n,i,a,t),(function(t){return(t=t||[]).push(r?[a,i]:i),t}))}));var i=An(t);return o.map((function(e){return On(t,i(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,Wt)!==Wt},hasIn:function(t){return go(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:ue(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:ue(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return Ye(e,t)}))},keySeq:function(){return this.toSeq().map(Ao).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return xn(this,t)},maxBy:function(t,e){return xn(this,e,t)},min:function(t){return xn(this,t?Io(t):Ro)},minBy:function(t,e){return xn(this,e?Io(e):Ro,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 On(this,mn(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(To(t),e)},sortBy:function(t,e){return On(this,wn(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 On(this,function(t,e,n){var r=jn(t);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return t.__iterate((function(t,o,s){return e.call(n,t,o,s)&&++a&&r(t,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=t.__iterator(2,o),s=!0;return new be((function(){if(!s)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var o=t.value,u=o[0],c=o[1];return e.call(n,c,u,i)?2===r?t:ge(r,u,c,t):(s=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(To(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=ve(t),n=ie(t),r=e?1:0;return function(t,e){return e=Je(e,3432918353),e=Je(e<<15|e>>>-15,461845907),e=Je(e<<13|e>>>-13,5),e=Je((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ke((e=Je(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+zo(We(t),We(e))|0}:function(t,e){r=r+zo(We(t),We(e))|0}:e?function(t){r=31*r+We(t)|0}:function(t){r=r+We(t)|0}),r)}(this))}});var xo=ue.prototype;xo["@@__IMMUTABLE_ITERABLE__@@"]=!0,xo[me]=xo.values,xo.toJSON=xo.toArray,xo.__toStringMapper=Un,xo.inspect=xo.toSource=function(){return this.toString()},xo.chain=xo.flatMap,xo.contains=xo.includes,so(ce,{flip:function(){return On(this,hn(this))},mapEntries:function(t,e){var n=this,r=0;return On(this,this.toSeq().map((function(o,i){return t.call(e,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return On(this,this.toSeq().flip().map((function(r,o){return t.call(e,r,o,n)})).flip())}});var So=ce.prototype;So["@@__IMMUTABLE_KEYED__@@"]=!0,So[me]=xo.entries,So.toJSON=wo,So.__toStringMapper=function(t,e){return Un(e)+": "+Un(t)},so(fe,{toKeyedSeq:function(){return new cn(this,!1)},filter:function(t,e){return On(this,vn(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 On(this,yn(this,!1))},slice:function(t,e){return On(this,_n(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=te(t,t<0?this.count():this.size);var r=this.slice(0,t);return On(this,1===n?r:r.concat(Cn(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 On(this,gn(this,t,!1))},get:function(t,e){return(t=$t(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=$t(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return On(this,function(t,e){var n=jn(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return t.__iterate((function(t){return(!i||!1!==n(e,i++,o))&&!1!==n(t,i++,o)}),r),i},n.__iteratorUncached=function(n,r){var o,i=t.__iterator(1,r),a=0;return new be((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?ge(n,a++,e):ge(n,a++,o.value,o)}))},n}(this,t))},interleave:function(){var t=[this].concat(Cn(arguments)),e=En(this.toSeq(),Ie.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),On(this,n)},keySeq:function(){return _o(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return On(this,mn(this,t,e,!1))},zip:function(){var t=[this].concat(Cn(arguments));return On(this,En(this,Co,t))},zipAll:function(){var t=[this].concat(Cn(arguments));return On(this,En(this,Co,t,!0))},zipWith:function(t){var e=Cn(arguments);return e[0]=this,On(this,En(this,t,e))}});var Eo=fe.prototype;Eo["@@__IMMUTABLE_INDEXED__@@"]=!0,Eo[ye]=!0,so(le,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Oo=le.prototype;function ko(t,e,n,r,o,i){return zn(t.size),t.__iterate((function(t,i,a){o?(o=!1,n=t):n=e.call(r,n,t,i,a)}),i),n}function Ao(t,e){return e}function jo(t,e){return[e,t]}function To(t){return function(){return!t.apply(this,arguments)}}function Io(t){return function(){return-t.apply(this,arguments)}}function Co(){return Cn(arguments)}function Ro(t,e){return t<e?1:t>e?-1:0}function zo(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Oo.has=xo.includes,Oo.contains=Oo.includes,Oo.keys=Oo.values,so(Te,So),so(Ie,Eo),so(Ce,Oo);var Mo=function(t){function e(t){return null==t?Uo():io(t)?t:Uo().withMutations((function(e){var n=le(t);zn(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(ce(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(co);Mo.isOrderedSet=io;var Do,Lo=Mo.prototype;function Po(t,e){var n=Object.create(Lo);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Uo(){return Do||(Do=Po(Qr()))}Lo[ye]=!0,Lo.zip=Eo.zip,Lo.zipWith=Eo.zipWith,Lo.zipAll=Eo.zipAll,Lo.__empty=Uo,Lo.__make=Po;var qo=function(t,e){var n;!function(t){if(he(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(de(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(i){var a=this;if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var s=Object.keys(t),u=o._indices={};o._name=e,o._keys=s,o._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];u[f]=c,o[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Fo(this)+' with property "'+f+'" since that property name is part of the Record API.'):Jo(o,f)}}return this.__ownerID=void 0,this._values=Mr().withMutations((function(t){t.setSize(a._keys.length),ce(i).forEach((function(e,n){t.set(a._indices[n],e===a._defaultValues[n]?void 0:e)}))})),this},o=r.prototype=Object.create(Bo);return o.constructor=r,e&&(r.displayName=e),r};qo.prototype.toString=function(){for(var t,e=Fo(this)+" { ",n=this._keys,r=0,o=n.length;r!==o;r++)e+=(r?", ":"")+(t=n[r])+": "+Un(this.get(t));return e+" }"},qo.prototype.equals=function(t){return this===t||he(t)&&Yo(this).equals(Yo(t))},qo.prototype.hashCode=function(){return Yo(this).hashCode()},qo.prototype.has=function(t){return this._indices.hasOwnProperty(t)},qo.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},qo.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 No(this,n)}return this},qo.prototype.remove=function(t){return this.set(t)},qo.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:No(this,t)},qo.prototype.wasAltered=function(){return this._values.wasAltered()},qo.prototype.toSeq=function(){return Yo(this)},qo.prototype.toJS=function(){return uo(this)},qo.prototype.entries=function(){return this.__iterator(2)},qo.prototype.__iterator=function(t,e){return Yo(this).__iterator(t,e)},qo.prototype.__iterate=function(t,e){return Yo(this).__iterate(t,e)},qo.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?No(this,e,t):(this.__ownerID=t,this._values=e,this)},qo.isRecord=he,qo.getDescriptiveName=Fo;var Bo=qo.prototype;function No(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._values=e,r.__ownerID=n,r}function Fo(t){return t.constructor.displayName||t.constructor.name||"Record"}function Yo(t){return Pe(t._keys.map((function(e){return[e,t.get(e)]})))}function Jo(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Rn(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}Bo["@@__IMMUTABLE_RECORD__@@"]=!0,Bo.delete=Bo.remove,Bo.deleteIn=Bo.removeIn=Vn,Bo.getIn=bo,Bo.hasIn=xo.hasIn,Bo.merge=Xn,Bo.mergeWith=Zn,Bo.mergeIn=ir,Bo.mergeDeep=rr,Bo.mergeDeepWith=or,Bo.mergeDeepIn=ar,Bo.setIn=Gn,Bo.update=Qn,Bo.updateIn=$n,Bo.withMutations=sr,Bo.asMutable=ur,Bo.asImmutable=cr,Bo[me]=Bo.entries,Bo.toJSON=Bo.toObject=xo.toObject,Bo.inspect=Bo.toSource=function(){return this.toString()};n(12);n(9);var Ko=n(43);function Go(){return(Go=u()(f.a.mark((function t(e,n,r,o,i,a){var s,u,c,l,p,h,d,y,v,_,m,b,g,w;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.addServices("casManagement");case 2:return s=t.sent,u=s.casManagement,t.next=6,i.apiCall(u.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,i.apiCall(c.itemsCmd(l,"caslibs"),p);case 13:return h=t.sent,t.next=16,i.apiCall(h.itemsCmd(e,"tables"));case 16:return d=t.sent,y={qs:{filter:"eq(name, ".concat(n.trim().toUpperCase(),")")}},t.next=20,i.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(b=new Ko).append("tableName",n),b.append("format",o),b.append("scope",null==a?"global":a),b.append("replace",!0),b.append("containsHeaderRow",!0),b.append("file",r),g={data:b,headers:{"content-type":'multipart/form-data; boundary="----------12345678901234567"'}},t.next=35,i.apiCall(d.links("upload"),g);case 35:return w=t.sent,t.abrupt("return",w);case 37:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Wo=function(t,e,n,r,o,i){return Go.apply(this,arguments)};function Vo(){return(Vo=u()(f.a.mark((function t(e,n,r){var i,a,s;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return null==r.where&&(r.where=" "),i=l.a.commonCasl()+" "+l.a.casFetchRows(),t.next=4,Object(o.a)(e,n,i,r);case 4:return a=t.sent,null==(s=a.items("results","casResults").toJS()).data&&(s.data={rows:[]}),t.abrupt("return",s);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ho=function(t,e,n){return Vo.apply(this,arguments)};var Qo=function(){return{caslRun:r.a,caslRunBase:o.a,casSetup:w,casActionRun:S,casFetchData:O,casUpdateData:T,computeRun:Z,computeSetup:et,computeSummary:H,computeFetchData:st,computeFileContent:ct,computeResults:rt,findReport:mt,getReportImage:gt,getReportUri:xt,getSASTableRows:Et,jesSetup:kt,jesRun:Mt,jesSummary:jt,jsonToDict:Dt.a,casTableToJson:M,caslScore:y,caslDescribe:b,masSetup:Nt,masAddModel:Pt,masDescribe:Ft,masRun:Jt,casUpload:Y,uploadData:Wo}}()}])}));
|
package/lib/restaflib.js
CHANGED
|
@@ -692,7 +692,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
692
692
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
693
693
|
|
|
694
694
|
"use strict";
|
|
695
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2) {\n return _casSetup.apply(this, arguments);\n}\n\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, logonPayload) {\n var _yield$store$addServi, casManagement, servers, casserver, session;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(logonPayload);\n debugger;\n\n if (!(logonPayload != null)) {\n _context.next =
|
|
695
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright (c) SAS Institute Inc.\r\n * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2) {\n return _casSetup.apply(this, arguments);\n}\n\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, logonPayload) {\n var msg, _yield$store$addServi, casManagement, servers, casserver, session;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(logonPayload);\n debugger;\n\n if (!(logonPayload != null)) {\n _context.next = 8;\n break;\n }\n\n debugger;\n _context.next = 6;\n return store.logon(logonPayload);\n\n case 6:\n msg = _context.sent;\n console.log(msg);\n\n case 8:\n _context.next = 10;\n return store.addServices('casManagement');\n\n case 10:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 14;\n return store.apiCall(casManagement.links('servers'));\n\n case 14:\n servers = _context.sent;\n\n if (!(servers.itemsList().size === 0)) {\n _context.next = 17;\n break;\n }\n\n throw {\n Error: 'No cas servers were found'\n };\n\n case 17:\n debugger;\n casserver = servers.itemsList(0);\n debugger;\n _context.next = 22;\n return store.apiCall(servers.itemsCmd(casserver, 'createSession'));\n\n case 22:\n session = _context.sent;\n debugger;\n console.log('returning from casSetup');\n return _context.abrupt(\"return\", {\n servers: servers,\n session: session\n });\n\n case 26:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casSetup.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSetup);\n\n//# sourceURL=webpack://restaflib/./casSetup.js?");
|
|
696
696
|
|
|
697
697
|
/***/ }),
|
|
698
698
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/restaflib",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"description": "collection of useful functions for common scenarios",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"url": "https://github.com/sassoftware/restaf/issues"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
+
|
|
32
33
|
"build": "rimraf dist && rimraf lib && webpack --env target=node p=n --config webpack.config.js && webpack --env target=web p=n --config webpack.config.js && webpack --env target=web p=y --config webpack.config.js",
|
|
33
|
-
"pub": "npm publish --tag
|
|
34
|
+
"pub": "npm publish --tag dev --access public",
|
|
34
35
|
"jsdoc": "jsdoc -c jsdoc.json"
|
|
35
36
|
}
|
|
36
37
|
}
|