diff --git a/build/index.js b/build/index.js index 555606c8..2b1d58ec 100644 --- a/build/index.js +++ b/build/index.js @@ -1,10 +1,10 @@ /*! * - * lattice - v0.82.1 + * lattice - v0.82.2 * JavaScript SDK for all OpenLattice REST APIs * https://github.com/openlattice/lattice-js * * Copyright (c) 2017-2020, OpenLattice, Inc. All rights reserved. * */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Lattice=e():t.Lattice=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=73)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(i=e,!1!==n&&function(t){var e=(r[t]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(s)+"="+e+";"}catch(t){}}}(e),a.call(o,e,t),"undefined"==typeof console&&e-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(6),i=r(89),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,r(42)(t))},function(t,e,r){var n=r(90),i=r(91),o=r(92),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e;throw e=null===t?"null":"object"===(e=n(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a ".concat(e),new TypeError("Expected string but received ".concat(e,"."))}},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(3),i=r(17),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(132),i=r(144),o=r(146),a=r(147),s=r(148);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){u.headers[t]=n.merge(o)})),t.exports=u}).call(this,r(111))},function(t,e,r){"use strict";var n=r(4),i=r(113),o=r(115),a=r(47),s=r(116),u=r(119),c=r(120),p=r(51);t.exports=function(t){return new Promise((function(e,r){var f=t.data,h=t.headers;n.isFormData(f)&&delete h["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+y)}var v=s(t.baseURL,t.url);if(l.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:t,request:l};i(e,r,o),l=null}},l.onabort=function(){l&&(r(p("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){r(p("Network Error",t,null,l)),l=null},l.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(p(e,t,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in l&&n.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:l.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),r(t),l=null)})),f||(f=null),l.send(f)}))}},function(t,e,r){"use strict";var n=r(114);t.exports=function(t,e,r,i,o){var a=new Error(t);return n(a,e,r,i,o)}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e){e=e||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(t[i],e[i])}n.forEach(i,(function(t){n.isUndefined(e[t])||(r[t]=u(void 0,e[t]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(void 0,e[i])})),n.forEach(s,(function(n){n in e?r[n]=u(t[n],e[n]):n in t&&(r[n]=u(void 0,t[n]))}));var p=i.concat(o).concat(a).concat(s),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===p.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(56),i=r(26),o=r(3),a=r(58),s=r(27),u=r(22);t.exports=function(t,e,r){for(var c=-1,p=(e=n(e,t)).length,f=!1;++c-1&&t%1==0&&tp))return!1;var h=u.get(t),l=u.get(e);if(h&&l)return h==e&&l==t;var d=-1,y=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((e=(0,a.default)(e,u)).validate_length&&t.length>=2083)return!1;var r,s,f,h,l,d,y,v;if(y=t.split("#"),t=y.shift(),y=t.split("?"),t=y.shift(),(y=t.split("://")).length>1){if(r=y.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(r))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;y[0]=t.substr(2)}}if(""===(t=y.join("://")))return!1;if(y=t.split("/"),""===(t=y.shift())&&!e.require_host)return!0;if((y=t.split("@")).length>1){if(e.disallow_auth)return!1;if(-1===(s=y.shift()).indexOf(":")||s.indexOf(":")>=0&&s.split(":").length>2)return!1}h=y.join("@"),d=null,v=null;var m=h.match(c);m?(f="",v=m[1],d=m[2]||null):(y=h.split(":"),f=y.shift(),y.length&&(d=y.join(":")));if(null!==d&&(l=parseInt(d,10),!/^[0-9]+$/.test(d)||l<=0||l>65535))return!1;if(!((0,o.default)(f)||(0,i.default)(f,e)||v&&(0,o.default)(v,6)))return!1;if(f=f||v,e.host_whitelist&&!p(f,e.host_whitelist))return!1;if(e.host_blacklist&&p(f,e.host_blacklist))return!1;return!0};var n=s(r(30)),i=s(r(123)),o=s(r(124)),a=s(r(54));function s(t){return t&&t.__esModule?t:{default:t}}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function p(t,e){for(var r=0;r=i?t:n(t,e,r)}},function(t,e){t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n-1;);return r}},function(t,e){t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o-1;);return r}},function(t,e,r){var n=r(103),i=r(104),o=r(105);t.exports=function(t){return i(t)?o(t):n(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),p="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+p+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e,r){"use strict";var n=r(4),i=r(46),o=r(107),a=r(52);function s(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=s(r(49));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=r(53),u.CancelToken=r(121),u.isCancel=r(48),u.all=function(t){return Promise.all(t)},u.spread=r(122),t.exports=u,t.exports.default=u},function(t,e,r){"use strict";var n=r(4),i=r(47),o=r(108),a=r(109),s=r(52);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,r,n){return this.request(s(n||{},{method:t,url:e,data:r}))}})),t.exports=u},function(t,e,r){"use strict";var n=r(4);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,r){"use strict";var n=r(4),i=r(110),o=r(48),a=r(49);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=s(h);p=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var n=r(4);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(53);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,i.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var r=t.split("."),o=0;o63)return!1;if(e.require_tld){var s=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(s))return!1}for(var u,c=0;c1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(e),!(r=String(r)))return t(e,4)||t(e,6);if("4"===r){if(!o.test(e))return!1;var n=e.split(".").sort((function(t,e){return t-e}));return n[3]<=255}if("6"===r){var s=[e];if(e.includes("%")){if(2!==(s=e.split("%")).length)return!1;if(!s[0].includes(":"))return!1;if(""===s[1])return!1}var u=s[0].split(":"),c=!1,p=t(u[u.length-1],4),f=p?7:8;if(u.length>f)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(u.shift(),u.shift(),c=!0):"::"===e.substr(e.length-2)&&(u.pop(),u.pop(),c=!0);for(var h=0;h0&&h=1:u.length===f}return!1};var n,i=(n=r(30))&&n.__esModule?n:{default:n};var o=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,a=/^[0-9A-F]{1,4}$/i;t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(126);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},function(t,e,r){var n=r(127);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,r){var n=r(15),i=r(17),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},function(t,e,r){var n=r(130),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},function(t,e,r){var n=r(131);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(32);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(133),i=r(19),o=r(25);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(134),i=r(135),o=r(136),a=r(137),s=r(138);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},function(t,e,r){var n=r(20);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(21);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(21);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(150);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(12),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(152),i=r(33);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(153)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e,r){var n=r(155),i=r(26),o=r(3),a=r(28),s=r(58),u=r(29),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),p=!r&&i(t),f=!r&&!p&&a(t),h=!r&&!p&&!f&&u(t),l=r||p||f||h,d=l?n(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||l&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?k(t)+e:e}function M(){return!0}function N(t,e,r){return(0===t&&!K(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function q(t,e){return L(t,e,0)}function C(t,e){return L(t,e,e)}function L(t,e,r){return void 0===t?r:K(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function K(t){return t<0||0===t&&1/t==-1/0}function B(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function F(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function V(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function J(t){return F(t)||V(t)}var G=function(t){return B(t)?t:ht(t)},W=function(t){function e(t){return F(t)?t:lt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),H=function(t){function e(t){return V(t)?t:dt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),Q=function(t){function e(t){return B(t)&&!J(t)?t:yt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G);G.Keyed=W,G.Indexed=H,G.Set=Q;function $(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function X(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Z(t){return B(t)||X(t)}var Y="@@__IMMUTABLE_ORDERED__@@";function tt(t){return Boolean(t&&t[Y])}var et="function"==typeof Symbol&&Symbol.iterator,rt=et||"@@iterator",nt=function(t){this.next=t};function it(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function ot(){return{value:void 0,done:!0}}function at(t){return!!ct(t)}function st(t){return t&&"function"==typeof t.next}function ut(t){var e=ct(t);return e&&e.call(t)}function ct(t){var e=t&&(et&&t[et]||t["@@iterator"]);if("function"==typeof e)return e}nt.prototype.toString=function(){return"[Iterator]"},nt.KEYS=0,nt.VALUES=1,nt.ENTRIES=2,nt.prototype.inspect=nt.prototype.toSource=function(){return this.toString()},nt.prototype[rt]=function(){return this};var pt=Object.prototype.hasOwnProperty;function ft(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 ht=function(t){function e(t){return null==t?bt():Z(t)?t.toSeq():function(t){var e=jt(t);if(e)return e;if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return it(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(G),lt=function(t){function e(t){return null==t?bt().toKeyedSeq():B(t)?F(t)?t.toSeq():t.fromEntrySeq():X(t)?t.toSeq():wt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ht),dt=function(t){function e(t){return null==t?bt():B(t)?F(t)?t.entrySeq():t.toIndexedSeq():X(t)?t.toSeq().entrySeq():It(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}(ht),yt=function(t){function e(t){return(B(t)&&!J(t)?t:dt(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}(ht);ht.isSeq=$,ht.Keyed=lt,ht.Set=yt,ht.Indexed=dt,ht.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var vt=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[R(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return it(t,o,r[o])}))},e}(dt),mt=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return pt.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new nt((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return it(t,a,r[a])}))},e}(lt);mt.prototype[Y]=!0;var gt,_t=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=ut(this._collection),n=0;if(st(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=ut(this._collection);if(!st(r))return new nt(ot);var n=0;return new nt((function(){var e=r.next();return e.done?e:it(t,n++,e.value)}))},e}(dt);function bt(){return gt||(gt=new vt([]))}function wt(t){var e=Array.isArray(t)?new vt(t):at(t)?new _t(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function It(t){var e=jt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function jt(t){return ft(t)?new vt(t):at(t)?new _t(t):void 0}function Et(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Tt(t){return Et(t)&&tt(t)}function At(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function St(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!!(At(t)&&At(e)&&t.equals(e))}var Pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}function Dt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return Ot(r)}if("string"===e)return t.length>qt?function(t){var e=Kt[t];void 0===e&&(e=Ut(t),Lt===Ct&&(Lt=0,Kt={}),Lt++,Kt[t]=e);return e}(t):Ut(t);if("function"==typeof t.hashCode)return Ot(t.hashCode());if("object"===e||"function"===e)return function(t){var e;if(Rt&&void 0!==(e=kt.get(t)))return e;if(void 0!==(e=t[Nt]))return e;if(!zt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nt]))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}e=++Mt,1073741824&Mt&&(Mt=0);if(Rt)kt.set(t,e);else{if(void 0!==xt&&!1===xt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(zt)Object.defineProperty(t,Nt,{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[Nt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nt]=e}}return e}(t);if("function"==typeof t.toString)return Ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ut(t){for(var e=0,r=0;r=0&&(c.get=function(e,r){return(e=R(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return n||1===e||t.done?t:it(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Xt(t,e,r,n){var i=se(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,c=0;return new nt((function(){var t,o,p;do{if((t=s.next()).done)return n||1===i?t:it(i,c++,0===i?void 0:t.value[1],t);var f=t.value;o=f[0],p=f[1],u&&(u=e.call(r,p,o,a))}while(u);return 2===i?t:it(i,o,p,t)}))},i}function Zt(t,e){var r=F(t),n=[t].concat(e).map((function(t){return B(t)?r&&(t=W(t)):t=r?wt(t):It(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&F(i)||V(t)&&V(i))return i}var o=new vt(n);return r?o=o.toKeyedSeq():V(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function Yt(t,e,r){var n=se(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,c){u.__iterate((function(o,u){return(!e||c0}function ne(t,e,r,n){var i=se(t),o=new vt(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=G(t),ut(i?t.reverse():t)})),a=0,s=!1;return new nt((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:it(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function ie(t,e){return t===e?t:$(t)?e:t.constructor(e)}function oe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ae(t){return F(t)?W:V(t)?H:Q}function se(t){return Object.create((F(t)?lt:V(t)?dt:yt).prototype)}function ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ht.prototype.cacheResult.call(this)}function ce(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return xe(this,e,t)}function xe(t,e,r){for(var n=[],i=0;i0;)e[r]=arguments[r+1];return ze(this,e,t)}function Ne(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ke(t,e)}))}function qe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ze(t,e)}))}function Ce(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Le(){return this.__ownerID?this:this.__ensureOwner(new z)}function Ke(){return this.__ensureOwner()}function Be(){return this.__altered}Ft.prototype.cacheResult=Bt.prototype.cacheResult=Vt.prototype.cacheResult=Jt.prototype.cacheResult=ue;var Fe=function(t){function e(e){return null==e?er():Et(e)&&!tt(e)?e:er().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er().withMutations((function(e){for(var r=0;r=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return rr(this,t,e)},e.prototype.remove=function(t){return rr(this,t,U)},e.prototype.deleteAll=function(t){var e=G(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):er()},e.prototype.sort=function(t){return Ar(te(this,t))},e.prototype.sortBy=function(t,e){return Ar(te(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(r){r.forEach((function(n,i){r.set(i,t.call(e,n,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Xe(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?tr(this.size,this._root,t,this.__hash):0===this.size?er():(this.__ownerID=t,this.__altered=!1,this)},e}(W);Fe.isMap=Et;var Ve=Fe.prototype;Ve["@@__IMMUTABLE_MAP__@@"]=!0,Ve.delete=Ve.remove,Ve.removeAll=Ve.deleteAll,Ve.setIn=Ee,Ve.removeIn=Ve.deleteIn=Ae,Ve.update=Pe,Ve.updateIn=Oe,Ve.merge=Ve.concat=De,Ve.mergeWith=Ue,Ve.mergeDeep=Re,Ve.mergeDeepWith=Me,Ve.mergeIn=Ne,Ve.mergeDeepIn=qe,Ve.withMutations=Ce,Ve.wasAltered=Be,Ve.asImmutable=Ke,Ve["@@transducer/init"]=Ve.asMutable=Le,Ve["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Ve["@@transducer/result"]=function(t){return t.asImmutable()};var Je=function(t,e){this.ownerID=t,this.entries=e};Je.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o=ur)return function(t,e,r,n){t||(t=new z);for(var i=new Qe(t,Dt(r),[r,n]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?n:this.nodes[ar(o&i-1)].get(t+5,e,r,n)},Ge.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=1<=cr)return function(t,e,r,n,i){for(var o=0,a=new Array(32),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[o++]:void 0;return a[n]=i,new We(t,o+1,a)}(t,h,c,s,d);if(p&&!d&&2===h.length&&ir(h[1^f]))return h[1^f];if(p&&d&&1===h.length&&ir(d))return d;var y=t&&t===this.ownerID,v=p?d?c:c^u:c|u,m=p?d?sr(h,f,d,y):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a>>t),o=this.nodes[i];return o?o.get(t+5,e,r,n):n},We.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=i===U,c=this.nodes,p=c[s];if(u&&!p)return this;var f=nr(p,t,e+5,r,n,i,o,a);if(f===p)return this;var h=this.count;if(p){if(!f&&--h>>r),s=31&(0===r?n:n>>>r),u=a===s?[or(t,e,r+5,n,i)]:(o=new Qe(e,n,i),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function sr(t,e,r,n){var i=n?t:pe(t);return i[e]=r,i}var ur=8,cr=16,pr=8;function fr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var hr=function(t){function e(e){var r=_r();if(null==e)return r;if(fr(e))return e;var n=t(e),i=n.size;return 0===i?r:(he(i),i>0&&i<32?gr(0,i,5,null,new dr(n.toArray())):r.withMutations((function(t){t.setSize(i),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=R(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?jr(t,e).set(0,r):jr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=Er(t._capacity)?n=br(n,t.__ownerID,0,e,r,o):i=br(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return gr(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):_r()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){jr(r,0,e+t.length);for(var n=0;n>>e&31;if(n>=this.array.length)return new dr([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!i)return this;var s=wr(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=wr(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var yr,vr={};function mr(t,e){var r=t._origin,n=t._capacity,i=Er(n),o=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===i?o&&o.array:t&&t.array,u=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(u===c)return vr;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,i,o){var s,u=t&&t.array,c=o>r?0:r-o>>i,p=1+(n-o>>i);p>32&&(p=32);return function(){for(;;){if(s){var t=s();if(t!==vr)return t;s=null}if(c===p)return vr;var r=e?--p:c++;s=a(u&&u[r],i-5,o+(r<>>r&31,u=t&&s0){var c=t&&t.array[s],p=br(c,e,r-5,n,i,o);return p===c?t:((a=wr(t,e)).array[s]=p,a)}return u&&t.array[s]===i?t:(o&&x(o),a=wr(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function wr(t,e){return e&&t&&e===t.ownerID?t:new dr(t?t.array.slice():[],e)}function Ir(t,e){if(e>=Er(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&31],n-=5;return r}}function jr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new z,i=t._origin,o=t._capacity,a=i+e,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,p=0;a+p<0;)c=new dr(c&&c.array.length?[void 0,c]:[],n),p+=1<<(u+=5);p&&(a+=p,i+=p,s+=p,o+=p);for(var f=Er(o),h=Er(s);h>=1<f?new dr([],n):l;if(l&&h>f&&a5;v-=5){var m=f>>>v&31;y=y.array[m]=wr(y.array[m],n)}y.array[f>>>5&31]=l}if(s=h)a-=h,s-=h,u=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||h>>u&31;if(g!==h>>>u&31)break;g&&(p+=(1<i&&(c=c.removeBefore(n,u,a-p)),c&&h>>5<<5}var Tr,Ar=function(t){function e(t){return null==t?Pr():Tt(t)?t:Pr().withMutations((function(e){var r=W(t);he(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Pr()},e.prototype.set=function(t,e){return Or(this,t,e)},e.prototype.remove=function(t){return Or(this,t,U)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Sr(e,r,t,this.__hash):0===this.size?Pr():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(Fe);function Sr(t,e,r,n){var i=Object.create(Ar.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Pr(){return Tr||(Tr=Sr(er(),_r()))}function Or(t,e,r){var n,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(r===U){if(!u)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(r===a.get(s)[1])return t;n=o,i=a.set(s,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Sr(n,i)}Ar.isOrderedMap=Tt,Ar.prototype[Y]=!0,Ar.prototype.delete=Ar.prototype.remove;function Dr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Ur=function(t){function e(t){return null==t?Rr():Dr(t)?t:Rr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=R(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):kr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Dr(e))return e;he(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):kr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rr()},e.prototype.slice=function(e,r){if(N(e,r,this.size))return this;var n=q(e,this.size);if(C(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):kr(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kr(this.size,this._head,t,this.__hash):0===this.size?Rr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new vt(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,r);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new vt(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new nt((function(){if(n){var e=n.value;return n=n.next,it(t,r++,e)}return{value:void 0,done:!0}}))},e}(H);Ur.isStack=Dr;var xr,zr=Ur.prototype;function kr(t,e,r,n){var i=Object.create(zr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Rr(){return xr||(xr=kr(0))}zr["@@__IMMUTABLE_STACK__@@"]=!0,zr.shift=zr.pop,zr.unshift=zr.push,zr.unshiftAll=zr.pushAll,zr.withMutations=Ce,zr.wasAltered=Be,zr.asImmutable=Ke,zr["@@transducer/init"]=zr.asMutable=Le,zr["@@transducer/step"]=function(t,e){return t.unshift(e)},zr["@@transducer/result"]=function(t){return t.asImmutable()};function Mr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function Nr(t){return Mr(t)&&tt(t)}function qr(t,e){if(t===e)return!0;if(!B(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||F(t)!==F(e)||V(t)!==V(e)||tt(t)!==tt(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!J(t);if(tt(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&St(i[1],t)&&(r||St(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate((function(e,n){if(r?!t.has(e):i?!St(e,t.get(n,U)):!St(t.get(n,U),e))return a=!1,!1}));return a&&t.size===s}function Cr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Lr(t){if(!t||"object"!=typeof t)return t;if(!B(t)){if(!ye(t))return t;t=ht(t)}if(F(t)){var e={};return t.__iterate((function(t,r){e[r]=Lr(t)})),e}var r=[];return t.__iterate((function(t){r.push(Lr(t))})),r}var Kr=function(t){function e(e){return null==e?Gr():Mr(e)&&!tt(e)?e:Gr().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.intersect=function(t){return(t=G(t).toArray()).length?Fr.intersect.apply(e(t.pop()),t):Gr()},e.union=function(t){return(t=G(t).toArray()).length?Fr.union.apply(e(t.pop()),t):Gr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Vr(this,this._map.set(t,t))},e.prototype.remove=function(t){return Vr(this,this._map.remove(t))},e.prototype.clear=function(){return Vr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this;return Vr(this,this._map.map((function(e){return t(e,e,r)}),e))},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n=0&&e=0&&r>>-15,461845907),e=Pt(e<<13|e>>>-13,5),e=Pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ot((e=Pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+pn(Dt(t),Dt(e))|0}:function(t,e){n=n+pn(Dt(t),Dt(e))|0}:e?function(t){n=31*n+Dt(t)|0}:function(t){n=n+Dt(t)|0}),n)}(this))}});var Yr=G.prototype;Yr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Yr[rt]=Yr.values,Yr.toJSON=Yr.toArray,Yr.__toStringMapper=ve,Yr.inspect=Yr.toSource=function(){return this.toString()},Yr.chain=Yr.flatMap,Yr.contains=Yr.includes,Cr(W,{flip:function(){return ie(this,Gt(this))},mapEntries:function(t,e){var r=this,n=0;return ie(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return ie(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var tn=W.prototype;tn["@@__IMMUTABLE_KEYED__@@"]=!0,tn[rt]=Yr.entries,tn.toJSON=Zr,tn.__toStringMapper=function(t,e){return ve(e)+": "+ve(t)},Cr(H,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(t,e){return ie(this,Qt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ie(this,Ht(this,!1))},slice:function(t,e){return ie(this,$t(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=q(t,t<0?this.count():this.size);var n=this.slice(0,t);return ie(this,1===r?n:n.concat(pe(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ie(this,Yt(this,t,!1))},get:function(t,e){return(t=R(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=R(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function pn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}en["@@__IMMUTABLE_INDEXED__@@"]=!0,en[Y]=!0,Cr(Q,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Q.prototype.has=Yr.includes,Q.prototype.contains=Q.prototype.includes,Cr(lt,W.prototype),Cr(dt,H.prototype),Cr(yt,Q.prototype);var fn=function(t){function e(t){return null==t?yn():Nr(t)?t:yn().withMutations((function(e){var r=Q(t);he(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Kr);fn.isOrderedSet=Nr;var hn,ln=fn.prototype;function dn(t,e){var r=Object.create(ln);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function yn(){return hn||(hn=dn(Pr()))}ln[Y]=!0,ln.zip=en.zip,ln.zipWith=en.zipWith,ln.__empty=yn,ln.__make=dn;var vn=function(t,e){var r,n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c2?[]:void 0,{"":t})}function En(t,e){return F(e)?e.toMap():e.toList()}var Tn=r(7),An=r.n(Tn),Sn=r(66),Pn=r.n(Sn),On=r(24),Dn=r.n(On),Un={TRACE:"trace",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};function xn(t){return D()(t)&&!An()(t)}function zn(t,e){return"[".concat((new Date).toISOString()," ").concat(t.toUpperCase()," ").concat("lattice","] ").concat(e)}Dn.a.setLevel(Dn.a.levels.INFO);var kn=function(){function t(e){I()(this,t),A()(this,"logger",void 0),A()(this,"name",void 0),this.logger=Dn.a.getLogger(e),this.name=e}return E()(t,[{key:"log",value:function(t,e){var r,n=zn(t,this.name);xn(e)?this.logger[t]("".concat(n," - ").concat(e)):(this.logger[t](n),t!==Un.TRACE&&(!Pn()(e)&&An()(e)||this.logger[t](e)));for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a0&&(r=this.logger)[t].apply(r,o)}},{key:"trace",value:function(t){this.log(Un.TRACE,t)}},{key:"debug",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],n="";if(Xn(t))if(Xn(e)){var i="".concat(t,".").concat(e);if(i.length<=63)return i;n="invalid FQN: FQNs must be <= ".concat(63," characters, got ").concat(i.length)}else n="invalid FQN: name must be a non-empty string";else n="invalid FQN: namespace must be a non-empty string";if(!0===r)throw Yn.error(n),new Error(n);return""}var ni=function(){function t(){if(I()(this,t),A()(this,"namespace",void 0),A()(this,"name",void 0),1!==arguments.length&&2!==arguments.length){var e="invalid parameter count: FQN takes only 1 or 2 parameters, got ".concat(arguments.length);throw Yn.error(e),new Error(e)}var r=ei.apply(void 0,arguments),n=r.namespace,i=r.name;ri(n,i,!0),this.namespace=n,this.name=i}return E()(t,[{key:"getNamespace",value:function(){return this.namespace}},{key:"getName",value:function(){return this.name}},{key:"toObject",value:function(){var t=this.namespace,e=this.name;return""===ri(t,e)?{namespace:"",name:""}:{namespace:t,name:e}}},{key:"toString",value:function(){return ri(this.namespace,this.name)}},{key:"valueOf",value:function(){return this.toString()}}]),t}();A()(ni,"of",(function(){for(var t=arguments.length,e=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",ho.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),ho.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=s,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),ho.error(n,e[ao]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))a=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=a;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),ho.error(n,e[uo]),Promise.reject(n);return Xn(r)&&ki[r]?Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("neighbors","?").concat("type","=").concat(r),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n))}function go(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!si(e)&&!ui(e))return n="invalid parameter: entityKeyIds must be a valid UUID or array of UUIDs",ho.error(n,e),Promise.reject(n);if(!ki[r])return n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n);var i=e;return"string"==typeof e&&(i=[e]),Ei("DataApi").delete("/".concat("set","/").concat(t,"?").concat("type","=").concat(r),{data:i}).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function _o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki.SOFT,r="";return si(t)?ki[e]?Ei("DataApi").delete("/".concat("set","/").concat(t,"/").concat("all","?").concat("type","=").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "deleteType" must be a valid DeleteType',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function bo(t,e){var r="";return si(t)?si(e)?Ei("DataApi").get("/".concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "entityKeyId" must be a valid UUID',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function wo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Io(t){var e="";return si(t)?Ei("DataApi").get("/".concat(t,"/").concat("count")).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",ho.error(e,t),Promise.reject(e))}function jo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("detailed"),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Eo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fi.PARTIAL_REPLACE,n="";if(!si(t))return n='invalid parameter: "entitySetId" must be a valid UUID',ho.error(n,t),Promise.reject(n);if(!$n(e))return n='invalid parameter: "entityData" must be a non-empty object',ho.error(n,t),Promise.reject(n);for(var i=Object.keys(e),o=0;o2&&void 0!==arguments[2])||arguments[2],n="";return si(t)?si(e)?!0===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "columns" must be a boolean',Oo.error(n,r),Promise.reject(n)):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function Uo(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";return si(t)?!0===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "columns" must be a boolean',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}function xo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n="";return si(t)?si(e)?!Po()(r)||r<=0?(n='invalid parameter: "count" must be a positive integer',Oo.error(n,e),Promise.reject(n)):Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat(r,"/").concat("data")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}var zo=r(5),ko=r.n(zo),Ro=r(23),Mo=r.n(Ro),No=new kn("EntityType"),qo=function(){function t(e){I()(this,t),A()(this,"baseType",void 0),A()(this,"category",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"key",void 0),A()(this,"properties",void 0),A()(this,"propertyTags",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.key=e.key,this.properties=e.properties,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.baseType)&&(this.baseType=e.baseType),Jn(e.category)&&(this.category=e.category),Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.propertyTags)&&(this.propertyTags=e.propertyTags)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={key:this.key,properties:this.properties,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),Jn(this.baseType)&&(t.baseType=this.baseType),Jn(this.category)&&(t.category=this.category),Jn(this.propertyTags)&&(t.propertyTags=this.propertyTags),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Co=function(){function t(e){I()(this,t),A()(this,"baseType",void 0),A()(this,"category",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"key",void 0),A()(this,"properties",void 0),A()(this,"propertyTags",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setBaseType(e.get("baseType")),this.setCategory(e.get("category")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setKey(e.get("key")),this.setPropertyTags(e.get("propertyTags")),this.setPropertyTypes(e.get("properties")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setBaseType(e.baseType),this.setCategory(e.category),this.setDescription(e.description),this.setId(e.id),this.setKey(e.key),this.setPropertyTags(e.propertyTags),this.setPropertyTypes(e.properties),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setBaseType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "baseType" must be a valid UUID');return this.baseType=t,this}},{key:"setCategory",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ki[t])throw new Error('invalid parameter: "category" must be a valid SecurableType');return this.category=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.id=t,this}},{key:"setKey",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "key" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "key" must be a non-empty array of UUIDs');return this.key=e.toJS(),this}},{key:"setPropertyTags",value:function(t){if(!Jn(t))return this;var e=t;if(B(e)&&(e=e.toJS()),Wn(e))return this;if(!ci(e,si))throw new Error('invalid parameter: "propertyTags" must be a valid multimap object');return this.propertyTags=e,this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "propertyTypes" must be a non-empty array of UUIDs');return this.properties=e.toJS(),this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.key||(this.key=[]),this.properties||(this.properties=[]),this.propertyTags||(this.propertyTags={}),this.schemas||(this.schemas=[]),new qo({baseType:this.baseType,category:this.category,description:this.description,id:this.id,key:this.key,properties:this.properties,propertyTags:this.propertyTags,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Lo=new kn("AssociationType"),Ko=function(){function t(e){I()(this,t),A()(this,"bidirectional",void 0),A()(this,"dst",void 0),A()(this,"entityType",void 0),A()(this,"src",void 0),this.bidirectional=e.bidirectional,this.entityType=e.entityType,this.dst=e.dst,this.src=e.src}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{bidirectional:this.bidirectional,dst:this.dst,entityType:this.entityType.toObject(),src:this.src}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Bo=function(){function t(e){I()(this,t),A()(this,"bidirectional",void 0),A()(this,"destinationEntityTypeIds",void 0),A()(this,"entityType",void 0),A()(this,"sourceEntityTypeIds",void 0),Z(e)?(this.setBidirectional(e.get("bidirectional")),this.setDestinationEntityTypeIds(e.get("dst")),this.setEntityType(e.get("entityType")),this.setSourceEntityTypeIds(e.get("src"))):Jn(e)&&(this.setBidirectional(e.bidirectional),this.setDestinationEntityTypeIds(e.dst),this.setEntityType(e.entityType),this.setSourceEntityTypeIds(e.src))}return E()(t,[{key:"setBidirectional",value:function(t){if(!Mo()(t))throw new Error('invalid parameter: "bidirectional" must be a boolean');return this.bidirectional=t,this}},{key:"setEntityType",value:function(t){return this.entityType=new Co(t).build(),this}},{key:"setDestinationEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "destinationEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "destinationEntityTypeIds" must be a non-empty array of UUIDs');return this.destinationEntityTypeIds=e.toJS(),this}},{key:"setSourceEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "sourceEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "sourceEntityTypeIds" must be a non-empty array of UUIDs');return this.sourceEntityTypeIds=e.toJS(),this}},{key:"build",value:function(){if(null===this.bidirectional||void 0===this.bidirectional)throw new Error('missing property: "bidirectional" is a required property');if(!this.entityType)throw new Error('missing property: "entityType" is a required property');return this.destinationEntityTypeIds||(this.destinationEntityTypeIds=[]),this.sourceEntityTypeIds||(this.sourceEntityTypeIds=[]),new Ko({bidirectional:this.bidirectional,dst:this.destinationEntityTypeIds,entityType:this.entityType,src:this.sourceEntityTypeIds})}}]),t}(),Fo=new kn("PropertyType"),Vo=function(){function t(e){I()(this,t),A()(this,"analyzer",void 0),A()(this,"datatype",void 0),A()(this,"description",void 0),A()(this,"enumValues",void 0),A()(this,"id",void 0),A()(this,"indexType",void 0),A()(this,"multiValued",void 0),A()(this,"pii",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.datatype=e.datatype,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.analyzer)&&(this.analyzer=e.analyzer),Jn(e.description)&&(this.description=e.description),Jn(e.enumValues)&&(this.enumValues=e.enumValues),Jn(e.id)&&(this.id=e.id),Jn(e.indexType)&&(this.indexType=e.indexType),Jn(e.multiValued)&&(this.multiValued=e.multiValued),Jn(e.pii)&&(this.pii=e.pii)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={datatype:this.datatype,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.analyzer)&&(t.analyzer=this.analyzer),Jn(this.description)&&(t.description=this.description),Jn(this.enumValues)&&(t.enumValues=this.enumValues),Jn(this.id)&&(t.id=this.id),Jn(this.indexType)&&(t.indexType=this.indexType),Jn(this.multiValued)&&(t.multiValued=this.multiValued),Jn(this.pii)&&(t.pii=this.pii),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Jo=function(){function t(e){I()(this,t),A()(this,"analyzer",void 0),A()(this,"datatype",void 0),A()(this,"description",void 0),A()(this,"enumValues",void 0),A()(this,"id",void 0),A()(this,"indexType",void 0),A()(this,"multiValued",void 0),A()(this,"pii",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setAnalyzer(e.get("analyzer")),this.setDataType(e.get("datatype")),this.setDescription(e.get("description")),this.setEnumValues(e.get("enumValues")),this.setId(e.get("id")),this.setIndexType(e.get("indexType")),this.setMultiValued(e.get("multiValued")),this.setPII(e.get("pii")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setAnalyzer(e.analyzer),this.setDataType(e.datatype),this.setDescription(e.description),this.setEnumValues(e.enumValues),this.setId(e.id),this.setIndexType(e.indexType),this.setMultiValued(e.multiValued),this.setPII(e.pii),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setAnalyzer",value:function(t){if(!Jn(t)||Hn(t))return this;if(!zi[t])throw new Error("invalid parameter: analyzer must be a valid AnalyzerType");return this.analyzer=t,this}},{key:"setDataType",value:function(t){if(!Xn(t))throw new Error("invalid parameter: datatype must be a non-empty string");return this.datatype=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error("invalid parameter: description must be a non-empty string");return this.description=t,this}},{key:"setEnumValues",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "values" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "values" must be a non-empty array of non-empty strings');return this.enumValues=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error("invalid parameter: propertyTypeId must be a valid UUID");return this.id=t,this}},{key:"setIndexType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ni[t])throw new Error("invalid parameter: indexType must be a valid IndexType");return this.indexType=t,this}},{key:"setMultiValued",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: multiValued must be a boolean");return this.multiValued=t,this}},{key:"setPII",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: pii must be a boolean");return this.pii=t,this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!Jn(this.datatype))throw new Error('missing property: "datatype" is a required property');if(!Jn(this.title))throw new Error('missing property: "title" is a required property');if(!Jn(this.type))throw new Error('missing property: "type" is a required property');return this.schemas||(this.schemas=[]),new Vo({analyzer:this.analyzer,datatype:this.datatype,description:this.description,enumValues:this.enumValues,id:this.id,indexType:this.indexType,multiValued:this.multiValued,pii:this.pii,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Go=new kn("Schema"),Wo=function(){function t(e){I()(this,t),A()(this,"entityTypes",void 0),A()(this,"fqn",void 0),A()(this,"propertyTypes",void 0),this.entityTypes=e.entityTypes,this.fqn=e.fqn,this.propertyTypes=e.propertyTypes}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityTypes:this.entityTypes.map((function(t){return t.toObject()})),fqn:this.fqn.toObject(),propertyTypes:this.propertyTypes.map((function(t){return t.toObject()}))}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Ho=function(){function t(e){I()(this,t),A()(this,"entityTypes",void 0),A()(this,"fqn",void 0),A()(this,"propertyTypes",void 0),Z(e)?(this.setEntityTypes(e.get("entityTypes")),this.setFQN(e.get("fqn")),this.setPropertyTypes(e.get("propertyTypes"))):Jn(e)&&(this.setEntityTypes(e.entityTypes),this.setFQN(e.fqn),this.setPropertyTypes(e.propertyTypes))}return E()(t,[{key:"setEntityTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entityTypes" must be an array');try{this.entityTypes=Kr(t).map((function(t){return new Co(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "entityTypes" must be an array of EntityTypes')}return this}},{key:"setFQN",value:function(t){return this.fqn=ni.of(t),this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');try{this.propertyTypes=Kr(t).map((function(t){return new Jo(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "propertyTypes" must be an array of PropertyTypes')}return this}},{key:"build",value:function(){if(!this.fqn)throw new Error('missing property: "fqn" is a required property');return this.entityTypes||(this.entityTypes=[]),this.propertyTypes||(this.propertyTypes=[]),new Wo({entityTypes:this.entityTypes,fqn:this.fqn,propertyTypes:this.propertyTypes})}}]),t}(),Qo=function(t){return pi(t,Ho,Go)},$o=new kn("EntityDataModelApi");function Xo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function Zo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(r,e),Promise.reject(r)):(r='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(r,t),Promise.reject(r))}function Yo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ta(t){var e="";return pi(t,Bo,Lo)?Ei(ii).post("/".concat("association/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationType" must be a valid AssociationType',$o.error(e,t),Promise.reject(e))}function ea(t){var e="";return pi(t,Co,No)?Ei(ii).post("/".concat("entity/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityType" must be a valid EntityType',$o.error(e,t),Promise.reject(e))}function ra(t){var e="";return pi(t,Jo,Fo)?Ei(ii).post("/".concat("property/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyType" must be a valid PropertyType',$o.error(e,t),Promise.reject(e))}function na(t){var e="";return Qo(t)?Ei(ii).post("/".concat("schema"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "schema" must be a valid Schema',$o.error(e,t),Promise.reject(e))}function ia(t){var e="";return si(t)?Ei(ii).delete("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function oa(t){var e="";return si(t)?Ei(ii).delete("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function aa(t){var e="";return si(t)?Ei(ii).delete("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function sa(){return Ei(ii).get("/".concat("association/type","/").concat("entity/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ua(){return Ei(ii).get("/".concat("association/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ca(){return Ei(ii).get("/".concat("entity/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function pa(){return Ei(ii).get("/".concat("property/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function fa(){return Ei(ii).get("/".concat("schema")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ha(t){var e="";return si(t)?Ei(ii).get("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function la(){return Ei(ii).get("/").then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function da(t){var e="";return ai(t,$n)?Ei(ii).post("/",t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "projection" must be an array of objects',$o.error(e,t),Promise.reject(e))}function ya(t){var e="";return si(t)?Ei(ii).get("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function va(t){var e="";return si(t)?Ei(ii).get("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function ma(t){var e="";if(!ni.isValid(t))return e='invalid parameter: "schemaFQN" must be a valid FQN',$o.error(e,t),Promise.reject(e);var r=t.namespace,n=t.name;return Ei(ii).get("/".concat("schema","/").concat(r,"/").concat(n)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ga(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function _a(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: propertyTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ba(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function wa(t,e){var r="";return si(t)?$n(e)?ko()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",$o.error(r,e.type),Promise.reject(r)):ko()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",$o.error(r,e.name),Promise.reject(r)):ko()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",$o.error(r,e.title),Promise.reject(r)):ko()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",$o.error(r,e.description),Promise.reject(r)):ko()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",$o.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("entity/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function Ia(t,e){var r="";return si(t)?$n(e)?ko()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",$o.error(r,e.type),Promise.reject(r)):ko()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",$o.error(r,e.name),Promise.reject(r)):ko()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",$o.error(r,e.title),Promise.reject(r)):ko()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",$o.error(r,e.description),Promise.reject(r)):ko()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",$o.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("property/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: propertyTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ja(t){var e="";if(!Qo(t))return e='invalid parameter: "schema" must be a valid Schema',$o.error(e,t),Promise.reject(e);var r={action:xi.REPLACE,entityTypes:t.entityTypes.map((function(t){return t.id})),propertyTypes:t.propertyTypes.map((function(t){return t.id}))};return Ei(ii).patch("/".concat("schema","/").concat(t.fqn.namespace,"/").concat(t.fqn.name),r).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}var Ea=new kn("EntitySet"),Ta=function(){function t(e){I()(this,t),A()(this,"contacts",void 0),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"flags",void 0),A()(this,"id",void 0),A()(this,"linkedEntitySets",void 0),A()(this,"name",void 0),A()(this,"organizationId",void 0),A()(this,"title",void 0),this.contacts=e.contacts,this.entityTypeId=e.entityTypeId,this.name=e.name,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.flags)&&(this.flags=e.flags),Jn(e.id)&&(this.id=e.id),Jn(e.linkedEntitySets)&&(this.linkedEntitySets=e.linkedEntitySets),Jn(e.organizationId)&&(this.organizationId=e.organizationId)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={contacts:this.contacts,entityTypeId:this.entityTypeId,name:this.name,title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.flags)&&(t.flags=this.flags),Jn(this.id)&&(t.id=this.id),Jn(this.linkedEntitySets)&&(t.linkedEntitySets=this.linkedEntitySets),Jn(this.organizationId)&&(t.organizationId=this.organizationId),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Aa=function(){function t(e){I()(this,t),A()(this,"contacts",void 0),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"flags",void 0),A()(this,"id",void 0),A()(this,"linkedEntitySets",void 0),A()(this,"name",void 0),A()(this,"organizationId",void 0),A()(this,"title",void 0),Z(e)?(this.setContacts(e.get("contacts")),this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setFlags(e.get("flags")),this.setId(e.get("id")),this.setLinkedEntitySets(e.get("linkedEntitySets")),this.setName(e.get("name")),this.setOrganizationId(e.get("organizationId")),this.setTitle(e.get("title"))):Jn(e)&&(this.setContacts(e.contacts),this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setFlags(e.flags),this.setId(e.id),this.setLinkedEntitySets(e.linkedEntitySets),this.setName(e.name),this.setOrganizationId(e.organizationId),this.setTitle(e.title))}return E()(t,[{key:"setContacts",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "contacts" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "contacts" must be a non-empty array of non-empty strings');return this.contacts=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setFlags",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "flags" must be an array');var e=Kr(t);if(!e.every((function(t){return Xn(t)&&Ri[t]})))throw new Error('invalid parameter: "flags" must be an array of EntitySetFlagTypes');return this.flags=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entitySetId" must be a valid UUID');return this.id=t,this}},{key:"setLinkedEntitySets",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entitySetIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "entitySetIds" must be a non-empty array of UUIDs');return this.linkedEntitySets=e.toJS(),this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setOrganizationId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.contacts||(this.contacts=[]),new Ta({contacts:this.contacts,description:this.description,entityTypeId:this.entityTypeId,flags:this.flags,id:this.id,linkedEntitySets:this.linkedEntitySets,name:this.name,organizationId:this.organizationId,title:this.title})}}]),t}(),Sa=function(t){return pi(t,Aa,Ea)},Pa=new kn("EntitySetsApi");function Oa(t){var e="";return Qn(t)?t.every(Sa)?Ei("EntitySetsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySets must be a non-empty array of valid EntitySets",Pa.error(e,t),Promise.reject(e)):(e="invalid parameter: entitySets must be a non-empty array",Pa.error(e,t),Promise.reject(e))}function Da(t){var e="";return si(t)?Ei("EntitySetsApi").delete("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Pa.error(e,t),Promise.reject(e))}function Ua(){return Ei("EntitySetsApi").get("/").then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)}))}function xa(t){var e="";return si(t)?Ei("EntitySetsApi").get("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Pa.error(e,t),Promise.reject(e))}function za(t){var e="";return Xn(t)?Ei("EntitySetsApi").get("/".concat("ids","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetName must be a non-empty string",Pa.error(e,t),Promise.reject(e))}function ka(t){var e="";return Qn(t)?t.every(Xn)?Ei("EntitySetsApi").post("/".concat("ids"),t).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetNames" must be an array of strings',Pa.error(e,t),Promise.reject(e)):(e='invalid parameter: "entitySetNames" must be a non-empty array',Pa.error(e,t),Promise.reject(e))}function Ra(t){var e="";if(!Qn(t))return e='invalid parameter: "idsOrNames" must be a non-empty array',Pa.error(e,t),Promise.reject(e);var r=Kr(t);return r.every(si)?Ei("EntitySetsApi").post("/".concat("by-id"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):r.every(Xn)?Ei("EntitySetsApi").post("/".concat("by-name"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e='invalid parameter: "idsOrNames" must be an array of EntitySet ids or names',Pa.error(e,t),Promise.reject(e))}function Ma(t,e){var r="";return si(t)?Jn(e)?Jn(e)&&!si(e)?(r="invalid parameter: propertyTypeId must be a valid UUID",Pa.error(r,e),Promise.reject(r)):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("properties","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("metadata")).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(r="invalid parameter: entitySetId must be a valid UUID",Pa.error(r,t),Promise.reject(r))}function Na(t){var e="";if(!ui(t))return e="invalid parameter: entitySetIds must be a valid UUID array",Pa.error(e,t),Promise.reject(e);var r=Kr(t).toJS();return Ei("EntitySetsApi").post("/".concat("all","/").concat("metadata"),r).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)}))}var qa=new kn("Principal"),Ca=function(){function t(e){I()(this,t),A()(this,"id",void 0),A()(this,"type",void 0),this.id=e.id,this.type=e.type}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{id:this.id,type:this.type}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),La=function(){function t(e){I()(this,t),A()(this,"id",void 0),A()(this,"type",void 0),Z(e)?(this.setId(e.get("id")),this.setType(e.get("type"))):Jn(e)&&(this.setId(e.id),this.setType(e.type))}return E()(t,[{key:"setId",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "id" must be a non-empty string');return this.id=t,this}},{key:"setType",value:function(t){if(!Ci[t])throw new Error('invalid parameter: "type" must be a valid PrincipalType');return this.type=t,this}},{key:"build",value:function(){if(!this.id)throw new Error('missing property: "id" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');return new Ca({id:this.id,type:this.type})}}]),t}(),Ka=(new kn("Ace"),function(){function t(e){I()(this,t),A()(this,"permissions",void 0),A()(this,"principal",void 0),this.principal=e.principal,this.permissions=e.permissions}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{permissions:this.permissions,principal:this.principal.toObject()}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Ba=function(){function t(e){I()(this,t),A()(this,"permissions",void 0),A()(this,"principal",void 0),Z(e)?(this.setPermissions(e.get("permissions")),this.setPrincipal(e.get("principal"))):Jn(e)&&(this.setPermissions(e.permissions),this.setPrincipal(e.principal))}return E()(t,[{key:"setPermissions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "permissions" must be an array');var e=fn(t);if(!e.every((function(t){return qi[t]})))throw new Error('invalid parameter: "permissions" must be an array of PermissionTypes');return this.permissions=e.toJS(),this}},{key:"setPrincipal",value:function(t){return this.principal=new La(t).build(),this}},{key:"build",value:function(){if(this.permissions||(this.permissions=[]),!this.principal)throw new Error("missing property: principal is a required property");return new Ka({permissions:this.permissions,principal:this.principal})}}]),t}(),Fa=(new kn("Acl"),function(){function t(e){I()(this,t),A()(this,"aces",void 0),A()(this,"aclKey",void 0),this.aces=e.aces,this.aclKey=e.aclKey}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{aces:this.aces.map((function(t){return t.toObject()})),aclKey:this.aclKey}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Va=function(){function t(e){I()(this,t),A()(this,"aces",void 0),A()(this,"aclKey",void 0),Z(e)?(this.setAces(e.get("aces")),this.setAclKey(e.get("aclKey"))):Jn(e)&&(this.setAces(e.aces),this.setAclKey(e.aclKey))}return E()(t,[{key:"setAces",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aces" must be an array');try{this.aces=hr(t).map((function(t){return new Ba(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "aces" must be an array of Aces')}return this}},{key:"setAclKey",value:function(t){if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aclKey" must be an array');var e=fn(t);if(e.isEmpty()||!e.every(si))throw new Error('invalid parameter: "aclKey" must be a non-empty array of UUIDs');return this.aclKey=e.toJS(),this}},{key:"build",value:function(){if(this.aces||(this.aces=[]),!this.aclKey)throw new Error('missing property: "aclKey" is a required property');return new Fa({aces:this.aces,aclKey:this.aclKey})}}]),t}(),Ja=new kn("AclData"),Ga=function(){function t(e){I()(this,t),A()(this,"acl",void 0),A()(this,"action",void 0),this.acl=e.acl,this.action=e.action}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{acl:this.acl.toObject(),action:this.action}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Wa=function(){function t(e){I()(this,t),A()(this,"acl",void 0),A()(this,"action",void 0),Z(e)?(this.setAcl(e.get("acl")),this.setAction(e.get("action"))):Jn(e)&&(this.setAcl(e.acl),this.setAction(e.action))}return E()(t,[{key:"setAcl",value:function(t){return this.acl=new Va(t).build(),this}},{key:"setAction",value:function(t){if(!xi[t])throw new Error('invalid parameter: "action" must be a valid ActionType');return this.action=t,this}},{key:"build",value:function(){if(!this.acl)throw new Error('missing property: "acl" is a required property');if(!this.action)throw new Error('missing property: "action" is a required property');return new Ga({acl:this.acl,action:this.action})}}]),t}(),Ha=function(t){return pi(t,Wa,Ja)},Qa=(new kn("App"),function(){function t(e){I()(this,t),A()(this,"appTypeIds",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"name",void 0),A()(this,"title",void 0),A()(this,"url",void 0),this.appTypeIds=e.appTypeIds,this.name=e.name,this.title=e.title,this.url=e.url,Jn(e.id)&&(this.id=e.id),Jn(e.description)&&(this.description=e.description)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={appTypeIds:this.appTypeIds,name:this.name,title:this.title,url:this.url};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),$a=function(){function t(e){I()(this,t),A()(this,"appTypeIds",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"name",void 0),A()(this,"title",void 0),A()(this,"url",void 0),Z(e)?(this.setAppTypeIds(e.get("appTypeIds")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setName(e.get("name")),this.setTitle(e.get("title")),this.setUrl(e.get("url"))):Jn(e)&&(this.setAppTypeIds(e.appTypeIds),this.setDescription(e.description),this.setId(e.id),this.setName(e.name),this.setTitle(e.title),this.setUrl(e.url))}return E()(t,[{key:"setAppTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appTypeIds" must be a non-empty array of UUIDs');return this.appTypeIds=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setUrl",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "url" must be a non-empty string');return this.url=t,this}},{key:"build",value:function(){if(this.appTypeIds||(this.appTypeIds=[]),!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.url)throw new Error('missing property: "url" is a required property');return new Qa({appTypeIds:this.appTypeIds,description:this.description,id:this.id,name:this.name,title:this.title,url:this.url})}}]),t}(),Xa=(new kn("AppType"),function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"id",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.entityTypeId=e.entityTypeId,this.title=e.title,this.type=e.type,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={entityTypeId:this.entityTypeId,title:this.title,type:this.type.toObject()};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Za=function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"id",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setId(e.get("id")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setId(e.id),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "appTypeId" must be a valid UUID');return this.id=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new Xa({description:this.description,entityTypeId:this.entityTypeId,id:this.id,title:this.title,type:this.type})}}]),t}(),Ya=(new kn("EntityDataKey"),function(){function t(e){I()(this,t),A()(this,"entityKeyId",void 0),A()(this,"entitySetId",void 0),this.entityKeyId=e.entityKeyId,this.entitySetId=e.entitySetId}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityKeyId:this.entityKeyId,entitySetId:this.entitySetId}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),ts=function(){function t(e){I()(this,t),A()(this,"entityKeyId",void 0),A()(this,"entitySetId",void 0),Z(e)?(this.setEntityKeyId(e.get("entityKeyId")),this.setEntitySetId(e.get("entitySetId"))):Jn(e)&&(this.setEntityKeyId(e.entityKeyId),this.setEntitySetId(e.entitySetId))}return E()(t,[{key:"setEntityKeyId",value:function(t){if(!si(t))throw new Error("invalid parameter: entityKeyId must be a valid UUID");return this.entityKeyId=t,this}},{key:"setEntitySetId",value:function(t){if(!si(t))throw new Error("invalid parameter: entitySetId must be a valid UUID");return this.entitySetId=t,this}},{key:"build",value:function(){if(!this.entityKeyId)throw new Error("missing property: entityKeyId is a required property");if(!this.entitySetId)throw new Error("missing property: entitySetId is a required property");return new Ya({entityKeyId:this.entityKeyId,entitySetId:this.entitySetId})}}]),t}(),es=new kn("Grant"),rs=function(){function t(e){I()(this,t),A()(this,"attribute",void 0),A()(this,"grantType",void 0),A()(this,"mappings",void 0),this.attribute=e.attribute,this.grantType=e.grantType,this.mappings=e.mappings}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{attribute:this.attribute,grantType:this.grantType,mappings:this.mappings}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),ns=function(){function t(e){I()(this,t),A()(this,"attribute",void 0),A()(this,"grantType",void 0),A()(this,"mappings",void 0),Z(e)?(this.setAttribute(e.get("attribute")),this.setGrantType(e.get("grantType")),this.setMappings(e.get("mappings"))):Jn(e)&&(this.setAttribute(e.attribute),this.setGrantType(e.grantType),this.setMappings(e.mappings))}return E()(t,[{key:"setAttribute",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "attribute" must be a string');return this.attribute=t,this}},{key:"setGrantType",value:function(t){if(!Object.values(Mi).includes(t))throw new Error('invalid parameter: "grantType" must be a valid GrantType');return this.grantType=t,this}},{key:"setMappings",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "mappings" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "mappings" must be a non-empty array of non-empty strings');return this.mappings=e.toJS(),this}},{key:"build",value:function(){if(this.attribute||(this.attribute=""),!this.grantType)throw new Error("missing property: grantType is a required property");return this.mappings||(this.mappings=[]),new rs({attribute:this.attribute,grantType:this.grantType,mappings:this.mappings})}}]),t}(),is=function(t){return pi(t,ns,es)},os=r(14),as=r.n(os),ss=r(72),us=r.n(ss),cs=new kn("Role"),ps=function(){function t(e){I()(this,t),A()(this,"aclKey",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"organizationId",void 0),A()(this,"principal",void 0),A()(this,"title",void 0),this.organizationId=e.organizationId,this.principal=e.principal,this.title=e.title,this[Zi]="com.openlattice.organization.roles.Role",Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.aclKey=[e.organizationId,e.id],this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={organizationId:this.organizationId,principal:this.principal.toObject(),title:this.title};return t[Zi]="com.openlattice.organization.roles.Role",Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.aclKey=[this.organizationId,this.id],t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),fs=function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"organizationId",void 0),A()(this,"principal",void 0),A()(this,"title",void 0),Z(e)?(this.setDescription(e.get("description")),this.setId(e.get("id")),this.setOrganizationId(e.get("organizationId")),this.setPrincipal(e.get("principal")),this.setTitle(e.get("title"))):Jn(e)&&(this.setDescription(e.description),this.setId(e.id),this.setOrganizationId(e.organizationId),this.setPrincipal(e.principal),this.setTitle(e.title))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setOrganizationId",value:function(t){if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setPrincipal",value:function(t){return this.principal=new La(t).build(),this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.organizationId)throw new Error('missing property: "organizationId" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new ps({description:this.description,id:this.id,organizationId:this.organizationId,principal:this.principal,title:this.title})}}]),t}(),hs=new kn("Organization"),ls=function(){function t(e){I()(this,t),A()(this,"apps",void 0),A()(this,"connections",void 0),A()(this,"description",void 0),A()(this,"emailDomains",void 0),A()(this,"grants",void 0),A()(this,"id",void 0),A()(this,"members",void 0),A()(this,"partitions",void 0),A()(this,"principal",void 0),A()(this,"roles",void 0),A()(this,"title",void 0),this.apps=e.apps,this.emailDomains=e.emailDomains,this.connections=e.connections,this.grants=e.grants,this.members=e.members,this.principal=e.principal,this.roles=e.roles,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.partitions)&&(this.partitions=e.partitions)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={apps:this.apps,connections:this.connections,emailDomains:this.emailDomains,grants:us()(this.grants,(function(t){return t.toObject()})),members:this.members.map((function(t){return t.toObject()})),principal:this.principal.toObject(),roles:this.roles.map((function(t){return t.toObject()})),title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),Jn(this.partitions)&&(t.partitions=this.partitions),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),ds=function(){function t(e){I()(this,t),A()(this,"apps",void 0),A()(this,"connections",void 0),A()(this,"description",void 0),A()(this,"emailDomains",void 0),A()(this,"grants",void 0),A()(this,"id",void 0),A()(this,"members",void 0),A()(this,"partitions",void 0),A()(this,"principal",void 0),A()(this,"roles",void 0),A()(this,"title",void 0),Z(e)?(this.setApps(e.get("apps")),this.setConnections(e.get("connections")),this.setDescription(e.get("description")),this.setEmailDomains(e.get("emailDomains")),this.setGrants(e.get("grants")),this.setId(e.get("id")),this.setMembers(e.get("members")),this.setPartitions(e.get("partitions")),this.setPrincipal(e.get("principal")),this.setRoles(e.get("roles")),this.setTitle(e.get("title"))):Jn(e)&&(this.setApps(e.apps),this.setConnections(e.connections),this.setDescription(e.description),this.setEmailDomains(e.emailDomains),this.setGrants(e.grants),this.setId(e.id),this.setMembers(e.members),this.setPartitions(e.partitions),this.setPrincipal(e.principal),this.setRoles(e.roles),this.setTitle(e.title))}return E()(t,[{key:"setApps",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appIds" must be a non-empty array of UUIDs');return this.apps=e.toJS(),this}},{key:"setConnections",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "connections" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "connections" must be a non-empty array of non-empty strings');return this.connections=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEmailDomains",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "emailDomains" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "emailDomains" must be a non-empty array of non-empty strings');return this.emailDomains=e.toJS(),this}},{key:"setGrants",value:function(t){if(!Jn(t))return this;if(!Ln()(t)&&!B(t))throw new Error('invalid parameter: "grants" must be an object');var e=Fe(t);if(!e.keySeq().every(si))throw new Error('invalid parameter: "grants" must be an object where all keys are valid UUIDs');if(!e.valueSeq().every(is))throw new Error('invalid parameter: "grants" must be an object where all values are valid Grants');return this.grants=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.id=t,this}},{key:"setMembers",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "members" must be an array');try{this.members=Kr(t).map((function(t){return new La(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "members" must be an array of Principals')}return this}},{key:"setPartitions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "partitions" must be an array');var e=hr(t);if(!e.every(as.a))throw new Error('invalid parameter: "partitions" must be a non-empty array of numbers');return this.partitions=e.toJS(),this}},{key:"setPrincipal",value:function(t){if(this.principal=new La(t).build(),this.principal.type!==Ci.ORGANIZATION)throw new Error('invalid parameter: "principal" must be PrincipalType.ORGANIZATION');return this}},{key:"setRoles",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "roles" must be an array');try{this.roles=Kr(t).map((function(t){return new fs(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "roles" must be an array of Roles')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');return this.apps||(this.apps=[]),this.connections||(this.connections=[]),this.emailDomains||(this.emailDomains=[]),this.grants||(this.grants={}),this.members||(this.members=[]),this.roles||(this.roles=[]),new ls({apps:this.apps,connections:this.connections,description:this.description,emailDomains:this.emailDomains,grants:this.grants,id:this.id,members:this.members,partitions:this.partitions,principal:this.principal,roles:this.roles,title:this.title})}}]),t}(),ys=new kn("PermissionsApi");function vs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function ms(t){var e="";return Qn(t)?t.every((function(t){return t.every(si)}))?Ei("PermissionsApi").post("/".concat("bulk"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKeys" is not valid UUID[][]',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKeys" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function gs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/".concat("explain"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function _s(t){var e="";return Ha(t)?Ei("PermissionsApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be a valid AclData object",ys.error(e,t),Promise.reject(e))}function bs(t){var e="";return Qn(t)?t.every(Ha)?Ei("PermissionsApi").patch("/".concat("update"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be an array of valid AclData objects",ys.error(e,t),Promise.reject(e)):(e="invalid parameter: aclData must be a non-empty array",ys.error(e,t),Promise.reject(e))}var ws=new kn("OrganizationsApi"),Is={headers:{"Content-Type":"text/plain"}};function js(t,e,r){var n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",ws.error(n,t),Promise.reject(n);if(!Xn(e))return n="invalid parameter: principalId must be a non-empty string",ws.error(n,e),Promise.reject(n);if(!Xn(r)||!xi[r])return n="invalid parameter: action must be a valid ActionType",ws.error(n,r),Promise.reject(n);var i=(new La).setId(e).setType(Ci.ORGANIZATION).build(),o=(new Ba).setPermissions([qi.READ]).setPrincipal(i).build(),a=(new Va).setAclKey([t]).setAces([o]).build();return _s((new Wa).setAction(r).setAcl(a).build())}function Es(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "connections" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("connections"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Ts(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("email-domains"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function As(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function Ss(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Ps(t){var e="";return pi(t,ds,hs)?Ei("OrganizationsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organization" must be a valid Organization',ws.error(e,t),Promise.reject(e))}function Os(t){var e="";return pi(t,fs,cs)?Ei("OrganizationsApi").post("/".concat("roles"),t).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "role" must be a valid Role',ws.error(e,t),Promise.reject(e))}function Ds(t){var e="";return si(t)?Ei("OrganizationsApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function Us(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "roleId" must be a valid UUID',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function xs(){return Ei("OrganizationsApi").get("/").then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function zs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function ks(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("database")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function Rs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("entity-sets")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Ms(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("integration")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Ns(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("members")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function qs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Cs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",ws.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",ws.error(r,t),Promise.reject(r))}function Ls(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",ws.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",ws.error(r,t),Promise.reject(r))}function Ks(t,e){return js(t,e,xi.ADD)}function Bs(t,e){var r,n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n="invalid parameter: connections must be an array of strings",ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("connections"),{data:r}).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Fs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("email-domains"),{data:r}).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Vs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function Js(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Gs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").patch("/".concat(t,"/").concat("database"),e,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "databaseName" must be a non-empty string',ws.error(r,t),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function Ws(t,e){return js(t,e,xi.REMOVE)}function Hs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Hn(e))r="";else{if(!Xn(e))return n='invalid parameter: "description" must be a non-empty string',ws.error(n,e),Promise.reject(n);r=e}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("description"),r,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Qs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("title"),e,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "title" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function $s(t,e,r){var n,i="";if(!si(t))return i='invalid parameter: "organizationId" must be a valid UUID',ws.error(i,t),Promise.reject(i);if(!si(e))return i='invalid parameter: "roleId" must be a valid UUID',ws.error(i,e),Promise.reject(i);if(!Jn(r)||Hn(r))n="";else{if(!Xn(r))return i='invalid parameter: "description" must be a non-empty string',ws.error(i,r),Promise.reject(i);n=r}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("description"),n,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Xs(t,e,r){var n="";return si(t)?si(e)?is(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("grant"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "grant" must be a valid Grant',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Zs(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("title"),r,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "title" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}var Ys=new kn("PersistentSearchApi");function tu(t){var e="";return $n(t)?Ei("PersistentSearchApi").post("",t).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearch" must be a non-empty object',Ys.error(e,t),Promise.reject(e))}function eu(t){var e="";return si(t)?Ei("PersistentSearchApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearchId" must be a valid UUID',Ys.error(e,t),Promise.reject(e))}function ru(t){var e="";return Mo()(t)?Ei("PersistentSearchApi").get("?includeExpired=".concat(t)).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "includeExpired" must be a boolean',Ys.error(e,t),Promise.reject(e))}function nu(t,e){var r="";return si(t)?Xn(e)?Ei("PersistentSearchApi").patch("/".concat(t,"/").concat("expiration"),e).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(r='invalid parameter: "expiration" must be a valid string',Ys.error(r,t),Promise.reject(r)):(r='invalid parameter: "persistentSearchId" must be a valid UUID',Ys.error(r,t),Promise.reject(r))}var iu=new kn("PrincipalsApi");function ou(){return Ei("PrincipalsApi").get("/".concat("roles")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function au(){return Ei("PrincipalsApi").get("/".concat("users")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function su(){return Ei("PrincipalsApi").get("/".concat("roles","/").concat("current")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function uu(t){var e="";return pi(t,La,qa)?Ei("PrincipalsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: principal must be a valid Principal",iu.error(e,t),Promise.reject(e))}function cu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat(t)).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: userId must be a non-empty string",iu.error(e,t),Promise.reject(e))}function pu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat("search","/").concat(t)).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: searchQuery must be a non-empty string",iu.error(e,t),Promise.reject(e))}function fu(){return Ei("PrincipalsApi").get("/".concat("sync")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}var hu=new kn("SearchApi");function lu(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",hu.error(n,t),Promise.reject(n);if("boolean"!=typeof r)return n="invalid parameter: idsOnly must be a boolean",hu.error(n,r),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",hu.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),hu.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s,u=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=u,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),hu.error(n,e[ao]),Promise.reject(n);if(Gn(e[so])||ui(e[so]))a=Kr().withMutations((function(t){return e[so].forEach((function(e){return t.add(e)}))})).toJS(),i.edge=a;else if(Jn(e[so]))return n="invalid parameter: filter.".concat(so," must be a set of valid UUIDs"),hu.error(n,e[so]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))s=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=s;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),hu.error(n,e[uo]),Promise.reject(n);var c="/".concat(t,"/").concat("neighbors","/").concat("advanced"),p=r?"".concat(c,"/").concat("ids"):c;return Ei("SearchApi").post(p,i).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function du(t){var e="";if(!$n(t))return e='invalid parameter: "searchConstraints" must be a non-empty object',hu.error(e,t),Promise.reject(e);var r=t.entitySetIds,n=t.maxHits,i=t.start;return ui(r)?!as()(i)||i<0?(e='invalid property: "start" must be a positive number',hu.error(e,i),Promise.reject(e)):!as()(n)||n<0?(e='invalid property: "maxHits" must be a positive number',hu.error(e,n),Promise.reject(e)):Ei("SearchApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetIds" must be a non-empty array of valid UUIDs',hu.error(e,r),Promise.reject(e))}function yu(t){var e="";if(!$n(t))return e='invalid parameter: "searchOptions" must be a non-empty object',hu.error(e,t),Promise.reject(e);var r={},n=t.entityTypeId,i=t.maxHits,o=t.organizationId,a=t.propertyTypeIds,s=t.searchTerm,u=t.start;if(!as()(u)||u<0)return e='invalid property: "start" must be a positive number',hu.error(e,u),Promise.reject(e);if(!as()(i)||i<0)return e='invalid property: "maxHits" must be a positive number',hu.error(e,i),Promise.reject(e);if(r.start=u,r.maxHits=i,Jn(s)){if(!Xn(s))return e='invalid property: "searchTerm" must be a non-empty string',hu.error(e,s),Promise.reject(e);r.kw=s}if(Jn(n)){if(!si(n))return e='invalid parameter: "entityTypeId" must be a valid UUID',hu.error(e,n),Promise.reject(e);r.entityTypeId=n}if(Jn(a)){if(!ui(a))return e='invalid parameter: "propertyTypeIds" must be a non-empty array of valid UUIDs',hu.error(e,a),Promise.reject(e);r.pid=Kr().withMutations((function(t){a.forEach((function(e){t.add(e)}))})).toJS()}else r.excludePropertyTypes=!0;return si(o)&&(r.organizationId=o),Ei("SearchApi").post("/",r).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}var vu="v0.82.1";e.default={AppApi:n,AuthorizationsApi:o,CodexApi:a,DataApi:u,DataIntegrationApi:c,DataSetsApi:p,EntityDataModelApi:f,EntitySetsApi:h,OrganizationsApi:y,PermissionsApi:d,PersistentSearchApi:v,PrincipalsApi:m,SearchApi:g,Constants:s,Models:l,Types:i,configure:yi,version:vu}}])})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Lattice=e():t.Lattice=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=73)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(i=e,!1!==n&&function(t){var e=(r[t]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(s)+"="+e+";"}catch(t){}}}(e),a.call(o,e,t),"undefined"==typeof console&&e-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(6),i=r(89),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,r(42)(t))},function(t,e,r){var n=r(90),i=r(91),o=r(92),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e;throw e=null===t?"null":"object"===(e=n(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a ".concat(e),new TypeError("Expected string but received ".concat(e,"."))}},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(3),i=r(17),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(132),i=r(144),o=r(146),a=r(147),s=r(148);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){u.headers[t]=n.merge(o)})),t.exports=u}).call(this,r(111))},function(t,e,r){"use strict";var n=r(4),i=r(113),o=r(115),a=r(47),s=r(116),u=r(119),c=r(120),p=r(51);t.exports=function(t){return new Promise((function(e,r){var f=t.data,h=t.headers;n.isFormData(f)&&delete h["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+y)}var v=s(t.baseURL,t.url);if(l.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:t,request:l};i(e,r,o),l=null}},l.onabort=function(){l&&(r(p("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){r(p("Network Error",t,null,l)),l=null},l.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(p(e,t,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in l&&n.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:l.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),r(t),l=null)})),f||(f=null),l.send(f)}))}},function(t,e,r){"use strict";var n=r(114);t.exports=function(t,e,r,i,o){var a=new Error(t);return n(a,e,r,i,o)}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e){e=e||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(t[i],e[i])}n.forEach(i,(function(t){n.isUndefined(e[t])||(r[t]=u(void 0,e[t]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(void 0,e[i])})),n.forEach(s,(function(n){n in e?r[n]=u(t[n],e[n]):n in t&&(r[n]=u(void 0,t[n]))}));var p=i.concat(o).concat(a).concat(s),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===p.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(56),i=r(26),o=r(3),a=r(58),s=r(27),u=r(22);t.exports=function(t,e,r){for(var c=-1,p=(e=n(e,t)).length,f=!1;++c-1&&t%1==0&&tp))return!1;var h=u.get(t),l=u.get(e);if(h&&l)return h==e&&l==t;var d=-1,y=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((e=(0,a.default)(e,u)).validate_length&&t.length>=2083)return!1;var r,s,f,h,l,d,y,v;if(y=t.split("#"),t=y.shift(),y=t.split("?"),t=y.shift(),(y=t.split("://")).length>1){if(r=y.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(r))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;y[0]=t.substr(2)}}if(""===(t=y.join("://")))return!1;if(y=t.split("/"),""===(t=y.shift())&&!e.require_host)return!0;if((y=t.split("@")).length>1){if(e.disallow_auth)return!1;if(-1===(s=y.shift()).indexOf(":")||s.indexOf(":")>=0&&s.split(":").length>2)return!1}h=y.join("@"),d=null,v=null;var m=h.match(c);m?(f="",v=m[1],d=m[2]||null):(y=h.split(":"),f=y.shift(),y.length&&(d=y.join(":")));if(null!==d&&(l=parseInt(d,10),!/^[0-9]+$/.test(d)||l<=0||l>65535))return!1;if(!((0,o.default)(f)||(0,i.default)(f,e)||v&&(0,o.default)(v,6)))return!1;if(f=f||v,e.host_whitelist&&!p(f,e.host_whitelist))return!1;if(e.host_blacklist&&p(f,e.host_blacklist))return!1;return!0};var n=s(r(30)),i=s(r(123)),o=s(r(124)),a=s(r(54));function s(t){return t&&t.__esModule?t:{default:t}}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function p(t,e){for(var r=0;r=i?t:n(t,e,r)}},function(t,e){t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n-1;);return r}},function(t,e){t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o-1;);return r}},function(t,e,r){var n=r(103),i=r(104),o=r(105);t.exports=function(t){return i(t)?o(t):n(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),p="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+p+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e,r){"use strict";var n=r(4),i=r(46),o=r(107),a=r(52);function s(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=s(r(49));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=r(53),u.CancelToken=r(121),u.isCancel=r(48),u.all=function(t){return Promise.all(t)},u.spread=r(122),t.exports=u,t.exports.default=u},function(t,e,r){"use strict";var n=r(4),i=r(47),o=r(108),a=r(109),s=r(52);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,r,n){return this.request(s(n||{},{method:t,url:e,data:r}))}})),t.exports=u},function(t,e,r){"use strict";var n=r(4);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,r){"use strict";var n=r(4),i=r(110),o=r(48),a=r(49);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=s(h);p=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var n=r(4);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(53);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,i.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var r=t.split("."),o=0;o63)return!1;if(e.require_tld){var s=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(s))return!1}for(var u,c=0;c1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(e),!(r=String(r)))return t(e,4)||t(e,6);if("4"===r){if(!o.test(e))return!1;var n=e.split(".").sort((function(t,e){return t-e}));return n[3]<=255}if("6"===r){var s=[e];if(e.includes("%")){if(2!==(s=e.split("%")).length)return!1;if(!s[0].includes(":"))return!1;if(""===s[1])return!1}var u=s[0].split(":"),c=!1,p=t(u[u.length-1],4),f=p?7:8;if(u.length>f)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(u.shift(),u.shift(),c=!0):"::"===e.substr(e.length-2)&&(u.pop(),u.pop(),c=!0);for(var h=0;h0&&h=1:u.length===f}return!1};var n,i=(n=r(30))&&n.__esModule?n:{default:n};var o=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,a=/^[0-9A-F]{1,4}$/i;t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(126);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},function(t,e,r){var n=r(127);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,r){var n=r(15),i=r(17),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},function(t,e,r){var n=r(130),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},function(t,e,r){var n=r(131);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(32);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(133),i=r(19),o=r(25);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(134),i=r(135),o=r(136),a=r(137),s=r(138);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},function(t,e,r){var n=r(20);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(21);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(21);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(150);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(12),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(152),i=r(33);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(153)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e,r){var n=r(155),i=r(26),o=r(3),a=r(28),s=r(58),u=r(29),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),p=!r&&i(t),f=!r&&!p&&a(t),h=!r&&!p&&!f&&u(t),l=r||p||f||h,d=l?n(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||l&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?k(t)+e:e}function M(){return!0}function N(t,e,r){return(0===t&&!K(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function q(t,e){return L(t,e,0)}function C(t,e){return L(t,e,e)}function L(t,e,r){return void 0===t?r:K(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function K(t){return t<0||0===t&&1/t==-1/0}function B(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function F(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function V(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function J(t){return F(t)||V(t)}var G=function(t){return B(t)?t:ht(t)},W=function(t){function e(t){return F(t)?t:lt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),H=function(t){function e(t){return V(t)?t:dt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),Q=function(t){function e(t){return B(t)&&!J(t)?t:yt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G);G.Keyed=W,G.Indexed=H,G.Set=Q;function $(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function X(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Z(t){return B(t)||X(t)}var Y="@@__IMMUTABLE_ORDERED__@@";function tt(t){return Boolean(t&&t[Y])}var et="function"==typeof Symbol&&Symbol.iterator,rt=et||"@@iterator",nt=function(t){this.next=t};function it(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function ot(){return{value:void 0,done:!0}}function at(t){return!!ct(t)}function st(t){return t&&"function"==typeof t.next}function ut(t){var e=ct(t);return e&&e.call(t)}function ct(t){var e=t&&(et&&t[et]||t["@@iterator"]);if("function"==typeof e)return e}nt.prototype.toString=function(){return"[Iterator]"},nt.KEYS=0,nt.VALUES=1,nt.ENTRIES=2,nt.prototype.inspect=nt.prototype.toSource=function(){return this.toString()},nt.prototype[rt]=function(){return this};var pt=Object.prototype.hasOwnProperty;function ft(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 ht=function(t){function e(t){return null==t?bt():Z(t)?t.toSeq():function(t){var e=jt(t);if(e)return e;if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return it(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(G),lt=function(t){function e(t){return null==t?bt().toKeyedSeq():B(t)?F(t)?t.toSeq():t.fromEntrySeq():X(t)?t.toSeq():wt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ht),dt=function(t){function e(t){return null==t?bt():B(t)?F(t)?t.entrySeq():t.toIndexedSeq():X(t)?t.toSeq().entrySeq():It(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}(ht),yt=function(t){function e(t){return(B(t)&&!J(t)?t:dt(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}(ht);ht.isSeq=$,ht.Keyed=lt,ht.Set=yt,ht.Indexed=dt,ht.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var vt=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[R(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return it(t,o,r[o])}))},e}(dt),mt=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return pt.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new nt((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return it(t,a,r[a])}))},e}(lt);mt.prototype[Y]=!0;var gt,_t=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=ut(this._collection),n=0;if(st(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=ut(this._collection);if(!st(r))return new nt(ot);var n=0;return new nt((function(){var e=r.next();return e.done?e:it(t,n++,e.value)}))},e}(dt);function bt(){return gt||(gt=new vt([]))}function wt(t){var e=Array.isArray(t)?new vt(t):at(t)?new _t(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function It(t){var e=jt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function jt(t){return ft(t)?new vt(t):at(t)?new _t(t):void 0}function Et(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Tt(t){return Et(t)&&tt(t)}function St(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function At(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!!(St(t)&&St(e)&&t.equals(e))}var Pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}function Dt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return Ot(r)}if("string"===e)return t.length>qt?function(t){var e=Kt[t];void 0===e&&(e=Ut(t),Lt===Ct&&(Lt=0,Kt={}),Lt++,Kt[t]=e);return e}(t):Ut(t);if("function"==typeof t.hashCode)return Ot(t.hashCode());if("object"===e||"function"===e)return function(t){var e;if(Rt&&void 0!==(e=kt.get(t)))return e;if(void 0!==(e=t[Nt]))return e;if(!zt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nt]))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}e=++Mt,1073741824&Mt&&(Mt=0);if(Rt)kt.set(t,e);else{if(void 0!==xt&&!1===xt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(zt)Object.defineProperty(t,Nt,{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[Nt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nt]=e}}return e}(t);if("function"==typeof t.toString)return Ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ut(t){for(var e=0,r=0;r=0&&(c.get=function(e,r){return(e=R(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return n||1===e||t.done?t:it(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Xt(t,e,r,n){var i=se(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,c=0;return new nt((function(){var t,o,p;do{if((t=s.next()).done)return n||1===i?t:it(i,c++,0===i?void 0:t.value[1],t);var f=t.value;o=f[0],p=f[1],u&&(u=e.call(r,p,o,a))}while(u);return 2===i?t:it(i,o,p,t)}))},i}function Zt(t,e){var r=F(t),n=[t].concat(e).map((function(t){return B(t)?r&&(t=W(t)):t=r?wt(t):It(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&F(i)||V(t)&&V(i))return i}var o=new vt(n);return r?o=o.toKeyedSeq():V(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function Yt(t,e,r){var n=se(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,c){u.__iterate((function(o,u){return(!e||c0}function ne(t,e,r,n){var i=se(t),o=new vt(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=G(t),ut(i?t.reverse():t)})),a=0,s=!1;return new nt((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:it(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function ie(t,e){return t===e?t:$(t)?e:t.constructor(e)}function oe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ae(t){return F(t)?W:V(t)?H:Q}function se(t){return Object.create((F(t)?lt:V(t)?dt:yt).prototype)}function ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ht.prototype.cacheResult.call(this)}function ce(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return xe(this,e,t)}function xe(t,e,r){for(var n=[],i=0;i0;)e[r]=arguments[r+1];return ze(this,e,t)}function Ne(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ke(t,e)}))}function qe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ze(t,e)}))}function Ce(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Le(){return this.__ownerID?this:this.__ensureOwner(new z)}function Ke(){return this.__ensureOwner()}function Be(){return this.__altered}Ft.prototype.cacheResult=Bt.prototype.cacheResult=Vt.prototype.cacheResult=Jt.prototype.cacheResult=ue;var Fe=function(t){function e(e){return null==e?er():Et(e)&&!tt(e)?e:er().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er().withMutations((function(e){for(var r=0;r=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return rr(this,t,e)},e.prototype.remove=function(t){return rr(this,t,U)},e.prototype.deleteAll=function(t){var e=G(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):er()},e.prototype.sort=function(t){return Sr(te(this,t))},e.prototype.sortBy=function(t,e){return Sr(te(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(r){r.forEach((function(n,i){r.set(i,t.call(e,n,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Xe(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?tr(this.size,this._root,t,this.__hash):0===this.size?er():(this.__ownerID=t,this.__altered=!1,this)},e}(W);Fe.isMap=Et;var Ve=Fe.prototype;Ve["@@__IMMUTABLE_MAP__@@"]=!0,Ve.delete=Ve.remove,Ve.removeAll=Ve.deleteAll,Ve.setIn=Ee,Ve.removeIn=Ve.deleteIn=Se,Ve.update=Pe,Ve.updateIn=Oe,Ve.merge=Ve.concat=De,Ve.mergeWith=Ue,Ve.mergeDeep=Re,Ve.mergeDeepWith=Me,Ve.mergeIn=Ne,Ve.mergeDeepIn=qe,Ve.withMutations=Ce,Ve.wasAltered=Be,Ve.asImmutable=Ke,Ve["@@transducer/init"]=Ve.asMutable=Le,Ve["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Ve["@@transducer/result"]=function(t){return t.asImmutable()};var Je=function(t,e){this.ownerID=t,this.entries=e};Je.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o=ur)return function(t,e,r,n){t||(t=new z);for(var i=new Qe(t,Dt(r),[r,n]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?n:this.nodes[ar(o&i-1)].get(t+5,e,r,n)},Ge.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=1<=cr)return function(t,e,r,n,i){for(var o=0,a=new Array(32),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[o++]:void 0;return a[n]=i,new We(t,o+1,a)}(t,h,c,s,d);if(p&&!d&&2===h.length&&ir(h[1^f]))return h[1^f];if(p&&d&&1===h.length&&ir(d))return d;var y=t&&t===this.ownerID,v=p?d?c:c^u:c|u,m=p?d?sr(h,f,d,y):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a>>t),o=this.nodes[i];return o?o.get(t+5,e,r,n):n},We.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=i===U,c=this.nodes,p=c[s];if(u&&!p)return this;var f=nr(p,t,e+5,r,n,i,o,a);if(f===p)return this;var h=this.count;if(p){if(!f&&--h>>r),s=31&(0===r?n:n>>>r),u=a===s?[or(t,e,r+5,n,i)]:(o=new Qe(e,n,i),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function sr(t,e,r,n){var i=n?t:pe(t);return i[e]=r,i}var ur=8,cr=16,pr=8;function fr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var hr=function(t){function e(e){var r=_r();if(null==e)return r;if(fr(e))return e;var n=t(e),i=n.size;return 0===i?r:(he(i),i>0&&i<32?gr(0,i,5,null,new dr(n.toArray())):r.withMutations((function(t){t.setSize(i),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=R(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?jr(t,e).set(0,r):jr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=Er(t._capacity)?n=br(n,t.__ownerID,0,e,r,o):i=br(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return gr(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):_r()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){jr(r,0,e+t.length);for(var n=0;n>>e&31;if(n>=this.array.length)return new dr([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!i)return this;var s=wr(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=wr(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var yr,vr={};function mr(t,e){var r=t._origin,n=t._capacity,i=Er(n),o=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===i?o&&o.array:t&&t.array,u=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(u===c)return vr;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,i,o){var s,u=t&&t.array,c=o>r?0:r-o>>i,p=1+(n-o>>i);p>32&&(p=32);return function(){for(;;){if(s){var t=s();if(t!==vr)return t;s=null}if(c===p)return vr;var r=e?--p:c++;s=a(u&&u[r],i-5,o+(r<>>r&31,u=t&&s0){var c=t&&t.array[s],p=br(c,e,r-5,n,i,o);return p===c?t:((a=wr(t,e)).array[s]=p,a)}return u&&t.array[s]===i?t:(o&&x(o),a=wr(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function wr(t,e){return e&&t&&e===t.ownerID?t:new dr(t?t.array.slice():[],e)}function Ir(t,e){if(e>=Er(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&31],n-=5;return r}}function jr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new z,i=t._origin,o=t._capacity,a=i+e,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,p=0;a+p<0;)c=new dr(c&&c.array.length?[void 0,c]:[],n),p+=1<<(u+=5);p&&(a+=p,i+=p,s+=p,o+=p);for(var f=Er(o),h=Er(s);h>=1<f?new dr([],n):l;if(l&&h>f&&a5;v-=5){var m=f>>>v&31;y=y.array[m]=wr(y.array[m],n)}y.array[f>>>5&31]=l}if(s=h)a-=h,s-=h,u=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||h>>u&31;if(g!==h>>>u&31)break;g&&(p+=(1<i&&(c=c.removeBefore(n,u,a-p)),c&&h>>5<<5}var Tr,Sr=function(t){function e(t){return null==t?Pr():Tt(t)?t:Pr().withMutations((function(e){var r=W(t);he(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Pr()},e.prototype.set=function(t,e){return Or(this,t,e)},e.prototype.remove=function(t){return Or(this,t,U)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ar(e,r,t,this.__hash):0===this.size?Pr():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(Fe);function Ar(t,e,r,n){var i=Object.create(Sr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Pr(){return Tr||(Tr=Ar(er(),_r()))}function Or(t,e,r){var n,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(r===U){if(!u)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(r===a.get(s)[1])return t;n=o,i=a.set(s,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ar(n,i)}Sr.isOrderedMap=Tt,Sr.prototype[Y]=!0,Sr.prototype.delete=Sr.prototype.remove;function Dr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Ur=function(t){function e(t){return null==t?Rr():Dr(t)?t:Rr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=R(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):kr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Dr(e))return e;he(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):kr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rr()},e.prototype.slice=function(e,r){if(N(e,r,this.size))return this;var n=q(e,this.size);if(C(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):kr(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kr(this.size,this._head,t,this.__hash):0===this.size?Rr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new vt(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,r);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new vt(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new nt((function(){if(n){var e=n.value;return n=n.next,it(t,r++,e)}return{value:void 0,done:!0}}))},e}(H);Ur.isStack=Dr;var xr,zr=Ur.prototype;function kr(t,e,r,n){var i=Object.create(zr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Rr(){return xr||(xr=kr(0))}zr["@@__IMMUTABLE_STACK__@@"]=!0,zr.shift=zr.pop,zr.unshift=zr.push,zr.unshiftAll=zr.pushAll,zr.withMutations=Ce,zr.wasAltered=Be,zr.asImmutable=Ke,zr["@@transducer/init"]=zr.asMutable=Le,zr["@@transducer/step"]=function(t,e){return t.unshift(e)},zr["@@transducer/result"]=function(t){return t.asImmutable()};function Mr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function Nr(t){return Mr(t)&&tt(t)}function qr(t,e){if(t===e)return!0;if(!B(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||F(t)!==F(e)||V(t)!==V(e)||tt(t)!==tt(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!J(t);if(tt(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&At(i[1],t)&&(r||At(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate((function(e,n){if(r?!t.has(e):i?!At(e,t.get(n,U)):!At(t.get(n,U),e))return a=!1,!1}));return a&&t.size===s}function Cr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Lr(t){if(!t||"object"!=typeof t)return t;if(!B(t)){if(!ye(t))return t;t=ht(t)}if(F(t)){var e={};return t.__iterate((function(t,r){e[r]=Lr(t)})),e}var r=[];return t.__iterate((function(t){r.push(Lr(t))})),r}var Kr=function(t){function e(e){return null==e?Gr():Mr(e)&&!tt(e)?e:Gr().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.intersect=function(t){return(t=G(t).toArray()).length?Fr.intersect.apply(e(t.pop()),t):Gr()},e.union=function(t){return(t=G(t).toArray()).length?Fr.union.apply(e(t.pop()),t):Gr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Vr(this,this._map.set(t,t))},e.prototype.remove=function(t){return Vr(this,this._map.remove(t))},e.prototype.clear=function(){return Vr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this;return Vr(this,this._map.map((function(e){return t(e,e,r)}),e))},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n=0&&e=0&&r>>-15,461845907),e=Pt(e<<13|e>>>-13,5),e=Pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ot((e=Pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+pn(Dt(t),Dt(e))|0}:function(t,e){n=n+pn(Dt(t),Dt(e))|0}:e?function(t){n=31*n+Dt(t)|0}:function(t){n=n+Dt(t)|0}),n)}(this))}});var Yr=G.prototype;Yr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Yr[rt]=Yr.values,Yr.toJSON=Yr.toArray,Yr.__toStringMapper=ve,Yr.inspect=Yr.toSource=function(){return this.toString()},Yr.chain=Yr.flatMap,Yr.contains=Yr.includes,Cr(W,{flip:function(){return ie(this,Gt(this))},mapEntries:function(t,e){var r=this,n=0;return ie(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return ie(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var tn=W.prototype;tn["@@__IMMUTABLE_KEYED__@@"]=!0,tn[rt]=Yr.entries,tn.toJSON=Zr,tn.__toStringMapper=function(t,e){return ve(e)+": "+ve(t)},Cr(H,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(t,e){return ie(this,Qt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ie(this,Ht(this,!1))},slice:function(t,e){return ie(this,$t(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=q(t,t<0?this.count():this.size);var n=this.slice(0,t);return ie(this,1===r?n:n.concat(pe(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ie(this,Yt(this,t,!1))},get:function(t,e){return(t=R(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=R(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function pn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}en["@@__IMMUTABLE_INDEXED__@@"]=!0,en[Y]=!0,Cr(Q,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Q.prototype.has=Yr.includes,Q.prototype.contains=Q.prototype.includes,Cr(lt,W.prototype),Cr(dt,H.prototype),Cr(yt,Q.prototype);var fn=function(t){function e(t){return null==t?yn():Nr(t)?t:yn().withMutations((function(e){var r=Q(t);he(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Kr);fn.isOrderedSet=Nr;var hn,ln=fn.prototype;function dn(t,e){var r=Object.create(ln);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function yn(){return hn||(hn=dn(Pr()))}ln[Y]=!0,ln.zip=en.zip,ln.zipWith=en.zipWith,ln.__empty=yn,ln.__make=dn;var vn=function(t,e){var r,n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c2?[]:void 0,{"":t})}function En(t,e){return F(e)?e.toMap():e.toList()}var Tn=r(7),Sn=r.n(Tn),An=r(66),Pn=r.n(An),On=r(24),Dn=r.n(On),Un={TRACE:"trace",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};function xn(t){return D()(t)&&!Sn()(t)}function zn(t,e){return"[".concat((new Date).toISOString()," ").concat(t.toUpperCase()," ").concat("lattice","] ").concat(e)}Dn.a.setLevel(Dn.a.levels.INFO);var kn=function(){function t(e){I()(this,t),S()(this,"logger",void 0),S()(this,"name",void 0),this.logger=Dn.a.getLogger(e),this.name=e}return E()(t,[{key:"log",value:function(t,e){var r,n=zn(t,this.name);xn(e)?this.logger[t]("".concat(n," - ").concat(e)):(this.logger[t](n),t!==Un.TRACE&&(!Pn()(e)&&Sn()(e)||this.logger[t](e)));for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a0&&(r=this.logger)[t].apply(r,o)}},{key:"trace",value:function(t){this.log(Un.TRACE,t)}},{key:"debug",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],n="";if(Xn(t))if(Xn(e)){var i="".concat(t,".").concat(e);if(i.length<=63)return i;n="invalid FQN: FQNs must be <= ".concat(63," characters, got ").concat(i.length)}else n="invalid FQN: name must be a non-empty string";else n="invalid FQN: namespace must be a non-empty string";if(!0===r)throw Yn.error(n),new Error(n);return""}var ni=function(){function t(){if(I()(this,t),S()(this,"namespace",void 0),S()(this,"name",void 0),1!==arguments.length&&2!==arguments.length){var e="invalid parameter count: FQN takes only 1 or 2 parameters, got ".concat(arguments.length);throw Yn.error(e),new Error(e)}var r=ei.apply(void 0,arguments),n=r.namespace,i=r.name;ri(n,i,!0),this.namespace=n,this.name=i}return E()(t,[{key:"getNamespace",value:function(){return this.namespace}},{key:"getName",value:function(){return this.name}},{key:"toObject",value:function(){var t=this.namespace,e=this.name;return""===ri(t,e)?{namespace:"",name:""}:{namespace:t,name:e}}},{key:"toString",value:function(){return ri(this.namespace,this.name)}},{key:"valueOf",value:function(){return this.toString()}}]),t}();S()(ni,"of",(function(){for(var t=arguments.length,e=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",ho.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),ho.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=s,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),ho.error(n,e[ao]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))a=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=a;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),ho.error(n,e[uo]),Promise.reject(n);return Xn(r)&&ki[r]?Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("neighbors","?").concat("type","=").concat(r),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n))}function go(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!si(e)&&!ui(e))return n="invalid parameter: entityKeyIds must be a valid UUID or array of UUIDs",ho.error(n,e),Promise.reject(n);if(!ki[r])return n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n);var i=e;return"string"==typeof e&&(i=[e]),Ei("DataApi").delete("/".concat("set","/").concat(t,"?").concat("type","=").concat(r),{data:i}).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function _o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki.SOFT,r="";return si(t)?ki[e]?Ei("DataApi").delete("/".concat("set","/").concat(t,"/").concat("all","?").concat("type","=").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "deleteType" must be a valid DeleteType',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function bo(t,e){var r="";return si(t)?si(e)?Ei("DataApi").get("/".concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "entityKeyId" must be a valid UUID',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function wo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Io(t){var e="";return si(t)?Ei("DataApi").get("/".concat(t,"/").concat("count")).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",ho.error(e,t),Promise.reject(e))}function jo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("detailed"),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Eo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fi.PARTIAL_REPLACE,n="";if(!si(t))return n='invalid parameter: "entitySetId" must be a valid UUID',ho.error(n,t),Promise.reject(n);if(!$n(e))return n='invalid parameter: "entityData" must be a non-empty object',ho.error(n,t),Promise.reject(n);for(var i=Object.keys(e),o=0;o2&&void 0!==arguments[2])||arguments[2],n="";return si(t)?si(e)?!0===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "columns" must be a boolean',Oo.error(n,r),Promise.reject(n)):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function Uo(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";return si(t)?!0===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "columns" must be a boolean',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}function xo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n="";return si(t)?si(e)?!Po()(r)||r<=0?(n='invalid parameter: "count" must be a positive integer',Oo.error(n,e),Promise.reject(n)):Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat(r,"/").concat("data")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}var zo=r(5),ko=r.n(zo),Ro=r(23),Mo=r.n(Ro),No=new kn("EntityType"),qo=function(){function t(e){I()(this,t),S()(this,"baseType",void 0),S()(this,"category",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"key",void 0),S()(this,"properties",void 0),S()(this,"propertyTags",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.key=e.key,this.properties=e.properties,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.baseType)&&(this.baseType=e.baseType),Jn(e.category)&&(this.category=e.category),Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.propertyTags)&&(this.propertyTags=e.propertyTags)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={key:this.key,properties:this.properties,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),Jn(this.baseType)&&(t.baseType=this.baseType),Jn(this.category)&&(t.category=this.category),Jn(this.propertyTags)&&(t.propertyTags=this.propertyTags),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Co=function(){function t(e){I()(this,t),S()(this,"baseType",void 0),S()(this,"category",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"key",void 0),S()(this,"properties",void 0),S()(this,"propertyTags",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setBaseType(e.get("baseType")),this.setCategory(e.get("category")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setKey(e.get("key")),this.setPropertyTags(e.get("propertyTags")),this.setPropertyTypes(e.get("properties")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setBaseType(e.baseType),this.setCategory(e.category),this.setDescription(e.description),this.setId(e.id),this.setKey(e.key),this.setPropertyTags(e.propertyTags),this.setPropertyTypes(e.properties),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setBaseType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "baseType" must be a valid UUID');return this.baseType=t,this}},{key:"setCategory",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ki[t])throw new Error('invalid parameter: "category" must be a valid SecurableType');return this.category=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.id=t,this}},{key:"setKey",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "key" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "key" must be a non-empty array of UUIDs');return this.key=e.toJS(),this}},{key:"setPropertyTags",value:function(t){if(!Jn(t))return this;var e=t;if(B(e)&&(e=e.toJS()),Wn(e))return this;if(!ci(e,si))throw new Error('invalid parameter: "propertyTags" must be a valid multimap object');return this.propertyTags=e,this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "propertyTypes" must be a non-empty array of UUIDs');return this.properties=e.toJS(),this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.key||(this.key=[]),this.properties||(this.properties=[]),this.propertyTags||(this.propertyTags={}),this.schemas||(this.schemas=[]),new qo({baseType:this.baseType,category:this.category,description:this.description,id:this.id,key:this.key,properties:this.properties,propertyTags:this.propertyTags,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Lo=new kn("AssociationType"),Ko=function(){function t(e){I()(this,t),S()(this,"bidirectional",void 0),S()(this,"dst",void 0),S()(this,"entityType",void 0),S()(this,"src",void 0),this.bidirectional=e.bidirectional,this.entityType=e.entityType,this.dst=e.dst,this.src=e.src}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{bidirectional:this.bidirectional,dst:this.dst,entityType:this.entityType.toObject(),src:this.src}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Bo=function(){function t(e){I()(this,t),S()(this,"bidirectional",void 0),S()(this,"destinationEntityTypeIds",void 0),S()(this,"entityType",void 0),S()(this,"sourceEntityTypeIds",void 0),Z(e)?(this.setBidirectional(e.get("bidirectional")),this.setDestinationEntityTypeIds(e.get("dst")),this.setEntityType(e.get("entityType")),this.setSourceEntityTypeIds(e.get("src"))):Jn(e)&&(this.setBidirectional(e.bidirectional),this.setDestinationEntityTypeIds(e.dst),this.setEntityType(e.entityType),this.setSourceEntityTypeIds(e.src))}return E()(t,[{key:"setBidirectional",value:function(t){if(!Mo()(t))throw new Error('invalid parameter: "bidirectional" must be a boolean');return this.bidirectional=t,this}},{key:"setEntityType",value:function(t){return this.entityType=new Co(t).build(),this}},{key:"setDestinationEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "destinationEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "destinationEntityTypeIds" must be a non-empty array of UUIDs');return this.destinationEntityTypeIds=e.toJS(),this}},{key:"setSourceEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "sourceEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "sourceEntityTypeIds" must be a non-empty array of UUIDs');return this.sourceEntityTypeIds=e.toJS(),this}},{key:"build",value:function(){if(null===this.bidirectional||void 0===this.bidirectional)throw new Error('missing property: "bidirectional" is a required property');if(!this.entityType)throw new Error('missing property: "entityType" is a required property');return this.destinationEntityTypeIds||(this.destinationEntityTypeIds=[]),this.sourceEntityTypeIds||(this.sourceEntityTypeIds=[]),new Ko({bidirectional:this.bidirectional,dst:this.destinationEntityTypeIds,entityType:this.entityType,src:this.sourceEntityTypeIds})}}]),t}(),Fo=new kn("PropertyType"),Vo=function(){function t(e){I()(this,t),S()(this,"analyzer",void 0),S()(this,"datatype",void 0),S()(this,"description",void 0),S()(this,"enumValues",void 0),S()(this,"id",void 0),S()(this,"indexType",void 0),S()(this,"multiValued",void 0),S()(this,"pii",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.datatype=e.datatype,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.analyzer)&&(this.analyzer=e.analyzer),Jn(e.description)&&(this.description=e.description),Jn(e.enumValues)&&(this.enumValues=e.enumValues),Jn(e.id)&&(this.id=e.id),Jn(e.indexType)&&(this.indexType=e.indexType),Jn(e.multiValued)&&(this.multiValued=e.multiValued),Jn(e.pii)&&(this.pii=e.pii)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={datatype:this.datatype,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.analyzer)&&(t.analyzer=this.analyzer),Jn(this.description)&&(t.description=this.description),Jn(this.enumValues)&&(t.enumValues=this.enumValues),Jn(this.id)&&(t.id=this.id),Jn(this.indexType)&&(t.indexType=this.indexType),Jn(this.multiValued)&&(t.multiValued=this.multiValued),Jn(this.pii)&&(t.pii=this.pii),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Jo=function(){function t(e){I()(this,t),S()(this,"analyzer",void 0),S()(this,"datatype",void 0),S()(this,"description",void 0),S()(this,"enumValues",void 0),S()(this,"id",void 0),S()(this,"indexType",void 0),S()(this,"multiValued",void 0),S()(this,"pii",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setAnalyzer(e.get("analyzer")),this.setDataType(e.get("datatype")),this.setDescription(e.get("description")),this.setEnumValues(e.get("enumValues")),this.setId(e.get("id")),this.setIndexType(e.get("indexType")),this.setMultiValued(e.get("multiValued")),this.setPII(e.get("pii")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setAnalyzer(e.analyzer),this.setDataType(e.datatype),this.setDescription(e.description),this.setEnumValues(e.enumValues),this.setId(e.id),this.setIndexType(e.indexType),this.setMultiValued(e.multiValued),this.setPII(e.pii),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setAnalyzer",value:function(t){if(!Jn(t)||Hn(t))return this;if(!zi[t])throw new Error("invalid parameter: analyzer must be a valid AnalyzerType");return this.analyzer=t,this}},{key:"setDataType",value:function(t){if(!Xn(t))throw new Error("invalid parameter: datatype must be a non-empty string");return this.datatype=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error("invalid parameter: description must be a non-empty string");return this.description=t,this}},{key:"setEnumValues",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "values" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "values" must be a non-empty array of non-empty strings');return this.enumValues=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error("invalid parameter: propertyTypeId must be a valid UUID");return this.id=t,this}},{key:"setIndexType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ni[t])throw new Error("invalid parameter: indexType must be a valid IndexType");return this.indexType=t,this}},{key:"setMultiValued",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: multiValued must be a boolean");return this.multiValued=t,this}},{key:"setPII",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: pii must be a boolean");return this.pii=t,this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!Jn(this.datatype))throw new Error('missing property: "datatype" is a required property');if(!Jn(this.title))throw new Error('missing property: "title" is a required property');if(!Jn(this.type))throw new Error('missing property: "type" is a required property');return this.schemas||(this.schemas=[]),new Vo({analyzer:this.analyzer,datatype:this.datatype,description:this.description,enumValues:this.enumValues,id:this.id,indexType:this.indexType,multiValued:this.multiValued,pii:this.pii,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Go=new kn("Schema"),Wo=function(){function t(e){I()(this,t),S()(this,"entityTypes",void 0),S()(this,"fqn",void 0),S()(this,"propertyTypes",void 0),this.entityTypes=e.entityTypes,this.fqn=e.fqn,this.propertyTypes=e.propertyTypes}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityTypes:this.entityTypes.map((function(t){return t.toObject()})),fqn:this.fqn.toObject(),propertyTypes:this.propertyTypes.map((function(t){return t.toObject()}))}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Ho=function(){function t(e){I()(this,t),S()(this,"entityTypes",void 0),S()(this,"fqn",void 0),S()(this,"propertyTypes",void 0),Z(e)?(this.setEntityTypes(e.get("entityTypes")),this.setFQN(e.get("fqn")),this.setPropertyTypes(e.get("propertyTypes"))):Jn(e)&&(this.setEntityTypes(e.entityTypes),this.setFQN(e.fqn),this.setPropertyTypes(e.propertyTypes))}return E()(t,[{key:"setEntityTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entityTypes" must be an array');try{this.entityTypes=Kr(t).map((function(t){return new Co(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "entityTypes" must be an array of EntityTypes')}return this}},{key:"setFQN",value:function(t){return this.fqn=ni.of(t),this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');try{this.propertyTypes=Kr(t).map((function(t){return new Jo(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "propertyTypes" must be an array of PropertyTypes')}return this}},{key:"build",value:function(){if(!this.fqn)throw new Error('missing property: "fqn" is a required property');return this.entityTypes||(this.entityTypes=[]),this.propertyTypes||(this.propertyTypes=[]),new Wo({entityTypes:this.entityTypes,fqn:this.fqn,propertyTypes:this.propertyTypes})}}]),t}(),Qo=function(t){return pi(t,Ho,Go)},$o=new kn("EntityDataModelApi");function Xo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function Zo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(r,e),Promise.reject(r)):(r='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(r,t),Promise.reject(r))}function Yo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ta(t){var e="";return pi(t,Bo,Lo)?Ei(ii).post("/".concat("association/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationType" must be a valid AssociationType',$o.error(e,t),Promise.reject(e))}function ea(t){var e="";return pi(t,Co,No)?Ei(ii).post("/".concat("entity/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityType" must be a valid EntityType',$o.error(e,t),Promise.reject(e))}function ra(t){var e="";return pi(t,Jo,Fo)?Ei(ii).post("/".concat("property/type"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyType" must be a valid PropertyType',$o.error(e,t),Promise.reject(e))}function na(t){var e="";return Qo(t)?Ei(ii).post("/".concat("schema"),t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "schema" must be a valid Schema',$o.error(e,t),Promise.reject(e))}function ia(t){var e="";return si(t)?Ei(ii).delete("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function oa(t){var e="";return si(t)?Ei(ii).delete("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function aa(t){var e="";return si(t)?Ei(ii).delete("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function sa(){return Ei(ii).get("/".concat("association/type","/").concat("entity/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ua(){return Ei(ii).get("/".concat("association/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ca(){return Ei(ii).get("/".concat("entity/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function pa(){return Ei(ii).get("/".concat("property/type")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function fa(){return Ei(ii).get("/".concat("schema")).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ha(t){var e="";return si(t)?Ei(ii).get("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function la(){return Ei(ii).get("/").then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function da(t){var e="";return ai(t,$n)?Ei(ii).post("/",t).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "projection" must be an array of objects',$o.error(e,t),Promise.reject(e))}function ya(t){var e="";return si(t)?Ei(ii).get("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function va(t){var e="";return si(t)?Ei(ii).get("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',$o.error(e,t),Promise.reject(e))}function ma(t){var e="";if(!ni.isValid(t))return e='invalid parameter: "schemaFQN" must be a valid FQN',$o.error(e,t),Promise.reject(e);var r=t.namespace,n=t.name;return Ei(ii).get("/".concat("schema","/").concat(r,"/").concat(n)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}function ga(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function _a(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: propertyTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ba(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function wa(t,e){var r="";return si(t)?$n(e)?ko()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",$o.error(r,e.type),Promise.reject(r)):ko()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",$o.error(r,e.name),Promise.reject(r)):ko()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",$o.error(r,e.title),Promise.reject(r)):ko()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",$o.error(r,e.description),Promise.reject(r)):ko()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",$o.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("entity/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function Ia(t,e){var r="";return si(t)?$n(e)?ko()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",$o.error(r,e.type),Promise.reject(r)):ko()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",$o.error(r,e.name),Promise.reject(r)):ko()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",$o.error(r,e.title),Promise.reject(r)):ko()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",$o.error(r,e.description),Promise.reject(r)):ko()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",$o.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("property/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",$o.error(r,e),Promise.reject(r)):(r="invalid parameter: propertyTypeId must be a valid UUID",$o.error(r,t),Promise.reject(r))}function ja(t){var e="";if(!Qo(t))return e='invalid parameter: "schema" must be a valid Schema',$o.error(e,t),Promise.reject(e);var r={action:xi.REPLACE,entityTypes:t.entityTypes.map((function(t){return t.id})),propertyTypes:t.propertyTypes.map((function(t){return t.id}))};return Ei(ii).patch("/".concat("schema","/").concat(t.fqn.namespace,"/").concat(t.fqn.name),r).then((function(t){return t.data})).catch((function(t){return $o.error(t),Promise.reject(t)}))}var Ea=new kn("EntitySet"),Ta=function(){function t(e){I()(this,t),S()(this,"contacts",void 0),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"flags",void 0),S()(this,"id",void 0),S()(this,"linkedEntitySets",void 0),S()(this,"name",void 0),S()(this,"organizationId",void 0),S()(this,"title",void 0),this.contacts=e.contacts,this.entityTypeId=e.entityTypeId,this.name=e.name,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.flags)&&(this.flags=e.flags),Jn(e.id)&&(this.id=e.id),Jn(e.linkedEntitySets)&&(this.linkedEntitySets=e.linkedEntitySets),Jn(e.organizationId)&&(this.organizationId=e.organizationId)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={contacts:this.contacts,entityTypeId:this.entityTypeId,name:this.name,title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.flags)&&(t.flags=this.flags),Jn(this.id)&&(t.id=this.id),Jn(this.linkedEntitySets)&&(t.linkedEntitySets=this.linkedEntitySets),Jn(this.organizationId)&&(t.organizationId=this.organizationId),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Sa=function(){function t(e){I()(this,t),S()(this,"contacts",void 0),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"flags",void 0),S()(this,"id",void 0),S()(this,"linkedEntitySets",void 0),S()(this,"name",void 0),S()(this,"organizationId",void 0),S()(this,"title",void 0),Z(e)?(this.setContacts(e.get("contacts")),this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setFlags(e.get("flags")),this.setId(e.get("id")),this.setLinkedEntitySets(e.get("linkedEntitySets")),this.setName(e.get("name")),this.setOrganizationId(e.get("organizationId")),this.setTitle(e.get("title"))):Jn(e)&&(this.setContacts(e.contacts),this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setFlags(e.flags),this.setId(e.id),this.setLinkedEntitySets(e.linkedEntitySets),this.setName(e.name),this.setOrganizationId(e.organizationId),this.setTitle(e.title))}return E()(t,[{key:"setContacts",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "contacts" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "contacts" must be a non-empty array of non-empty strings');return this.contacts=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setFlags",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "flags" must be an array');var e=Kr(t);if(!e.every((function(t){return Xn(t)&&Ri[t]})))throw new Error('invalid parameter: "flags" must be an array of EntitySetFlagTypes');return this.flags=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entitySetId" must be a valid UUID');return this.id=t,this}},{key:"setLinkedEntitySets",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entitySetIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "entitySetIds" must be a non-empty array of UUIDs');return this.linkedEntitySets=e.toJS(),this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setOrganizationId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.contacts||(this.contacts=[]),new Ta({contacts:this.contacts,description:this.description,entityTypeId:this.entityTypeId,flags:this.flags,id:this.id,linkedEntitySets:this.linkedEntitySets,name:this.name,organizationId:this.organizationId,title:this.title})}}]),t}(),Aa=function(t){return pi(t,Sa,Ea)},Pa=new kn("EntitySetsApi");function Oa(t){var e="";return Qn(t)?t.every(Aa)?Ei("EntitySetsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySets must be a non-empty array of valid EntitySets",Pa.error(e,t),Promise.reject(e)):(e="invalid parameter: entitySets must be a non-empty array",Pa.error(e,t),Promise.reject(e))}function Da(t){var e="";return si(t)?Ei("EntitySetsApi").delete("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Pa.error(e,t),Promise.reject(e))}function Ua(){return Ei("EntitySetsApi").get("/").then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)}))}function xa(t){var e="";return si(t)?Ei("EntitySetsApi").get("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Pa.error(e,t),Promise.reject(e))}function za(t){var e="";return Xn(t)?Ei("EntitySetsApi").get("/".concat("ids","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetName must be a non-empty string",Pa.error(e,t),Promise.reject(e))}function ka(t){var e="";return Qn(t)?t.every(Xn)?Ei("EntitySetsApi").post("/".concat("ids"),t).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetNames" must be an array of strings',Pa.error(e,t),Promise.reject(e)):(e='invalid parameter: "entitySetNames" must be a non-empty array',Pa.error(e,t),Promise.reject(e))}function Ra(t){var e="";if(!Qn(t))return e='invalid parameter: "idsOrNames" must be a non-empty array',Pa.error(e,t),Promise.reject(e);var r=Kr(t);return r.every(si)?Ei("EntitySetsApi").post("/".concat("by-id"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):r.every(Xn)?Ei("EntitySetsApi").post("/".concat("by-name"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(e='invalid parameter: "idsOrNames" must be an array of EntitySet ids or names',Pa.error(e,t),Promise.reject(e))}function Ma(t,e){var r="";return si(t)?Jn(e)?Jn(e)&&!si(e)?(r="invalid parameter: propertyTypeId must be a valid UUID",Pa.error(r,e),Promise.reject(r)):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("properties","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("metadata")).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)})):(r="invalid parameter: entitySetId must be a valid UUID",Pa.error(r,t),Promise.reject(r))}function Na(t){var e="";if(!ui(t))return e="invalid parameter: entitySetIds must be a valid UUID array",Pa.error(e,t),Promise.reject(e);var r=Kr(t).toJS();return Ei("EntitySetsApi").post("/".concat("all","/").concat("metadata"),r).then((function(t){return t.data})).catch((function(t){return Pa.error(t),Promise.reject(t)}))}var qa=new kn("Principal"),Ca=function(){function t(e){I()(this,t),S()(this,"id",void 0),S()(this,"type",void 0),this.id=e.id,this.type=e.type}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{id:this.id,type:this.type}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),La=function(){function t(e){I()(this,t),S()(this,"id",void 0),S()(this,"type",void 0),Z(e)?(this.setId(e.get("id")),this.setType(e.get("type"))):Jn(e)&&(this.setId(e.id),this.setType(e.type))}return E()(t,[{key:"setId",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "id" must be a non-empty string');return this.id=t,this}},{key:"setType",value:function(t){if(!Ci[t])throw new Error('invalid parameter: "type" must be a valid PrincipalType');return this.type=t,this}},{key:"build",value:function(){if(!this.id)throw new Error('missing property: "id" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');return new Ca({id:this.id,type:this.type})}}]),t}(),Ka=(new kn("Ace"),function(){function t(e){I()(this,t),S()(this,"permissions",void 0),S()(this,"principal",void 0),this.principal=e.principal,this.permissions=e.permissions}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{permissions:this.permissions,principal:this.principal.toObject()}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Ba=function(){function t(e){I()(this,t),S()(this,"permissions",void 0),S()(this,"principal",void 0),Z(e)?(this.setPermissions(e.get("permissions")),this.setPrincipal(e.get("principal"))):Jn(e)&&(this.setPermissions(e.permissions),this.setPrincipal(e.principal))}return E()(t,[{key:"setPermissions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "permissions" must be an array');var e=fn(t);if(!e.every((function(t){return qi[t]})))throw new Error('invalid parameter: "permissions" must be an array of PermissionTypes');return this.permissions=e.toJS(),this}},{key:"setPrincipal",value:function(t){return this.principal=new La(t).build(),this}},{key:"build",value:function(){if(this.permissions||(this.permissions=[]),!this.principal)throw new Error("missing property: principal is a required property");return new Ka({permissions:this.permissions,principal:this.principal})}}]),t}(),Fa=(new kn("Acl"),function(){function t(e){I()(this,t),S()(this,"aces",void 0),S()(this,"aclKey",void 0),this.aces=e.aces,this.aclKey=e.aclKey}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{aces:this.aces.map((function(t){return t.toObject()})),aclKey:this.aclKey}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Va=function(){function t(e){I()(this,t),S()(this,"aces",void 0),S()(this,"aclKey",void 0),Z(e)?(this.setAces(e.get("aces")),this.setAclKey(e.get("aclKey"))):Jn(e)&&(this.setAces(e.aces),this.setAclKey(e.aclKey))}return E()(t,[{key:"setAces",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aces" must be an array');try{this.aces=hr(t).map((function(t){return new Ba(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "aces" must be an array of Aces')}return this}},{key:"setAclKey",value:function(t){if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aclKey" must be an array');var e=fn(t);if(e.isEmpty()||!e.every(si))throw new Error('invalid parameter: "aclKey" must be a non-empty array of UUIDs');return this.aclKey=e.toJS(),this}},{key:"build",value:function(){if(this.aces||(this.aces=[]),!this.aclKey)throw new Error('missing property: "aclKey" is a required property');return new Fa({aces:this.aces,aclKey:this.aclKey})}}]),t}(),Ja=new kn("AclData"),Ga=function(){function t(e){I()(this,t),S()(this,"acl",void 0),S()(this,"action",void 0),this.acl=e.acl,this.action=e.action}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{acl:this.acl.toObject(),action:this.action}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Wa=function(){function t(e){I()(this,t),S()(this,"acl",void 0),S()(this,"action",void 0),Z(e)?(this.setAcl(e.get("acl")),this.setAction(e.get("action"))):Jn(e)&&(this.setAcl(e.acl),this.setAction(e.action))}return E()(t,[{key:"setAcl",value:function(t){return this.acl=new Va(t).build(),this}},{key:"setAction",value:function(t){if(!xi[t])throw new Error('invalid parameter: "action" must be a valid ActionType');return this.action=t,this}},{key:"build",value:function(){if(!this.acl)throw new Error('missing property: "acl" is a required property');if(!this.action)throw new Error('missing property: "action" is a required property');return new Ga({acl:this.acl,action:this.action})}}]),t}(),Ha=function(t){return pi(t,Wa,Ja)},Qa=(new kn("App"),function(){function t(e){I()(this,t),S()(this,"appTypeIds",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"name",void 0),S()(this,"title",void 0),S()(this,"url",void 0),this.appTypeIds=e.appTypeIds,this.name=e.name,this.title=e.title,this.url=e.url,Jn(e.id)&&(this.id=e.id),Jn(e.description)&&(this.description=e.description)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={appTypeIds:this.appTypeIds,name:this.name,title:this.title,url:this.url};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),$a=function(){function t(e){I()(this,t),S()(this,"appTypeIds",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"name",void 0),S()(this,"title",void 0),S()(this,"url",void 0),Z(e)?(this.setAppTypeIds(e.get("appTypeIds")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setName(e.get("name")),this.setTitle(e.get("title")),this.setUrl(e.get("url"))):Jn(e)&&(this.setAppTypeIds(e.appTypeIds),this.setDescription(e.description),this.setId(e.id),this.setName(e.name),this.setTitle(e.title),this.setUrl(e.url))}return E()(t,[{key:"setAppTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appTypeIds" must be a non-empty array of UUIDs');return this.appTypeIds=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setUrl",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "url" must be a non-empty string');return this.url=t,this}},{key:"build",value:function(){if(this.appTypeIds||(this.appTypeIds=[]),!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.url)throw new Error('missing property: "url" is a required property');return new Qa({appTypeIds:this.appTypeIds,description:this.description,id:this.id,name:this.name,title:this.title,url:this.url})}}]),t}(),Xa=(new kn("AppType"),function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"id",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.entityTypeId=e.entityTypeId,this.title=e.title,this.type=e.type,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={entityTypeId:this.entityTypeId,title:this.title,type:this.type.toObject()};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Za=function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"id",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setId(e.get("id")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setId(e.id),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "appTypeId" must be a valid UUID');return this.id=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new Xa({description:this.description,entityTypeId:this.entityTypeId,id:this.id,title:this.title,type:this.type})}}]),t}(),Ya=(new kn("EntityDataKey"),function(){function t(e){I()(this,t),S()(this,"entityKeyId",void 0),S()(this,"entitySetId",void 0),this.entityKeyId=e.entityKeyId,this.entitySetId=e.entitySetId}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityKeyId:this.entityKeyId,entitySetId:this.entitySetId}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),ts=function(){function t(e){I()(this,t),S()(this,"entityKeyId",void 0),S()(this,"entitySetId",void 0),Z(e)?(this.setEntityKeyId(e.get("entityKeyId")),this.setEntitySetId(e.get("entitySetId"))):Jn(e)&&(this.setEntityKeyId(e.entityKeyId),this.setEntitySetId(e.entitySetId))}return E()(t,[{key:"setEntityKeyId",value:function(t){if(!si(t))throw new Error("invalid parameter: entityKeyId must be a valid UUID");return this.entityKeyId=t,this}},{key:"setEntitySetId",value:function(t){if(!si(t))throw new Error("invalid parameter: entitySetId must be a valid UUID");return this.entitySetId=t,this}},{key:"build",value:function(){if(!this.entityKeyId)throw new Error("missing property: entityKeyId is a required property");if(!this.entitySetId)throw new Error("missing property: entitySetId is a required property");return new Ya({entityKeyId:this.entityKeyId,entitySetId:this.entitySetId})}}]),t}(),es=new kn("Grant"),rs=function(){function t(e){I()(this,t),S()(this,"attribute",void 0),S()(this,"grantType",void 0),S()(this,"mappings",void 0),this.attribute=e.attribute,this.grantType=e.grantType,this.mappings=e.mappings}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{attribute:this.attribute,grantType:this.grantType,mappings:this.mappings}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),ns=function(){function t(e){I()(this,t),S()(this,"attribute",void 0),S()(this,"grantType",void 0),S()(this,"mappings",void 0),Z(e)?(this.setAttribute(e.get("attribute")),this.setGrantType(e.get("grantType")),this.setMappings(e.get("mappings"))):Jn(e)&&(this.setAttribute(e.attribute),this.setGrantType(e.grantType),this.setMappings(e.mappings))}return E()(t,[{key:"setAttribute",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "attribute" must be a string');return this.attribute=t,this}},{key:"setGrantType",value:function(t){if(!Object.values(Mi).includes(t))throw new Error('invalid parameter: "grantType" must be a valid GrantType');return this.grantType=t,this}},{key:"setMappings",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "mappings" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "mappings" must be a non-empty array of non-empty strings');return this.mappings=e.toJS(),this}},{key:"build",value:function(){if(this.attribute||(this.attribute=""),!this.grantType)throw new Error("missing property: grantType is a required property");return this.mappings||(this.mappings=[]),new rs({attribute:this.attribute,grantType:this.grantType,mappings:this.mappings})}}]),t}(),is=function(t){return pi(t,ns,es)},os=r(14),as=r.n(os),ss=r(72),us=r.n(ss),cs=new kn("Role"),ps=function(){function t(e){I()(this,t),S()(this,"aclKey",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"organizationId",void 0),S()(this,"principal",void 0),S()(this,"title",void 0),this.organizationId=e.organizationId,this.principal=e.principal,this.title=e.title,this[Zi]="com.openlattice.organization.roles.Role",Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.aclKey=[e.organizationId,e.id],this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={organizationId:this.organizationId,principal:this.principal.toObject(),title:this.title};return t[Zi]="com.openlattice.organization.roles.Role",Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.aclKey=[this.organizationId,this.id],t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),fs=function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"organizationId",void 0),S()(this,"principal",void 0),S()(this,"title",void 0),Z(e)?(this.setDescription(e.get("description")),this.setId(e.get("id")),this.setOrganizationId(e.get("organizationId")),this.setPrincipal(e.get("principal")),this.setTitle(e.get("title"))):Jn(e)&&(this.setDescription(e.description),this.setId(e.id),this.setOrganizationId(e.organizationId),this.setPrincipal(e.principal),this.setTitle(e.title))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setOrganizationId",value:function(t){if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setPrincipal",value:function(t){return this.principal=new La(t).build(),this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.organizationId)throw new Error('missing property: "organizationId" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new ps({description:this.description,id:this.id,organizationId:this.organizationId,principal:this.principal,title:this.title})}}]),t}(),hs=new kn("Organization"),ls=function(){function t(e){I()(this,t),S()(this,"apps",void 0),S()(this,"connections",void 0),S()(this,"description",void 0),S()(this,"emailDomains",void 0),S()(this,"grants",void 0),S()(this,"id",void 0),S()(this,"members",void 0),S()(this,"metadataEntitySetIds",void 0),S()(this,"partitions",void 0),S()(this,"principal",void 0),S()(this,"roles",void 0),S()(this,"title",void 0),this.apps=e.apps,this.emailDomains=e.emailDomains,this.connections=e.connections,this.grants=e.grants,this.members=e.members,this.metadataEntitySetIds=e.metadataEntitySetIds,this.principal=e.principal,this.roles=e.roles,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.partitions)&&(this.partitions=e.partitions)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={apps:this.apps,connections:this.connections,emailDomains:this.emailDomains,grants:us()(this.grants,(function(t){return t.toObject()})),members:this.members.map((function(t){return t.toObject()})),metadataEntitySetIds:this.metadataEntitySetIds,principal:this.principal.toObject(),roles:this.roles.map((function(t){return t.toObject()})),title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),Jn(this.partitions)&&(t.partitions=this.partitions),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),ds=function(){function t(e){I()(this,t),S()(this,"apps",void 0),S()(this,"connections",void 0),S()(this,"description",void 0),S()(this,"emailDomains",void 0),S()(this,"grants",void 0),S()(this,"id",void 0),S()(this,"members",void 0),S()(this,"metadataEntitySetIds",void 0),S()(this,"partitions",void 0),S()(this,"principal",void 0),S()(this,"roles",void 0),S()(this,"title",void 0),Z(e)?(this.setApps(e.get("apps")),this.setConnections(e.get("connections")),this.setDescription(e.get("description")),this.setEmailDomains(e.get("emailDomains")),this.setGrants(e.get("grants")),this.setId(e.get("id")),this.setMembers(e.get("members")),this.setMetaDataEntitySetIds(e.get("metadataEntitySetIds")),this.setPartitions(e.get("partitions")),this.setPrincipal(e.get("principal")),this.setRoles(e.get("roles")),this.setTitle(e.get("title"))):Jn(e)&&(this.setApps(e.apps),this.setConnections(e.connections),this.setDescription(e.description),this.setEmailDomains(e.emailDomains),this.setGrants(e.grants),this.setId(e.id),this.setMembers(e.members),this.setMetaDataEntitySetIds(e.metadataEntitySetIds),this.setPartitions(e.partitions),this.setPrincipal(e.principal),this.setRoles(e.roles),this.setTitle(e.title))}return E()(t,[{key:"setApps",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appIds" must be a non-empty array of UUIDs');return this.apps=e.toJS(),this}},{key:"setConnections",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "connections" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "connections" must be a non-empty array of non-empty strings');return this.connections=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEmailDomains",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "emailDomains" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "emailDomains" must be a non-empty array of non-empty strings');return this.emailDomains=e.toJS(),this}},{key:"setGrants",value:function(t){if(!Jn(t))return this;if(!Ln()(t)&&!B(t))throw new Error('invalid parameter: "grants" must be an object');var e=Fe(t);if(!e.keySeq().every(si))throw new Error('invalid parameter: "grants" must be an object where all keys are valid UUIDs');if(!e.valueSeq().every(is))throw new Error('invalid parameter: "grants" must be an object where all values are valid Grants');return this.grants=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.id=t,this}},{key:"setMembers",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "members" must be an array');try{this.members=Kr(t).map((function(t){return new La(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "members" must be an array of Principals')}return this}},{key:"setMetaDataEntitySetIds",value:function(t){if(!Jn(t))return this;if(!si(ge(t,"columns")))throw new Error('invalid parameter: "metadataEntitySetIds.columns" must be a valid UUID');if(!si(ge(t,"datasets")))throw new Error('invalid parameter: "metadataEntitySetIds.datasets" must be a valid UUID');if(!si(ge(t,"organization")))throw new Error('invalid parameter: "metadataEntitySetIds.organization" must be a valid UUID');return this.metadataEntitySetIds={columns:ge(t,"columns"),datasets:ge(t,"datasets"),organization:ge(t,"organization")},this}},{key:"setPartitions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "partitions" must be an array');var e=hr(t);if(!e.every(as.a))throw new Error('invalid parameter: "partitions" must be a non-empty array of numbers');return this.partitions=e.toJS(),this}},{key:"setPrincipal",value:function(t){if(this.principal=new La(t).build(),this.principal.type!==Ci.ORGANIZATION)throw new Error('invalid parameter: "principal" must be PrincipalType.ORGANIZATION');return this}},{key:"setRoles",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "roles" must be an array');try{this.roles=Kr(t).map((function(t){return new fs(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "roles" must be an array of Roles')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');return this.apps||(this.apps=[]),this.connections||(this.connections=[]),this.emailDomains||(this.emailDomains=[]),this.grants||(this.grants={}),this.members||(this.members=[]),this.metadataEntitySetIds||(this.metadataEntitySetIds={}),this.roles||(this.roles=[]),new ls({apps:this.apps,connections:this.connections,description:this.description,emailDomains:this.emailDomains,grants:this.grants,id:this.id,members:this.members,metadataEntitySetIds:this.metadataEntitySetIds,partitions:this.partitions,principal:this.principal,roles:this.roles,title:this.title})}}]),t}(),ys=new kn("PermissionsApi");function vs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function ms(t){var e="";return Qn(t)?t.every((function(t){return t.every(si)}))?Ei("PermissionsApi").post("/".concat("bulk"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKeys" is not valid UUID[][]',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKeys" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function gs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/".concat("explain"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ys.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ys.error(e,t),Promise.reject(e))}function _s(t){var e="";return Ha(t)?Ei("PermissionsApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be a valid AclData object",ys.error(e,t),Promise.reject(e))}function bs(t){var e="";return Qn(t)?t.every(Ha)?Ei("PermissionsApi").patch("/".concat("update"),t).then((function(t){return t.data})).catch((function(t){return ys.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be an array of valid AclData objects",ys.error(e,t),Promise.reject(e)):(e="invalid parameter: aclData must be a non-empty array",ys.error(e,t),Promise.reject(e))}var ws=new kn("OrganizationsApi"),Is={headers:{"Content-Type":"text/plain"}};function js(t,e,r){var n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",ws.error(n,t),Promise.reject(n);if(!Xn(e))return n="invalid parameter: principalId must be a non-empty string",ws.error(n,e),Promise.reject(n);if(!Xn(r)||!xi[r])return n="invalid parameter: action must be a valid ActionType",ws.error(n,r),Promise.reject(n);var i=(new La).setId(e).setType(Ci.ORGANIZATION).build(),o=(new Ba).setPermissions([qi.READ]).setPrincipal(i).build(),a=(new Va).setAclKey([t]).setAces([o]).build();return _s((new Wa).setAction(r).setAcl(a).build())}function Es(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "connections" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("connections"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Ts(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("email-domains"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Ss(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function As(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Ps(t){var e="";return pi(t,ds,hs)?Ei("OrganizationsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organization" must be a valid Organization',ws.error(e,t),Promise.reject(e))}function Os(t){var e="";return pi(t,fs,cs)?Ei("OrganizationsApi").post("/".concat("roles"),t).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "role" must be a valid Role',ws.error(e,t),Promise.reject(e))}function Ds(t){var e="";return si(t)?Ei("OrganizationsApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function Us(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "roleId" must be a valid UUID',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function xs(){return Ei("OrganizationsApi").get("/").then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function zs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function ks(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("database")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',ws.error(e,t),Promise.reject(e))}function Rs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("entity-sets")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Ms(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("integration")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Ns(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("members")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function qs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",ws.error(e,t),Promise.reject(e))}function Cs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",ws.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",ws.error(r,t),Promise.reject(r))}function Ls(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members")).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",ws.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",ws.error(r,t),Promise.reject(r))}function Ks(t,e){return js(t,e,xi.ADD)}function Bs(t,e){var r,n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n="invalid parameter: connections must be an array of strings",ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("connections"),{data:r}).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Fs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',ws.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("email-domains"),{data:r}).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Vs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function Js(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Gs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").patch("/".concat(t,"/").concat("database"),e,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "databaseName" must be a non-empty string',ws.error(r,t),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function Ws(t,e){return js(t,e,xi.REMOVE)}function Hs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n);if(!Jn(e)||Hn(e))r="";else{if(!Xn(e))return n='invalid parameter: "description" must be a non-empty string',ws.error(n,e),Promise.reject(n);r=e}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("description"),r,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Qs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("title"),e,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(r='invalid parameter: "title" must be a non-empty string',ws.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',ws.error(r,t),Promise.reject(r))}function $s(t,e,r){var n,i="";if(!si(t))return i='invalid parameter: "organizationId" must be a valid UUID',ws.error(i,t),Promise.reject(i);if(!si(e))return i='invalid parameter: "roleId" must be a valid UUID',ws.error(i,e),Promise.reject(i);if(!Jn(r)||Hn(r))n="";else{if(!Xn(r))return i='invalid parameter: "description" must be a non-empty string',ws.error(i,r),Promise.reject(i);n=r}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("description"),n,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)}))}function Xs(t,e,r){var n="";return si(t)?si(e)?is(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("grant"),r).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "grant" must be a valid Grant',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}function Zs(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("title"),r,Is).then((function(t){return t.data})).catch((function(t){return ws.error(t),Promise.reject(t)})):(n='invalid parameter: "title" must be a non-empty string',ws.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',ws.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',ws.error(n,t),Promise.reject(n))}var Ys=new kn("PersistentSearchApi");function tu(t){var e="";return $n(t)?Ei("PersistentSearchApi").post("",t).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearch" must be a non-empty object',Ys.error(e,t),Promise.reject(e))}function eu(t){var e="";return si(t)?Ei("PersistentSearchApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearchId" must be a valid UUID',Ys.error(e,t),Promise.reject(e))}function ru(t){var e="";return Mo()(t)?Ei("PersistentSearchApi").get("?includeExpired=".concat(t)).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(e='invalid parameter: "includeExpired" must be a boolean',Ys.error(e,t),Promise.reject(e))}function nu(t,e){var r="";return si(t)?Xn(e)?Ei("PersistentSearchApi").patch("/".concat(t,"/").concat("expiration"),e).then((function(t){return t.data})).catch((function(t){return Ys.error(t),Promise.reject(t)})):(r='invalid parameter: "expiration" must be a valid string',Ys.error(r,t),Promise.reject(r)):(r='invalid parameter: "persistentSearchId" must be a valid UUID',Ys.error(r,t),Promise.reject(r))}var iu=new kn("PrincipalsApi");function ou(){return Ei("PrincipalsApi").get("/".concat("roles")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function au(){return Ei("PrincipalsApi").get("/".concat("users")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function su(){return Ei("PrincipalsApi").get("/".concat("roles","/").concat("current")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}function uu(t){var e="";return pi(t,La,qa)?Ei("PrincipalsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: principal must be a valid Principal",iu.error(e,t),Promise.reject(e))}function cu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat(t)).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: userId must be a non-empty string",iu.error(e,t),Promise.reject(e))}function pu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat("search","/").concat(t)).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)})):(e="invalid parameter: searchQuery must be a non-empty string",iu.error(e,t),Promise.reject(e))}function fu(){return Ei("PrincipalsApi").get("/".concat("sync")).then((function(t){return t.data})).catch((function(t){return iu.error(t),Promise.reject(t)}))}var hu=new kn("SearchApi");function lu(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",hu.error(n,t),Promise.reject(n);if("boolean"!=typeof r)return n="invalid parameter: idsOnly must be a boolean",hu.error(n,r),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",hu.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),hu.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s,u=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=u,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),hu.error(n,e[ao]),Promise.reject(n);if(Gn(e[so])||ui(e[so]))a=Kr().withMutations((function(t){return e[so].forEach((function(e){return t.add(e)}))})).toJS(),i.edge=a;else if(Jn(e[so]))return n="invalid parameter: filter.".concat(so," must be a set of valid UUIDs"),hu.error(n,e[so]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))s=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=s;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),hu.error(n,e[uo]),Promise.reject(n);var c="/".concat(t,"/").concat("neighbors","/").concat("advanced"),p=r?"".concat(c,"/").concat("ids"):c;return Ei("SearchApi").post(p,i).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function du(t){var e="";if(!$n(t))return e='invalid parameter: "searchConstraints" must be a non-empty object',hu.error(e,t),Promise.reject(e);var r=t.entitySetIds,n=t.maxHits,i=t.start;return ui(r)?!as()(i)||i<0?(e='invalid property: "start" must be a positive number',hu.error(e,i),Promise.reject(e)):!as()(n)||n<0?(e='invalid property: "maxHits" must be a positive number',hu.error(e,n),Promise.reject(e)):Ei("SearchApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetIds" must be a non-empty array of valid UUIDs',hu.error(e,r),Promise.reject(e))}function yu(t){var e="";if(!$n(t))return e='invalid parameter: "searchOptions" must be a non-empty object',hu.error(e,t),Promise.reject(e);var r={},n=t.entityTypeId,i=t.maxHits,o=t.organizationId,a=t.propertyTypeIds,s=t.searchTerm,u=t.start;if(!as()(u)||u<0)return e='invalid property: "start" must be a positive number',hu.error(e,u),Promise.reject(e);if(!as()(i)||i<0)return e='invalid property: "maxHits" must be a positive number',hu.error(e,i),Promise.reject(e);if(r.start=u,r.maxHits=i,Jn(s)){if(!Xn(s))return e='invalid property: "searchTerm" must be a non-empty string',hu.error(e,s),Promise.reject(e);r.kw=s}if(Jn(n)){if(!si(n))return e='invalid parameter: "entityTypeId" must be a valid UUID',hu.error(e,n),Promise.reject(e);r.entityTypeId=n}if(Jn(a)){if(!ui(a))return e='invalid parameter: "propertyTypeIds" must be a non-empty array of valid UUIDs',hu.error(e,a),Promise.reject(e);r.pid=Kr().withMutations((function(t){a.forEach((function(e){t.add(e)}))})).toJS()}else r.excludePropertyTypes=!0;return si(o)&&(r.organizationId=o),Ei("SearchApi").post("/",r).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}var vu="v0.82.2";e.default={AppApi:n,AuthorizationsApi:o,CodexApi:a,DataApi:u,DataIntegrationApi:c,DataSetsApi:p,EntityDataModelApi:f,EntitySetsApi:h,OrganizationsApi:y,PermissionsApi:d,PersistentSearchApi:v,PrincipalsApi:m,SearchApi:g,Constants:s,Models:l,Types:i,configure:yi,version:vu}}])})); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 29c67ae0..dd03c757 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lattice", - "version": "0.82.1", + "version": "0.82.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7e3a572e..e4efcbdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lattice", - "version": "0.82.1", + "version": "0.82.2", "homepage": "https://github.com/openlattice/lattice-js", "description": "JavaScript SDK for all OpenLattice REST APIs", "author": {