@esri/hub-common 9.23.3 → 9.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es2017/content/fetch.js +14 -8
- package/dist/es2017/content/fetch.js.map +1 -1
- package/dist/esm/content/fetch.js +19 -11
- package/dist/esm/content/fetch.js.map +1 -1
- package/dist/node/content/fetch.js +14 -8
- package/dist/node/content/fetch.js.map +1 -1
- package/dist/types/search/types.d.ts +2 -0
- package/dist/umd/common.umd.js +19 -11
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +1 -1
- package/dist/umd/common.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisHub=e.arcgisHub||{})}(this,function(n){"use strict";function o(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function i(e,r,n){return n=n||"",Array.isArray(e)?e.map(t):!e||!c(e)||s(e)||l(e)||u(e)?r(e,n):Object.assign({},e,o(e,t));function t(e,t){return i(e,r,""+(n?n+"."+t:t))}}function a(e){return"string"==typeof e||e instanceof String}function s(e){return e instanceof Date}function u(e){return"function"==typeof e}function c(e){return"object"==typeof e}function l(e){return e instanceof RegExp}function q(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:void 0},e)}function p(e){var t,r={};if(Array.isArray(e))r=e.map(p);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(null!=(t=e[n])&&"object"==typeof t?t instanceof Date?r[n]=new Date(t.getTime()):r[n]=p(t):r[n]=t);else r=e;return r}function d(e,r,n){return e?e.reduce(function(e,t){return e=q(t,r)===n?t:e},null):null}function r(e){return""+(e=void 0===e?"i":e)+Math.random().toString(36).substr(2,8)}function f(e,t){return null!=e&&(t=p(t)).push(e),t}function h(e){return(e=(e=e.toLowerCase()).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi," ")).replace(/(\-|\_|\.|\s)+(.)?/g,function(e,t,r){return r?r.toUpperCase():""}).replace(/(^|\/)([A-Z])/g,function(e,t,r){return e.toLowerCase()})}function m(e,t,r){return r.indexOf(e)===t}function g(e){return null==e}function t(e){return(e=Array.from(e))[0]=e[0].toUpperCase(),e.join("")}function b(e){return e.reduce(function(e,t){return e.concat(t)},[])}function y(e,t,r){void 0===r&&(r={});var t=t.split("."),n=e,o=t.length-1;t.forEach(function(e,t){n.hasOwnProperty(e)&&null!=n[e]?t===o&&("object"!=typeof n[e]||Array.isArray(n[e])?n[e]=r:n[e]=Object.assign(n[e],p(r))):n[e]=t===o?r:{},n=n[e]})}function v(e,t,r){t=q(e,t);return void 0!==t?t:r}function w(e,r,n){return i(e,function(e){if(!a(e))return e;var t=l(r)?r:new RegExp(r,"g");return e.replace(t,n)})}function A(t,r,e){return Array.isArray(e)&&e.length?(e.forEach(function(e){void 0!==q(t,e)&&y(r,e,q(t,e))}),r):t}function D(e,t,r){y(r,e=Array.isArray(e)?e.join("."):e,t)}function S(r,n){return Array.isArray(r)?r.reduce(function(e,t){return n(t)?e=t:!x(t)||(t=S(t,n))&&(e=t),e},void 0):x(r)?n(r)?r:Object.keys(r).reduce(function(e,t){return!x(r[t])||(t=S(r[t],n))&&(e=t),e},void 0):void 0}function x(e){var t=!1;return t=e&&c(e)&&!s(e)&&!l(e)&&!u(e)?!0:t}function E(e,n,o){void 0===o&&(o=5);return e.reduce(function(e,t){var r=e[e.length-1];return r&&r.length!==o||e.push(r=[]),r.push(t),e},[]).reduce(function(e,r){return e.then(function(t){var e=r.map(function(e){return n(e)});return Promise.all(e).then(function(e){return t.concat(e)})})},Promise.resolve([]))}function k(e,t){return-1!==e.indexOf(t)}var C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function e(e,t){function r(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var I=function(){return(I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function T(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function O(e,a,s,u){return new(s=s||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((u=u.apply(e,a||[])).next())})}function P(r,n){var o,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=n.call(r,s)}catch(e){t=[6,e],i=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function U(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}var N,R=(e(F,N=Error),F);function F(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=v(r,"rootCause",r),(n=N.call(this,t)||this).operation=e,n.name="OperationError",n.rootCause=r,Object.setPrototypeOf(n,F.prototype),n.stack=v(r,"stack",(new Error).stack),n}function L(e){return function(r){return e.reduce(function(e,t){return e.then(t).catch(function(e){if("OperationError"===e.name)return Promise.reject(e);e="IPipeableFn did not reject with an OperationError \n Operation Stack: \n "+r.stack.toString(),e=new R("pipeline execution error",e);return e.operationStack=r.stack.serialize(),Promise.reject(e)})},Promise.resolve(r))}}function _(r,n){return void 0===n&&(n={}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e).catch(function(e){return n})}}function j(e){var r=(new Date).getTime();return Array(e).fill(0).reduce(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),e=""+e+t.toString(16)},"")}function B(e){"{"===e[0]&&(e=e.substring(1,e.length-1));return/^(\{){0,1}[0-9a-fA-F]{8}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{12}(\}){0,1}$/gi.test(e)}function M(e){return"string"==typeof e?e.trim().toLowerCase().replace(/ +/g,"-").replace(/[^\w-]/g,"").replace(/-+/g,"-"):e}n.Level=void 0,(Ut=n.Level||(n.Level={}))[Ut.all=0]="all",Ut[Ut.debug=1]="debug",Ut[Ut.info=2]="info",Ut[Ut.warn=3]="warn",Ut[Ut.error=4]="error",Ut[Ut.off=5]="off";var G=(V.setLogLevel=function(e){this.logLevel=e},V.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.log.apply(console,U([e],t))},V.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.debug.apply(console,U([e],t))},V.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.info)&&console.info.apply(console,U([e],t))},V.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.warn)&&console.warn.apply(console,U([e],t))},V.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.error)&&console.error.apply(console,U([e],t))},V.isLevelPermitted=function(e){return this.logLevel<=e},V.logLevel=n.Level.off,V);function V(){}function H(e){return e.capabilities.includes("updateitemcontrol")}function z(t){return Object.keys(t).some(function(e){e=t[e];if(!e)return!1;switch((e=e&&e.toParam?e.toParam():e).constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}})}function Y(o){var i={};return Object.keys(o).forEach(function(e){var t=o[e];if((t=t&&t.toParam?t.toParam():t)||0===t||"boolean"==typeof t||"string"==typeof t){switch(t.constructor.name){case"Array":var r=null===(r=null===(r=t[0])||void 0===r?void 0:r.constructor)||void 0===r?void 0:r.name,n="Array"===r?t:"Object"===r?JSON.stringify(t):t.join(",");break;case"Object":n=JSON.stringify(t);break;case"Date":n=t.valueOf();break;case"Function":n=null;break;case"Boolean":n=t+"";break;default:n=t}(n||0===n||"string"==typeof n||Array.isArray(n))&&(i[e]=n)}}),i}function W(e){var t=Y(e);return Object.keys(t).map(function(e){return function t(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(function(e){return t(r,e)}).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}(e,t[e])}).join("&")}var K=function(e,t,r,n,o){e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message="UNKNOWN_ERROR_CODE"===t?e:t+": "+e,this.originalMessage=e,this.code=t,this.response=r,this.url=n,this.options=o};function J(e){console&&console.warn&&console.warn.apply(console,[e])}K.prototype=Object.create(Error.prototype),K.prototype.constructor=K;var Z,Q="@esri/arcgis-rest-js",$={httpMethod:"POST",params:{f:"json"}},X=(e(ee,Z=K),ee.prototype.retry=function(e,n){var o=this;void 0===n&&(n=3);var i=0,a=function(t,r){e(o.url,o.options).then(function(e){e=I(I({},o.options),{authentication:e});return i+=1,te(o.url,e)}).then(function(e){t(e)}).catch(function(e){"ArcGISAuthError"===e.name&&i<n?a(t,r):"ArcGISAuthError"===e.name&&n<=i?r(o):r(e)})};return new Promise(function(e,t){a(e,t)})},ee);function ee(e,t,r,n,o){o=Z.call(this,e=void 0===e?"AUTHENTICATION_ERROR":e,t=void 0===t?"AUTHENTICATION_ERROR_CODE":t,r,n,o)||this;return o.name="ArcGISAuthError",o.message="AUTHENTICATION_ERROR_CODE"===t?e:t+": "+e,o}function te(n,e){void 0===e&&(e={params:{f:"json"}});var o=I(I(I({httpMethod:"POST"},$),e),{params:I(I({},$.params),e.params),headers:I(I({},$.headers),e.headers)}),t=[],e=[];if(o.fetch||"undefined"==typeof fetch?(t.push("`fetch`"),e.push("`node-fetch`")):o.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(t.push("`Promise`"),e.push("`es6-promise`")),"undefined"==typeof FormData&&(t.push("`FormData`"),e.push("`isomorphic-form-data`")),!o.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing "+t.join(", ")+". We recommend installing the "+e.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var e=o.httpMethod,i=o.authentication,a=o.rawResponse,s=I({f:"json"},o.params),r=null,u={method:e,credentials:o.credentials||"same-origin"};return o.headers&&o.headers["X-Esri-Auth-Client-Id"]&&-1<n.indexOf("/oauth2/platformSelf")&&(u.credentials="include"),(i?i.getToken(n,{fetch:o.fetch}).catch(function(e){return e.url=n,e.options=o,r=e,Promise.resolve("")}):Promise.resolve("")).then(function(e){e.length&&(s.token=e),i&&i.getDomainCredentials&&(u.credentials=i.getDomainCredentials(n));var t={};"GET"===u.method&&(s.token&&o.hideToken&&"undefined"==typeof window&&(t["X-Esri-Authorization"]="Bearer "+s.token,delete s.token),r=""===W(s)?n:n+"?"+W(s),o.maxUrlLength&&r.length>o.maxUrlLength||s.token&&o.hideToken?(u.method="POST",e.length&&o.hideToken&&(s.token=e,delete t["X-Esri-Authorization"])):n=r);var r=new RegExp("/items/.+/updateResources").test(n);return"POST"===u.method&&(u.body=function(e,t){var t=z(e)||t,r=Y(e);if(t){var n=new FormData;return Object.keys(r).forEach(function(e){var t;"undefined"!=typeof Blob&&r[e]instanceof Blob?(t=r.fileName||r[e].name||e,n.append(e,r[e],t)):n.append(e,r[e])}),n}return W(e)}(s,r)),u.headers=I(I({},t),o.headers),"undefined"!=typeof window||u.headers.referer||(u.headers.referer=Q),z(s)||r||(u.headers["Content-Type"]="application/x-www-form-urlencoded"),o.fetch(n,u)}).then(function(e){if(!e.ok){var t=e.status,r=e.statusText;throw new K(r,"HTTP "+t,e,n,o)}if(a)return e;switch(s.f){case"json":case"geojson":return e.json();case"html":case"text":return e.text();default:return e.blob()}}).then(function(e){if("json"!==s.f&&"geojson"!==s.f||a)return e;var t=function(t,e,r,n){if(400<=t.code){var o=t.message,i=t.code;throw new K(o,i,t,e,r)}if(t.error){var a=t.error,o=a.message,i=a.code,s=a.messageCode,a=s||i||"UNKNOWN_ERROR_CODE";if(498===i||499===i||"GWM_0003"===s||400===i&&"Unable to generate token."===o)throw n||new X(o,a,t,e,r);throw new K(o,a,t,e,r)}if("failed"!==t.status&&"failure"!==t.status)return t;o=void 0,i="UNKNOWN_ERROR_CODE";try{o=JSON.parse(t.statusMessage).message,i=JSON.parse(t.statusMessage).code}catch(e){o=t.statusMessage||t.message}throw new K(o,i,t,e,r)}(e,n,o,r);return r&&(e=n.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0],o.authentication.federatedServers[e]={token:[],expires:new Date(Date.now()+864e5)},r=null),t})}function re(r,e,t){var n=I(I({params:{}},t),r);return n.params=e.reduce(function(e,t){return!r[t]&&"boolean"!=typeof r[t]||(e[t]=r[t]),e},n.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}function ne(e){return"string"==typeof e&&"/"===(e=e.trim())[e.length-1]?e.slice(0,-1):e}function oe(e){return e.replace(/^#/,"").split("&").reduce(function(e,t){var r,t=(r=t,r=(t=t.split("="))[0],t=t[1],{key:decodeURIComponent(r),value:decodeURIComponent(t)});return e[t.key]=t.value,e},{})}function ie(e,t){return t.rawResponse=!1,te(e,t).then(function(e){var t={token:e.access_token,username:e.username,expires:new Date(Date.now()+(1e3*e.expires_in-1e3)),ssl:!0===e.ssl};return e.refresh_token&&(t.refreshToken=e.refresh_token),t})}function ae(e,t){return"undefined"!=typeof window&&window.location&&window.location.host?t.params.referer=window.location.host:t.params.referer=Q,te(e,t)}var se=/^https?:\/\/(\S+)\.arcgis\.com.+/;function ue(e){return se.test(e)}function ce(e){if(!se.test(e))return null;e=e.match(se)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}function le(e,t){t=ne(function(e){if(!se.test(e))return e;switch(ce(e)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(t)).replace(/https?:\/\//,""),e=ne(e).replace(/https?:\/\//,"");return new RegExp(e,"i").test(t)}var pe=(Object.defineProperty(de.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),de.beginOAuth2=function(e,t){void 0===t&&(t=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),n=r.portal,o=r.provider,i=r.clientId,a=r.expiration,s=r.redirectUri,u=r.popup,c=r.popupWindowFeatures,l=r.state,p=r.locale,r=r.params,p="arcgis"===o?n+"/oauth2/authorize?client_id="+i+"&response_type=token&expiration="+(e.duration||a)+"&redirect_uri="+encodeURIComponent(s)+"&state="+l+"&locale="+p:n+"/oauth2/social/authorize?client_id="+i+"&socialLoginProviderName="+o+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||a)+"&redirect_uri="+encodeURIComponent(s)+"&state="+l+"&locale="+p;if(r&&(p=p+"&"+W(r)),u){var d,f=((d={promise:null,resolve:null,reject:null}).promise=new Promise(function(e,t){d.resolve=e,d.reject=t}),d);return t["__ESRI_REST_AUTH_HANDLER_"+i]=function(e,t){e?(e=JSON.parse(e),f.reject(new X(e.errorMessage,e.error))):t&&(t=JSON.parse(t),f.resolve(new de({clientId:i,portal:n,ssl:t.ssl,token:t.token,tokenExpires:new Date(t.expires),username:t.username})))},t.open(p,"oauth-window",c),f.promise}t.location.href=p},de.completeOAuth2=function(e,o){void 0===o&&(o=window);var t=I({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),i=t.portal,a=t.clientId,s=t.popup;function r(e,t){try{var r=void 0,n="__ESRI_REST_AUTH_HANDLER_"+a;if(s&&(o.opener?o.opener.parent&&o.opener.parent[n]?r=o.opener.parent[n]:o.opener&&o.opener[n]&&(r=o.opener[n]):o!==o.parent&&o.parent&&o.parent[n]&&(r=o.parent[n]),r))return r(e?JSON.stringify(e):void 0,JSON.stringify(t)),void o.close()}catch(e){throw new X('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new X(e.errorMessage,e.error);return new de({clientId:a,portal:i,ssl:t.ssl,token:t.token,tokenExpires:t.expires,username:t.username})}e=oe(o.location.hash);if(!e.access_token){var n=void 0,u="Unknown error";return e.error&&(n=e.error,u=e.error_description),r({error:n,errorMessage:u})}t=e.access_token,n=new Date(Date.now()+1e3*parseInt(e.expires_in,10)-6e4),u=e.username;return r(void 0,{token:t,expires:n,ssl:"true"===e.ssl,username:u})},de.fromParent=function(e,n){var o;return!n&&window&&(n=window),new Promise(function(t,r){o=function(e){if(e.source===n.parent&&e.data)try{return t(de.parentMessageHandler(e))}catch(e){return r(e)}},n.addEventListener("message",o,!1),n.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(function(e){return n.removeEventListener("message",o,!1),e})},de.authorize=function(e,t){e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),n=r.portal,o=r.clientId,i=r.expiration,r=r.redirectUri;t.writeHead(301,{Location:n+"/oauth2/authorize?client_id="+o+"&expiration="+(e.duration||i)+"&response_type=code&redirect_uri="+encodeURIComponent(r)}),t.end()},de.exchangeAuthorizationCode=function(e,t){var e=I({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=e.portal,n=e.clientId,o=e.redirectUri,i=e.refreshTokenTTL;return ie(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:n,redirect_uri:o,code:t}}).then(function(e){return new de({clientId:n,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:i,refreshTokenExpires:new Date(Date.now()+60*(i-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})})},de.deserialize=function(e){e=JSON.parse(e);return new de({clientId:e.clientId,refreshToken:e.refreshToken,refreshTokenExpires:new Date(e.refreshTokenExpires),username:e.username,password:e.password,token:e.token,tokenExpires:new Date(e.tokenExpires),portal:e.portal,ssl:e.ssl,tokenDuration:e.tokenDuration,redirectUri:e.redirectUri,refreshTokenTTL:e.refreshTokenTTL})},de.fromCredential=function(e){var t=void 0===e.ssl||e.ssl,r=e.expires||Date.now()+72e5;return new de({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:t,token:e.token,username:e.userId,tokenExpires:new Date(r)})},de.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return de.fromCredential(e.data.credential);if("arcgis:auth:error"!==e.data.type)throw new Error("Unknown message type.");var t=new Error(e.data.error.message);throw t.name=e.data.error.name,t},de.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},de.prototype.getUser=function(e){var t=this;if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);var r=this.portal+"/community/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=te(r,e).then(function(e){return t._user=e,t._pendingUserRequest=null,e}),this._pendingUserRequest},de.prototype.getPortal=function(e){var t=this;if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);var r=this.portal+"/portals/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=te(r,e).then(function(e){return t._portalInfo=e,t._pendingPortalRequest=null,e}),this._pendingPortalRequest},de.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then(function(e){return e.username})},de.prototype.getToken=function(e,t){return r=this.portal,n=e,o=ue(r),i=ue(n),r=ce(r),n=ce(n),o&&i&&r===n||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t);var r,n,o,i},de.prototype.validateAppAccess=function(r){return this.getToken(this.portal).then(function(e){return te((t=void 0===t?"https://www.arcgis.com/sharing/rest":t)+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:r,token:e}});var t})},de.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},de.prototype.serialize=function(){return JSON.stringify(this)},de.prototype.enablePostMessageAuth=function(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)},de.prototype.disablePostMessageAuth=function(e){(e=!e&&window?window:e).removeEventListener("message",this._hostHandler,!1)},de.prototype.refreshSession=function(e){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new X("Unable to refresh token."))},de.prototype.getServerRootUrl=function(e){var t=ne(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/);t[0];var r=t[1],e=t[2].split("/"),t=e[0],e=e.slice(1);return""+r+t.toLowerCase()+"/"+e.join("/")},de.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some(function(e){return t.startsWith(e)})?"include":"same-origin"},de.prototype.createPostMessageHandler=function(o){var i=this;return function(e){var t=-1<o.indexOf(e.origin),r="arcgis:auth:requestCredential"===e.data.type,n=i.tokenExpires.getTime()>Date.now();t&&r&&(r={},r=n?((n=i.toCredential()).server=n.server.replace("/sharing/rest",""),{type:"arcgis:auth:credential",credential:n}):{type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}},e.source.postMessage(r,e.origin))}},de.prototype.getTokenForServer=function(t,r){var n=this,o=this.getServerRootUrl(t),e=this.federatedServers[o];return e&&e.expires&&e.expires.getTime()>Date.now()?Promise.resolve(e.token):this._pendingTokenRequests[o]||(this._pendingTokenRequests[o]=this.fetchAuthorizedDomains().then(function(){return te(o+"/rest/info",{credentials:n.getDomainCredentials(t)}).then(function(e){if(e.owningSystemUrl){if(le(e.owningSystemUrl,n.portal))return te(e.owningSystemUrl+"/sharing/rest/info",r);throw new X(t+" is not federated with "+n.portal+".","NOT_FEDERATED")}if(e.authInfo&&void 0!==n.federatedServers[o])return Promise.resolve({authInfo:e.authInfo});throw new X(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")}).then(function(e){return e.authInfo.tokenServicesUrl}).then(function(e){return n.token&&n.tokenExpires.getTime()>Date.now()?ae(e,{params:{token:n.token,serverUrl:t,expiration:n.tokenDuration,client:"referer"}}):ae(e,{params:{username:n.username,password:n.password,expiration:n.tokenDuration,client:"referer"}}).then(function(e){return n._token=e.token,n._tokenExpires=new Date(e.expires),e})}).then(function(e){return n.federatedServers[o]={expires:new Date(e.expires),token:e.token},delete n._pendingTokenRequests[o],e.token})}),this._pendingTokenRequests[o])},de.prototype.getFreshToken=function(e){var t=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(e).then(function(e){return t._pendingTokenRequests[t.portal]=null,e.token})),this._pendingTokenRequests[this.portal])},de.prototype.refreshWithUsernameAndPassword=function(e){var t=this,e=I({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},e);return ae(this.portal+"/generateToken",e).then(function(e){return t._token=e.token,t._tokenExpires=new Date(e.expires),t})},de.prototype.refreshWithRefreshToken=function(e){var t=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(e);e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return ie(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t})},de.prototype.refreshRefreshToken=function(e){var t=this,e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return ie(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t._refreshToken=e.refreshToken,t._refreshTokenExpires=new Date(Date.now()+60*(t.refreshTokenTTL-1)*1e3),t})},de.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter(function(e){return!e.startsWith("http://")}).map(function(e){return e.startsWith("https://")?e:"https://"+e})),t})},de);function de(e){var t;this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.username=e.username,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?ne(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.refreshTokenTTL=e.refreshTokenTTL||20160,this.server=e.server,this.federatedServers={},this.trustedDomains=[],e.server&&(t=this.getServerRootUrl(e.server),this.federatedServers[t]={token:e.token,expires:e.tokenExpires}),this._pendingTokenRequests={}}function fe(e){e=e.privileges;return k(void 0===e?[]:e,"portal:user:createItem")}function he(e,t){var r,n=!1,o=e.itemControl,i=e.owner,a=e.orgId,s=t.roleId,u=t.role,c=t.username,l=t.groups,p=t.orgId,u=k(["admin","update"],o)||!!i&&i===c||!!(!!a&&a===p)&&!s&&"org_admin"===u,t=fe(t);return t&&u?n=!0:t&&(r=U(q(e,"groupIds")||[],[q(e,"properties.collaborationGroupId")]),n=l.some(function(e){return H(e)&&k(r,e.id)})),n}var me=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function ge(e){var t=e.host,r=e.path,e=e.query,t=t.endsWith("/")?t:t+"/",t=new URL(r,t);return t.search=function(r){void 0===r&&(r={});var e=Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{});return new URLSearchParams(e).toString()}(e),t.toString()}function be(e){return(e=void 0===e?{}:e).portal?ne(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function ye(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function ve(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function we(t){return ve(t).then(function(e){e=t.folderId?be(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":be(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=I(I({},t.params),ye(t.item)),te(e,t)})}function Ae(e){var r,e=I({folderId:null},e);return(r=e).multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):ve(r).then(function(e){var t=be(r)+"/content/users/"+e,e=t+"/addItem";return r.folderId&&(e=t+"/"+r.folderId+"/addItem"),r.params=I(I({},r.params),ye(r.item)),te(e,re(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:I({},r.params)}))})}var De=/[\x00-\x1F\x7F-\x9F\xA0]/g;function Se(e,t){return te(xe(e,t),I({httpMethod:"GET"},t))}var xe=function(e,t){return("string"==typeof t?t:be(t))+"/content/items/"+e};function Ee(e,t){e=xe(e,t)+"/data",t=I({httpMethod:"GET",params:{}},t);return t.file&&(t.params.f=null),te(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})}function ke(e){var t=xe(e.id,e)+"/relatedItems",r=I({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,te(t,r)}function Ce(e,t){var r,n,o=t||{},i=o.fileName,i=void 0===i?"iteminfo.xml":i,o=o.readAs,o=void 0===o?"text":o,t=I({httpMethod:"GET"},t);return i="/info/"+i,r=o,i=""+xe(e,t=t)+i,t=I({params:{}},t),n=t.rawResponse,t.rawResponse=!0,t.params.f=null,te(i,t).then(function(e){return n?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(e.replace(De,""))})})}function Te(t){return ve(t).then(function(e){return te(be(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect",t)})}function qe(e){return t=e.groupId,te(be(e=e)+"/community/groups/"+t,I({httpMethod:"GET"},e)).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"});var t}function Ie(t){return ve(t).then(function(e){return te(be(t)+"/content/users/"+e+"/items/"+t.id+"/delete",t)})}var Oe=(Pe.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},Pe.prototype.in=function(e){return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(J("`in("+(e?'"'+e+'"':"")+")`"+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},Pe.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},Pe.prototype.endGroup=function(){return this.openGroups<=0?J("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},Pe.prototype.and=function(){return this.addModifier("and")},Pe.prototype.or=function(){return this.addModifier("or")},Pe.prototype.not=function(){return this.addModifier("not")},Pe.prototype.from=function(e){return this.hasTerms?J('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[0]=e,this},Pe.prototype.to=function(e){return this.hasTerms?J('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[1]=e,this},Pe.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},Pe.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},Pe.prototype.clone=function(){return this.commit(),this.cleanup(),new Pe(this.q+"")},Pe.prototype.addModifier=function(e){return this.currentModifer?(J("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?J("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},Pe.prototype.needsQuotes=function(e){return/\s|:/g.test(e)},Pe.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.needsQuotes(e)?'"'+e+'"':e},Pe.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(Pe.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),Pe.prototype.cleanup=function(){if(0<this.openGroups)for(J("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&J("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")},Pe);function Pe(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function Ue(r,n){var e,t="string"==typeof r||r instanceof Oe?{httpMethod:"GET",params:{q:r}}:re(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});switch(n){case"item":e="/search";break;case"group":e="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof Oe||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));e="/content/groups/"+r.groupId+"/search";break;default:e="/portals/self/users/search"}return te(be(t)+e,t).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof Oe?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,Ue(e,n)}),t})}function Ne(e){return Ue(e,"item")}function Re(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Fe(e){var t=e.id,r=be(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),t=U(Le("users",e.users,t),Le("admins",e.admins,t)).map(function(e){return te(r,e).catch(function(e){return{errors:[e]}})});return Promise.all(t).then(_e)}function Le(o,e,i){return!e||e.length<1?[]:Re(e,25).map(function(e){return t=o,r=e,n=i,Object.assign({},n,((e={})[t]=r,e.params=I(I({},n.params),((n={})[t]=r,n)),e));var t,r,n})}function _e(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function je(t){var e=t.id,r=t.users,n=be(t)+"/community/groups/"+e+"/removeUsers",r=Re(r,25).map(function(e){e=I(I({},t),{users:e,params:{users:e}});return te(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(r).then(function(e){var t=function(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])},r=t("errors"),t={notRemoved:t("notRemoved")};return r.length?I(I({},t),{errors:r}):t})}function Be(e){var t,r=e.id,n=be(e)+"/community/groups/"+r+"/invite",e=Re((t=e).users,25).map(function(e){return function(e,t){t=Object.assign({},t);return t.params=I(I({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}(e,t)}).map(function(e){return te(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(Me)}function Me(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function Ge(e){return te(be(e)+"/community/groups/"+e.id+"/unprotect",e)}function Ve(e){return te(be(e)+"/community/groups/"+e.id+"/delete",I({},e))}function He(e){var t=be(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,te(t,r)}function ze(e){var n,t=be(e)+"/portals/self/createNotification",e=Re((n=e).users,n.batchSize||25).map(function(e){return t=e,r=n,(e=Object.assign({},r)).params=I(I({},e.params),{users:t,subject:r.subject,message:r.message,notificationChannelType:e.notificationChannelType}),e;var t,r}).map(function(e){return te(t,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(Ye)}function Ye(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function We(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=be(e)+"/community/users/"+encodeURIComponent(t),n=I(I({},e),n)),te(r,n)}function Ke(t){return Ne({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function Je(a){return Ke(a).then(function(e){if(e)return{itemId:a.id,shortcut:!0,notSharedWith:[]};var t=a.authentication.username,e=a.owner,n=a.confirmItemControl,e=e||t;if(e===t)return Ze(a);var o=!1,i=!1;return Promise.all([We({username:t,authentication:a.authentication}),We({username:e,authentication:a.authentication}),qe(a)]).then(function(e){var t=e[0],r=e[1],e=e[2];return o="org_admin"===t.role&&!t.roleId,i=t.orgId!==r.orgId,function(e,t,r,n,o,i){var a=[];if(i.groupId!==e.favGroupId)if(t){if(!n)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+e.username+" as they not the item owner or org admin.");a.push(Qe(e,e,!1,"Error adding "+e.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),Qe(e,o,!0,"none"===r?"Error adding user "+o.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+o.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(n)a.push(Qe(e,e,!1,"Error adding "+e.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===r)throw new Error("This item can not be shared by "+e.username+" as they are not a member of the specified group "+i.groupId+".");return a}(t,!!n,e,o,r,a)}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return Ze(a,o,i)}).then(function(e){return r(e)})})}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+a.id+" could not be shared to group "+a.groupId+".");return e})}function Ze(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.authentication.username,o=e.owner||n,i=be(e)+"/content/items/"+e.id+"/share";return(o===n||t&&!r)&&(i=be(e)+"/content/users/"+o+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},te(i,e)}function Qe(e,t,r,n,o){var i,a,s=t.groups||[],u=s.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!u&&511<s.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return a=u?r&&"member"===u.userMembership.memberType?(i=He({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return He({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(i=Fe(((a={id:o.groupId})[r?"admins":"users"]=[t.username],a.authentication=o.authentication,a)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return je({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:a}}function $e(o){return Ke(o).then(function(e){if(!e)return Promise.resolve({itemId:o.id,shortcut:!0,notUnsharedFrom:[]});var r=o.authentication.username,n=o.owner;return Promise.all([qe(o),We({username:r,authentication:o.authentication})]).then(function(e){var t=e[0],e=e[1],e="org_admin"===e.role&&!e.roleId;if(!((n||r)===r)&&!e&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+o.groupId+" by "+r+" as they not the item owner, an org admin, group admin or group owner.");return function(e){var t=e.authentication.username,r=e.owner||t,n=be(e)+"/content/items/"+e.id+"/unshare";r===t&&(n=be(e)+"/content/users/"+r+"/items/"+e.id+"/unshare");return e.params={groups:e.groupId},te(n,e)}(o)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+o.id+" could not be unshared to group "+o.groupId);return e})})}function Xe(e){return function(e,t){e=e||"self",e=be(t)+"/portals/"+e,t=I({httpMethod:"GET"},t);return te(e,t)}(null,e)}function et(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){var t=e.portalSelf||e,r=t.portalHostname,n=t.urlKey,o=t.customBaseUrl;if(r||n&&o)return t.isPortal?"https://"+t.portalHostname:"https://"+t.urlKey+"."+t.customBaseUrl}return et(be(e))}var tt={devext:"https://d1011m9qpnz5mw.cloudfront.net",qaext:"https://dyq9ux9ryu4qj.cloudfront.net",www:"https://d1iq7pbacwn5rb.cloudfront.net"};function rt(e){if(e.isPortal)return et(e)+"/apps/sites";e=e.portalHostname.split(".")[0];return(tt[e]||tt.www)+"/opendata-ui/assets"}function nt(e){return et(e)+"/sharing/rest"}function ot(e){return e=(e=e.toLowerCase()).includes("//")?e.split("//")[1]:e}function it(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function at(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return it(e.portalHostname)}function st(e,t){return et(t)+"/home/item.html?id="+e}function ut(e,t,r){return t=ct(e,t,r),r="\\/"+e.id+"\\?f=json",r=new RegExp(r),t&&t.replace(r,"/"+e.id+"/data").replace(/\&token/,"?token")}var ct=function(e,t,r){var n=e.id,e=e.access,t=nt(t)+"/content/items/"+n,n=new URLSearchParams({f:"json"});return"public"!==e&&r&&n.append("token",r),t+"?"+n.toString()};function lt(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function pt(e){var t=e;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://qaext.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://devext.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://www.arcgis.com"),t}function dt(e){return ft.test(e)}var ft=/\/(map|feature)server/i,ht=function(e){e=e.match(ft),e=e&&e[1];return e&&t(e)+" Service"};function mt(e){var t=e&&e.hubApiUrl;return t||it(nt(e))}var gt="/api/v3/domains",bt="/api/v3/datasets",yt="/api/discussions/v1",vt=(Object.defineProperty(wt.prototype,"session",{get:function(){return this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"isAuthenticated",{get:function(){return!!this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"userRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"requestOptions",{get:function(){var e={portal:this.sharingApiUrl};return e=this.isAuthenticated?{authentication:this._authentication,portal:this.sharingApiUrl}:e},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"portalUrl",{get:function(){return this.isAuthenticated?this.isPortal?"https://"+this._portalSelf.portalHostname:"https://"+this._portalSelf.urlKey+"."+this._portalSelf.customBaseUrl:this._portalUrl},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"sharingApiUrl",{get:function(){return this.portalUrl+"/sharing/rest"},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubUrl",{get:function(){return this._hubUrl},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"isPortal",{get:function(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"discussionsServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+yt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubSearchServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+bt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"domainServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+gt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"eventsConfig",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.events")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubEnabled",{get:function(){return v(this._portalSelf,"portalProperties.hub.enabled",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgId",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgHostname",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgUrl",{get:function(){if(this.communityOrgHostname)return"https://"+this.communityOrgHostname},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"helperServices",{get:function(){if(this._portalSelf)return this._portalSelf.helperServices},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"portal",{get:function(){return this._portalSelf},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),wt);function wt(e){this._portalUrl="https://www.arcgis.com",this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties)}var At=(Dt.create=function(r){return void 0===r&&(r={}),O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,(t=new Dt(r)).initialize()];case 1:return e.sent(),[2,t]}})})},Dt.prototype.setAuthentication=function(t){return O(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return this._authentication=t,this._portalUrl=t.portal.replace("/sharing/rest",""),[4,this.initialize()];case 1:return e.sent(),[2]}})})},Dt.prototype.setProperties=function(e){this._properties=e,this._context=new vt(this.contextOpts)},Dt.prototype.clearAuthentication=function(){this._context.isPortal||(this._portalUrl=pt(this._portalUrl)),this._authentication=null,this._portalSelf=null,this._currentUser=null,this._context=new vt(this.contextOpts)},Object.defineProperty(Dt.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Dt.prototype.initialize=function(){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){switch(e.label){case 0:if(!this._authentication||this._portalSelf&&this._currentUser)return[3,4];G.debug("ArcGISContextManager-"+this.id+": Initializing"),t=this._authentication.username,t=[Xe({authentication:this._authentication}),We({username:t,authentication:this._authentication})],e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(t)];case 2:return n=e.sent(),r=n[0],n=n[1],this._portalSelf=r,this._currentUser=n,G.debug("ArcGISContextManager-"+this.id+": received portalSelf and currentUser"),[3,4];case 3:throw r=e.sent(),n='ArcGISContextManager could not fetch portal & user for "'+this._authentication.username+'" using '+this._authentication.portal+".",G.error(n),console.error(n),r;case 4:return G.debug("ArcGISContextManager-"+this.id+": updating context"),this._context=new vt(this.contextOpts),[2]}})})},Object.defineProperty(Dt.prototype,"contextOpts",{get:function(){var e={id:this.id,portalUrl:this._portalUrl,hubUrl:this._hubUrl,properties:this._properties};return this._authentication&&(e.authentication=this._authentication),this._portalSelf&&(e.portalSelf=this._portalSelf),this._currentUser&&(e.currentUser=this._currentUser),e},enumerable:!1,configurable:!0}),Dt);function Dt(e){this._portalUrl="https://www.arcgis.com",this._logLevel=n.Level.error,this.id=(new Date).getTime(),e.logLevel&&(this._logLevel=e.logLevel),G.setLogLevel(this._logLevel),G.debug("ArcGISContextManager:ctor: Creating "+this.id),e.properties&&(this._properties=e.properties),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest","")):e.portalUrl&&(this._portalUrl=e.portalUrl),this._hubUrl=lt(this._portalUrl),e.portal&&(this._portalSelf=p(e.portal)),e.currentUser&&(this._currentUser=p(e.currentUser))}var St=function(e){if(e){var t=e.toLocaleLowerCase();return Object.keys(xt).find(function(e){return xt[e].some(function(e){return e.toLocaleLowerCase()===t})})}},xt={app:["Application","City Engine Web Scene","CityEngine Web Scene","Dashboard","Insights Page","Insights Workbook","Operation View","Web Mapping Application","StoryMap","Web Experience","Urban Model"],dataset:["CSV Collection","CSV","Feature Collection Template","Feature Collection","Feature Layer","Feature Service","File Geodatabase","GeoJSON","GeoJson","KML Collection","KML","Microsoft Excel","Raster Layer","Shapefile","Stream Service","Table"],document:["CAD Drawing","Document Link","Hub Page","Site Page","Image","iWork Keynote","iWork Numbers","iWork Pages","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","PDF","Pro Map","Report Template"],event:["Hub Event"],feedback:["Form","Quick Capture Project"],initiative:["Hub Initiative"],template:["Hub Initiative Template"],solution:["Solution"],map:["Image Collection","Image Service","Map Service Layer","Map Service","Scene Service","Scene Layer","Vector Tile Service","Web Map Service","Web Map Tile Service","Web Map","Web Scene","WFS","WMS","WMTS"],other:["360 VR Experience","AppBuilder Widget Package","Application Configuration","ArcPad Package","Code Attachment","Code Sample","Desktop Add In","Desktop Application Template","Desktop Application","Desktop Style","Explorer Add In","Explorer Layer","Geocoding Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Layer File","Layer Package","Layer Template","Layer","Layout","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Mobile Application","Mobile Map Package","Native Application","Network Analysis Service","Operations Dashboard Add In","Project Package","Project Template","Raster Function Template","Rule Package","Scene Package","Service Definition","SQLite Geodatabase","Style","Tile Package","Vector Tile Package","Workflow Manager Package"],site:["Hub Site Application","Site Application"]},Et=xt.app,kt=xt.dataset,Ct=xt.document,Tt=xt.event,qt=xt.feedback,It=xt.initiative,Ot=xt.map,Pt=xt.other,Ut=xt.site,Nt=["360 VR Experience","Application","CityEngine Web Scene","Code Sample","CSV Collection","CSV","CAD Drawing","Desktop Application","Desktop Application Template","Desktop Style","File Geodatabase","GeoJson","Geoprocessing Package","Geoprocessing Sample","Image","iWork Keynote","iWork Numbers","KML Collection","KML","Layer","Layer File","Layer Package","Layout","Locator Package","Map Package","Map Service Definition","Map Template","Microsoft Excel","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","Operations Dashboard Add In","PDF","Pro Map","Project Package","Project Template","Raster function template","Rule Package","Service Definition","Shapefile","Vector Tile Package","Workflow Manager Package"],Rt=["Data"],Ft={app:Et.concat(qt),dataset:kt,document:Ct,event:Tt,initiative:It,map:Ot,other:Pt,site:Ut,downloadableTypes:Nt,downloadableTypeKeywords:Rt,apiTypes:["Feature Service","Map Service","Image Service"]};function Lt(e){return-1!==Nt.indexOf(e.type)||e.typeKeywords&&Rt.some(function(t){return e.typeKeywords.some(function(e){return e===t})})}var _t=new RegExp(/.+(?:map|feature|image)server/i);function jt(e){var t=e.match(_t);return t?t[0]:ne(e.split("?")[0])}function Bt(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}var Mt={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function Gt(e){var t=e.portalSelf,r=t.defaultExtent,t=q(t,"helperServices.geometry.url");if(!t)return Promise.resolve(Mt);if(!r)return Promise.resolve(Mt);t+="/project",r={httpMethod:"POST",params:{geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[r]}),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(r.authentication=e.authentication),te(t,r).then(function(e){e=e.geometries[0];return{xmin:e.xmin,ymin:e.ymin,xmax:e.xmax,ymax:e.ymax,spatialReference:{wkid:4326}}}).catch(function(e){return Mt})}var Vt=function(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])};function Ht(e){return console.warn("DEPRECATED: use isBBox() instead"),Vt(e)}function zt(e){var t=(n=e[0])[0],r=n[1],e=(n=e[1])[0],n=n[1];return{rings:[[[t,r],[e,r],[e,n],[t,n],[t,r]]],spatialReference:{wkid:4326}}}function Yt(e){var t,r;switch((e||"").toLowerCase()){case"image service":t="dataset";break;case"feature service":case"raster layer":t="map";break;case"microsoft excel":t="document";break;case"cad drawing":case"feature collection template":case"report template":t="content";break;default:t={other:"content",solution:"template"}[r=St(e)]||r}return t}function Wt(e){return e&&e.isPortal}function Kt(e,t){return!!e&&"public"===e.access&&!Wt(t)}function Jt(e,t,r){var n,o=$t(e,t,r);return o||(n="/content","feedback"===(r=Yt(e))?n="/feedback/surveys":Qt(e)?n="/pages":-1<["app","dataset","document","map","template"].indexOf(r)&&(n="/"+r+"s"),o=n+"/"+t),o}var Zt,Qt=function(e){return["Hub Page","Site Page"].includes(e)},$t=function(e,t,r){var n;return"Solution"===e&&(0<(null==r?void 0:r.indexOf("Deployed"))&&(n="/content/"+t),n="/templates/"+t+"/about"),n};function Xt(e){return{updateFrequency:"metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",reviseDate:"metadata.dataIdInfo.idCitation.date.reviseDate",pubDate:"metadata.dataIdInfo.idCitation.date.pubDate",createDate:"metadata.dataIdInfo.idCitation.date.createDate",metadataUpdateFrequency:"metadata.mdMaint.maintFreq.MaintFreqCd.@_value",metadataUpdatedDate:"metadata.mdDateSt"}[e]}function er(e,t){t=Xt(t);return t&&q(e,t)}(Pt=Zt=Zt||{}).Year="year",Pt.Month="month",Pt.Day="day",Pt.Time="time";var tr=function(e,t){t=t.url&&jt(t.url);return t&&e.linkage.includes(t)},rr=function(e,t,r){var n=e.linkage,r=q(r,"authentication.token");return r&&tr(e,t)&&(t=new URL(e.linkage),(e=new URLSearchParams(t.search)).set("token",r),t.search=e.toString(),n=t.toString()),n},nr=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"http://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"http://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"http://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"http://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"http://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"http://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"http://creativecommons.org/licenses/by-sa/4.0"},{type:"CC-BY-SA-3.0",abbr:"CC BY-SA 3.0",name:"Attribution-ShareAlike 3.0 Unported",url:"http://creativecommons.org/licenses/by-sa/3.0"},{type:"CC-BY-SA-2.5",abbr:"CC BY-SA 2.5",name:"Attribution-ShareAlike 2.5 Generic",url:"http://creativecommons.org/licenses/by-sa/2.5"},{type:"CC-BY-SA-2.0",abbr:"CC BY-SA 2.0",name:"Attribution-ShareAlike 2.0 Generic",url:"http://creativecommons.org/licenses/by-sa/2.0"},{type:"CC-BY-SA-1.0",abbr:"CC BY-SA 1.0",name:"Attribution-ShareAlike 1.0 Generic",url:"http://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"http://creativecommons.org/licenses/by-nd/4.0"},{type:"CC-BY-ND-3.0",abbr:"CC BY-ND 3.0",name:"Attribution-NoDerivs 3.0 Unported",url:"http://creativecommons.org/licenses/by-nd/3.0"},{type:"CC-BY-ND-2.5",abbr:"CC BY-ND 2.5",name:"Attribution-NoDerivs 2.5 Generic",url:"http://creativecommons.org/licenses/by-nd/2.5"},{type:"CC-BY-ND-2.0",abbr:"CC BY-ND 2.0",name:"Attribution-NoDerivs 2.0 Generic",url:"http://creativecommons.org/licenses/by-nd/2.0"},{type:"CC-BY-ND-1.0",abbr:"CC BY-ND 1.0",name:"Attribution-NoDerivs 1.0 Generic",url:"http://creativecommons.org/licenses/by-nd/1.0"},{type:"CC-BY-NC-4.0",abbr:"CC BY-NC",name:"Attribution-NonCommercial 4.0 International",url:"https://creativecommons.org/licenses/by-nc/4.0"},{type:"CC-BY-NC-3.0",abbr:"CC BY-NC 3.0",name:"Attribution-NonCommercial 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc/3.0"},{type:"CC-BY-NC-2.5",abbr:"CC BY-NC 2.5",name:"Attribution-NonCommercial 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc/2.5"},{type:"CC-BY-NC-2.0",abbr:"CC BY-NC 2.0",name:"Attribution-NonCommercial 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc/2.0"},{type:"CC-BY-NC-1.0",abbr:"CC BY-NC 1.0",name:"Attribution-NonCommercial 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc/1.0"},{type:"CC-BY-NC-SA-4.0",abbr:"CC BY-NC-SA",name:"Attribution-NonCommercial-ShareAlike 4.0 International",url:"https://creativecommons.org/licenses/by-nc-sa/4.0"},{type:"CC-BY-NC-SA-3.0",abbr:"CC BY-NC-SA 3.0",name:"Attribution-NonCommercial-ShareAlike 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-sa/3.0"},{type:"CC-BY-NC-SA-2.5",abbr:"CC BY-NC-SA 2.5",name:"Attribution-NonCommercial-ShareAlike 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.5"},{type:"CC-BY-NC-SA-2.0",abbr:"CC BY-NC-SA 2.0",name:"Attribution-NonCommercial-ShareAlike 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.0"},{type:"CC-BY-NC-SA-1.0",abbr:"CC BY-NC-SA 1.0",name:"Attribution-NonCommercial-ShareAlike 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/1.0"},{type:"CC-BY-NC-ND-4.0",abbr:"CC BY-NC-ND",name:"Attribution-NonCommercial-NoDerivatives 4.0 International",url:"https://creativecommons.org/licenses/by-nc-nd/4.0"},{type:"CC-BY-NC-ND-3.0",abbr:"CC BY-NC-ND 3.0",name:"Attribution-NonCommercial-NoDerivs 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-nd/3.0"},{type:"CC-BY-NC-ND-2.5",abbr:"CC BY-NC-ND 2.5",name:"Attribution-NonCommercial-NoDerivs 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.5"},{type:"CC-BY-NC-ND-2.0",abbr:"CC BY-NC-ND 2.0",name:"Attribution-NonCommercial-NoDerivs 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.0"},{type:"CC-BY-NC-ND-1.0",abbr:"CC BY-NC-ND 1.0",name:"Attribution-NonCommercial-NoDerivs 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/1.0"},{type:"PDDL-1.0",abbr:"PDDL",name:"ODC Public Domain Dedication and License",url:"http://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"http://opendatacommons.org/licenses/odbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"http://opendatacommons.org/licenses/by/summary"}];function or(r){var e={type:(r=r||"")?"custom":"none",text:r},t=!1,n=nr.filter(function(e){return t=e,(e=(e=r).toLowerCase()).includes(t.name.toLowerCase())||e.includes(t.url.toLowerCase())||e.includes(t.abbr.toLowerCase());var t});return n.length&&(t=!0,e=n.pop()),t||(n=void 0,!function(e){try{return!!new URL(e).protocol}catch(e){return!1}}(r)?(t=r,new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!\<\/a\>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(t)&&(t=new RegExp(/href\s?=\s?["'](.*?)["']/),n=r.match(t)[1])):n=r,n&&(e.url=n,e.text="")),e.text||delete e.text,e}function ir(e,t,r){if(!e||!e.thumbnail)return null;var n=r||{},o=n.token,n=n.width,r=ct(e,t,o=!o&&"string"==typeof r?r:o).split("?"),o=r[0],r=r[1],r=new URLSearchParams(r);r.delete("f"),n&&r.append("w",n+"");r=r.toString(),e=o+"/info/"+e.thumbnail;return r?e+"?"+r:e}function ar(e,t,r){return e&&t&&1<t.length&&!mr(r)}n.UpdateFrequency=void 0,(Ut=n.UpdateFrequency||(n.UpdateFrequency={})).Continual="continual",Ut.Daily="daily",Ut.Weekly="weekly",Ut.Fortnightly="fortnightly",Ut.Monthly="monthly",Ut.Quarterly="quarterly",Ut.Biannually="biannually",Ut.Annually="annually",Ut.AsNeeded="as-needed",Ut.Irregular="irregular",Ut.NotPlanned="not-planned",Ut.Unknown="unknown",Ut.Semimonthly="semimonthly";function sr(e,t){return{"001":n.UpdateFrequency.Continual,"002":n.UpdateFrequency.Daily,"003":n.UpdateFrequency.Weekly,"004":n.UpdateFrequency.Fortnightly,"005":n.UpdateFrequency.Monthly,"006":n.UpdateFrequency.Quarterly,"007":n.UpdateFrequency.Biannually,"008":n.UpdateFrequency.Annually,"009":n.UpdateFrequency.AsNeeded,"010":n.UpdateFrequency.Irregular,"011":n.UpdateFrequency.NotPlanned,"012":n.UpdateFrequency.Unknown,"013":n.UpdateFrequency.Semimonthly}[er(e,t||"updateFrequency")]}function ur(e,t){var r,n,o=(e=er(e,t),/^\d{4}$/.test(e=""+e)?(r=new Date(+e,0,1),o=Zt.Year):/^\d{4}-\d{1,2}$/.test(e)?(n=e.split("-"),r=new Date(+n[0],+n[1]-1,1),o=Zt.Month):/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)?(n=e.split("-"),r=new Date(+n[0],+n[1]-1,+n[2]),o=Zt.Day):Number.isNaN(Date.parse(e))||(r=new Date(e),o=e.includes("T")?Zt.Time:Zt.Day),r&&o&&{date:r,precision:o});return o&&I(I({},o),{source:"metadata."+Xt(t)})}function cr(e,t){return(e=q(e,t+=".editingInfo.lastEditDate"))&&{date:new Date(e),source:t,precision:Zt.Day}}function lr(e,t){return{date:new Date(e[t]),precision:Zt.Day,source:"item."+t}}function pr(e){return null!==(e={appbuilderExtension:"file",appbuilderWidgetPackage:"widgets-source",application:"web",applicationConfiguration:"app-gear",arcgisProMap:"desktop",cadDrawing:"file-cad",cityEngineWebScene:"urban-model",codeAttachment:"file-code",codeSample:"file-code",colorSet:"palette",contentCategorySet:"label",csv:"file-csv",cSV:"file-csv",cSVCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",documentLink:"link",excaliburImageryProject:"file",explorerMap:"file",exportPackage:"file",featureCollection:"data",featureCollectionTemplate:"file",featureLayer:"data",featureService:"collection",fileGeodatabase:"data",form:"survey",geocodingService:"file",geodataService:"file",geometryService:"file",geopackage:"file",geoprocessingService:"file",globeLayer:"layers",globeService:"file",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"browser",hubSiteApplication:"web",image:"file-image",imageService:"data",insightsModel:"file",insightsPage:"graph-moving-average",insightsTheme:"palette",insightsWorkbook:"graph-moving-average",iWorkPages:"file-text",iWorkKeynote:"presentation",iWorkNumbers:"file-report",kML:"data",kMLCollection:"data",layer:"layers",layerPackage:"layers",layerTemplate:"file",locatorPackage:"file",mapArea:"file",mapDocument:"map-contents",mapImageLayer:"collection",mapPackage:"file",mapService:"collection",microsoftExcel:"file-report",microsoftPowerpoint:"presentation",microsoftWord:"file-text",mission:"file",mobileMapPackage:"map-contents",nativeApplication:"mobile",nativeApplicationInstaller:"file",nativeApplicationTemplate:"file",mobileApplication:"mobile",networkAnalysisService:"file",notebook:"code",orientedImageryCatalog:"file",orthoMappingProject:"file",orthoMappingTemplate:"file",pDF:"file-pdf",quickCaptureProject:"mobile",rasterFunctionTemplate:"file",rasterLayer:"map",realTimeAnalytic:"file",relationalDatabaseConnection:"file",reportTemplate:"file",sceneLayer:"data",sceneService:"urban-model",serviceDefinition:"file",shapefile:"data",solution:"puzzle-piece",sqliteGeodatabase:"file",statisticalDataCollection:"file",storymap:"tour",storyMap:"tour",storymapTheme:"palette",symbolSet:"file",table:"table",urbanModel:"urban-model",vectorTilePackage:"file-shape",vectorTileService:"map",visioDocument:"conditional-rules",webExperience:"apps",webMap:"map",webMappingApplication:"apps",webScene:"urban-model",wfs:"map",wFS:"map",wMS:"map",wMTS:"map",workflowManagerService:"file",workforceProject:"list-check"}[h(e||"")])&&void 0!==e?e:"file"}function dr(e,t){var r=(r=t.authentication)&&r.token;return{portalHome:st(e.id,t),portalApi:ct(e,t,r),portalData:ut(e,t,r),thumbnail:ir(e,t,{token:r})}}function fr(e,t){var r,n;return n=e,r=!Wt(t)&&"public"===n.access&&"CSV"===n.type&&n.size<=5e6?mt(t)+"/datasets/"+e.id+"_0/FeatureServer/0":r}function hr(e){return e&&"feature service"===e.toLowerCase()}var mr=function(e){e=e&&e.match(/\/\d+$/);return e&&e[0].slice(1)};function gr(e){var t=(e=void 0===e?{}:e).type,r=e.typeKeywords||[];return("Site Application"===e.type||"Web Mapping Application"===e.type&&k(r,"hubSite"))&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&k(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&k(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),t="Web Mapping Application"===e.type&&k(r,"hubSolutionTemplate")?"Solution":t}function br(e){return mr(e.url)||hr(e.type)&&e.typeKeywords&&k(e.typeKeywords,"Singlelayer")&&"0"}function yr(e){if("public"===e.access){var t=e.id,e=br(e);return e?t+"_"+e:t}}function vr(e){if(!e)return e;var t=["categories",""];return e.map(function(e){return e.split("/")}).reduce(function(e,t,r){return U(e,t)},[]).filter(function(e){return!k(t,e.toLowerCase())})}function wr(e,t,r){var n=mr(e.url),o=n?parseInt(n,10):r;return t&&(g(o)?hr(e.type)&&function(e){e=e&&1===e.length?e[0]:void 0;return e&&e.capabilities.includes("Query")?e:void 0}(t):t.find(function(e){return e.id===o}))}function Ar(e){return e.isView}var Dr=function(r,e){var t=e||{},n=t.slug,o=t.requestOptions,i=t.data,a=t.metadata,s=t.groupIds,u=t.ownerUser,c=t.org,l=t.errors,p=t.server,d=t.layers,f=t.recordCount,h=t.boundary,m=t.extent,g=t.searchDescription,b=t.statistics,y=wr(r,d,null==e?void 0:e.layerId),v=Kt(r,o)?y?r.id+"_"+y.id:yr(r):void 0,w=n||v||r.id,A=((ar(t=y,d,(e=r).url)?t.name:e.title||e.name)||"").replace(/_/g," "),D=ar(y,d,r.url)&&y.description,S=y?y.type:gr(r),x=I({relative:Jt(S,w,r.typeKeywords)},o&&dr(r,o)),E=fr(r,o),k=(e=r,ur((o={metadata:a,layer:y,server:p}).metadata,"reviseDate")||cr(o,"layer")||cr(o,"server")||lr(e,"modified")),C=(o=r,ur(e=a,"pubDate")||ur(e,"createDate")||lr(o,"created")),T=(o=r,ur(a,"metadataUpdatedDate")||lr(o,"modified"));return I(I({item:r},r),{slug:n,data:i,metadata:a,groupIds:s,ownerUser:u,org:c,errors:l||[],server:p,layers:d,recordCount:f,statistics:b,hubId:v,identifier:w,get isProxied(){return!!E},layer:y,name:A,get title(){return A},get description(){return g||D||r.description},type:S,get family(){return Yt(S)},get url(){return E||(y?jt(r.url)+"/"+y.id:r.url)},get categories(){return vr(r.categories)},get actionLinks(){return r.properties&&r.properties.links},get hubActions(){return r.properties&&r.properties.actions},get isDownloadable(){return Lt(r)},get structuredLicense(){return or(r.licenseInfo)},get permissions(){return{visibility:r.access,control:r.itemControl||"view"}},get extent(){return!Vt(r.extent)&&m&&Vt(m.coordinates)?m.coordinates:r.extent},get boundary(){return h||function(e){var t,r=e.extent,n=Vt(r),e=(null===(e=e.properties)||void 0===e?void 0:e.boundary)||(n?"item":void 0);switch(e){case"item":t=n?zt(r):null;break;case"none":t=null}return{provenance:e,geometry:t}}(r)},get summary(){return D||r.snippet||r.description},urls:x,get portalHomeUrl(){return x.portalHome},get portalDataUrl(){return x.portalData},get portalApiUrl(){return x.portalApi},get thumbnailUrl(){return x.thumbnail},get createdDate(){return new Date(r.created)},createdDateSource:"item.created",get updatedDate(){return k.date},get updatedDateSource(){return k.source},get updatedDatePrecision(){return k.precision},get modified(){return k.date.getTime()},get publishedDate(){return C.date},get publishedDateSource(){return C.source},get publishedDatePrecision(){return C.precision},get metadataUpdatedDate(){return T.date},get metadataUpdatedDateSource(){return T.source},get metadataUpdatedDatePrecision(){return T.precision},get updateFrequency(){return sr(a)},get metadataUpdateFrequency(){return sr(a,"metadataUpdateFrequency")},get publisher(){return{name:r.owner,username:r.owner}},get metrics(){return r.properties&&r.properties.metrics},get spatialReference(){return function(e){var t=e.spatialReference;if(!t||"object"==typeof t)return t;e=t+"",t=parseInt(e,10);return isNaN(t)?{wkt:e}:{wkid:t}}(r)||(e=p,(null===(t=null==(t=y)?void 0:t.extent)||void 0===t?void 0:t.spatialReference)||(null==e?void 0:e.spatialReference))||null;var e,t},get viewDefinition(){var e=y&&Ar(y)&&i&&Array.isArray(i.layers)&&i.layers.find(function(e){return e.id===y.id});return e?e.layerDefinition:void 0},get orgId(){return c?c.id:r.orgId||(null==u?void 0:u.orgId)},get contentTypeIcon(){return console.warn("DEPRECATED: it is now the responsibility of the consuming package to determine the icon"),pr(S)},get license(){return console.warn("DEPRECATED: use structuredLicense instead"),{name:"Custom License",description:r.accessInformation}},get hubType(){return console.warn("DEPRECATED: use family instead"),Yt(S)},get additionalResources(){return function(t,e,r){e=q(e,"metadata.distInfo.distTranOps.onLineSrc")||null;return null===e?null:(e=Array.isArray(e)?e:[e]).map(function(e){return{name:e.orName,url:rr(e,t,r),isDataSource:tr(e,t)}})}(r,a)}})};function Sr(e){e=e?e.split("_"):[];return{itemId:e[0],layerId:e[1]}}function xr(e){e=Sr(e).itemId;return!(!e||B(e))}function Er(e,t){return/.+::.+/.test(e)?e:t+"::"+e}function kr(e,t){return t&&e.match(t+"::")?e.split(t+"::")[1]:e}var Cr=(Tr.prototype.startOperation=function(e){e=p(e);e.startedAt=(new Date).getTime(),e.state="working",this.operations.push(e)},Tr.prototype.start=function(e,t){t={type:e,id:v(t,"id",r(e+"_")),inputs:v(t,"inputs",{}),cleanup:v(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(t),t.id},Tr.prototype.getOperation=function(t){return this.operations.find(function(e){return e.id===t})},Tr.prototype.getOperations=function(){return this.operations},Tr.prototype.finish=function(e,t){var r=this.getOperation(e);if(!r)throw new Error("No operation with id "+e+" present in stack");r.duration=(new Date).getTime()-r.startedAt,r.state="completed",t&&(r.output=p(t))},Tr.prototype.merge=function(e){this.operations=U(this.operations,e.operations)},Tr.prototype.getCompleted=function(){return p(this.operations.filter(function(e){return"completed"===e.state}))},Tr.prototype.getWorking=function(){return p(this.operations.filter(function(e){return"working"===e.state}))},Tr.prototype.toString=function(){return this.operations.sort(function(e,t){return e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0}).map(qr).join("\n")},Tr.prototype.serialize=function(){return{operations:p(this.getOperations())}},Tr);function Tr(){this.operations=[]}function qr(e){var t=e.startedAt+" : Operation "+e.id+" started with inputs "+JSON.stringify(e.inputs)+" but was not completed";return t="completed"===e.state?e.startedAt+" : Operation "+e.id+" took "+e.duration+" ms with inputs "+JSON.stringify(e.inputs)+" and output "+(e.output?JSON.stringify(e.output):"n/a"):t}var Ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Or(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function Pr(e,t,r){this.tagname=e,this.parent=t,this.child=[],this.attrsMap,this.val=r,this.addChild=function(e){this.child.push(e)}}function Ur(e,t){t=Object.assign({},Lr,t),e=e.replace(/<!--[\s\S]*?-->/g,"");for(var r=new Pr("!xml"),n=r,o=new RegExp("<((!\\[CDATA\\[([\\s\\S]*?)(\\]\\]>))|(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))>))([^<]*)","g"),i=o.exec(e),a=o.exec(e);i;){var s,u="]]>"===(u=i)[4]?Fr.CDATA:"/"===u[10]?Fr.CLOSING:void 0!==u[8]&&"/"===u[8].substr(u[8].length-1)?Fr.SELF:Fr.OPENING;u===Fr.CLOSING?(n.parent&&i[14]&&(n.parent.val=Nr.getValue(n.parent.val)+""+_r(i[14],t)),n=n.parent):u===Fr.CDATA?t.cdataTagName?((s=new Pr(t.cdataTagName,n,i[3])).attrsMap=Mr(i[8],t),n.addChild(s),n.val=Nr.getValue(n.val)+t.cdataPositionChar,i[14]&&(n.val+=_r(i[14],t))):n.val=(n.val||"")+(i[3]||"")+_r(i[14],t):u===Fr.SELF?(s=new Pr(t.ignoreNameSpace?i[7]:i[5],n,""),i[8]&&1<i[8].length&&(i[8]=i[8].substr(0,i[8].length-1)),s.attrsMap=Mr(i[8],t),n.addChild(s)):((s=new Pr(t.ignoreNameSpace?i[7]:i[5],n,_r(i[14],t))).attrsMap=Mr(i[8],t),n.addChild(s),n=s),i=a,a=o.exec(e)}return r}var Nr=Or(function(e,t){function r(e,t){return null!=(e=t.exec(e))}t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t){if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o++)e[r[o]]=t[r[o]]},t.getValue=function(e){return t.isExist(e)?e:""},t.doesMatch=r,t.doesNotMatch=function(e,t){return!r(e,t)},t.getAllMatches=function(e,t){for(var r=[],n=t.exec(e);n;){for(var o=[],i=n.length,a=0;a<i;a++)o.push(n[a]);r.push(o),n=t.exec(e)}return r}}),Rr=Or(function(I,O){!function(e){var t=O,r=I&&I.exports==t&&I,n="object"==typeof Ir&&Ir;n.global!==n&&n.window!==n||(e=n);function f(e,t){return x.call(e,t)}function s(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=(f(e,r)?e:t)[r];return n}function h(e,t){var r="";return 55296<=e&&e<=57343||1114111<e?(t&&E("character reference outside the permissible Unicode range"),"�"):f(A,e)?(t&&E("disallowed character reference"),A[e]):(t&&function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return!0;return!1}(D,e)&&E("disallowed character reference"),65535<e&&(r+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=S(e))}function u(e){return"&#x"+e.toString(16).toUpperCase()+";"}function c(e){return"&#"+e+";"}var l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=/[\x01-\x7F]/g,d=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,m=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,g={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},b=/["&'<>`]/g,o={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},i=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,y=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,v={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},w={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},A={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},D=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],S=String.fromCharCode,x={}.hasOwnProperty,E=function(e){throw Error("Parse error: "+e)},k=function(e,t){(t=s(t,k.options)).strict&&y.test(e)&&E("forbidden code point");function r(e){return a(e.charCodeAt(0))}var n=t.encodeEverything,o=t.useNamedReferences,i=t.allowUnsafeSymbols,a=t.decimal?c:u;return n?(e=e.replace(p,function(e){return o&&f(g,e)?"&"+g[e]+";":r(e)}),o&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),o&&(e=e.replace(m,function(e){return"&"+g[e]+";"}))):o?e=(e=(e=!i?e.replace(b,function(e){return"&"+g[e]+";"}):e).replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(m,function(e){return"&"+g[e]+";"}):i||(e=e.replace(b,r)),e.replace(l,function(e){var t=e.charCodeAt(0),e=e.charCodeAt(1);return a(1024*(t-55296)+e-56320+65536)}).replace(d,r)};k.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var C=function(e,p){var d=(p=s(p,C.options)).strict;return d&&i.test(e)&&E("malformed character reference"),e.replace(a,function(e,t,r,n,o,i,a,s){var u,c,l;return t?(c=t,u=r,d&&!u&&E("character reference was not terminated by a semicolon"),c=parseInt(c,10),h(c,d)):n?(n=n,u=o,d&&!u&&E("character reference was not terminated by a semicolon"),c=parseInt(n,16),h(c,d)):i?f(v,l=i)?v[l]:(d&&E("named character reference was not terminated by a semicolon"),e):(l=a,(s=s)&&p.isAttributeValue?(d&&"="==s&&E("`&` did not start a character reference"),e):(d&&E("named character reference was not terminated by a semicolon"),w[l]+(s||"")))})};C.options={isAttributeValue:!1,strict:!1};var T={version:"1.1.1",encode:k,decode:C,escape:function(e){return e.replace(b,function(e){return o[e]})},unescape:C};if(t&&!t.nodeType)if(r)r.exports=T;else for(var q in T)f(T,q)&&(t[q]=T[q]);else e.he=T}(Ir)}),Fr={OPENING:1,CLOSING:2,SELF:3,CDATA:4},Lr={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,decodeHTMLchar:!1,cdataTagName:!1,cdataPositionChar:"\\c"};function _r(e,t){return e&&(t.trimValues&&(e=e.trim()),e=jr(e=t.decodeHTMLchar?Rr.decode(e):e,t.parseNodeValue)),e}function jr(e,t){return t&&"string"==typeof e?e=""===e.trim()||isNaN(e)?"true"===e||"false"!==e&&e:-1!==e.indexOf(".")?Number.parseFloat(e):Number.parseInt(e,10):Nr.isExist(e)?e:""}var Br=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function Mr(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");for(var r=Nr.getAllMatches(e,Br),n=r.length,o={},i=0;i<n;i++){var a=function(e,t){if(t.ignoreNameSpace){var r=e.split(":"),t="/"===e.charAt(0)?"/":"";if("xmlns"===r[0])return"";2===r.length&&(e=t+r[1])}return e}(r[i][1],t);a.length&&(void 0!==r[i][4]?(t.trimValues&&(r[i][4]=r[i][4].trim()),t.decodeHTMLchar&&(r[i][4]=Rr.decode(r[i][4],{isAttributeValue:!0})),o[t.attributeNamePrefix+a]=jr(r[i][4],t.parseAttributeValue)):t.allowBooleanAttributes&&(o[t.attributeNamePrefix+a]=!0))}if(Object.keys(o).length){if(t.attrNodeName){e={};return e[t.attrNodeName]=o,e}return o}}}var Gr=function(e,t){for(var r={},n=0;n<e.child.length;n++){var o,i=e.child[n].tagname,a=Gr(e.child[n],t);void 0!==r[i]?(Array.isArray(r[i])||(o=r[i],r[i]=[],r[i].push(o)),r[i].push(a)):r[i]=t.arrayMode?[a]:a}return Nr.merge(r,e.attrsMap),Nr.isEmptyObject(r)?Nr.isExist(e.val)?e.val:"":(Nr.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(r[t.textNodeName]=e.val),r)},Vr={parse:function(e,t){return t=Object.assign({},Lr,t),Gr(Ur(e,t),t)},getTraversalObj:Ur,convertToJson:Gr}.parse;function Hr(e,t){return Ce(e,I(I({},t),{fileName:"metadata/metadata.xml"})).then(function(e){return Vr(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}).catch(function(){return null})}function zr(e,t,r){return t=t.reduce(function(e,t){t=Kr[t];return t&&e.push(t),e},[]),L(t)({data:{item:e},stack:new Cr,requestOptions:r}).then(function(e){return e.data})}var Yr,Wr=function(e,t,r){var n=t.data,o=t.stack,t=t.requestOptions;o.finish(r,{error:e});r="string"==typeof e?e:e.message,e=n.errors||[];return e.push({type:"Other",message:r}),{data:I(I({},n),{errors:e}),stack:o,requestOptions:t}},Kr={groupIds:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichGroupIds");return e=r.item.id,te(xe(e,e=o)+"/groups",e).then(function(e){e=U(e.admin,e.member,e.other).map(function(e){return e.id});return n.finish(i),{data:I(I({},r),{groupIds:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},metadata:function(e){var t=e.data,r=e.stack,n=e.requestOptions,o=r.start("enrichMetadata");return Hr(t.item.id,n).then(function(e){return r.finish(o),{data:I(I({},t),{metadata:e}),stack:r,requestOptions:n}})},ownerUser:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichOwner");return We(I({username:r.item.owner},o)).then(function(e){return n.finish(i),{data:I(I({},r),{ownerUser:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},data:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichData");return Ee(r.item.id,o).then(function(e){return n.finish(i),{data:I(I({},r),{data:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},server:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichServer"),e=r.item.url,e=I(I({},o),{url:e});return te(ne((e=e).url),e).then(function(e){return n.finish(i),{data:I(I({},r),{server:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},layers:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichLayers"),a=r.item.url,s=I(I({},o),{url:a});return e=s,a=s.url,e=T(s,["url"]),te(jt(a)+"/layers",e).then(function(e){return U(e.layers,e.tables).filter(function(e){return"Group Layer"!==e.type})}).then(function(e){return n.finish(i),{data:I(I({},r),{layers:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})}},Jr=(e(Zr,Yr=Error),Zr);function Zr(e,t,r){e=Yr.call(this,e)||this;return e.status=r,e.url=t,e}function Qr(e,t){var r,n,o=I({httpMethod:"GET"},t),i=o.fetch||fetch,t=I({"Content-Type":"application/json"},o.headers);"GET"===o.httpMethod?r=o.params:n=JSON.stringify(o.params);var a=ge({host:mt(o),path:("/api/v3/"+e).replace(/\/\//g,"/"),query:r});return i(a,{method:o.httpMethod,headers:t,body:n}).then(function(e){if(e.ok)return e.json();throw new Jr(e.statusText,a,e.status)})}function $r(e){var t=["groupIds","metadata","ownerUser","org"];return function(e){e=gr(e);return k(["template","solution"],Yt(e))||k(["Web Map","Web Scene"],e)}(e)&&t.push("data"),dt(e.url)?t.concat("server","layers"):t}function Xr(e,t){return(e=p(e)).params=I(I({},e.params),{"fields[datasets]":"slug,boundary,extent,searchDescription,statistics"}),t&&(e.params["filter[slug]"]=t),e}function en(e){var t=(r=Sr(e.id)).itemId,r=(r=r.layerId)&&parseInt(r,10),e=e.attributes;return{itemId:t,layerId:r,slug:e.slug,boundary:e.boundary,extent:e.extent,searchDescription:e.searchDescription,statistics:e.statistics}}function tn(r,n){return O(void 0,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Qr("/datasets/"+r,Xr(n))];case 1:return t=e.sent(),[2,en(t.data)]}})})}function rn(n,o){return O(void 0,void 0,void 0,function(){var t,r;return P(this,function(e){switch(e.label){case 0:return[4,Se(n,o)];case 1:return t=e.sent(),r=(null==o?void 0:o.enrichments)||$r(t),[4,zr(t,r,o)];case 2:return r=e.sent(),[2,(i=I(I({},r),{item:t}),a=o,O(void 0,void 0,void 0,function(){var t,r,n,o;return P(this,function(e){switch(e.label){case 0:return n=i.item,t=i.data,r=i.layers,(r=r&&wr(n,r,a&&a.layerId))&&Ar(r)&&!t?[4,zr(n,["data"],a)]:[3,2];case 1:return o=e.sent(),[3,3];case 2:o=void 0,e.label=3;case 3:return n=o,[2,I(I({},i),n)]}})}))]}var i,a})})}function nn(d,f){return O(void 0,void 0,void 0,function(){var t,o,i,a,s,u,c,l,p;return P(this,function(e){switch(e.label){case 0:return[4,(r=d,n=f,O(void 0,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Qr("/datasets",Xr(n,r))];case 1:return t=e.sent(),[2,en(t.data[0])]}})}))];case 1:return t=e.sent(),o=t.itemId,i=t.layerId,[4,rn(o,f)];case 2:return(l=e.sent(),a=l.item,s=T(l,["item"]),p=f&&f.layerId,g(p)||p===i)?[3,4]:[4,tn(o+"_"+(i=p),f)];case 3:t=e.sent(),e.label=4;case 4:return u=t.boundary,c=t.extent,l=t.searchDescription,p=t.statistics,[2,Dr(a,I(I({requestOptions:f},s),{layerId:i,slug:d,boundary:u,extent:c,searchDescription:l,statistics:p}))]}var r,n})})}function on(i){return O(void 0,void 0,void 0,function(){var n,o;return P(this,function(e){switch(e.label){case 0:return n=i.url,o=i.viewDefinition,o=null==o?void 0:o.definitionExpression,[4,(r=re(t={url:n,where:o,returnCountOnly:!0},["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:I({where:"1=1",outFields:"*"},t.params)}),te(ne(t.url)+"/query",r))];case 1:return[2,e.sent().count]}var t,r})})}function an(e){void 0===e&&(e=""),console.warn("DEPRECATED: Use getCollection() instead. getCategory will be removed at v10.0.0");e=St(e);return"feedback"===e?"app":e}function sn(t,e){if(k(["template","feedback"],t.family))return t.id;if(Qt(t.type)){var r=(q(e,"data.values.pages")||[]).find(function(e){return e.id===t.id});return r?r.slug:t.id}if(t.slug){r=q(e,"domainInfo.orgKey");return q(e,"data.values.isUmbrella")?t.slug:kr(t.slug,r)}return t.hubId||t.id}function un(e){return Dr(e)}function cn(e){if(e){var t=e.id,r=e.attributes;if(r){var n=Sr(t).itemId,o=r.owner,i=r.orgId,a=r.created,s=r.modified,u=r.name,c=r.title,l=r.type,p=r.typeKeywords,d=r.description,f=r.snippet,h=r.tags,m=r.thumbnail,g=r.categories,b=r.contentStatus,y=r.spatialReference,v=r.accessInformation,w=r.licenseInfo,A=r.culture,D=r.url,S=r.access,x=r.proxyFilter,E=r.properties,k=r.appCategories,C=r.industries,T=r.languages,q=r.largeThumbnail,I=r.banner,O=r.screenshots,P=r.listed,U=r.ownerFolder,N=r.size,R=r.protected,F=r.commentsEnabled,L=r.numComments,_=r.numRatings,j=r.avgRating,B=r.numViews,M=r.itemControl,G=r.scoreCompleteness,V=r.itemExtent,e=r.itemModified,t=r.modifiedProvenance,r=r.serviceSpatialReference;return{id:n,owner:o,orgId:i,created:a,modified:e||"item.modified"===t&&s,title:c||u,type:D&&ht(D)||l,typeKeywords:p,description:d,tags:h,snippet:f,thumbnail:m,extent:V||[],categories:g,contentStatus:b,spatialReference:y||r,accessInformation:v,licenseInfo:w,culture:A,url:D,access:S,size:N,protected:R,proxyFilter:x,properties:E,appCategories:k,industries:C,languages:T,largeThumbnail:q,banner:I,screenshots:O,listed:P,ownerFolder:U,commentsEnabled:F,numComments:L,numRatings:_,avgRating:j,numViews:B,itemControl:M,scoreCompleteness:G}}}}function ln(e,t){var r=sn(e,t);return{relative:r=hn(e,r),absolute:""+q(t,"item.url").replace(/\/$/,"")+r}}var pn=function(e,t){return t?"CSV":h(e||"")},dn=function(e,t){var r=ln(e,t),t=r.relative,r=r.absolute;return fn(e,{relative:t,site:r})},fn=function(e,t){t=I(I({},e.urls),t);return I(I({},e),{urls:t})},hn=function(e,t){return Jt(e.type,t||e.identifier,e.typeKeywords)};const mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var bn={atob:function(t){if((t=(t=(t=`${t}`).replace(/[ \t\n\f\r]/g,"")).length%4==0?t.replace(/==?$/,""):t).length%4==1||/[^+/0-9A-Za-z]/.test(t))return null;let r="",n=0,o=0;for(let e=0;e<t.length;e++)n<<=6,n|=function(e){e=mn.indexOf(e);return e<0?void 0:e}(t[e]),o+=6,24===o&&(r+=String.fromCharCode((16711680&n)>>16),r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n),n=o=0);return 12===o?(n>>=4,r+=String.fromCharCode(n)):18===o&&(n>>=2,r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n)),r},btoa:function(e){let t;for(e=`${e}`,t=0;t<e.length;t++)if(255<e.charCodeAt(t))return null;let r="";for(t=0;t<e.length;t+=3){const n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)void 0===n[e]?r+="=":r+=function(e){if(0<=e&&e<64)return gn[e];return}(n[e])}return r}},yn="4326",vn={csv:{name:"CSV",itemTypes:["CSV","CSV Collection"],supportsProjection:!0},kml:{name:"KML",itemTypes:["KML","KML Collection"],supportsProjection:!1},shapefile:{name:"Shapefile",itemTypes:["Shapefile"],supportsProjection:!0},fileGeodatabase:{name:"File Geodatabase",itemTypes:["File Geodatabase"],supportsProjection:!0},geojson:{name:"GeoJson",itemTypes:["GeoJson"],supportsProjection:!1},excel:{name:"Excel",itemTypes:["Microsoft Excel"],supportsProjection:!0},featureCollection:{name:"Feature Collection",itemTypes:["Feature Collection"],supportsProjection:!0}};function wn(e){if("object"!=typeof e)return e;var t=e.wkid,e=e.wkt;return t?t+"":bn.btoa(e)}function An(e){return"spatialRefId:"+wn(function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}return r}(e))}function Dn(e){return"exportItem:"+e}function Sn(e){return e?"exportLayer:0"+e:"exportLayer:null"}function xn(e){var t,r=e.autoAddResult,n=e.inviteResult,o=e.primaryEmailResult,e=e.secondaryEmailResult;return(o||e)&&(t={success:(e=[o,e].filter(function(e){return e})).every(function(e){return e.success})},(e=e.reduce(function(e,t){return e.concat(v(t,"errors",[]))},[])).length&&(t.errors=e)),{success:[r,n,t].filter(function(e){return e}).every(function(e){return e.success}),autoAdd:r,invite:n,email:t}}function En(t,e){var r;return t&&(r=!q(t,"notAdded.length")&&!t.errors,e.autoAddResult={success:r},r||(r=t.errors||[],q(t,"notAdded.length")&&r.push(new K("Users not auto-added: "+t.notAdded.join(", "))),e.autoAddResult.errors=r,r=e.usersToAutoAdd.filter(function(e){return k(t.notAdded,e.username)}),e.usersToInvite=e.usersToInvite.concat(r))),e}function kn(e,t){return e.orgId===t.orgId}function Cn(e){return"org_admin"===e.role&&!e.roleId}function Tn(e,t,r,n){var o=Promise.resolve(null);return e.length&&(e={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map(function(e){return e.username})},n||(e.batchSize=1),o=ze(e)),o}function qn(t){var r,e=Promise.resolve(t);return t.email&&t.secondaryRO&&q(t,"inviteResult.success")&&(r=v(t,"secondaryRO.portalSelf.user",{}),e=Tn(t.usersToInvite.filter(function(e){return kn(e,r)}),t.email,t.secondaryRO.authentication,Cn(r)).then(function(e){return t.secondaryEmailResult=e,t})),e}function In(e,t,r){var n=Promise.resolve(null);return n=t.length?Fe({id:e,users:t.map(function(e){return e.username}),authentication:r}):n}function On(t){return In(q(t,"groupId"),q(t,"usersToAutoAdd"),q(t,"primaryRO.authentication")).then(function(e){return En(e,t)})}function Pn(e,t,r,n,o){void 0===n&&(n=20160),void 0===o&&(o="group_member");var i=Promise.resolve(null);return i=t.length?Be({id:e,users:t.map(function(e){return e.username}),authentication:r,role:o,expiration:n}):i}function Un(t){return Pn(q(t,"groupId"),q(t,"usersToInvite"),q(t,"primaryRO.authentication")).then(function(e){return t.inviteResult=e,t})}function Nn(t){var e=Promise.resolve(t);return e=t.email&&q(t,"inviteResult.success")?Tn(t.usersToEmail,t.email,t.primaryRO.authentication,Cn(t.requestingUser)).then(function(e){return t.primaryEmailResult=e,t}):e}function Rn(e,t){var r,n=[];return-1!==t.privileges.indexOf("portal:admin:assignToGroups")&&(r=[t.orgId,t.cOrgId].filter(function(e){return e}),n=e.filter(function(e){return-1!==r.indexOf(e.orgId)})),n}function Fn(e,t){var r=Rn(e,t);return e.filter(function(t){return!r.some(function(e){return e.username===t.username})})}function Ln(e,t,r){void 0===r&&(r=!1);e=Fn(e,t).filter(function(e){return kn(e,t)});return r&&e.push(t),e}var _n=["ar","bs","ca","cs","da","de","en","es","et","el","fi","fr","hr","he","hu","it","id","ja","ko","lt","lv","nb","nl","pl","pt","pt-br","pt-pt","ro","ru","sl","sr","sv","th","tr","uk","vi","zh","zh-cn","zh-tw","zh-hk"];function jn(e,t){if("object"==typeof e&&null!==e&&"string"==typeof t){for(var r=t.split("."),n=0;n<r.length-1;n++){if(!e.hasOwnProperty(r[n]))return;e=e[r[n]]}delete e[r[r.length-1]]}}function Bn(e){var t=p(e.item);return t.text=JSON.stringify(e.data),t}function Mn(e,t){return Promise.all([Se(e,t),Ee(e,t)]).then(function(e){return{item:e[0],data:e[1]}})}function Gn(e,r){return ho(e,r).then(function(e){var t=[Promise.resolve(e)];return e?t.push(Ee(e.id,r)):t.push(Promise.resolve(null)),Promise.all(t)}).then(function(e){return e[0]?{item:e[0],data:e[1]}:null})}function Vn(e,t){var r=p(e),n=p(e.item);return n.data=p(e.data),Ae(I({item:n},t)).then(function(e){return r.item.id=e.id,r.item.created=(new Date).getTime(),r.item.modified=r.item.created,r})}function Hn(e,t){var r=p(e),n=p(e.item);return n.data=p(e.data),we(I({item:n},t)).then(function(){return r.item.modified=(new Date).getTime(),r})}function zn(r,n){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Ee(r.id,n)];case 1:return t=e.sent(),[2,{item:r,data:t}]}})})}var Yn=function(e,t,r){return void 0===r&&(r=void 0),t.split(".").reduce(function(e,t){return e?e[t]:r},e)};function Wn(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}var Kn=function(e){return e instanceof Date},Jn=function(e){return"function"==typeof e},Zn=function(e){return"object"==typeof e},Qn=function(e){return e instanceof RegExp};var $n=function(e){return"object"==typeof e};function Xn(e){return Array.isArray(e)?function(e){var t=e,e=e.reduce(function(e,t){return ro(t)&&to(t)&&(e<(t=eo(t))&&(e=t)),e},-1);-1<e&&(t=0===e?[]:"{{delete:"+(e-1)+"}}");return t}(e.map(t).filter(function(e){return null!=e})):e&&$n(e)?function(o){var e=Object.keys(o).reduce(function(e,t){var r,n=o[t];return ro(n)&&to(n)?(r=eo(n))>e.maxLevel&&(e.maxLevel=r):e.obj[t]=n,e},{obj:{},maxLevel:-1});e=0<e.maxLevel?1===e.maxLevel?void 0:"{{delete:"+(e.maxLevel-1)+"}}":e.obj;return e}(Wn(e,t)):function(e){var t=e;"string"==typeof e&&to(e)&&(t=function(e){var t=e,e=eo(e);t=0===e?void 0:"{{delete:"+e+"}}";return t}(e));return t}(e);function t(e,t){return Xn(e)}}var eo=function(e){return parseInt(e.replace(/{|}/g,"").split(":")[1])};function to(e){return e&&"string"==typeof e&&-1<e.indexOf("{{delete")}var ro=function(e){return"string"==typeof e};function no(e,t,r,n){return void 0===n&&(n=0),t?t:"{{delete:"+n+"}}"}var oo=function(e){var t={};if(Array.isArray(e))t=e.map(oo);else if("object"==typeof e)for(var r in e)null!=e[r]&&"object"==typeof e[r]?t[r]=oo(e[r]):t[r]=e[r];else t=e;return t},io=/{{\s*?[\w].*?}}/g,ao=function(e){return"string"==typeof e};function so(e){return e||""===e||0===e}function uo(e,a,s){if((s=oo(s=void 0===s?null:s)||{}).optional)throw new Error("Please do not pass in an `optional` transform; adlib provides that internally.");return s.optional=no,Xn(function r(e,n,o){return o=o||"",Array.isArray(e)?e.map(t):!e||!Zn(e)||Kn(e)||Qn(e)||Jn(e)?n(e,o):Object.assign({},e,Wn(e,t));function t(e,t){return r(e,n,o?o+"."+t:t)}}(e,function(t,e){if(!ao(t))return t;var r,n=t.match(io);return n&&n.length?(n.map(function(e){var o,i=!1,t=e.replace(/{|}/g,"").trim();-1<t.indexOf("||")&&(r=t.split("||").map(function(e){return e.trim()}),o=r.length,t=r.find(function(e,t){var r,n;return(n=a,r=(r=e).split(":")[0],null!=(r=Yn(n,r,null)))?e:t+1===o&&(i=!0,isNaN(e)?e:parseInt(e))}));var r={key:e,value:t};return i||(t=function(e,t,r){var n,o=e.split(":");if(1<o.length){var i,a=o[0],s=o[1];if(o[2]&&(i=o[2]),!r||!r[s]||"function"!=typeof r[s])throw new Error("Attempted to apply non-existant transform "+s+" on "+a+" with params "+e);n=Yn(t,a),n=r[s](a,n,t,i)}else n=Yn(t,e);return n}(t,a,s),r.value=so(t)?t:e),r}).forEach(function(e){t===e.key?("string"==typeof e.value&&(isNaN(e.value)||""===e.value||(-1<e.value.indexOf(".")?e.value=parseFloat(e.value):e.value=parseInt(e.value))),r=e.value):t=t.replace(e.key,e.value)}),so(r)?r:t):t}))}function co(e,t,r){return uo(e,t,r)}function lo(e,t,r){return Ne({q:'title:"'+e+'" AND '+Object.keys(t).map(function(e){return e+':"'+t[e]+'"'}).join(" AND "),authentication:r}).then(function(e){return 0<e.results.length}).catch(function(e){throw Error("Error in doesItemExistWithTitle "+e)})}function po(e,t){return t.toLowerCase()+"-"+M(e)}function fo(e,t){e=e.filter(function(e){return!e.startsWith("slug|")});return e.push("slug|"+t),e}function ho(e,t){return mo({slug:e},t).then(function(e){return e.length?e[0]:null})}function mo(e,t){t={q:"",filter:'typekeywords:"slug|'+e.slug+'"',authentication:t.authentication};return e.exclude&&(t.q="NOT id:"+e.exclude),Ne(t).then(function(e){return e.results}).catch(function(e){throw Error("Error in getItemBySlug "+e)})}function go(t,r,n){var o=t.slug;return mo({slug:o=(n=void 0===n?0:n)?t.slug+"-"+n:o,exclude:t.existingId},r).then(function(e){return e.length?go(t,r,++n):o}).catch(function(e){throw Error("Error in getUniqueSlug "+e)})}var bo=["id","isOrgItem","proxyFilter","ownerFolder","protected","owner","created","modified","guid","name","access","size","listed","numComments","numRatings","avgRating","numViews","scoreCompleteness","groupDesignations","listed","screenshots","banner","appCategories","industries","languages","largeThumbnail"];function yo(n,o,i,a){return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){switch(e.label){case 0:t=I({item:{id:n},params:{thumbnail:o},filename:i},a),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,we(t)];case 2:if(!e.sent().success)throw new Fi("Set Project Thumbnail","Unknown error setting thumbnail.");return[3,4];case 3:throw(r=e.sent())instanceof Error?new Fi("Set Project Thumbnail",r.message,r):new Fi("Set Project Thumbnail","Unknown error setting thumbnail.");case 4:return[2]}})})}var vo=(wo.prototype.modelToObject=function(e,t){return r=this.mappings,Ao(e,"modelKey",t,"objectKey",r);var r},wo.prototype.objectToModel=function(e,t){return r=this.mappings,Ao(e,"objectKey",t,"modelKey",r);var r},wo);function wo(e){this.mappings=e}function Ao(r,n,e,o,t){var i=p(e);return t.forEach(function(e){var t=q(e,n),e=q(e,o),t=q(r,t);null!=t&&y(i,e,t)}),i}var Pt="Hub Project",Do={name:"No title provided",tags:[],typeKeywords:["Hub Project"],status:"inactive"},So={item:{type:Pt,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Project"],properties:{slug:""}},data:{display:"about",timeline:{},status:"inactive",contacts:[],schemaVersion:1}};function xo(){var t=[];return["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["contacts","display","geometry","headerImage","layout","location","status"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function Eo(i,a){return O(this,void 0,void 0,function(){var t,r,n,o;return P(this,function(e){switch(e.label){case 0:return(t=I(I({},Do),i)).slug||(t.slug=po(t.name,t.orgUrlKey)),[4,go({slug:(r=t).slug},a)];case 1:return r.slug=e.sent(),t.typeKeywords=fo(t.typeKeywords,t.slug),n=new vo(xo()),[4,Vn(o=n.objectToModel(t,p(So)),a)];case 2:return o=e.sent(),[2,n.modelToObject(o,{})]}})})}function ko(o,i){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){switch(e.label){case 0:return[4,go({slug:(t=o).slug,existingId:o.id},i)];case 1:return t.slug=e.sent(),[4,Mn(o.id,i)];case 2:return n=e.sent(),r=new vo(xo()),[4,Hn(r.objectToModel(o,n),i)];case 3:return n=e.sent(),[2,r.modelToObject(n,o)]}})})}function Co(e,n){e=(B(e)?Mn:Gn)(e,n);return e.then(function(e){var t,r=new vo(xo()).modelToObject(e,{});return n.authentication&&(t=n.authentication.token),r.thumbnailUrl=ir(e.item,n,t),r})}function To(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return[4,Ie(I(I({},r),{id:t}))];case 1:return e.sent(),[2]}})})}function qo(n,o){var i;return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){return t=Xo([{filterType:"content",typekeywords:{exact:["HubProject"]}},n]),t=ei(t),r=ii(t),null!==(i=o.aggregations)&&void 0!==i&&i.length&&(r.countFields=o.aggregations.join(","),r.countSize=200),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,Io(r)]})})}function Io(s){return O(this,void 0,void 0,function(){var t,r,n,o,i,a;return P(this,function(e){switch(e.label){case 0:return[4,Ne(s)];case 1:return t=e.sent(),r=-1<t.nextStart,i=t.results.map(function(e){return zn(e,{authentication:s.authentication})}),[4,Promise.all(i)];case 2:return a=e.sent(),n=new vo(xo()),s.authentication&&(i=s.authentication,o=i.token),a=a.map(function(e){var t=n.modelToObject(e,{});return t.thumbnailUrl=ir(e.item,{authentication:s.authentication},o),t}),[2,{total:t.total,results:a,facets:[],hasNext:r,next:Ko(s,t.nextStart,t.total,Io)}]}})})}var Oo=(Po.init=function(e){return new Po(e)},Object.defineProperty(Po.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),Po.prototype.create=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,Eo(t,r||this.context.userRequestOptions)];throw new Fi("Create Project","Creating Hub Projects requires authentication.")})})},Po.prototype.update=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return[2,ko(t,r||this.context.userRequestOptions)];throw new Fi("Update Project","Updating Hub Projects requires authentication.")})})},Po.prototype.destroy=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return[2,To(t,r||this.context.userRequestOptions)];throw new Fi("Destroy Project","Destroying Hub Projects requires authentication.")})})},Po.prototype.get=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){return console.warn("HubProjectManager.get is deprecated and will be removed. Use .fetch() instead."),[2,this.fetch(t,r)]})})},Po.prototype.fetch=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.requestOptions)return[2,Co(t,r||this.context.requestOptions)];throw new Fi("Fetch Project","Can not retrieve context.requestOptions from Context Manager. HubProjectManager is configured incorrectly.")})})},Po.prototype.search=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,qo(t,r)]})})},Po.prototype.updateThumbnail=function(r,n,o,i){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,yo(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},Po);function Po(e){e instanceof At?this._contextManager=e:this._context=e}function Uo(e,t){var r=e;return r=-1===e.indexOf("token")&&-1<e.indexOf(t.authentication.portal)?e+"?token="+t.authentication.token:r}function No(e,t){return(t=void 0===t?{}:t).credentials||(t.credentials="same-origin"),fetch(e,t).then(function(e){return e.blob()})}function Ro(r){return No(r.url).then(function(e){return ve(t={id:r.id,owner:r.owner,name:r.fileName,resource:e,authentication:r.authentication}).then(function(e){e=be(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=I({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),te(e,t)});var t})}function Fo(t){return No(t.url).then(function(e){return we({item:{id:t.id,owner:t.owner},params:{fileName:t.fileName,thumbnail:e},authentication:t.authentication}).catch(function(e){return Promise.resolve()})}).catch(function(e){return Promise.resolve()})}var Lo={arcgis:{label:"ArcGIS Online",url:"https://www.arcgis.com",type:"arcgis"},arcgisQA:{label:"ArcGIS Online QAEXT",url:"https://qaext.arcgis.com",type:"arcgis"},arcgisDEV:{label:"ArcGIS Online DEVEXT",url:"https://devext.arcgis.com",type:"arcgis"},hub:{label:"ArcGIS Hub",url:"https://hub.arcgis.com/api",type:"arcgis-hub"},hubDEV:{label:"ArcGIS Hub DEV",url:"https://hubdev.arcgis.com/api",type:"arcgis-hub"},hubQA:{label:"ArcGIS Hub QA",url:"https://hubqa.arcgis.com/api",type:"arcgis-hub"}};function _o(e){return"string"==typeof e&&e in Lo?Lo[e]:e}function jo(e,t){var r=p(e);return t.from<e.from&&(r.from=t.from),t.to>e.to&&(r.to=t.to),r}function Bo(r,n){var o={};return["any","all","not","exact"].forEach(function(e){var t=e,e=U(Mo(r,t),Mo(n,t));e.length&&(o[t]=e.filter(m))}),o}function Mo(e,t){var r=[];return e[t]&&(t=e[t],r=Array.isArray(t)?t:[t]),r}function Go(e){var t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function Vo(e){var t=new Date,r={type:"date-range",from:t.getTime(),to:t.getTime()};switch(e.unit){case"hours":case"days":case"weeks":r.from=r.to-{min:6e4,hours:36e5,days:864e5,weeks:6048e5}[e.unit]*e.num;break;case"months":t.setMonth(t.getMonth()-e.num),r.from=t.getTime();break;case"years":t.setFullYear(t.getFullYear()-e.num),r.from=t.getTime()}return r}function Ho(e,t,r){var n=p(e),e=t.q,t=t.filter;return e&&(n.q=(n.q?" ("+n.q+" "+r+" "+e+")":e).trim()),t&&(n.filter=(n.filter?"("+n.filter+" "+r+" "+t+")":t).trim()),n}function zo(e,t){var r={q:"",filter:""};return t.exact&&(U(["username","firstname","lastname","fullname","email"],["title","tags","typekeywords","type","name","owner"],["title","typekeywords","owner"]).includes(e)?r.filter=Wo("AND",e,t.exact):("string"==typeof t.exact&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all.push(t.exact)),Array.isArray(t.exact)&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all=t.all.concat(t.exact)))),t.any&&(r.q=Wo("OR",e,t.any)),t.all&&(r.q=(r.q?r.q+" AND ":"")+Wo("AND",e,t.all)),t.not&&(r.q=(r.q?r.q+" AND ":"")+Wo("OR","-"+e,t.not)),r}function Yo(e,t){return{q:e+":["+t.from+" TO "+t.to+"]",filter:""}}function Wo(e,t,r){return Array.isArray(r)?"("+t+':"'+r.join('" '+e+" "+t+':"')+'")':t+':"'+r+'"'}function Ko(e,t,r,n){var o=p(e);return e.authentication&&(o.authentication=pe.deserialize(e.authentication.serialize())),o.start=-1<t?t:r+1,function(e){return e&&(o.authentication=e),n(o)}}function Jo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/groups/"+t.id+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}function Zo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/users/"+t.username+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}var Qo={$apps:[{type:{any:["Code Sample","Web Mapping Application","Mobile Application","Application","Desktop Application Template","Desktop Application","Operation View","Dashboard","Operations Dashboard Extension","Workforce Project","Insights Workbook","Insights Page","Insights Model","Hub Page","Hub Initiative","Hub Site Application","StoryMap","Web Experience","Web Experience Template","Form"],not:["Code Attachment","Featured Items","Symbol Set","Color Set","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]},typekeywords:{not:["MapAreaPackage","SMX"]}}],$storymap:[{type:"StoryMap"},{type:"Web Mapping Application",typekeywords:["Story Map"]}],$dashboard:[{type:"Dashboard",typekeywords:{any:["Dashboard"],not:["ArcGIS Operation View","Add In","Extension"]}}],$dataset:[],$experience:[{type:{any:["Web Experience"],not:["Web Experience Template"]}}],$site:[{type:["Hub Site Application","Site Application"]},{type:["Web Mapping Application"],typekeywords:["hubSite"]}],$initiative:[{type:{any:"Hub Initiative",not:"Hub Initiative Template"}}],$document:[{typekeywords:{any:"Document",not:["MapAreaPackage","SMX"]},type:{any:["Image","Layout","Desktop Style","Project Template","Report Template","Pro Report","Statistical Data Collection","360 VR Experience","netCDF","PDF","CSV","Administrative Report","Raster function template"],not:["Image Service","Explorer Document","Explorer Map","Globe Document","Scene Document","Code Attachment","Featured Items","Symbol Set","ColorSet","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]}}]};function $o(e){var t,o=[];return null!==(t=e.aggregations)&&void 0!==t&&t.counts&&e.aggregations.counts.forEach(function(r){var e={label:r.fieldName,attribute:r.fieldName,type:"multi-select"},n=[];r.fieldValues.forEach(function(e){var t={filterType:"content"};t[r.fieldName]=e.value;t={label:e.value,value:e.value,count:e.count,selected:!1,filter:t};n.push(t)}),e.options=n,o.push(e)}),o}function Xo(e){var e=e.map(ei),n=["created","modified"],o=U(["filterType","subFilters","term"],n),e=e.reduce(function(r,e){return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r.hasOwnProperty(t)?o.includes(t)?n.includes(t)?r[t]=jo(r[t],e):"term"===t?r[t]=r[t]+" "+e:"subFilters"===t&&(r[t]=U(r[t],e)):r[t]=Bo(r[t],e):r[t]=p(e)}),r},{});return e.filterType="content",e}function ei(e){var t=ti(e);return Array.isArray(e.subFilters)&&(t.subFilters=t.subFilters.reduce(function(e,t){return"string"==typeof t?Qo[t]&&(e=e.concat(Qo[t])):e.push(t),e},[])),oi(t)}function ti(e){var r=p(e);return r.subFilters=r.subFilters||[],r.type&&(Array.isArray(r.type)?r.type=r.type.reduce(function(e,t){return ri(t)?r.subFilters=r.subFilters.concat(ni(t)):e.push(t),e},[]):ri(r.type)&&(e=r.type,r.subFilters=r.subFilters.concat(ni(e)),delete r.type)),r}function ri(e){var t=!1;return t="string"==typeof e?e in Qo:t}function ni(e){return Qo[e]}function oi(t){var r={};t.term&&(r.term=t.term);var e,n=["created","modified"],o=U(["filterType","subFilters","term"],n);return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r[t]=Go(e))}),t.subFilters&&Array.isArray(t.subFilters)&&(e=t.subFilters,r.subFilters=e.map(oi)),n.forEach(function(e){t[e]&&("relative-date"===t[e].type?r[e]=Vo(t[e]):r[e]=p(t[e]))}),r}function ii(e){var t,r=ai(e);return e.subFilters&&(t=e.subFilters.reduce(function(e,t){return e="object"==typeof t?Ho(e,ai(t),"OR"):e},{q:"",filter:""}),r=Ho(r,t,"AND")),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ai(e){var r={q:"",filter:""},n=["created","modified"],o=U(["filterType","subFilters","term"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),r}function si(r){var n={},o=["created","modified"],i=U(["term","searchUserAccess"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||D(t,Go(e),n),o.includes(t)&&(e=p(q(r,t)),"relative-date"===q(r,t+".type")?D(t,Vo(e),n):D(t,e,n))}),r.hasOwnProperty("searchUserAccess")&&(n.searchUserAccess=r.searchUserAccess),r.term&&(n.term=r.term),n}function ui(e){var r={q:"",filter:""},n=["created","modified"],o=U(["term","searchUserAccess","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),e.hasOwnProperty("searchUserAccess")&&(r.searchUserAccess=e.searchUserAccess),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ci(r){var n={},o=["created","modified","lastlogin"],i=U(["disabled","term"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||D(t,Go(e),n),o.includes(t)&&(e=p(q(r,t)),"relative-date"===q(r,t+".type")?D(t,Vo(e),n):D(t,e,n))}),r.hasOwnProperty("disabled")&&(n.disabled=r.disabled),r.term&&(n.term=r.term),n}function li(e){var r={q:"",filter:""},n=["created","modified","lastlogin"],o=U(["term","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),e.term&&(r.q=("("+e.term+") "+r.q).trim()),r}function pi(o){var e,t,r=(null===(e=o.authentication)||void 0===e?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);function i(e){return e.thumbnailUrl=ir(e,r,t),e}return Ne(o).then(function(e){var t=-1<e.nextStart,r=e.results.map(un),r=(r=o.site?r.map(function(e){return dn(e,o.site)}):r).map(i),n=$o(e);return{total:e.total,results:r,facets:n,hasNext:t,next:Ko(o,e.nextStart,e.total,pi)}})}function di(o){function i(e){return e.siteTeamUrl=o.site.item.url+"/teams/"+e.id+"/about",e}var e,t,r=(null===(e=o.authentication)||void 0===e?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);function a(e){return e.thumbnailUrl=Jo(r,e,t),e}return Ue(o,"group").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!==(t=null===(t=o.site)||void 0===t?void 0:t.item)&&void 0!==t&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Ko(o,e.nextStart,e.total,di)}})}function fi(o){function i(e){return e.profileUrl=o.site.item.url+"/people/"+e.username+"/profile",e}function a(e){return e.thumbnail&&(e.thumbnailUrl=Zo(t,e,r)),e}var t=o.authentication.portal,r=o.authentication.token;return Ue(o,"user").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!==(t=null===(t=o.site)||void 0===t?void 0:t.item)&&void 0!==t&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Ko(o,e.nextStart,e.total,fi)}})}function hi(t){return O(this,void 0,void 0,function(){return P(this,function(e){return 200<=t.status&&t.status<300?[2,t.json()]:[2,t.json().then(function(e){if(e.error)throw new Error(e.error.title+" :: "+e.error.detail+" :: "+t.status);throw new Error("Got "+t.status+" "+t.statusText)})]})})}function mi(e){var t={},e=q(e,"authentication.token");return e&&(t.Authorization=e),t}function gi(e){return(e||"https://hub.arcgis.com")+"/api/v3/domains"}function bi(e,t){var r=e,n="hubsubdomain|"+(r=-1<e.indexOf("#/")?e.split("#/")[1]:r);return Ne(Object.assign({q:"typekeywords: "+n},t)).then(function(e){return e.results.filter(function(e){return k(e.typeKeywords,n)})[0]}).then(function(e){if(!e)throw new Error("site not found");return{hostname:e.url,siteId:e.id}})}function yi(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=ot(e);e=gi(t.hubApiUrl)+"/"+e,t=mi(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(function(e){return 404!==e.status})}function vi(e,t){return bi(e,t).then(function(e){return!0}).catch(function(e){return!1})}function wi(t,r,n,o){var i=t;return yi((i=(o=void 0===o?0:o)?t+"-"+o:t)+"-"+r,n).then(function(e){return e?wi(t,r,n,o+1):i})}function Ai(t,r,n){var o=(n=void 0===n?0:n)?t+"-"+n:t;return vi(o,r).then(function(e){return e?Ai(t,r,n+1):o})}function Di(e,t){if(t.isPortal)return bi(e,t);e=gi(t.hubApiUrl)+"/"+e,t=mi(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(hi)}function Si(e,t){var r=p(e),e=63;return t&&(e-=t.length+1),r=r.length>e?r.slice(0,e-6)+"-"+j(5):r}function xi(e,t){return Mn(e,t).then(qi)}function Ei(e){if(1.4<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.values.gacode");return t.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(e),id:e}}}},jn(t,"data.values.gacode"),D("item.properties.schemaVersion",1.4,t),t}var ki=1.5;function Ci(e){if(1.5<=q(e,"item.properties.schemaVersion"))return e;var r,t=p(e),e=t.data.values.dcatConfig;return t.data.feeds={},e&&(t.data.feeds.dcatUS11=(r=JSON.stringify(e),Object.keys(Ti).forEach(function(e){var t=Ti[e];r=r.split(e).join(t)}),JSON.parse(r))),t.item.properties.schemaVersion=1.5,t}var Ti={"{{default.name}}":"{{name}}","{{default.description}}":"{{description}}","{{item.tags}}":"{{tags}}","{{item.created:toISO}}":"{{created:toISO}}","{{item.modified:toISO}}":"{{modified:toISO}}","{{default.source.source}}":"{{source}}","{{item.owner}}":"{{owner}}","{{org.portalProperties.links.contactUs.url}}":"{{orgContactEmail}}","{{org.name}}":"{{orgName}}","{{item.categories}}":"{{categories}}","{{item.licenseInfo}}":"{{licenseInfo}}","{{item.modified}}":"{{modified}}","{{enrichments.categories}}":"{{categories}}","{{default.id}}":"{{id}}","{{item.licenseInfo || No License}}":"{{licenseInfo || No License}}","{{org.portalProperties.links.contactUs.url || mailto:data@tempe.gov}}":"{{orgContactEmail || mailto:data@tempe.gov}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"};function qi(e){return q(e,"item.properties.schemaVersion")===ki?e:e=Ci(e=Ei(e=function(e){if(1.3<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.catalog.groups")||[];return t.data.catalog.groups=e.filter(B),t.item.properties.schemaVersion=1.3,t}(e=function(e){if(1.2<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.catalog")||{};return q(t,"data.values.groups")&&(e.groups=p(t.data.values.groups),delete t.data.values.groups),t.data.catalog=e,t.item.properties.schemaVersion=1.2,t}(e=function(e){if(1.1<=q(e,"item.properties.schemaVersion"))return e;var t=p(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach(function(e){t.data.values[e]&&"string"==typeof t.data.values[e]&&(t.data.values[e]=t.data.values[e].toLowerCase())}),t.item.properties.schemaVersion=1.1,t}(e=function(e){if(1<=q(e,"item.properties.schemaVersion"))return e;var t=p(e);return["groupId","title"].forEach(function(e){delete t.data.values[e]}),t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1,t.data.values.groups&&Array.isArray(t.data.values.groups)&&(e=t.data.values.groups.map(function(e){return"object"==typeof e?e.id:e}).filter(function(e){return!!e}),t.data.values.groups=e),t}(e))))))}function Ii(e,t){return ke(I({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Oi(e,t){return ke(I({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Pi(e,t){return ke(I({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Ui(t){function e(e){return-1<t.typeKeywords.indexOf(e)}var r=e("FieldworkerView");return r=r||["Survey123","Feature Service","View Service"].every(e)&&!e("StakeholderView")}Ni.create=function(r){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return r.contextManager?[2,new Ni(r.contextManager)]:[3,1];case 1:return t=r.managerOptions||{},[4,At.create(t)];case 2:return[2,new Ni(e.sent())]}})})},Object.defineProperty(Ni.prototype,"context",{get:function(){return this._contextManager.context},enumerable:!1,configurable:!0}),Object.defineProperty(Ni.prototype,"projects",{get:function(){return this._projectManager||(this._projectManager=Oo.init(this._contextManager)),this._projectManager},enumerable:!1,configurable:!0}),Ut=Ni;function Ni(e){this._contextManager=e}var Ri,Fi=(e(Li,Ri=R),Li);function Li(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=v(r,"rootCause",r),(n=Ri.call(this,e,t,r)||this).name="HubError",n.stack=v(r,"stack",(new Error).stack),n}n.ArcGISContext=vt,n.ArcGISContextManager=At,n.GLOBAL_EXTENT=Mt,n.HUB_CDN_URLMAP=tt,n.HUB_LOCALES=_n,n.HUB_PROJECT_ITEM_TYPE=Pt,n.Hub=Ut,n.HubError=Fi,n.HubProjectManager=Oo,n.Logger=G,n.OperationError=R,n.OperationStack=Cr,n.PORTAL_EXPORT_TYPES=vn,n.REQUIRED_PRIVS=me,n.RemoteServerError=Jr,n.SEARCH_APIS=Lo,n.SITE_SCHEMA_VERSION=ki,n.STANDARD_LICENSES=nr,n.WGS84_WKID=yn,n._addTokenToResourceUrl=Uo,n._canEmailUser=kn,n._checkStatusAndParseJson=hi,n._consolidateResults=xn,n._deepMapValues=i,n._ensureSafeDomainLength=Si,n._ensureTelemetry=Ei,n._formatAutoAddResponse=En,n._getAuthHeader=mi,n._getAutoAddUsers=Rn,n._getDomainServiceUrl=gi,n._getEmailUsers=Ln,n._getHttpAndHttpsUris=function(e){return e?["http://"+(e=e.replace(/^http(s?):\/\//,"")),"https://"+e]:[]},n._getInviteUsers=Fn,n._getLocation=function(){if(window)return window.location},n._isDate=s,n._isFunction=u,n._isObject=c,n._isOrgAdmin=Cn,n._isRegExp=l,n._isString=a,n._lookupPortal=bi,n._mapValues=o,n._processAutoAdd=On,n._processInvite=Un,n._processPrimaryEmail=Nn,n._processSecondaryEmail=qn,n._searchContent=function(o,i){var a;return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){return t=ei(o),r=_o(i.api||"arcgis"),[2,"arcgis"===r.type?(n=ii(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),null!==(a=i.aggregations)&&void 0!==a&&a.length&&(n.countFields=i.aggregations.join(","),n.countSize=200),pi(n)):Promise.resolve({total:0,results:[],facets:[],hasNext:!1,next:function(){}})]})})},n._searchGroups=function(o,i){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){if(t=si(o),"arcgis"===(r=_o(i.api||"arcgis")).type)return n=ui(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),[2,di(n)];throw new Error("_searchGroups is not implemented for non-arcgis apis")})})},n._searchUsers=function(n,o){return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){if(!o.authentication)throw new Error("Authentication required to search for users.");if(t=ci(n),"arcgis"===_o(o.api||"arcgis").type)return r=li(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,fi(r)];throw new Error("_searchUsers is not implemented for non-arcgis apis")})})},n._unprotectAndRemoveGroup=function(e){var t=_(Ge,{success:!0}),r=_(Ve,{success:!0});return t(e).then(function(){return r(e)})},n._unprotectAndRemoveItem=function(e){var t=_(Te,{success:!0}),r=_(Ie,{success:!0});return t(e).then(function(){return r(e)})},n.addContextToSlug=Er,n.addDays=function(e,t){try{var r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}},n.addDomain=function(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);r["Content-Type"]="application/json";var n=""+gi(t.hubApiUrl);return"number"==typeof(t=e.siteTitle)&&(e.siteTitle=t.toString()),fetch(n,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(hi)},n.addSolutionResourceUrlToAssets=function(e,t){var r,n,o=e.assets||e.resources||[];return e.bundleItemId&&(r=nt(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=o.map(function(e){return{name:e.name,type:e.type||"resource",url:r+"/resources/"+n+"-"+e.name}})),o},n.addUsersToGroup=function(e,t,r,n,o){var i=p(v(r,"portalSelf.user",{}));return i.cOrgId=q(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId"),On({groupId:e,allUsers:t,primaryRO:r,email:n,secondaryRO:o,requestingUser:i,usersToAutoAdd:Rn(t,i),usersToInvite:Fn(t,i),usersToEmail:Ln(t,i,q(n,"copyMe"))}).then(Un).then(Nn).then(qn).then(xn)},n.applyPropertiesToItems=function(e,t){return e.map(function(e){return e.properties||(e.properties={}),Object.assign(e.properties,t),e})},n.arrayToObject=function(e,r){return e.reduce(function(e,t){return e[q(t,r)]=t,e},{})},n.atob=bn.atob,n.autoAddUsers=In,n.bBoxToPolygon=zt,n.batch=E,n.btoa=bn.btoa,n.buildDraft=function(e,t){return A(e,{},t)},n.buildExistingExportsPortalQuery=function(e,t){var r,n,o,i,a=(c=function(e){if(e)return{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId};return{}}(t)).onlyTypes,s=c.layerId,u=c.spatialRefId,t=Object.keys(vn).map(function(e){return vn[e]}),c=new Set(b(t.filter(function(e){return!e.supportsProjection}).map(function(e){return e.itemTypes}))),t=a||b(t.map(function(e){return e.itemTypes})),s=(new Oe).startGroup().match(Dn(e)).in("typekeywords").and().match(Sn(s)).in("typekeywords").endGroup().and().startGroup();function l(e,t){var r;t.startGroup().match(/\s/g.test(e)?e:'"'+e+'"').in("type").and().match(An((r=e,t=yn,t=(e=i)&&!o.has(r)?e:t))).in("typekeywords").endGroup()}return r=s,n=(c={types:t,spatialRefId:u,noProjectionItemTypes:c}).types,o=c.noProjectionItemTypes,i=c.spatialRefId,n.forEach(function(e,t){l(e,r),t<n.length-1&&r.or()}),s.endGroup(),s.toParam()},n.buildUrl=ge,n.camelize=h,n.canEditEvent=function(e,t){var r=!1;return fe(t)&&(e=q(e,"initiative.item.properties.collaborationGroupId"),t=t.groups,r=!!e&&!!d(void 0===t?[]:t,"id",e)),r},n.canEditItem=he,n.canEditSite=function(e,t){var r=!1;return r=!q(e,"properties.isDefaultHubHome")&&fe(t)?he(e,t):r},n.canEditSiteContent=function(e,t){var r,n=!1,o=q(e,"properties.isDefaultHubHome"),i=fe(t);return!o&&i?n=he(e,t):i&&(i=t.orgId,e=e.orgId,i&&i===e&&(r=t.privileges||[],n=me.every(function(e){return k(r,e)}))),n},n.capitalize=t,n.categories=Ft,n.chunkArray=function(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r},n.clearSession=function(e,t){(t=void 0===t?window:t).localStorage&&t.localStorage.removeItem("__CONTEXT_"+e)},n.cloneObject=p,n.completeOAuth2=function(t,e){var r=(e=(e=void 0===e?window:e).location.href.match(/access_token=(.+)&expires_in=.+&username=([^&]+)/))[1],n="https://www.arcgis.com/sharing/rest/community/users/"+decodeURIComponent(e[2]);return te(n,{params:{token:r},httpMethod:"GET"}).then(function(e){return Date.now()-e.created<5e3?te(n+"/update",{params:{token:r,tags:["hubRole:participant","org:"+e.orgId],access:"public"}}).then(function(){return pe.completeOAuth2(t)}):pe.completeOAuth2(t)})},n.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(r,n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(n.apply(void 0,e))}})},n.composeContent=Dr,n.constructSlug=po,n.convertContentDefinitionToFilter=oi,n.convertContentFilterToSearchOptions=ai,n.convertPortalResponseToFacets=$o,n.convertSolutionTemplateResourcesToAssets=function(e,t){var r,n,o=[];return e.resources&&e.bundleItemId&&(r=nt(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=e.resources.map(function(e){return{name:e,type:"resource",url:r+"/resources/"+n+"-"+e}})),o},n.convertToWellKnownLocale=function(e){var t="en";return e=(e=void 0===e?"en":e).toLowerCase(),-1<_n.indexOf(e)?t=e:1<(e=e.split("-")).length&&-1<_n.indexOf(e[0])&&(t=e[0]),t},n.convertUrlsToAnchorTags=function(t){var e=t.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return e&&e.forEach(function(e){t=t.replace(e,'<a target="_blank" href="'+e+'">'+e+"</a>")}),t.replace("(","<br/>(")},n.createExtent=function(e,t,r,n,o){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:o=void 0===o?4326:o}}},n.createId=r,n.createModel=Vn,n.createOperationPipeline=L,n.createProject=Eo,n.dasherize=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")},n.datasetToContent=function(e){var t=cn(e),r=(g=e.attributes).errors,n=g.boundary,o=g.metadata,i=g.slug,a=g.groupIds,s=g.orgId,u=g.orgName,c=g.organization,l=g.orgExtent,p=g.server,d=g.layers,f=g.layer,h=g.recordCount,m=g.statistics,e=g.extent,g=g.searchDescription,f=f&&f.id;return Dr(t,{layerId:f,slug:i,errors:r,metadata:o||null,groupIds:a,org:s&&{id:s,name:u||c,extent:l},server:p,layers:d,recordCount:h,boundary:n,extent:e,searchDescription:g,statistics:m})},n.datasetToItem=cn,n.deepFind=S,n.deepFindById=function(e,t){return S(e,function(e){return e.id===t})},n.deepSet=y,n.deepStringReplace=w,n.deleteProp=jn,n.destroyProject=To,n.doesItemExistWithTitle=lo,n.domainExists=yi,n.domainExistsPortal=vi,n.emailOrgUsers=Tn,n.ensureProp=function(e,t){return y(e,t)},n.ensureUniqueDomainName=function(e,t){return(t.isPortal?Ai(e,t):wi(e,t.portalSelf.urlKey+"."+ot(mt(t)),t)).then(function(e){return Si(e,t.portalSelf.urlKey)})},n.ensureUniqueString=function(e,t){for(var r=!1,n=0,o=t;!r;)k(e,o)?o=t+"-"+ ++n:r=!0;return o},n.expandApi=_o,n.expandApis=function(e){return e.map(_o)},n.expandContentFilter=ei,n.expandGroupFilter=si,n.expandTypeField=ti,n.expandUserFilter=ci,n.extend=function n(e,o,i){void 0===i&&(i=!0);e=p(e);return Object.keys(o).reduce(function(e,t){var r;return null!==o[t]&&void 0!==o[t]&&(r=p(o[t]),Array.isArray(r)?e[t]=r:e[t]=i&&"object"==typeof r?n(e[t]||{},r,i):r),e},e)},n.extentToBBox=Bt,n.failSafe=_,n.failSafeUpdate=function(e,t){return _(we,{id:e.item.id,success:!0})(Object.assign({item:Bn(e)},t))},n.fetchAllPages=function(n,o,r,i){var a=o.num||100,e=o.start||1;return(-1===(r=void 0===r?-1:r)?n(I(I({},o),{num:a,start:e})):Promise.resolve({nextStart:e,total:r,results:[],num:a})).then(function(t){if(-1===t.nextStart)return[t];for(var e=[],r=t.nextStart;r<=t.total;r+=a)e.push(r);return E(e,function(e){return n(I(I({},o),{start:e,num:a}))},i).then(function(e){return U([t],e)})}).then(function(e){var t=e.reduce(function(e,t){return U(e,t.results)},[]),e=-1===r?t.length:r;return t.slice(0,e)})},n.fetchAndUploadResource=Ro,n.fetchAndUploadThumbnail=Fo,n.fetchContent=function(s,u){return O(void 0,void 0,void 0,function(){var t,r,n,o,i,a;return P(this,function(e){switch(e.label){case 0:return xr(s)?[4,nn(Er(s,null==u?void 0:u.siteOrgKey),u)]:[3,2];case 1:return r=e.sent(),[3,4];case 2:return[4,(p=s,d=u,O(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s,u,c,l;return P(this,function(e){switch(e.label){case 0:return u=Sr(p).itemId,[4,rn(u,d)];case 1:return c=e.sent(),t=c.item,r=T(c,["item"]),n=d&&d.layerId,Kt(t,d)?[4,tn(p,d)]:[3,3];case 2:return l=e.sent(),[3,4];case 3:l={},e.label=4;case 4:return o=l.slug,i=l.layerId,a=l.boundary,s=l.extent,u=l.searchDescription,c=l.statistics,[2,Dr(t,I(I({requestOptions:d},r),{slug:o,layerId:g(n)?i:n,boundary:a,extent:s,searchDescription:u,statistics:c}))]}})}))];case 3:r=e.sent(),e.label=4;case 4:return n=(t=r).layer,o=t.type,i=t,n&&["Feature Layer","Table"].includes(o)?[4,on(t)]:[3,6];case 5:return a=e.sent(),[3,7];case 6:a=void 0,e.label=7;case 7:return i.recordCount=a,[2,t]}var p,d})})},n.fetchHubTranslation=function(t,e,r){void 0===r&&(r="cors");var n=(rt(e)+"/locales/"+t+".json").toLocaleLowerCase();return fetch(n,{method:"GET",credentials:"same-origin",mode:r}).then(function(e){return e.json()}).catch(function(e){throw Error("Attempt to fetch locale "+t+" from "+n+" failed: "+JSON.stringify(e))})},n.fetchImageAsBlob=No,n.fetchModelFromItem=zn,n.fetchProject=Co,n.fetchSite=function(e,t){return B(e)?xi(e,t):Di(ot(e).split("/")[0],t).then(function(e){return xi(e.siteId,t)})},n.filterBy=function(e,t,r){return e.filter(function(e){return q(e,t)===r})},n.findBy=d,n.findItemsBySlug=mo,n.flattenArray=b,n.generateRandomString=j,n.getCategory=an,n.getContentIdentifier=sn,n.getContentSiteUrls=ln,n.getContentTypeIcon=pr,n.getContentTypeLabel=pn,n.getCulture=function(e){return q(e,"portalSelf.user.culture")||q(e,"portalSelf.culture")||"en-us"},n.getDomainsForSite=function(e,t){return t.isPortal?Promise.resolve([]):(e=gi(t.hubApiUrl)+"?siteId="+e,t=mi(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(hi).catch(function(e){throw Error("Error in getDomainsForSite "+e)}))},n.getExportItemTypeKeyword=Dn,n.getExportLayerTypeKeyword=Sn,n.getFamily=Yt,n.getGeographicOrgExtent=Gt,n.getGroupThumbnailUrl=Jo,n.getHubApiFromPortalUrl=lt,n.getHubApiUrl=mt,n.getHubApiUrlFromPortal=function(e){return at(e)+"/api/v3"},n.getHubLocaleAssetUrl=rt,n.getHubProduct=function(e){var t=q(e,"portalProperties.hub.enabled")||!1?"premium":"basic";return t=e.isPortal&&"singletenant"===e.portalMode?"portal":t},n.getHubUrlFromPortal=at,n.getInputFeatureServiceModel=Ii,n.getItemApiUrl=ct,n.getItemAssets=function(e,t){var r=nt(t.portalSelf)+"/content/items/"+e.id,n=ir(e,t),o=[];return n&&o.push({name:e.thumbnail,url:n,type:"thumbnail"}),e=e.id,e=xe(e,t=t)+"/resources",(t=I({},t)).params=I({num:1e3},t.params),te(e,t).then(function(e){e=e.resources.map(function(e){return{name:e.resource,type:"resource",url:r+"/resources/"+e.resource}});return o.concat(e)})},n.getItemBySlug=ho,n.getItemDataUrl=ut,n.getItemHomeUrl=st,n.getItemHubId=yr,n.getItemHubType=function(e){return console.warn("DEPRECATED: Use getFamily() instead. getItemHubType() will be removed at v10.0.0"),e=gr(e="string"==typeof e?{type:e}:e),St(e)},n.getItemLayer=wr,n.getItemLayerId=br,n.getItemThumbnailUrl=ir,n.getLayerIdFromUrl=mr,n.getModel=Mn,n.getModelBySlug=Gn,n.getModelFromOptions=function(e,t){var r=e+"Model",e=e+"Id";if(t[r])return Promise.resolve(t[r]);if(t[e])return _(Mn,{item:{id:t[e]},isMissing:!0})(t[e],t);throw new Error("getModelFromOptions requires either a ."+r+" or ."+e+" property.")},n.getNextFunction=Ko,n.getOrgExtentAsBBox=function(e){return Gt(e).then(Bt)},n.getPortalApiUrl=nt,n.getPortalBaseFromOrgUrl=pt,n.getPortalUrl=et,n.getPortalUrls=dr,n.getProp=q,n.getProps=function(r,e){return e.reduce(function(e,t){t=q(r,t);return t&&e.push(t),e},[])},n.getProxyUrl=fr,n.getServiceTypeFromUrl=ht,n.getSession=function(e,t){var r=null;return!(t=void 0===t?window:t).localStorage||(e=t.localStorage.getItem("__CONTEXT_"+e))&&(r=pe.deserialize(e)),r},n.getSiteById=xi,n.getSourceFeatureServiceModelFromFieldworker=Oi,n.getSpatialRefTypeKeyword=An,n.getStakeholderModel=Pi,n.getStructuredLicense=or,n.getSubscriptionType=function(e){return v(e,"subscriptionInfo.type","Enterprise")},n.getSurveyModels=function(e,r){var n,o;return("string"==typeof e?Se(e,r):Promise.resolve(e)).then(function(t){var e=[Ii(t.id,r),Pi(t.id,r)];return Promise.all(e).then(function(e){var t=e[0],e=e[1];return o=e,t&&Ui(t.item)?Oi((n=t).item.id,r):t}).then(function(e){return{form:{item:t},featureService:e,fieldworker:n,stakeholder:o}})})},n.getTypeCategories=function(e){if(e=an(gr(e=void 0===e?{}:e))){e=Array.from(e);return e[0]=e[0].toUpperCase(),[e.join("")]}return["Other"]},n.getTypes=function(e){return Ft[(e=void 0===e?"":e).toLowerCase()]},n.getUniqueDomainName=wi,n.getUniqueDomainNamePortal=Ai,n.getUniqueItemTitle=function t(r,n,o,i){var a=(i=void 0===i?0:i)?r+" "+i:r;return lo(a,n,o).then(function(e){return e?t(r,n,o,++i):a}).catch(function(e){throw Error("Error in getUniqueItemTitle "+e)})},n.getUniqueSlug=go,n.getUserThumbnailUrl=Zo,n.getWithDefault=v,n.hasBasePriv=fe,n.hubApiRequest=Qr,n.hubApiSearch=function(e){var t=(t=e.authentication)&&t.serialize&&{authentication:t.serialize()};return Qr("/search",I(I({},{headers:t,httpMethod:"POST"}),e))},n.includes=k,n.incrementString=function(e){var t=e.match(/-\s(\d+$)/);return t?(t=parseInt(t[1],10),e=e.replace("- "+t,"- "+(t+1))):e+=" - 1",e},n.interpolate=co,n.interpolateItemId=function(e){return co(e,{item:{id:e.item.id},appid:e.item.id},{toISO:function(e,t){return t}})},n.inviteUsers=Pn,n.isBBox=Vt,n.isDomainForLegacySite=function(e){return!B(e.siteId)},n.isDomainUsedElsewhere=function(e,t,r){return Di(e,r).then(function(e){return e.siteId!==t}).catch(function(){return!1})},n.isDownloadable=Lt,n.isExtentCoordinateArray=Ht,n.isFeatureService=hr,n.isFieldworkerView=Ui,n.isGuid=B,n.isLayerView=Ar,n.isMapOrFeatureServerUrl=dt,n.isNil=g,n.isSlug=xr,n.isUpdateGroup=H,n.isValidDomain=function(t,e){if(e.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");var r=gi(e.hubApiUrl)+"/validate?hostname="+t,e=mi(e);return fetch(r,{method:"GET",headers:e,mode:"cors"}).then(function(e){return e.json()}).catch(function(e){return{success:!1,input:t,error:{code:400,detail:e,message:"lookupFailed"}}})},n.isValidExtent=function(t){return!!t&&[Ht,function(t){return["xmin","ymin","xmax","ymax"].every(function(e){return"number"==typeof t[e]})}].some(function(e){return e(t)})},n.itemPropsNotInTemplates=bo,n.itemToContent=un,n.last=function(e){return e[e.length-1]},n.lookupDomain=Di,n.mapBy=function(t,e){return(e=void 0===e?[]:e).map(function(e){return e[t]})},n.maybeAdd=function(e,t,r){return null!=t&&((r=p(r))[e]=t),r},n.maybePush=f,n.mergeContentFilter=Xo,n.mergeDateRange=jo,n.mergeGroupFilters=function(e){var e=e.map(si),o=["created","modified"],i=U(["filterType","term"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t=e[0],r=e[1];n.hasOwnProperty(t)?(e=q(n,t),i.includes(t)?o.includes(t)?D(t,jo(e,r),n):"term"===t&&(n[t]=n[t]+" "+r):D(t,Bo(e,r),n)):D(t,p(r),n)}),n},{filterType:"group"})},n.mergeMatchOptions=Bo,n.mergeObjects=A,n.mergeSearchOptions=Ho,n.mergeUserFilters=function(e){var e=e.map(ci),o=["created","modified","lastlogin"],i=U(["disabled","term","filterType"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t=e[0],r=e[1];n.hasOwnProperty(t)?(e=q(n,t),i.includes(t)?o.includes(t)?D(t,jo(e,r),n):"term"===t&&(n[t]=n[t]+" "+r):D(t,Bo(e,r),n)):D(t,p(r),n)}),n},{filterType:"user"})},n.normalizeItemType=gr,n.normalizeSolutionTemplateItem=function(e){var t=p(e);return bo.forEach(function(e){delete t[e]}),t.extent="{{organization.defaultExtentBBox}}",t},n.objectToArray=function(r,n){return void 0===n&&(n="id"),Object.keys(r).reduce(function(e,t){return r[t][n]=t,e.push(p(r[t])),e},[])},n.objectToJsonBlob=function(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")},n.parseDatasetId=Sr,n.parseItemCategories=vr,n.processRevertableTasks=function(e){return Promise.all(e).then(function(e){function t(e){return"fullfilled"===e.status}var r=e.filter(t),n=e.filter(function(e){return!t(e)});if(n.length){e=r.map(function(e){return e.revert()});throw Promise.all(e).catch(function(){}),n[0].error}return r.map(function(e){return e.results})})},n.propifyString=function(e){return h(e.replace(/^[0-9]*/g,"").replace(/[^\w\s]/g,""))},n.relativeDateToDateRange=Vo,n.removeContextFromSlug=kr,n.removeDomain=function(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);return r["Content-Type"]="application/json",e=gi(t.hubApiUrl)+"/"+e,fetch(e,{method:"DELETE",headers:r,mode:"cors"}).then(hi)},n.removeDomainsBySiteId=function(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);return r["Content-Type"]="application/json",e=gi(t.hubApiUrl)+"/?siteId="+e,fetch(e,{method:"DELETE",headers:r,mode:"cors"}).then(hi)},n.removeEmptyProps=function t(r){return Object.keys(r).forEach(function(e){r[e]&&"object"==typeof r[e]?t(r[e]):null==r[e]&&delete r[e]}),r},n.replaceItemId=function(e,t,r){return void 0===r&&(r="{{appid}}"),w(p(e),new RegExp(t,"g"),r)},n.runRevertableTask=function(e,t){return e().then(function(e){return{status:"fullfilled",results:e,revert:t}}).catch(function(e){return{status:"rejected",error:e}})},n.saveSession=function(e,t,r){(r=void 0===r?window:r).localStorage&&r.localStorage.setItem("__CONTEXT_"+e,t.serialize())},n.searchProjects=qo,n.serializeContentFilterForPortal=ii,n.serializeDateRange=Yo,n.serializeGroupFilterForPortal=ui,n.serializeMatchOptions=zo,n.serializeModel=Bn,n.serializeSpatialReference=wn,n.serializeStringOrArray=Wo,n.serializeUserFilterForPortal=li,n.setContentHubId=function(e,t){var r=e.id,r=e.slug||t||r,r=I(I({},e),{hubId:t,identifier:r});return fn(r,{relative:hn(r)})},n.setContentSiteUrls=dn,n.setContentType=function(e,t){var r=gr(I(I({},e.item),{type:t})),n=Yt(r),o=pr(r),t=pn(r,e.isProxied),t=I(I({},e),{type:r,family:n,normalizedType:r,contentTypeIcon:o,contentTypeLabel:t});return fn(t,{relative:hn(t)})},n.setItemThumbnail=yo,n.setProp=D,n.setSlugKeyword=fo,n.shareItemToGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),Je(e)}))},n.slugify=M,n.stringToBlob=function(e,t){if(void 0===t&&(t="application/octet-stream"),"undefined"==typeof Blob)throw new Error("stringToBlob is not currently supported on Node");for(var r=[],n=0;n<e.length;n++)r[n]=e.charCodeAt(n);var o=new Uint8Array(r);return new Blob([o],{type:t})},n.stripProtocol=ot,n.unique=m,n.uniqueBy=function(e,r){return e.reduce(function(e,t){return f(e.find(function(e){return q(e,r)===q(t,r)})?null:t,e)},[])},n.unprotectModel=function(e,t){return e.item.protected?Te(Object.assign({id:e.item.id},t)):Promise.resolve({success:!0})},n.unshareItemFromGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),$e(e)}))},n.updateDomain=function(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);r["Content-Type"]="application/json";var n=gi(t.hubApiUrl)+"/"+e.id;return"number"==typeof(t=e.siteTitle)&&(e.siteTitle=t.toString()),fetch(n,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(hi)},n.updateModel=Hn,n.updateProject=ko,n.upgradeProtocol=function(e){return-1===e.indexOf("http")?"https://"+e:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e},n.upgradeSiteSchema=qi,n.uploadResourcesFromUrl=function(n,e,o){if(Array.isArray(e)){e=e.reduce(function(e,t){var r;return t.url&&(r={id:n.item.id,owner:n.item.owner,fileName:t.name,url:Uo(t.url,o),authentication:o.authentication},"thumbnail"===t.type?e.push(Fo(r)):e.push(Ro(r))),e},[]);return Promise.all(e)}return Promise.resolve([])},n.valueToMatchOptions=Go,n.without=function(e,t){return e.filter(function(e){return e!==t})},n.withoutByProp=function(t,r,e){return e.filter(function(e){return e[t]!==r})},Object.defineProperty(n,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisHub=e.arcgisHub||{})}(this,function(n){"use strict";function o(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function i(e,r,n){return n=n||"",Array.isArray(e)?e.map(t):!e||!c(e)||s(e)||l(e)||u(e)?r(e,n):Object.assign({},e,o(e,t));function t(e,t){return i(e,r,""+(n?n+"."+t:t))}}function a(e){return"string"==typeof e||e instanceof String}function s(e){return e instanceof Date}function u(e){return"function"==typeof e}function c(e){return"object"==typeof e}function l(e){return e instanceof RegExp}function q(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:void 0},e)}function p(e){var t,r={};if(Array.isArray(e))r=e.map(p);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(null!=(t=e[n])&&"object"==typeof t?t instanceof Date?r[n]=new Date(t.getTime()):r[n]=p(t):r[n]=t);else r=e;return r}function d(e,r,n){return e?e.reduce(function(e,t){return e=q(t,r)===n?t:e},null):null}function r(e){return""+(e=void 0===e?"i":e)+Math.random().toString(36).substr(2,8)}function f(e,t){return null!=e&&(t=p(t)).push(e),t}function h(e){return(e=(e=e.toLowerCase()).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi," ")).replace(/(\-|\_|\.|\s)+(.)?/g,function(e,t,r){return r?r.toUpperCase():""}).replace(/(^|\/)([A-Z])/g,function(e,t,r){return e.toLowerCase()})}function m(e,t,r){return r.indexOf(e)===t}function g(e){return null==e}function t(e){return(e=Array.from(e))[0]=e[0].toUpperCase(),e.join("")}function b(e){return e.reduce(function(e,t){return e.concat(t)},[])}function y(e,t,r){void 0===r&&(r={});var t=t.split("."),n=e,o=t.length-1;t.forEach(function(e,t){n.hasOwnProperty(e)&&null!=n[e]?t===o&&("object"!=typeof n[e]||Array.isArray(n[e])?n[e]=r:n[e]=Object.assign(n[e],p(r))):n[e]=t===o?r:{},n=n[e]})}function v(e,t,r){t=q(e,t);return void 0!==t?t:r}function w(e,r,n){return i(e,function(e){if(!a(e))return e;var t=l(r)?r:new RegExp(r,"g");return e.replace(t,n)})}function A(t,r,e){return Array.isArray(e)&&e.length?(e.forEach(function(e){void 0!==q(t,e)&&y(r,e,q(t,e))}),r):t}function D(e,t,r){y(r,e=Array.isArray(e)?e.join("."):e,t)}function S(r,n){return Array.isArray(r)?r.reduce(function(e,t){return n(t)?e=t:!x(t)||(t=S(t,n))&&(e=t),e},void 0):x(r)?n(r)?r:Object.keys(r).reduce(function(e,t){return!x(r[t])||(t=S(r[t],n))&&(e=t),e},void 0):void 0}function x(e){var t=!1;return t=e&&c(e)&&!s(e)&&!l(e)&&!u(e)?!0:t}function E(e,n,o){void 0===o&&(o=5);return e.reduce(function(e,t){var r=e[e.length-1];return r&&r.length!==o||e.push(r=[]),r.push(t),e},[]).reduce(function(e,r){return e.then(function(t){var e=r.map(function(e){return n(e)});return Promise.all(e).then(function(e){return t.concat(e)})})},Promise.resolve([]))}function k(e,t){return-1!==e.indexOf(t)}var C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function e(e,t){function r(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var I=function(){return(I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function T(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function O(e,a,s,u){return new(s=s||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((u=u.apply(e,a||[])).next())})}function P(r,n){var o,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=n.call(r,s)}catch(e){t=[6,e],i=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function U(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}var N,R=(e(F,N=Error),F);function F(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=v(r,"rootCause",r),(n=N.call(this,t)||this).operation=e,n.name="OperationError",n.rootCause=r,Object.setPrototypeOf(n,F.prototype),n.stack=v(r,"stack",(new Error).stack),n}function L(e){return function(r){return e.reduce(function(e,t){return e.then(t).catch(function(e){if("OperationError"===e.name)return Promise.reject(e);e="IPipeableFn did not reject with an OperationError \n Operation Stack: \n "+r.stack.toString(),e=new R("pipeline execution error",e);return e.operationStack=r.stack.serialize(),Promise.reject(e)})},Promise.resolve(r))}}function _(r,n){return void 0===n&&(n={}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e).catch(function(e){return n})}}function j(e){var r=(new Date).getTime();return Array(e).fill(0).reduce(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),e=""+e+t.toString(16)},"")}function B(e){"{"===e[0]&&(e=e.substring(1,e.length-1));return/^(\{){0,1}[0-9a-fA-F]{8}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{12}(\}){0,1}$/gi.test(e)}function M(e){return"string"==typeof e?e.trim().toLowerCase().replace(/ +/g,"-").replace(/[^\w-]/g,"").replace(/-+/g,"-"):e}n.Level=void 0,(Ut=n.Level||(n.Level={}))[Ut.all=0]="all",Ut[Ut.debug=1]="debug",Ut[Ut.info=2]="info",Ut[Ut.warn=3]="warn",Ut[Ut.error=4]="error",Ut[Ut.off=5]="off";var G=(V.setLogLevel=function(e){this.logLevel=e},V.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.log.apply(console,U([e],t))},V.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.debug.apply(console,U([e],t))},V.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.info)&&console.info.apply(console,U([e],t))},V.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.warn)&&console.warn.apply(console,U([e],t))},V.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.error)&&console.error.apply(console,U([e],t))},V.isLevelPermitted=function(e){return this.logLevel<=e},V.logLevel=n.Level.off,V);function V(){}function H(e){return e.capabilities.includes("updateitemcontrol")}function z(t){return Object.keys(t).some(function(e){e=t[e];if(!e)return!1;switch((e=e&&e.toParam?e.toParam():e).constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}})}function Y(o){var i={};return Object.keys(o).forEach(function(e){var t=o[e];if((t=t&&t.toParam?t.toParam():t)||0===t||"boolean"==typeof t||"string"==typeof t){switch(t.constructor.name){case"Array":var r=null===(r=null===(r=t[0])||void 0===r?void 0:r.constructor)||void 0===r?void 0:r.name,n="Array"===r?t:"Object"===r?JSON.stringify(t):t.join(",");break;case"Object":n=JSON.stringify(t);break;case"Date":n=t.valueOf();break;case"Function":n=null;break;case"Boolean":n=t+"";break;default:n=t}(n||0===n||"string"==typeof n||Array.isArray(n))&&(i[e]=n)}}),i}function W(e){var t=Y(e);return Object.keys(t).map(function(e){return function t(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(function(e){return t(r,e)}).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}(e,t[e])}).join("&")}var K=function(e,t,r,n,o){e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message="UNKNOWN_ERROR_CODE"===t?e:t+": "+e,this.originalMessage=e,this.code=t,this.response=r,this.url=n,this.options=o};function J(e){console&&console.warn&&console.warn.apply(console,[e])}K.prototype=Object.create(Error.prototype),K.prototype.constructor=K;var Z,Q="@esri/arcgis-rest-js",$={httpMethod:"POST",params:{f:"json"}},X=(e(ee,Z=K),ee.prototype.retry=function(e,n){var o=this;void 0===n&&(n=3);var i=0,a=function(t,r){e(o.url,o.options).then(function(e){e=I(I({},o.options),{authentication:e});return i+=1,te(o.url,e)}).then(function(e){t(e)}).catch(function(e){"ArcGISAuthError"===e.name&&i<n?a(t,r):"ArcGISAuthError"===e.name&&n<=i?r(o):r(e)})};return new Promise(function(e,t){a(e,t)})},ee);function ee(e,t,r,n,o){o=Z.call(this,e=void 0===e?"AUTHENTICATION_ERROR":e,t=void 0===t?"AUTHENTICATION_ERROR_CODE":t,r,n,o)||this;return o.name="ArcGISAuthError",o.message="AUTHENTICATION_ERROR_CODE"===t?e:t+": "+e,o}function te(n,e){void 0===e&&(e={params:{f:"json"}});var o=I(I(I({httpMethod:"POST"},$),e),{params:I(I({},$.params),e.params),headers:I(I({},$.headers),e.headers)}),t=[],e=[];if(o.fetch||"undefined"==typeof fetch?(t.push("`fetch`"),e.push("`node-fetch`")):o.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(t.push("`Promise`"),e.push("`es6-promise`")),"undefined"==typeof FormData&&(t.push("`FormData`"),e.push("`isomorphic-form-data`")),!o.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing "+t.join(", ")+". We recommend installing the "+e.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var e=o.httpMethod,i=o.authentication,a=o.rawResponse,s=I({f:"json"},o.params),r=null,u={method:e,credentials:o.credentials||"same-origin"};return o.headers&&o.headers["X-Esri-Auth-Client-Id"]&&-1<n.indexOf("/oauth2/platformSelf")&&(u.credentials="include"),(i?i.getToken(n,{fetch:o.fetch}).catch(function(e){return e.url=n,e.options=o,r=e,Promise.resolve("")}):Promise.resolve("")).then(function(e){e.length&&(s.token=e),i&&i.getDomainCredentials&&(u.credentials=i.getDomainCredentials(n));var t={};"GET"===u.method&&(s.token&&o.hideToken&&"undefined"==typeof window&&(t["X-Esri-Authorization"]="Bearer "+s.token,delete s.token),r=""===W(s)?n:n+"?"+W(s),o.maxUrlLength&&r.length>o.maxUrlLength||s.token&&o.hideToken?(u.method="POST",e.length&&o.hideToken&&(s.token=e,delete t["X-Esri-Authorization"])):n=r);var r=new RegExp("/items/.+/updateResources").test(n);return"POST"===u.method&&(u.body=function(e,t){var t=z(e)||t,r=Y(e);if(t){var n=new FormData;return Object.keys(r).forEach(function(e){var t;"undefined"!=typeof Blob&&r[e]instanceof Blob?(t=r.fileName||r[e].name||e,n.append(e,r[e],t)):n.append(e,r[e])}),n}return W(e)}(s,r)),u.headers=I(I({},t),o.headers),"undefined"!=typeof window||u.headers.referer||(u.headers.referer=Q),z(s)||r||(u.headers["Content-Type"]="application/x-www-form-urlencoded"),o.fetch(n,u)}).then(function(e){if(!e.ok){var t=e.status,r=e.statusText;throw new K(r,"HTTP "+t,e,n,o)}if(a)return e;switch(s.f){case"json":case"geojson":return e.json();case"html":case"text":return e.text();default:return e.blob()}}).then(function(e){if("json"!==s.f&&"geojson"!==s.f||a)return e;var t=function(t,e,r,n){if(400<=t.code){var o=t.message,i=t.code;throw new K(o,i,t,e,r)}if(t.error){var a=t.error,o=a.message,i=a.code,s=a.messageCode,a=s||i||"UNKNOWN_ERROR_CODE";if(498===i||499===i||"GWM_0003"===s||400===i&&"Unable to generate token."===o)throw n||new X(o,a,t,e,r);throw new K(o,a,t,e,r)}if("failed"!==t.status&&"failure"!==t.status)return t;o=void 0,i="UNKNOWN_ERROR_CODE";try{o=JSON.parse(t.statusMessage).message,i=JSON.parse(t.statusMessage).code}catch(e){o=t.statusMessage||t.message}throw new K(o,i,t,e,r)}(e,n,o,r);return r&&(e=n.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0],o.authentication.federatedServers[e]={token:[],expires:new Date(Date.now()+864e5)},r=null),t})}function re(r,e,t){var n=I(I({params:{}},t),r);return n.params=e.reduce(function(e,t){return!r[t]&&"boolean"!=typeof r[t]||(e[t]=r[t]),e},n.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}function ne(e){return"string"==typeof e&&"/"===(e=e.trim())[e.length-1]?e.slice(0,-1):e}function oe(e){return e.replace(/^#/,"").split("&").reduce(function(e,t){var r,t=(r=t,r=(t=t.split("="))[0],t=t[1],{key:decodeURIComponent(r),value:decodeURIComponent(t)});return e[t.key]=t.value,e},{})}function ie(e,t){return t.rawResponse=!1,te(e,t).then(function(e){var t={token:e.access_token,username:e.username,expires:new Date(Date.now()+(1e3*e.expires_in-1e3)),ssl:!0===e.ssl};return e.refresh_token&&(t.refreshToken=e.refresh_token),t})}function ae(e,t){return"undefined"!=typeof window&&window.location&&window.location.host?t.params.referer=window.location.host:t.params.referer=Q,te(e,t)}var se=/^https?:\/\/(\S+)\.arcgis\.com.+/;function ue(e){return se.test(e)}function ce(e){if(!se.test(e))return null;e=e.match(se)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}function le(e,t){t=ne(function(e){if(!se.test(e))return e;switch(ce(e)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(t)).replace(/https?:\/\//,""),e=ne(e).replace(/https?:\/\//,"");return new RegExp(e,"i").test(t)}var pe=(Object.defineProperty(de.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),de.beginOAuth2=function(e,t){void 0===t&&(t=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),n=r.portal,o=r.provider,i=r.clientId,a=r.expiration,s=r.redirectUri,u=r.popup,c=r.popupWindowFeatures,l=r.state,p=r.locale,r=r.params,p="arcgis"===o?n+"/oauth2/authorize?client_id="+i+"&response_type=token&expiration="+(e.duration||a)+"&redirect_uri="+encodeURIComponent(s)+"&state="+l+"&locale="+p:n+"/oauth2/social/authorize?client_id="+i+"&socialLoginProviderName="+o+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||a)+"&redirect_uri="+encodeURIComponent(s)+"&state="+l+"&locale="+p;if(r&&(p=p+"&"+W(r)),u){var d,f=((d={promise:null,resolve:null,reject:null}).promise=new Promise(function(e,t){d.resolve=e,d.reject=t}),d);return t["__ESRI_REST_AUTH_HANDLER_"+i]=function(e,t){e?(e=JSON.parse(e),f.reject(new X(e.errorMessage,e.error))):t&&(t=JSON.parse(t),f.resolve(new de({clientId:i,portal:n,ssl:t.ssl,token:t.token,tokenExpires:new Date(t.expires),username:t.username})))},t.open(p,"oauth-window",c),f.promise}t.location.href=p},de.completeOAuth2=function(e,o){void 0===o&&(o=window);var t=I({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),i=t.portal,a=t.clientId,s=t.popup;function r(e,t){try{var r=void 0,n="__ESRI_REST_AUTH_HANDLER_"+a;if(s&&(o.opener?o.opener.parent&&o.opener.parent[n]?r=o.opener.parent[n]:o.opener&&o.opener[n]&&(r=o.opener[n]):o!==o.parent&&o.parent&&o.parent[n]&&(r=o.parent[n]),r))return r(e?JSON.stringify(e):void 0,JSON.stringify(t)),void o.close()}catch(e){throw new X('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new X(e.errorMessage,e.error);return new de({clientId:a,portal:i,ssl:t.ssl,token:t.token,tokenExpires:t.expires,username:t.username})}e=oe(o.location.hash);if(!e.access_token){var n=void 0,u="Unknown error";return e.error&&(n=e.error,u=e.error_description),r({error:n,errorMessage:u})}t=e.access_token,n=new Date(Date.now()+1e3*parseInt(e.expires_in,10)-6e4),u=e.username;return r(void 0,{token:t,expires:n,ssl:"true"===e.ssl,username:u})},de.fromParent=function(e,n){var o;return!n&&window&&(n=window),new Promise(function(t,r){o=function(e){if(e.source===n.parent&&e.data)try{return t(de.parentMessageHandler(e))}catch(e){return r(e)}},n.addEventListener("message",o,!1),n.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(function(e){return n.removeEventListener("message",o,!1),e})},de.authorize=function(e,t){e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),n=r.portal,o=r.clientId,i=r.expiration,r=r.redirectUri;t.writeHead(301,{Location:n+"/oauth2/authorize?client_id="+o+"&expiration="+(e.duration||i)+"&response_type=code&redirect_uri="+encodeURIComponent(r)}),t.end()},de.exchangeAuthorizationCode=function(e,t){var e=I({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=e.portal,n=e.clientId,o=e.redirectUri,i=e.refreshTokenTTL;return ie(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:n,redirect_uri:o,code:t}}).then(function(e){return new de({clientId:n,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:i,refreshTokenExpires:new Date(Date.now()+60*(i-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})})},de.deserialize=function(e){e=JSON.parse(e);return new de({clientId:e.clientId,refreshToken:e.refreshToken,refreshTokenExpires:new Date(e.refreshTokenExpires),username:e.username,password:e.password,token:e.token,tokenExpires:new Date(e.tokenExpires),portal:e.portal,ssl:e.ssl,tokenDuration:e.tokenDuration,redirectUri:e.redirectUri,refreshTokenTTL:e.refreshTokenTTL})},de.fromCredential=function(e){var t=void 0===e.ssl||e.ssl,r=e.expires||Date.now()+72e5;return new de({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:t,token:e.token,username:e.userId,tokenExpires:new Date(r)})},de.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return de.fromCredential(e.data.credential);if("arcgis:auth:error"!==e.data.type)throw new Error("Unknown message type.");var t=new Error(e.data.error.message);throw t.name=e.data.error.name,t},de.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},de.prototype.getUser=function(e){var t=this;if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);var r=this.portal+"/community/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=te(r,e).then(function(e){return t._user=e,t._pendingUserRequest=null,e}),this._pendingUserRequest},de.prototype.getPortal=function(e){var t=this;if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);var r=this.portal+"/portals/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=te(r,e).then(function(e){return t._portalInfo=e,t._pendingPortalRequest=null,e}),this._pendingPortalRequest},de.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then(function(e){return e.username})},de.prototype.getToken=function(e,t){return r=this.portal,n=e,o=ue(r),i=ue(n),r=ce(r),n=ce(n),o&&i&&r===n||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t);var r,n,o,i},de.prototype.validateAppAccess=function(r){return this.getToken(this.portal).then(function(e){return te((t=void 0===t?"https://www.arcgis.com/sharing/rest":t)+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:r,token:e}});var t})},de.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},de.prototype.serialize=function(){return JSON.stringify(this)},de.prototype.enablePostMessageAuth=function(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)},de.prototype.disablePostMessageAuth=function(e){(e=!e&&window?window:e).removeEventListener("message",this._hostHandler,!1)},de.prototype.refreshSession=function(e){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new X("Unable to refresh token."))},de.prototype.getServerRootUrl=function(e){var t=ne(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/);t[0];var r=t[1],e=t[2].split("/"),t=e[0],e=e.slice(1);return""+r+t.toLowerCase()+"/"+e.join("/")},de.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some(function(e){return t.startsWith(e)})?"include":"same-origin"},de.prototype.createPostMessageHandler=function(o){var i=this;return function(e){var t=-1<o.indexOf(e.origin),r="arcgis:auth:requestCredential"===e.data.type,n=i.tokenExpires.getTime()>Date.now();t&&r&&(r={},r=n?((n=i.toCredential()).server=n.server.replace("/sharing/rest",""),{type:"arcgis:auth:credential",credential:n}):{type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}},e.source.postMessage(r,e.origin))}},de.prototype.getTokenForServer=function(t,r){var n=this,o=this.getServerRootUrl(t),e=this.federatedServers[o];return e&&e.expires&&e.expires.getTime()>Date.now()?Promise.resolve(e.token):this._pendingTokenRequests[o]||(this._pendingTokenRequests[o]=this.fetchAuthorizedDomains().then(function(){return te(o+"/rest/info",{credentials:n.getDomainCredentials(t)}).then(function(e){if(e.owningSystemUrl){if(le(e.owningSystemUrl,n.portal))return te(e.owningSystemUrl+"/sharing/rest/info",r);throw new X(t+" is not federated with "+n.portal+".","NOT_FEDERATED")}if(e.authInfo&&void 0!==n.federatedServers[o])return Promise.resolve({authInfo:e.authInfo});throw new X(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")}).then(function(e){return e.authInfo.tokenServicesUrl}).then(function(e){return n.token&&n.tokenExpires.getTime()>Date.now()?ae(e,{params:{token:n.token,serverUrl:t,expiration:n.tokenDuration,client:"referer"}}):ae(e,{params:{username:n.username,password:n.password,expiration:n.tokenDuration,client:"referer"}}).then(function(e){return n._token=e.token,n._tokenExpires=new Date(e.expires),e})}).then(function(e){return n.federatedServers[o]={expires:new Date(e.expires),token:e.token},delete n._pendingTokenRequests[o],e.token})}),this._pendingTokenRequests[o])},de.prototype.getFreshToken=function(e){var t=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(e).then(function(e){return t._pendingTokenRequests[t.portal]=null,e.token})),this._pendingTokenRequests[this.portal])},de.prototype.refreshWithUsernameAndPassword=function(e){var t=this,e=I({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},e);return ae(this.portal+"/generateToken",e).then(function(e){return t._token=e.token,t._tokenExpires=new Date(e.expires),t})},de.prototype.refreshWithRefreshToken=function(e){var t=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(e);e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return ie(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t})},de.prototype.refreshRefreshToken=function(e){var t=this,e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return ie(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t._refreshToken=e.refreshToken,t._refreshTokenExpires=new Date(Date.now()+60*(t.refreshTokenTTL-1)*1e3),t})},de.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter(function(e){return!e.startsWith("http://")}).map(function(e){return e.startsWith("https://")?e:"https://"+e})),t})},de);function de(e){var t;this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.username=e.username,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?ne(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.refreshTokenTTL=e.refreshTokenTTL||20160,this.server=e.server,this.federatedServers={},this.trustedDomains=[],e.server&&(t=this.getServerRootUrl(e.server),this.federatedServers[t]={token:e.token,expires:e.tokenExpires}),this._pendingTokenRequests={}}function fe(e){e=e.privileges;return k(void 0===e?[]:e,"portal:user:createItem")}function he(e,t){var r,n=!1,o=e.itemControl,i=e.owner,a=e.orgId,s=t.roleId,u=t.role,c=t.username,l=t.groups,p=t.orgId,u=k(["admin","update"],o)||!!i&&i===c||!!(!!a&&a===p)&&!s&&"org_admin"===u,t=fe(t);return t&&u?n=!0:t&&(r=U(q(e,"groupIds")||[],[q(e,"properties.collaborationGroupId")]),n=l.some(function(e){return H(e)&&k(r,e.id)})),n}var me=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function ge(e){var t=e.host,r=e.path,e=e.query,t=t.endsWith("/")?t:t+"/",t=new URL(r,t);return t.search=function(r){void 0===r&&(r={});var e=Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{});return new URLSearchParams(e).toString()}(e),t.toString()}function be(e){return(e=void 0===e?{}:e).portal?ne(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function ye(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function ve(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function we(t){return ve(t).then(function(e){e=t.folderId?be(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":be(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=I(I({},t.params),ye(t.item)),te(e,t)})}function Ae(e){var r,e=I({folderId:null},e);return(r=e).multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):ve(r).then(function(e){var t=be(r)+"/content/users/"+e,e=t+"/addItem";return r.folderId&&(e=t+"/"+r.folderId+"/addItem"),r.params=I(I({},r.params),ye(r.item)),te(e,re(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:I({},r.params)}))})}var De=/[\x00-\x1F\x7F-\x9F\xA0]/g;function Se(e,t){return te(xe(e,t),I({httpMethod:"GET"},t))}var xe=function(e,t){return("string"==typeof t?t:be(t))+"/content/items/"+e};function Ee(e,t){e=xe(e,t)+"/data",t=I({httpMethod:"GET",params:{}},t);return t.file&&(t.params.f=null),te(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})}function ke(e){var t=xe(e.id,e)+"/relatedItems",r=I({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,te(t,r)}function Ce(e,t){var r,n,o=t||{},i=o.fileName,i=void 0===i?"iteminfo.xml":i,o=o.readAs,o=void 0===o?"text":o,t=I({httpMethod:"GET"},t);return i="/info/"+i,r=o,i=""+xe(e,t=t)+i,t=I({params:{}},t),n=t.rawResponse,t.rawResponse=!0,t.params.f=null,te(i,t).then(function(e){return n?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(e.replace(De,""))})})}function Te(t){return ve(t).then(function(e){return te(be(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect",t)})}function qe(e){return t=e.groupId,te(be(e=e)+"/community/groups/"+t,I({httpMethod:"GET"},e)).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"});var t}function Ie(t){return ve(t).then(function(e){return te(be(t)+"/content/users/"+e+"/items/"+t.id+"/delete",t)})}var Oe=(Pe.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},Pe.prototype.in=function(e){return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(J("`in("+(e?'"'+e+'"':"")+")`"+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},Pe.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},Pe.prototype.endGroup=function(){return this.openGroups<=0?J("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},Pe.prototype.and=function(){return this.addModifier("and")},Pe.prototype.or=function(){return this.addModifier("or")},Pe.prototype.not=function(){return this.addModifier("not")},Pe.prototype.from=function(e){return this.hasTerms?J('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[0]=e,this},Pe.prototype.to=function(e){return this.hasTerms?J('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[1]=e,this},Pe.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},Pe.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},Pe.prototype.clone=function(){return this.commit(),this.cleanup(),new Pe(this.q+"")},Pe.prototype.addModifier=function(e){return this.currentModifer?(J("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?J("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},Pe.prototype.needsQuotes=function(e){return/\s|:/g.test(e)},Pe.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.needsQuotes(e)?'"'+e+'"':e},Pe.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(Pe.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),Pe.prototype.cleanup=function(){if(0<this.openGroups)for(J("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&J("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")},Pe);function Pe(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function Ue(r,n){var e,t="string"==typeof r||r instanceof Oe?{httpMethod:"GET",params:{q:r}}:re(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});switch(n){case"item":e="/search";break;case"group":e="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof Oe||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));e="/content/groups/"+r.groupId+"/search";break;default:e="/portals/self/users/search"}return te(be(t)+e,t).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof Oe?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,Ue(e,n)}),t})}function Ne(e){return Ue(e,"item")}function Re(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Fe(e){var t=e.id,r=be(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),t=U(Le("users",e.users,t),Le("admins",e.admins,t)).map(function(e){return te(r,e).catch(function(e){return{errors:[e]}})});return Promise.all(t).then(_e)}function Le(o,e,i){return!e||e.length<1?[]:Re(e,25).map(function(e){return t=o,r=e,n=i,Object.assign({},n,((e={})[t]=r,e.params=I(I({},n.params),((n={})[t]=r,n)),e));var t,r,n})}function _e(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function je(t){var e=t.id,r=t.users,n=be(t)+"/community/groups/"+e+"/removeUsers",r=Re(r,25).map(function(e){e=I(I({},t),{users:e,params:{users:e}});return te(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(r).then(function(e){var t=function(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])},r=t("errors"),t={notRemoved:t("notRemoved")};return r.length?I(I({},t),{errors:r}):t})}function Be(e){var t,r=e.id,n=be(e)+"/community/groups/"+r+"/invite",e=Re((t=e).users,25).map(function(e){return function(e,t){t=Object.assign({},t);return t.params=I(I({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}(e,t)}).map(function(e){return te(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(Me)}function Me(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function Ge(e){return te(be(e)+"/community/groups/"+e.id+"/unprotect",e)}function Ve(e){return te(be(e)+"/community/groups/"+e.id+"/delete",I({},e))}function He(e){var t=be(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,te(t,r)}function ze(e){var n,t=be(e)+"/portals/self/createNotification",e=Re((n=e).users,n.batchSize||25).map(function(e){return t=e,r=n,(e=Object.assign({},r)).params=I(I({},e.params),{users:t,subject:r.subject,message:r.message,notificationChannelType:e.notificationChannelType}),e;var t,r}).map(function(e){return te(t,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(Ye)}function Ye(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function We(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=be(e)+"/community/users/"+encodeURIComponent(t),n=I(I({},e),n)),te(r,n)}function Ke(t){return Ne({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function Je(a){return Ke(a).then(function(e){if(e)return{itemId:a.id,shortcut:!0,notSharedWith:[]};var t=a.authentication.username,e=a.owner,n=a.confirmItemControl,e=e||t;if(e===t)return Ze(a);var o=!1,i=!1;return Promise.all([We({username:t,authentication:a.authentication}),We({username:e,authentication:a.authentication}),qe(a)]).then(function(e){var t=e[0],r=e[1],e=e[2];return o="org_admin"===t.role&&!t.roleId,i=t.orgId!==r.orgId,function(e,t,r,n,o,i){var a=[];if(i.groupId!==e.favGroupId)if(t){if(!n)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+e.username+" as they not the item owner or org admin.");a.push(Qe(e,e,!1,"Error adding "+e.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),Qe(e,o,!0,"none"===r?"Error adding user "+o.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+o.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(n)a.push(Qe(e,e,!1,"Error adding "+e.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===r)throw new Error("This item can not be shared by "+e.username+" as they are not a member of the specified group "+i.groupId+".");return a}(t,!!n,e,o,r,a)}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return Ze(a,o,i)}).then(function(e){return r(e)})})}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+a.id+" could not be shared to group "+a.groupId+".");return e})}function Ze(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.authentication.username,o=e.owner||n,i=be(e)+"/content/items/"+e.id+"/share";return(o===n||t&&!r)&&(i=be(e)+"/content/users/"+o+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},te(i,e)}function Qe(e,t,r,n,o){var i,a,s=t.groups||[],u=s.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!u&&511<s.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return a=u?r&&"member"===u.userMembership.memberType?(i=He({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return He({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(i=Fe(((a={id:o.groupId})[r?"admins":"users"]=[t.username],a.authentication=o.authentication,a)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return je({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:a}}function $e(o){return Ke(o).then(function(e){if(!e)return Promise.resolve({itemId:o.id,shortcut:!0,notUnsharedFrom:[]});var r=o.authentication.username,n=o.owner;return Promise.all([qe(o),We({username:r,authentication:o.authentication})]).then(function(e){var t=e[0],e=e[1],e="org_admin"===e.role&&!e.roleId;if(!((n||r)===r)&&!e&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+o.groupId+" by "+r+" as they not the item owner, an org admin, group admin or group owner.");return function(e){var t=e.authentication.username,r=e.owner||t,n=be(e)+"/content/items/"+e.id+"/unshare";r===t&&(n=be(e)+"/content/users/"+r+"/items/"+e.id+"/unshare");return e.params={groups:e.groupId},te(n,e)}(o)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+o.id+" could not be unshared to group "+o.groupId);return e})})}function Xe(e){return function(e,t){e=e||"self",e=be(t)+"/portals/"+e,t=I({httpMethod:"GET"},t);return te(e,t)}(null,e)}function et(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){var t=e.portalSelf||e,r=t.portalHostname,n=t.urlKey,o=t.customBaseUrl;if(r||n&&o)return t.isPortal?"https://"+t.portalHostname:"https://"+t.urlKey+"."+t.customBaseUrl}return et(be(e))}var tt={devext:"https://d1011m9qpnz5mw.cloudfront.net",qaext:"https://dyq9ux9ryu4qj.cloudfront.net",www:"https://d1iq7pbacwn5rb.cloudfront.net"};function rt(e){if(e.isPortal)return et(e)+"/apps/sites";e=e.portalHostname.split(".")[0];return(tt[e]||tt.www)+"/opendata-ui/assets"}function nt(e){return et(e)+"/sharing/rest"}function ot(e){return e=(e=e.toLowerCase()).includes("//")?e.split("//")[1]:e}function it(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function at(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return it(e.portalHostname)}function st(e,t){return et(t)+"/home/item.html?id="+e}function ut(e,t,r){return t=ct(e,t,r),r="\\/"+e.id+"\\?f=json",r=new RegExp(r),t&&t.replace(r,"/"+e.id+"/data").replace(/\&token/,"?token")}var ct=function(e,t,r){var n=e.id,e=e.access,t=nt(t)+"/content/items/"+n,n=new URLSearchParams({f:"json"});return"public"!==e&&r&&n.append("token",r),t+"?"+n.toString()};function lt(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function pt(e){var t=e;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://qaext.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://devext.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://www.arcgis.com"),t}function dt(e){return ft.test(e)}var ft=/\/(map|feature)server/i,ht=function(e){e=e.match(ft),e=e&&e[1];return e&&t(e)+" Service"};function mt(e){var t=e&&e.hubApiUrl;return t||it(nt(e))}var gt="/api/v3/domains",bt="/api/v3/datasets",yt="/api/discussions/v1",vt=(Object.defineProperty(wt.prototype,"session",{get:function(){return this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"isAuthenticated",{get:function(){return!!this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"userRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"requestOptions",{get:function(){var e={portal:this.sharingApiUrl};return e=this.isAuthenticated?{authentication:this._authentication,portal:this.sharingApiUrl}:e},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"portalUrl",{get:function(){return this.isAuthenticated?this.isPortal?"https://"+this._portalSelf.portalHostname:"https://"+this._portalSelf.urlKey+"."+this._portalSelf.customBaseUrl:this._portalUrl},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"sharingApiUrl",{get:function(){return this.portalUrl+"/sharing/rest"},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubUrl",{get:function(){return this._hubUrl},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"isPortal",{get:function(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"discussionsServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+yt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubSearchServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+bt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"domainServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+gt},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"eventsConfig",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.events")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"hubEnabled",{get:function(){return v(this._portalSelf,"portalProperties.hub.enabled",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgId",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgHostname",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"communityOrgUrl",{get:function(){if(this.communityOrgHostname)return"https://"+this.communityOrgHostname},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"helperServices",{get:function(){if(this._portalSelf)return this._portalSelf.helperServices},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"portal",{get:function(){return this._portalSelf},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),wt);function wt(e){this._portalUrl="https://www.arcgis.com",this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties)}var At=(Dt.create=function(r){return void 0===r&&(r={}),O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,(t=new Dt(r)).initialize()];case 1:return e.sent(),[2,t]}})})},Dt.prototype.setAuthentication=function(t){return O(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return this._authentication=t,this._portalUrl=t.portal.replace("/sharing/rest",""),[4,this.initialize()];case 1:return e.sent(),[2]}})})},Dt.prototype.setProperties=function(e){this._properties=e,this._context=new vt(this.contextOpts)},Dt.prototype.clearAuthentication=function(){this._context.isPortal||(this._portalUrl=pt(this._portalUrl)),this._authentication=null,this._portalSelf=null,this._currentUser=null,this._context=new vt(this.contextOpts)},Object.defineProperty(Dt.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Dt.prototype.initialize=function(){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){switch(e.label){case 0:if(!this._authentication||this._portalSelf&&this._currentUser)return[3,4];G.debug("ArcGISContextManager-"+this.id+": Initializing"),t=this._authentication.username,t=[Xe({authentication:this._authentication}),We({username:t,authentication:this._authentication})],e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(t)];case 2:return n=e.sent(),r=n[0],n=n[1],this._portalSelf=r,this._currentUser=n,G.debug("ArcGISContextManager-"+this.id+": received portalSelf and currentUser"),[3,4];case 3:throw r=e.sent(),n='ArcGISContextManager could not fetch portal & user for "'+this._authentication.username+'" using '+this._authentication.portal+".",G.error(n),console.error(n),r;case 4:return G.debug("ArcGISContextManager-"+this.id+": updating context"),this._context=new vt(this.contextOpts),[2]}})})},Object.defineProperty(Dt.prototype,"contextOpts",{get:function(){var e={id:this.id,portalUrl:this._portalUrl,hubUrl:this._hubUrl,properties:this._properties};return this._authentication&&(e.authentication=this._authentication),this._portalSelf&&(e.portalSelf=this._portalSelf),this._currentUser&&(e.currentUser=this._currentUser),e},enumerable:!1,configurable:!0}),Dt);function Dt(e){this._portalUrl="https://www.arcgis.com",this._logLevel=n.Level.error,this.id=(new Date).getTime(),e.logLevel&&(this._logLevel=e.logLevel),G.setLogLevel(this._logLevel),G.debug("ArcGISContextManager:ctor: Creating "+this.id),e.properties&&(this._properties=e.properties),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest","")):e.portalUrl&&(this._portalUrl=e.portalUrl),this._hubUrl=lt(this._portalUrl),e.portal&&(this._portalSelf=p(e.portal)),e.currentUser&&(this._currentUser=p(e.currentUser))}var St=function(e){if(e){var t=e.toLocaleLowerCase();return Object.keys(xt).find(function(e){return xt[e].some(function(e){return e.toLocaleLowerCase()===t})})}},xt={app:["Application","City Engine Web Scene","CityEngine Web Scene","Dashboard","Insights Page","Insights Workbook","Operation View","Web Mapping Application","StoryMap","Web Experience","Urban Model"],dataset:["CSV Collection","CSV","Feature Collection Template","Feature Collection","Feature Layer","Feature Service","File Geodatabase","GeoJSON","GeoJson","KML Collection","KML","Microsoft Excel","Raster Layer","Shapefile","Stream Service","Table"],document:["CAD Drawing","Document Link","Hub Page","Site Page","Image","iWork Keynote","iWork Numbers","iWork Pages","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","PDF","Pro Map","Report Template"],event:["Hub Event"],feedback:["Form","Quick Capture Project"],initiative:["Hub Initiative"],template:["Hub Initiative Template"],solution:["Solution"],map:["Image Collection","Image Service","Map Service Layer","Map Service","Scene Service","Scene Layer","Vector Tile Service","Web Map Service","Web Map Tile Service","Web Map","Web Scene","WFS","WMS","WMTS"],other:["360 VR Experience","AppBuilder Widget Package","Application Configuration","ArcPad Package","Code Attachment","Code Sample","Desktop Add In","Desktop Application Template","Desktop Application","Desktop Style","Explorer Add In","Explorer Layer","Geocoding Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Layer File","Layer Package","Layer Template","Layer","Layout","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Mobile Application","Mobile Map Package","Native Application","Network Analysis Service","Operations Dashboard Add In","Project Package","Project Template","Raster Function Template","Rule Package","Scene Package","Service Definition","SQLite Geodatabase","Style","Tile Package","Vector Tile Package","Workflow Manager Package"],site:["Hub Site Application","Site Application"]},Et=xt.app,kt=xt.dataset,Ct=xt.document,Tt=xt.event,qt=xt.feedback,It=xt.initiative,Ot=xt.map,Pt=xt.other,Ut=xt.site,Nt=["360 VR Experience","Application","CityEngine Web Scene","Code Sample","CSV Collection","CSV","CAD Drawing","Desktop Application","Desktop Application Template","Desktop Style","File Geodatabase","GeoJson","Geoprocessing Package","Geoprocessing Sample","Image","iWork Keynote","iWork Numbers","KML Collection","KML","Layer","Layer File","Layer Package","Layout","Locator Package","Map Package","Map Service Definition","Map Template","Microsoft Excel","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","Operations Dashboard Add In","PDF","Pro Map","Project Package","Project Template","Raster function template","Rule Package","Service Definition","Shapefile","Vector Tile Package","Workflow Manager Package"],Rt=["Data"],Ft={app:Et.concat(qt),dataset:kt,document:Ct,event:Tt,initiative:It,map:Ot,other:Pt,site:Ut,downloadableTypes:Nt,downloadableTypeKeywords:Rt,apiTypes:["Feature Service","Map Service","Image Service"]};function Lt(e){return-1!==Nt.indexOf(e.type)||e.typeKeywords&&Rt.some(function(t){return e.typeKeywords.some(function(e){return e===t})})}var _t=new RegExp(/.+(?:map|feature|image)server/i);function jt(e){var t=e.match(_t);return t?t[0]:ne(e.split("?")[0])}function Bt(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}var Mt={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function Gt(e){var t=e.portalSelf,r=t.defaultExtent,t=q(t,"helperServices.geometry.url");if(!t)return Promise.resolve(Mt);if(!r)return Promise.resolve(Mt);t+="/project",r={httpMethod:"POST",params:{geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[r]}),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(r.authentication=e.authentication),te(t,r).then(function(e){e=e.geometries[0];return{xmin:e.xmin,ymin:e.ymin,xmax:e.xmax,ymax:e.ymax,spatialReference:{wkid:4326}}}).catch(function(e){return Mt})}var Vt=function(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])};function Ht(e){return console.warn("DEPRECATED: use isBBox() instead"),Vt(e)}function zt(e){var t=(n=e[0])[0],r=n[1],e=(n=e[1])[0],n=n[1];return{rings:[[[t,r],[e,r],[e,n],[t,n],[t,r]]],spatialReference:{wkid:4326}}}function Yt(e){var t,r;switch((e||"").toLowerCase()){case"image service":t="dataset";break;case"feature service":case"raster layer":t="map";break;case"microsoft excel":t="document";break;case"cad drawing":case"feature collection template":case"report template":t="content";break;default:t={other:"content",solution:"template"}[r=St(e)]||r}return t}function Wt(e){return e&&e.isPortal}function Kt(e,t){return!!e&&"public"===e.access&&!Wt(t)}function Jt(e,t,r){var n,o=$t(e,t,r);return o||(n="/content","feedback"===(r=Yt(e))?n="/feedback/surveys":Qt(e)?n="/pages":-1<["app","dataset","document","map","template"].indexOf(r)&&(n="/"+r+"s"),o=n+"/"+t),o}var Zt,Qt=function(e){return["Hub Page","Site Page"].includes(e)},$t=function(e,t,r){var n;return"Solution"===e&&(0<(null==r?void 0:r.indexOf("Deployed"))&&(n="/content/"+t),n="/templates/"+t+"/about"),n};function Xt(e){return{updateFrequency:"metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",reviseDate:"metadata.dataIdInfo.idCitation.date.reviseDate",pubDate:"metadata.dataIdInfo.idCitation.date.pubDate",createDate:"metadata.dataIdInfo.idCitation.date.createDate",metadataUpdateFrequency:"metadata.mdMaint.maintFreq.MaintFreqCd.@_value",metadataUpdatedDate:"metadata.mdDateSt"}[e]}function er(e,t){t=Xt(t);return t&&q(e,t)}(Pt=Zt=Zt||{}).Year="year",Pt.Month="month",Pt.Day="day",Pt.Time="time";var tr=function(e,t){t=t.url&&jt(t.url);return t&&e.linkage.includes(t)},rr=function(e,t,r){var n=e.linkage,r=q(r,"authentication.token");return r&&tr(e,t)&&(t=new URL(e.linkage),(e=new URLSearchParams(t.search)).set("token",r),t.search=e.toString(),n=t.toString()),n},nr=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"http://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"http://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"http://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"http://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"http://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"http://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"http://creativecommons.org/licenses/by-sa/4.0"},{type:"CC-BY-SA-3.0",abbr:"CC BY-SA 3.0",name:"Attribution-ShareAlike 3.0 Unported",url:"http://creativecommons.org/licenses/by-sa/3.0"},{type:"CC-BY-SA-2.5",abbr:"CC BY-SA 2.5",name:"Attribution-ShareAlike 2.5 Generic",url:"http://creativecommons.org/licenses/by-sa/2.5"},{type:"CC-BY-SA-2.0",abbr:"CC BY-SA 2.0",name:"Attribution-ShareAlike 2.0 Generic",url:"http://creativecommons.org/licenses/by-sa/2.0"},{type:"CC-BY-SA-1.0",abbr:"CC BY-SA 1.0",name:"Attribution-ShareAlike 1.0 Generic",url:"http://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"http://creativecommons.org/licenses/by-nd/4.0"},{type:"CC-BY-ND-3.0",abbr:"CC BY-ND 3.0",name:"Attribution-NoDerivs 3.0 Unported",url:"http://creativecommons.org/licenses/by-nd/3.0"},{type:"CC-BY-ND-2.5",abbr:"CC BY-ND 2.5",name:"Attribution-NoDerivs 2.5 Generic",url:"http://creativecommons.org/licenses/by-nd/2.5"},{type:"CC-BY-ND-2.0",abbr:"CC BY-ND 2.0",name:"Attribution-NoDerivs 2.0 Generic",url:"http://creativecommons.org/licenses/by-nd/2.0"},{type:"CC-BY-ND-1.0",abbr:"CC BY-ND 1.0",name:"Attribution-NoDerivs 1.0 Generic",url:"http://creativecommons.org/licenses/by-nd/1.0"},{type:"CC-BY-NC-4.0",abbr:"CC BY-NC",name:"Attribution-NonCommercial 4.0 International",url:"https://creativecommons.org/licenses/by-nc/4.0"},{type:"CC-BY-NC-3.0",abbr:"CC BY-NC 3.0",name:"Attribution-NonCommercial 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc/3.0"},{type:"CC-BY-NC-2.5",abbr:"CC BY-NC 2.5",name:"Attribution-NonCommercial 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc/2.5"},{type:"CC-BY-NC-2.0",abbr:"CC BY-NC 2.0",name:"Attribution-NonCommercial 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc/2.0"},{type:"CC-BY-NC-1.0",abbr:"CC BY-NC 1.0",name:"Attribution-NonCommercial 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc/1.0"},{type:"CC-BY-NC-SA-4.0",abbr:"CC BY-NC-SA",name:"Attribution-NonCommercial-ShareAlike 4.0 International",url:"https://creativecommons.org/licenses/by-nc-sa/4.0"},{type:"CC-BY-NC-SA-3.0",abbr:"CC BY-NC-SA 3.0",name:"Attribution-NonCommercial-ShareAlike 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-sa/3.0"},{type:"CC-BY-NC-SA-2.5",abbr:"CC BY-NC-SA 2.5",name:"Attribution-NonCommercial-ShareAlike 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.5"},{type:"CC-BY-NC-SA-2.0",abbr:"CC BY-NC-SA 2.0",name:"Attribution-NonCommercial-ShareAlike 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.0"},{type:"CC-BY-NC-SA-1.0",abbr:"CC BY-NC-SA 1.0",name:"Attribution-NonCommercial-ShareAlike 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/1.0"},{type:"CC-BY-NC-ND-4.0",abbr:"CC BY-NC-ND",name:"Attribution-NonCommercial-NoDerivatives 4.0 International",url:"https://creativecommons.org/licenses/by-nc-nd/4.0"},{type:"CC-BY-NC-ND-3.0",abbr:"CC BY-NC-ND 3.0",name:"Attribution-NonCommercial-NoDerivs 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-nd/3.0"},{type:"CC-BY-NC-ND-2.5",abbr:"CC BY-NC-ND 2.5",name:"Attribution-NonCommercial-NoDerivs 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.5"},{type:"CC-BY-NC-ND-2.0",abbr:"CC BY-NC-ND 2.0",name:"Attribution-NonCommercial-NoDerivs 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.0"},{type:"CC-BY-NC-ND-1.0",abbr:"CC BY-NC-ND 1.0",name:"Attribution-NonCommercial-NoDerivs 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/1.0"},{type:"PDDL-1.0",abbr:"PDDL",name:"ODC Public Domain Dedication and License",url:"http://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"http://opendatacommons.org/licenses/odbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"http://opendatacommons.org/licenses/by/summary"}];function or(r){var e={type:(r=r||"")?"custom":"none",text:r},t=!1,n=nr.filter(function(e){return t=e,(e=(e=r).toLowerCase()).includes(t.name.toLowerCase())||e.includes(t.url.toLowerCase())||e.includes(t.abbr.toLowerCase());var t});return n.length&&(t=!0,e=n.pop()),t||(n=void 0,!function(e){try{return!!new URL(e).protocol}catch(e){return!1}}(r)?(t=r,new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!\<\/a\>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(t)&&(t=new RegExp(/href\s?=\s?["'](.*?)["']/),n=r.match(t)[1])):n=r,n&&(e.url=n,e.text="")),e.text||delete e.text,e}function ir(e,t,r){if(!e||!e.thumbnail)return null;var n=r||{},o=n.token,n=n.width,r=ct(e,t,o=!o&&"string"==typeof r?r:o).split("?"),o=r[0],r=r[1],r=new URLSearchParams(r);r.delete("f"),n&&r.append("w",n+"");r=r.toString(),e=o+"/info/"+e.thumbnail;return r?e+"?"+r:e}function ar(e,t,r){return e&&t&&1<t.length&&!mr(r)}n.UpdateFrequency=void 0,(Ut=n.UpdateFrequency||(n.UpdateFrequency={})).Continual="continual",Ut.Daily="daily",Ut.Weekly="weekly",Ut.Fortnightly="fortnightly",Ut.Monthly="monthly",Ut.Quarterly="quarterly",Ut.Biannually="biannually",Ut.Annually="annually",Ut.AsNeeded="as-needed",Ut.Irregular="irregular",Ut.NotPlanned="not-planned",Ut.Unknown="unknown",Ut.Semimonthly="semimonthly";function sr(e,t){return{"001":n.UpdateFrequency.Continual,"002":n.UpdateFrequency.Daily,"003":n.UpdateFrequency.Weekly,"004":n.UpdateFrequency.Fortnightly,"005":n.UpdateFrequency.Monthly,"006":n.UpdateFrequency.Quarterly,"007":n.UpdateFrequency.Biannually,"008":n.UpdateFrequency.Annually,"009":n.UpdateFrequency.AsNeeded,"010":n.UpdateFrequency.Irregular,"011":n.UpdateFrequency.NotPlanned,"012":n.UpdateFrequency.Unknown,"013":n.UpdateFrequency.Semimonthly}[er(e,t||"updateFrequency")]}function ur(e,t){var r,n,o=(e=er(e,t),/^\d{4}$/.test(e=""+e)?(r=new Date(+e,0,1),o=Zt.Year):/^\d{4}-\d{1,2}$/.test(e)?(n=e.split("-"),r=new Date(+n[0],+n[1]-1,1),o=Zt.Month):/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)?(n=e.split("-"),r=new Date(+n[0],+n[1]-1,+n[2]),o=Zt.Day):Number.isNaN(Date.parse(e))||(r=new Date(e),o=e.includes("T")?Zt.Time:Zt.Day),r&&o&&{date:r,precision:o});return o&&I(I({},o),{source:"metadata."+Xt(t)})}function cr(e,t){return(e=q(e,t+=".editingInfo.lastEditDate"))&&{date:new Date(e),source:t,precision:Zt.Day}}function lr(e,t){return{date:new Date(e[t]),precision:Zt.Day,source:"item."+t}}function pr(e){return null!==(e={appbuilderExtension:"file",appbuilderWidgetPackage:"widgets-source",application:"web",applicationConfiguration:"app-gear",arcgisProMap:"desktop",cadDrawing:"file-cad",cityEngineWebScene:"urban-model",codeAttachment:"file-code",codeSample:"file-code",colorSet:"palette",contentCategorySet:"label",csv:"file-csv",cSV:"file-csv",cSVCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",documentLink:"link",excaliburImageryProject:"file",explorerMap:"file",exportPackage:"file",featureCollection:"data",featureCollectionTemplate:"file",featureLayer:"data",featureService:"collection",fileGeodatabase:"data",form:"survey",geocodingService:"file",geodataService:"file",geometryService:"file",geopackage:"file",geoprocessingService:"file",globeLayer:"layers",globeService:"file",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"browser",hubSiteApplication:"web",image:"file-image",imageService:"data",insightsModel:"file",insightsPage:"graph-moving-average",insightsTheme:"palette",insightsWorkbook:"graph-moving-average",iWorkPages:"file-text",iWorkKeynote:"presentation",iWorkNumbers:"file-report",kML:"data",kMLCollection:"data",layer:"layers",layerPackage:"layers",layerTemplate:"file",locatorPackage:"file",mapArea:"file",mapDocument:"map-contents",mapImageLayer:"collection",mapPackage:"file",mapService:"collection",microsoftExcel:"file-report",microsoftPowerpoint:"presentation",microsoftWord:"file-text",mission:"file",mobileMapPackage:"map-contents",nativeApplication:"mobile",nativeApplicationInstaller:"file",nativeApplicationTemplate:"file",mobileApplication:"mobile",networkAnalysisService:"file",notebook:"code",orientedImageryCatalog:"file",orthoMappingProject:"file",orthoMappingTemplate:"file",pDF:"file-pdf",quickCaptureProject:"mobile",rasterFunctionTemplate:"file",rasterLayer:"map",realTimeAnalytic:"file",relationalDatabaseConnection:"file",reportTemplate:"file",sceneLayer:"data",sceneService:"urban-model",serviceDefinition:"file",shapefile:"data",solution:"puzzle-piece",sqliteGeodatabase:"file",statisticalDataCollection:"file",storymap:"tour",storyMap:"tour",storymapTheme:"palette",symbolSet:"file",table:"table",urbanModel:"urban-model",vectorTilePackage:"file-shape",vectorTileService:"map",visioDocument:"conditional-rules",webExperience:"apps",webMap:"map",webMappingApplication:"apps",webScene:"urban-model",wfs:"map",wFS:"map",wMS:"map",wMTS:"map",workflowManagerService:"file",workforceProject:"list-check"}[h(e||"")])&&void 0!==e?e:"file"}function dr(e,t){var r=(r=t.authentication)&&r.token;return{portalHome:st(e.id,t),portalApi:ct(e,t,r),portalData:ut(e,t,r),thumbnail:ir(e,t,{token:r})}}function fr(e,t){var r,n;return n=e,r=!Wt(t)&&"public"===n.access&&"CSV"===n.type&&n.size<=5e6?mt(t)+"/datasets/"+e.id+"_0/FeatureServer/0":r}function hr(e){return e&&"feature service"===e.toLowerCase()}var mr=function(e){e=e&&e.match(/\/\d+$/);return e&&e[0].slice(1)};function gr(e){var t=(e=void 0===e?{}:e).type,r=e.typeKeywords||[];return("Site Application"===e.type||"Web Mapping Application"===e.type&&k(r,"hubSite"))&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&k(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&k(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),t="Web Mapping Application"===e.type&&k(r,"hubSolutionTemplate")?"Solution":t}function br(e){return mr(e.url)||hr(e.type)&&e.typeKeywords&&k(e.typeKeywords,"Singlelayer")&&"0"}function yr(e){if("public"===e.access){var t=e.id,e=br(e);return e?t+"_"+e:t}}function vr(e){if(!e)return e;var t=["categories",""];return e.map(function(e){return e.split("/")}).reduce(function(e,t,r){return U(e,t)},[]).filter(function(e){return!k(t,e.toLowerCase())})}function wr(e,t,r){var n=mr(e.url),o=n?parseInt(n,10):r;return t&&(g(o)?hr(e.type)&&function(e){e=e&&1===e.length?e[0]:void 0;return e&&e.capabilities.includes("Query")?e:void 0}(t):t.find(function(e){return e.id===o}))}function Ar(e){return e.isView}var Dr=function(r,e){var t=e||{},n=t.slug,o=t.requestOptions,i=t.data,a=t.metadata,s=t.groupIds,u=t.ownerUser,c=t.org,l=t.errors,p=t.server,d=t.layers,f=t.recordCount,h=t.boundary,m=t.extent,g=t.searchDescription,b=t.statistics,y=wr(r,d,null==e?void 0:e.layerId),v=Kt(r,o)?y?r.id+"_"+y.id:yr(r):void 0,w=n||v||r.id,A=((ar(t=y,d,(e=r).url)?t.name:e.title||e.name)||"").replace(/_/g," "),D=ar(y,d,r.url)&&y.description,S=y?y.type:gr(r),x=I({relative:Jt(S,w,r.typeKeywords)},o&&dr(r,o)),E=fr(r,o),k=(e=r,ur((o={metadata:a,layer:y,server:p}).metadata,"reviseDate")||cr(o,"layer")||cr(o,"server")||lr(e,"modified")),C=(o=r,ur(e=a,"pubDate")||ur(e,"createDate")||lr(o,"created")),T=(o=r,ur(a,"metadataUpdatedDate")||lr(o,"modified"));return I(I({item:r},r),{slug:n,data:i,metadata:a,groupIds:s,ownerUser:u,org:c,errors:l||[],server:p,layers:d,recordCount:f,statistics:b,hubId:v,identifier:w,get isProxied(){return!!E},layer:y,name:A,get title(){return A},get description(){return g||D||r.description},type:S,get family(){return Yt(S)},get url(){return E||(y?jt(r.url)+"/"+y.id:r.url)},get categories(){return vr(r.categories)},get actionLinks(){return r.properties&&r.properties.links},get hubActions(){return r.properties&&r.properties.actions},get isDownloadable(){return Lt(r)},get structuredLicense(){return or(r.licenseInfo)},get permissions(){return{visibility:r.access,control:r.itemControl||"view"}},get extent(){return!Vt(r.extent)&&m&&Vt(m.coordinates)?m.coordinates:r.extent},get boundary(){return h||function(e){var t,r=e.extent,n=Vt(r),e=(null===(e=e.properties)||void 0===e?void 0:e.boundary)||(n?"item":void 0);switch(e){case"item":t=n?zt(r):null;break;case"none":t=null}return{provenance:e,geometry:t}}(r)},get summary(){return D||r.snippet||r.description},urls:x,get portalHomeUrl(){return x.portalHome},get portalDataUrl(){return x.portalData},get portalApiUrl(){return x.portalApi},get thumbnailUrl(){return x.thumbnail},get createdDate(){return new Date(r.created)},createdDateSource:"item.created",get updatedDate(){return k.date},get updatedDateSource(){return k.source},get updatedDatePrecision(){return k.precision},get modified(){return k.date.getTime()},get publishedDate(){return C.date},get publishedDateSource(){return C.source},get publishedDatePrecision(){return C.precision},get metadataUpdatedDate(){return T.date},get metadataUpdatedDateSource(){return T.source},get metadataUpdatedDatePrecision(){return T.precision},get updateFrequency(){return sr(a)},get metadataUpdateFrequency(){return sr(a,"metadataUpdateFrequency")},get publisher(){return{name:r.owner,username:r.owner}},get metrics(){return r.properties&&r.properties.metrics},get spatialReference(){return function(e){var t=e.spatialReference;if(!t||"object"==typeof t)return t;e=t+"",t=parseInt(e,10);return isNaN(t)?{wkt:e}:{wkid:t}}(r)||(e=p,(null===(t=null==(t=y)?void 0:t.extent)||void 0===t?void 0:t.spatialReference)||(null==e?void 0:e.spatialReference))||null;var e,t},get viewDefinition(){var e=y&&Ar(y)&&i&&Array.isArray(i.layers)&&i.layers.find(function(e){return e.id===y.id});return e?e.layerDefinition:void 0},get orgId(){return c?c.id:r.orgId||(null==u?void 0:u.orgId)},get contentTypeIcon(){return console.warn("DEPRECATED: it is now the responsibility of the consuming package to determine the icon"),pr(S)},get license(){return console.warn("DEPRECATED: use structuredLicense instead"),{name:"Custom License",description:r.accessInformation}},get hubType(){return console.warn("DEPRECATED: use family instead"),Yt(S)},get additionalResources(){return function(t,e,r){e=q(e,"metadata.distInfo.distTranOps.onLineSrc")||null;return null===e?null:(e=Array.isArray(e)?e:[e]).map(function(e){return{name:e.orName,url:rr(e,t,r),isDataSource:tr(e,t)}})}(r,a)}})};function Sr(e){e=e?e.split("_"):[];return{itemId:e[0],layerId:e[1]}}function xr(e){e=Sr(e).itemId;return!(!e||B(e))}function Er(e,t){return/.+::.+/.test(e)?e:t+"::"+e}function kr(e,t){return t&&e.match(t+"::")?e.split(t+"::")[1]:e}var Cr=(Tr.prototype.startOperation=function(e){e=p(e);e.startedAt=(new Date).getTime(),e.state="working",this.operations.push(e)},Tr.prototype.start=function(e,t){t={type:e,id:v(t,"id",r(e+"_")),inputs:v(t,"inputs",{}),cleanup:v(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(t),t.id},Tr.prototype.getOperation=function(t){return this.operations.find(function(e){return e.id===t})},Tr.prototype.getOperations=function(){return this.operations},Tr.prototype.finish=function(e,t){var r=this.getOperation(e);if(!r)throw new Error("No operation with id "+e+" present in stack");r.duration=(new Date).getTime()-r.startedAt,r.state="completed",t&&(r.output=p(t))},Tr.prototype.merge=function(e){this.operations=U(this.operations,e.operations)},Tr.prototype.getCompleted=function(){return p(this.operations.filter(function(e){return"completed"===e.state}))},Tr.prototype.getWorking=function(){return p(this.operations.filter(function(e){return"working"===e.state}))},Tr.prototype.toString=function(){return this.operations.sort(function(e,t){return e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0}).map(qr).join("\n")},Tr.prototype.serialize=function(){return{operations:p(this.getOperations())}},Tr);function Tr(){this.operations=[]}function qr(e){var t=e.startedAt+" : Operation "+e.id+" started with inputs "+JSON.stringify(e.inputs)+" but was not completed";return t="completed"===e.state?e.startedAt+" : Operation "+e.id+" took "+e.duration+" ms with inputs "+JSON.stringify(e.inputs)+" and output "+(e.output?JSON.stringify(e.output):"n/a"):t}var Ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Or(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}function Pr(e,t,r){this.tagname=e,this.parent=t,this.child=[],this.attrsMap,this.val=r,this.addChild=function(e){this.child.push(e)}}function Ur(e,t){t=Object.assign({},Lr,t),e=e.replace(/<!--[\s\S]*?-->/g,"");for(var r=new Pr("!xml"),n=r,o=new RegExp("<((!\\[CDATA\\[([\\s\\S]*?)(\\]\\]>))|(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))>))([^<]*)","g"),i=o.exec(e),a=o.exec(e);i;){var s,u="]]>"===(u=i)[4]?Fr.CDATA:"/"===u[10]?Fr.CLOSING:void 0!==u[8]&&"/"===u[8].substr(u[8].length-1)?Fr.SELF:Fr.OPENING;u===Fr.CLOSING?(n.parent&&i[14]&&(n.parent.val=Nr.getValue(n.parent.val)+""+_r(i[14],t)),n=n.parent):u===Fr.CDATA?t.cdataTagName?((s=new Pr(t.cdataTagName,n,i[3])).attrsMap=Mr(i[8],t),n.addChild(s),n.val=Nr.getValue(n.val)+t.cdataPositionChar,i[14]&&(n.val+=_r(i[14],t))):n.val=(n.val||"")+(i[3]||"")+_r(i[14],t):u===Fr.SELF?(s=new Pr(t.ignoreNameSpace?i[7]:i[5],n,""),i[8]&&1<i[8].length&&(i[8]=i[8].substr(0,i[8].length-1)),s.attrsMap=Mr(i[8],t),n.addChild(s)):((s=new Pr(t.ignoreNameSpace?i[7]:i[5],n,_r(i[14],t))).attrsMap=Mr(i[8],t),n.addChild(s),n=s),i=a,a=o.exec(e)}return r}var Nr=Or(function(e,t){function r(e,t){return null!=(e=t.exec(e))}t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t){if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o++)e[r[o]]=t[r[o]]},t.getValue=function(e){return t.isExist(e)?e:""},t.doesMatch=r,t.doesNotMatch=function(e,t){return!r(e,t)},t.getAllMatches=function(e,t){for(var r=[],n=t.exec(e);n;){for(var o=[],i=n.length,a=0;a<i;a++)o.push(n[a]);r.push(o),n=t.exec(e)}return r}}),Rr=Or(function(I,O){!function(e){var t=O,r=I&&I.exports==t&&I,n="object"==typeof Ir&&Ir;n.global!==n&&n.window!==n||(e=n);function f(e,t){return x.call(e,t)}function s(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=(f(e,r)?e:t)[r];return n}function h(e,t){var r="";return 55296<=e&&e<=57343||1114111<e?(t&&E("character reference outside the permissible Unicode range"),"�"):f(A,e)?(t&&E("disallowed character reference"),A[e]):(t&&function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return!0;return!1}(D,e)&&E("disallowed character reference"),65535<e&&(r+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=S(e))}function u(e){return"&#x"+e.toString(16).toUpperCase()+";"}function c(e){return"&#"+e+";"}var l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=/[\x01-\x7F]/g,d=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,m=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,g={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},b=/["&'<>`]/g,o={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},i=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,y=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,v={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},w={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},A={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},D=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],S=String.fromCharCode,x={}.hasOwnProperty,E=function(e){throw Error("Parse error: "+e)},k=function(e,t){(t=s(t,k.options)).strict&&y.test(e)&&E("forbidden code point");function r(e){return a(e.charCodeAt(0))}var n=t.encodeEverything,o=t.useNamedReferences,i=t.allowUnsafeSymbols,a=t.decimal?c:u;return n?(e=e.replace(p,function(e){return o&&f(g,e)?"&"+g[e]+";":r(e)}),o&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),o&&(e=e.replace(m,function(e){return"&"+g[e]+";"}))):o?e=(e=(e=!i?e.replace(b,function(e){return"&"+g[e]+";"}):e).replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(m,function(e){return"&"+g[e]+";"}):i||(e=e.replace(b,r)),e.replace(l,function(e){var t=e.charCodeAt(0),e=e.charCodeAt(1);return a(1024*(t-55296)+e-56320+65536)}).replace(d,r)};k.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var C=function(e,p){var d=(p=s(p,C.options)).strict;return d&&i.test(e)&&E("malformed character reference"),e.replace(a,function(e,t,r,n,o,i,a,s){var u,c,l;return t?(c=t,u=r,d&&!u&&E("character reference was not terminated by a semicolon"),c=parseInt(c,10),h(c,d)):n?(n=n,u=o,d&&!u&&E("character reference was not terminated by a semicolon"),c=parseInt(n,16),h(c,d)):i?f(v,l=i)?v[l]:(d&&E("named character reference was not terminated by a semicolon"),e):(l=a,(s=s)&&p.isAttributeValue?(d&&"="==s&&E("`&` did not start a character reference"),e):(d&&E("named character reference was not terminated by a semicolon"),w[l]+(s||"")))})};C.options={isAttributeValue:!1,strict:!1};var T={version:"1.1.1",encode:k,decode:C,escape:function(e){return e.replace(b,function(e){return o[e]})},unescape:C};if(t&&!t.nodeType)if(r)r.exports=T;else for(var q in T)f(T,q)&&(t[q]=T[q]);else e.he=T}(Ir)}),Fr={OPENING:1,CLOSING:2,SELF:3,CDATA:4},Lr={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,decodeHTMLchar:!1,cdataTagName:!1,cdataPositionChar:"\\c"};function _r(e,t){return e&&(t.trimValues&&(e=e.trim()),e=jr(e=t.decodeHTMLchar?Rr.decode(e):e,t.parseNodeValue)),e}function jr(e,t){return t&&"string"==typeof e?e=""===e.trim()||isNaN(e)?"true"===e||"false"!==e&&e:-1!==e.indexOf(".")?Number.parseFloat(e):Number.parseInt(e,10):Nr.isExist(e)?e:""}var Br=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function Mr(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");for(var r=Nr.getAllMatches(e,Br),n=r.length,o={},i=0;i<n;i++){var a=function(e,t){if(t.ignoreNameSpace){var r=e.split(":"),t="/"===e.charAt(0)?"/":"";if("xmlns"===r[0])return"";2===r.length&&(e=t+r[1])}return e}(r[i][1],t);a.length&&(void 0!==r[i][4]?(t.trimValues&&(r[i][4]=r[i][4].trim()),t.decodeHTMLchar&&(r[i][4]=Rr.decode(r[i][4],{isAttributeValue:!0})),o[t.attributeNamePrefix+a]=jr(r[i][4],t.parseAttributeValue)):t.allowBooleanAttributes&&(o[t.attributeNamePrefix+a]=!0))}if(Object.keys(o).length){if(t.attrNodeName){e={};return e[t.attrNodeName]=o,e}return o}}}var Gr=function(e,t){for(var r={},n=0;n<e.child.length;n++){var o,i=e.child[n].tagname,a=Gr(e.child[n],t);void 0!==r[i]?(Array.isArray(r[i])||(o=r[i],r[i]=[],r[i].push(o)),r[i].push(a)):r[i]=t.arrayMode?[a]:a}return Nr.merge(r,e.attrsMap),Nr.isEmptyObject(r)?Nr.isExist(e.val)?e.val:"":(Nr.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(r[t.textNodeName]=e.val),r)},Vr={parse:function(e,t){return t=Object.assign({},Lr,t),Gr(Ur(e,t),t)},getTraversalObj:Ur,convertToJson:Gr}.parse;function Hr(e,t){return Ce(e,I(I({},t),{fileName:"metadata/metadata.xml"})).then(function(e){return Vr(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}).catch(function(){return null})}function zr(e,t,r){return t=t.reduce(function(e,t){t=Kr[t];return t&&e.push(t),e},[]),L(t)({data:{item:e},stack:new Cr,requestOptions:r}).then(function(e){return e.data})}var Yr,Wr=function(e,t,r){var n=t.data,o=t.stack,t=t.requestOptions;o.finish(r,{error:e});r="string"==typeof e?e:e.message,e=n.errors||[];return e.push({type:"Other",message:r}),{data:I(I({},n),{errors:e}),stack:o,requestOptions:t}},Kr={groupIds:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichGroupIds");return e=r.item.id,te(xe(e,e=o)+"/groups",e).then(function(e){e=U(e.admin,e.member,e.other).map(function(e){return e.id});return n.finish(i),{data:I(I({},r),{groupIds:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},metadata:function(e){var t=e.data,r=e.stack,n=e.requestOptions,o=r.start("enrichMetadata");return Hr(t.item.id,n).then(function(e){return r.finish(o),{data:I(I({},t),{metadata:e}),stack:r,requestOptions:n}})},ownerUser:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichOwner");return We(I({username:r.item.owner},o)).then(function(e){return n.finish(i),{data:I(I({},r),{ownerUser:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},data:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichData");return Ee(r.item.id,o).then(function(e){return n.finish(i),{data:I(I({},r),{data:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},server:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichServer"),e=r.item.url,e=I(I({},o),{url:e});return te(ne((e=e).url),e).then(function(e){return n.finish(i),{data:I(I({},r),{server:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})},layers:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichLayers"),a=r.item.url,s=I(I({},o),{url:a});return e=s,a=s.url,e=T(s,["url"]),te(jt(a)+"/layers",e).then(function(e){return U(e.layers,e.tables).filter(function(e){return"Group Layer"!==e.type})}).then(function(e){return n.finish(i),{data:I(I({},r),{layers:e}),stack:n,requestOptions:o}}).catch(function(e){return Wr(e,t,i)})}},Jr=(e(Zr,Yr=Error),Zr);function Zr(e,t,r){e=Yr.call(this,e)||this;return e.status=r,e.url=t,e}function Qr(e,t){var r,n,o=I({httpMethod:"GET"},t),i=o.fetch||fetch,t=I({"Content-Type":"application/json"},o.headers);"GET"===o.httpMethod?r=o.params:n=JSON.stringify(o.params);var a=ge({host:mt(o),path:("/api/v3/"+e).replace(/\/\//g,"/"),query:r});return i(a,{method:o.httpMethod,headers:t,body:n}).then(function(e){if(e.ok)return e.json();throw new Jr(e.statusText,a,e.status)})}function $r(e){var t=["groupIds","metadata","ownerUser","org"];return function(e){e=gr(e);return k(["template","solution"],Yt(e))||k(["Web Map","Web Scene"],e)}(e)&&t.push("data"),dt(e.url)?t.concat("server","layers"):t}function Xr(e,t){return(e=p(e)).params=I(I({},e.params),{"fields[datasets]":"slug,boundary,extent,searchDescription,statistics"}),t&&(e.params["filter[slug]"]=t),e}function en(e){var t=(r=Sr(e.id)).itemId,r=(r=r.layerId)&&parseInt(r,10),e=e.attributes;return{itemId:t,layerId:r,slug:e.slug,boundary:e.boundary,extent:e.extent,searchDescription:e.searchDescription,statistics:e.statistics}}function tn(r,n){return O(void 0,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Qr("/datasets/"+r,Xr(n))];case 1:return t=e.sent(),[2,en(t.data)]}})})}function rn(n,o){return O(void 0,void 0,void 0,function(){var t,r;return P(this,function(e){switch(e.label){case 0:return[4,Se(n,o)];case 1:return t=e.sent(),r=(null==o?void 0:o.enrichments)||$r(t),[4,zr(t,r,o)];case 2:return r=e.sent(),[2,(i=I(I({},r),{item:t}),a=o,O(void 0,void 0,void 0,function(){var t,r,n,o;return P(this,function(e){switch(e.label){case 0:return n=i.item,t=i.data,r=i.layers,(r=r&&wr(n,r,a&&a.layerId))&&Ar(r)&&!t?[4,zr(n,["data"],a)]:[3,2];case 1:return o=e.sent(),[3,3];case 2:o=void 0,e.label=3;case 3:return n=o,[2,I(I({},i),n)]}})}))]}var i,a})})}function nn(d,f){return O(void 0,void 0,void 0,function(){var t,o,i,a,s,u,c,l,p;return P(this,function(e){switch(e.label){case 0:return[4,(r=d,n=f,O(void 0,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Qr("/datasets",Xr(n,r))];case 1:return t=e.sent(),[2,en(t.data[0])]}})}))];case 1:return t=e.sent(),o=t.itemId,i=t.layerId,[4,rn(o,f)];case 2:return(l=e.sent(),a=l.item,s=T(l,["item"]),p=f&&f.layerId,g(p)||p===i)?[3,4]:[4,tn(o+"_"+(i=p),f)];case 3:t=e.sent(),e.label=4;case 4:return u=t.boundary,c=t.extent,l=t.searchDescription,p=t.statistics,[2,Dr(a,I(I({requestOptions:f},s),{layerId:i,slug:d,boundary:u,extent:c,searchDescription:l,statistics:p}))]}var r,n})})}function on(i,a){return O(void 0,void 0,void 0,function(){var n,o;return P(this,function(e){switch(e.label){case 0:n=i.url,o=i.viewDefinition,o=null==o?void 0:o.definitionExpression,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(t=I(I({},a),{url:n,where:o,returnCountOnly:!0}),r=re(t,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:I({where:"1=1",outFields:"*"},t.params)}),te(ne(t.url)+"/query",r))];case 2:return[2,e.sent().count];case 3:return e.sent(),[2,1/0];case 4:return[2]}var t,r})})}function an(e){void 0===e&&(e=""),console.warn("DEPRECATED: Use getCollection() instead. getCategory will be removed at v10.0.0");e=St(e);return"feedback"===e?"app":e}function sn(t,e){if(k(["template","feedback"],t.family))return t.id;if(Qt(t.type)){var r=(q(e,"data.values.pages")||[]).find(function(e){return e.id===t.id});return r?r.slug:t.id}if(t.slug){r=q(e,"domainInfo.orgKey");return q(e,"data.values.isUmbrella")?t.slug:kr(t.slug,r)}return t.hubId||t.id}function un(e){return Dr(e)}function cn(e){if(e){var t=e.id,r=e.attributes;if(r){var n=Sr(t).itemId,o=r.owner,i=r.orgId,a=r.created,s=r.modified,u=r.name,c=r.title,l=r.type,p=r.typeKeywords,d=r.description,f=r.snippet,h=r.tags,m=r.thumbnail,g=r.categories,b=r.contentStatus,y=r.spatialReference,v=r.accessInformation,w=r.licenseInfo,A=r.culture,D=r.url,S=r.access,x=r.proxyFilter,E=r.properties,k=r.appCategories,C=r.industries,T=r.languages,q=r.largeThumbnail,I=r.banner,O=r.screenshots,P=r.listed,U=r.ownerFolder,N=r.size,R=r.protected,F=r.commentsEnabled,L=r.numComments,_=r.numRatings,j=r.avgRating,B=r.numViews,M=r.itemControl,G=r.scoreCompleteness,V=r.itemExtent,e=r.itemModified,t=r.modifiedProvenance,r=r.serviceSpatialReference;return{id:n,owner:o,orgId:i,created:a,modified:e||"item.modified"===t&&s,title:c||u,type:D&&ht(D)||l,typeKeywords:p,description:d,tags:h,snippet:f,thumbnail:m,extent:V||[],categories:g,contentStatus:b,spatialReference:y||r,accessInformation:v,licenseInfo:w,culture:A,url:D,access:S,size:N,protected:R,proxyFilter:x,properties:E,appCategories:k,industries:C,languages:T,largeThumbnail:q,banner:I,screenshots:O,listed:P,ownerFolder:U,commentsEnabled:F,numComments:L,numRatings:_,avgRating:j,numViews:B,itemControl:M,scoreCompleteness:G}}}}function ln(e,t){var r=sn(e,t);return{relative:r=hn(e,r),absolute:""+q(t,"item.url").replace(/\/$/,"")+r}}var pn=function(e,t){return t?"CSV":h(e||"")},dn=function(e,t){var r=ln(e,t),t=r.relative,r=r.absolute;return fn(e,{relative:t,site:r})},fn=function(e,t){t=I(I({},e.urls),t);return I(I({},e),{urls:t})},hn=function(e,t){return Jt(e.type,t||e.identifier,e.typeKeywords)};const mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var bn={atob:function(t){if((t=(t=(t=`${t}`).replace(/[ \t\n\f\r]/g,"")).length%4==0?t.replace(/==?$/,""):t).length%4==1||/[^+/0-9A-Za-z]/.test(t))return null;let r="",n=0,o=0;for(let e=0;e<t.length;e++)n<<=6,n|=function(e){e=mn.indexOf(e);return e<0?void 0:e}(t[e]),o+=6,24===o&&(r+=String.fromCharCode((16711680&n)>>16),r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n),n=o=0);return 12===o?(n>>=4,r+=String.fromCharCode(n)):18===o&&(n>>=2,r+=String.fromCharCode((65280&n)>>8),r+=String.fromCharCode(255&n)),r},btoa:function(e){let t;for(e=`${e}`,t=0;t<e.length;t++)if(255<e.charCodeAt(t))return null;let r="";for(t=0;t<e.length;t+=3){const n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)void 0===n[e]?r+="=":r+=function(e){if(0<=e&&e<64)return gn[e];return}(n[e])}return r}},yn="4326",vn={csv:{name:"CSV",itemTypes:["CSV","CSV Collection"],supportsProjection:!0},kml:{name:"KML",itemTypes:["KML","KML Collection"],supportsProjection:!1},shapefile:{name:"Shapefile",itemTypes:["Shapefile"],supportsProjection:!0},fileGeodatabase:{name:"File Geodatabase",itemTypes:["File Geodatabase"],supportsProjection:!0},geojson:{name:"GeoJson",itemTypes:["GeoJson"],supportsProjection:!1},excel:{name:"Excel",itemTypes:["Microsoft Excel"],supportsProjection:!0},featureCollection:{name:"Feature Collection",itemTypes:["Feature Collection"],supportsProjection:!0}};function wn(e){if("object"!=typeof e)return e;var t=e.wkid,e=e.wkt;return t?t+"":bn.btoa(e)}function An(e){return"spatialRefId:"+wn(function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}return r}(e))}function Dn(e){return"exportItem:"+e}function Sn(e){return e?"exportLayer:0"+e:"exportLayer:null"}function xn(e){var t,r=e.autoAddResult,n=e.inviteResult,o=e.primaryEmailResult,e=e.secondaryEmailResult;return(o||e)&&(t={success:(e=[o,e].filter(function(e){return e})).every(function(e){return e.success})},(e=e.reduce(function(e,t){return e.concat(v(t,"errors",[]))},[])).length&&(t.errors=e)),{success:[r,n,t].filter(function(e){return e}).every(function(e){return e.success}),autoAdd:r,invite:n,email:t}}function En(t,e){var r;return t&&(r=!q(t,"notAdded.length")&&!t.errors,e.autoAddResult={success:r},r||(r=t.errors||[],q(t,"notAdded.length")&&r.push(new K("Users not auto-added: "+t.notAdded.join(", "))),e.autoAddResult.errors=r,r=e.usersToAutoAdd.filter(function(e){return k(t.notAdded,e.username)}),e.usersToInvite=e.usersToInvite.concat(r))),e}function kn(e,t){return e.orgId===t.orgId}function Cn(e){return"org_admin"===e.role&&!e.roleId}function Tn(e,t,r,n){var o=Promise.resolve(null);return e.length&&(e={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map(function(e){return e.username})},n||(e.batchSize=1),o=ze(e)),o}function qn(t){var r,e=Promise.resolve(t);return t.email&&t.secondaryRO&&q(t,"inviteResult.success")&&(r=v(t,"secondaryRO.portalSelf.user",{}),e=Tn(t.usersToInvite.filter(function(e){return kn(e,r)}),t.email,t.secondaryRO.authentication,Cn(r)).then(function(e){return t.secondaryEmailResult=e,t})),e}function In(e,t,r){var n=Promise.resolve(null);return n=t.length?Fe({id:e,users:t.map(function(e){return e.username}),authentication:r}):n}function On(t){return In(q(t,"groupId"),q(t,"usersToAutoAdd"),q(t,"primaryRO.authentication")).then(function(e){return En(e,t)})}function Pn(e,t,r,n,o){void 0===n&&(n=20160),void 0===o&&(o="group_member");var i=Promise.resolve(null);return i=t.length?Be({id:e,users:t.map(function(e){return e.username}),authentication:r,role:o,expiration:n}):i}function Un(t){return Pn(q(t,"groupId"),q(t,"usersToInvite"),q(t,"primaryRO.authentication")).then(function(e){return t.inviteResult=e,t})}function Nn(t){var e=Promise.resolve(t);return e=t.email&&q(t,"inviteResult.success")?Tn(t.usersToEmail,t.email,t.primaryRO.authentication,Cn(t.requestingUser)).then(function(e){return t.primaryEmailResult=e,t}):e}function Rn(e,t){var r,n=[];return-1!==t.privileges.indexOf("portal:admin:assignToGroups")&&(r=[t.orgId,t.cOrgId].filter(function(e){return e}),n=e.filter(function(e){return-1!==r.indexOf(e.orgId)})),n}function Fn(e,t){var r=Rn(e,t);return e.filter(function(t){return!r.some(function(e){return e.username===t.username})})}function Ln(e,t,r){void 0===r&&(r=!1);e=Fn(e,t).filter(function(e){return kn(e,t)});return r&&e.push(t),e}var _n=["ar","bs","ca","cs","da","de","en","es","et","el","fi","fr","hr","he","hu","it","id","ja","ko","lt","lv","nb","nl","pl","pt","pt-br","pt-pt","ro","ru","sl","sr","sv","th","tr","uk","vi","zh","zh-cn","zh-tw","zh-hk"];function jn(e,t){if("object"==typeof e&&null!==e&&"string"==typeof t){for(var r=t.split("."),n=0;n<r.length-1;n++){if(!e.hasOwnProperty(r[n]))return;e=e[r[n]]}delete e[r[r.length-1]]}}function Bn(e){var t=p(e.item);return t.text=JSON.stringify(e.data),t}function Mn(e,t){return Promise.all([Se(e,t),Ee(e,t)]).then(function(e){return{item:e[0],data:e[1]}})}function Gn(e,r){return ho(e,r).then(function(e){var t=[Promise.resolve(e)];return e?t.push(Ee(e.id,r)):t.push(Promise.resolve(null)),Promise.all(t)}).then(function(e){return e[0]?{item:e[0],data:e[1]}:null})}function Vn(e,t){var r=p(e),n=p(e.item);return n.data=p(e.data),Ae(I({item:n},t)).then(function(e){return r.item.id=e.id,r.item.created=(new Date).getTime(),r.item.modified=r.item.created,r})}function Hn(e,t){var r=p(e),n=p(e.item);return n.data=p(e.data),we(I({item:n},t)).then(function(){return r.item.modified=(new Date).getTime(),r})}function zn(r,n){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return[4,Ee(r.id,n)];case 1:return t=e.sent(),[2,{item:r,data:t}]}})})}var Yn=function(e,t,r){return void 0===r&&(r=void 0),t.split(".").reduce(function(e,t){return e?e[t]:r},e)};function Wn(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}var Kn=function(e){return e instanceof Date},Jn=function(e){return"function"==typeof e},Zn=function(e){return"object"==typeof e},Qn=function(e){return e instanceof RegExp};var $n=function(e){return"object"==typeof e};function Xn(e){return Array.isArray(e)?function(e){var t=e,e=e.reduce(function(e,t){return ro(t)&&to(t)&&(e<(t=eo(t))&&(e=t)),e},-1);-1<e&&(t=0===e?[]:"{{delete:"+(e-1)+"}}");return t}(e.map(t).filter(function(e){return null!=e})):e&&$n(e)?function(o){var e=Object.keys(o).reduce(function(e,t){var r,n=o[t];return ro(n)&&to(n)?(r=eo(n))>e.maxLevel&&(e.maxLevel=r):e.obj[t]=n,e},{obj:{},maxLevel:-1});e=0<e.maxLevel?1===e.maxLevel?void 0:"{{delete:"+(e.maxLevel-1)+"}}":e.obj;return e}(Wn(e,t)):function(e){var t=e;"string"==typeof e&&to(e)&&(t=function(e){var t=e,e=eo(e);t=0===e?void 0:"{{delete:"+e+"}}";return t}(e));return t}(e);function t(e,t){return Xn(e)}}var eo=function(e){return parseInt(e.replace(/{|}/g,"").split(":")[1])};function to(e){return e&&"string"==typeof e&&-1<e.indexOf("{{delete")}var ro=function(e){return"string"==typeof e};function no(e,t,r,n){return void 0===n&&(n=0),t?t:"{{delete:"+n+"}}"}var oo=function(e){var t={};if(Array.isArray(e))t=e.map(oo);else if("object"==typeof e)for(var r in e)null!=e[r]&&"object"==typeof e[r]?t[r]=oo(e[r]):t[r]=e[r];else t=e;return t},io=/{{\s*?[\w].*?}}/g,ao=function(e){return"string"==typeof e};function so(e){return e||""===e||0===e}function uo(e,a,s){if((s=oo(s=void 0===s?null:s)||{}).optional)throw new Error("Please do not pass in an `optional` transform; adlib provides that internally.");return s.optional=no,Xn(function r(e,n,o){return o=o||"",Array.isArray(e)?e.map(t):!e||!Zn(e)||Kn(e)||Qn(e)||Jn(e)?n(e,o):Object.assign({},e,Wn(e,t));function t(e,t){return r(e,n,o?o+"."+t:t)}}(e,function(t,e){if(!ao(t))return t;var r,n=t.match(io);return n&&n.length?(n.map(function(e){var o,i=!1,t=e.replace(/{|}/g,"").trim();-1<t.indexOf("||")&&(r=t.split("||").map(function(e){return e.trim()}),o=r.length,t=r.find(function(e,t){var r,n;return(n=a,r=(r=e).split(":")[0],null!=(r=Yn(n,r,null)))?e:t+1===o&&(i=!0,isNaN(e)?e:parseInt(e))}));var r={key:e,value:t};return i||(t=function(e,t,r){var n,o=e.split(":");if(1<o.length){var i,a=o[0],s=o[1];if(o[2]&&(i=o[2]),!r||!r[s]||"function"!=typeof r[s])throw new Error("Attempted to apply non-existant transform "+s+" on "+a+" with params "+e);n=Yn(t,a),n=r[s](a,n,t,i)}else n=Yn(t,e);return n}(t,a,s),r.value=so(t)?t:e),r}).forEach(function(e){t===e.key?("string"==typeof e.value&&(isNaN(e.value)||""===e.value||(-1<e.value.indexOf(".")?e.value=parseFloat(e.value):e.value=parseInt(e.value))),r=e.value):t=t.replace(e.key,e.value)}),so(r)?r:t):t}))}function co(e,t,r){return uo(e,t,r)}function lo(e,t,r){return Ne({q:'title:"'+e+'" AND '+Object.keys(t).map(function(e){return e+':"'+t[e]+'"'}).join(" AND "),authentication:r}).then(function(e){return 0<e.results.length}).catch(function(e){throw Error("Error in doesItemExistWithTitle "+e)})}function po(e,t){return t.toLowerCase()+"-"+M(e)}function fo(e,t){e=e.filter(function(e){return!e.startsWith("slug|")});return e.push("slug|"+t),e}function ho(e,t){return mo({slug:e},t).then(function(e){return e.length?e[0]:null})}function mo(e,t){t={q:"",filter:'typekeywords:"slug|'+e.slug+'"',authentication:t.authentication};return e.exclude&&(t.q="NOT id:"+e.exclude),Ne(t).then(function(e){return e.results}).catch(function(e){throw Error("Error in getItemBySlug "+e)})}function go(t,r,n){var o=t.slug;return mo({slug:o=(n=void 0===n?0:n)?t.slug+"-"+n:o,exclude:t.existingId},r).then(function(e){return e.length?go(t,r,++n):o}).catch(function(e){throw Error("Error in getUniqueSlug "+e)})}var bo=["id","isOrgItem","proxyFilter","ownerFolder","protected","owner","created","modified","guid","name","access","size","listed","numComments","numRatings","avgRating","numViews","scoreCompleteness","groupDesignations","listed","screenshots","banner","appCategories","industries","languages","largeThumbnail"];function yo(n,o,i,a){return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){switch(e.label){case 0:t=I({item:{id:n},params:{thumbnail:o},filename:i},a),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,we(t)];case 2:if(!e.sent().success)throw new Fi("Set Project Thumbnail","Unknown error setting thumbnail.");return[3,4];case 3:throw(r=e.sent())instanceof Error?new Fi("Set Project Thumbnail",r.message,r):new Fi("Set Project Thumbnail","Unknown error setting thumbnail.");case 4:return[2]}})})}var vo=(wo.prototype.modelToObject=function(e,t){return r=this.mappings,Ao(e,"modelKey",t,"objectKey",r);var r},wo.prototype.objectToModel=function(e,t){return r=this.mappings,Ao(e,"objectKey",t,"modelKey",r);var r},wo);function wo(e){this.mappings=e}function Ao(r,n,e,o,t){var i=p(e);return t.forEach(function(e){var t=q(e,n),e=q(e,o),t=q(r,t);null!=t&&y(i,e,t)}),i}var Pt="Hub Project",Do={name:"No title provided",tags:[],typeKeywords:["Hub Project"],status:"inactive"},So={item:{type:Pt,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Project"],properties:{slug:""}},data:{display:"about",timeline:{},status:"inactive",contacts:[],schemaVersion:1}};function xo(){var t=[];return["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["contacts","display","geometry","headerImage","layout","location","status"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function Eo(i,a){return O(this,void 0,void 0,function(){var t,r,n,o;return P(this,function(e){switch(e.label){case 0:return(t=I(I({},Do),i)).slug||(t.slug=po(t.name,t.orgUrlKey)),[4,go({slug:(r=t).slug},a)];case 1:return r.slug=e.sent(),t.typeKeywords=fo(t.typeKeywords,t.slug),n=new vo(xo()),[4,Vn(o=n.objectToModel(t,p(So)),a)];case 2:return o=e.sent(),[2,n.modelToObject(o,{})]}})})}function ko(o,i){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){switch(e.label){case 0:return[4,go({slug:(t=o).slug,existingId:o.id},i)];case 1:return t.slug=e.sent(),[4,Mn(o.id,i)];case 2:return n=e.sent(),r=new vo(xo()),[4,Hn(r.objectToModel(o,n),i)];case 3:return n=e.sent(),[2,r.modelToObject(n,o)]}})})}function Co(e,n){e=(B(e)?Mn:Gn)(e,n);return e.then(function(e){var t,r=new vo(xo()).modelToObject(e,{});return n.authentication&&(t=n.authentication.token),r.thumbnailUrl=ir(e.item,n,t),r})}function To(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return[4,Ie(I(I({},r),{id:t}))];case 1:return e.sent(),[2]}})})}function qo(n,o){var i;return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){return t=Xo([{filterType:"content",typekeywords:{exact:["HubProject"]}},n]),t=ei(t),r=ii(t),null!==(i=o.aggregations)&&void 0!==i&&i.length&&(r.countFields=o.aggregations.join(","),r.countSize=200),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,Io(r)]})})}function Io(s){return O(this,void 0,void 0,function(){var t,r,n,o,i,a;return P(this,function(e){switch(e.label){case 0:return[4,Ne(s)];case 1:return t=e.sent(),r=-1<t.nextStart,i=t.results.map(function(e){return zn(e,{authentication:s.authentication})}),[4,Promise.all(i)];case 2:return a=e.sent(),n=new vo(xo()),s.authentication&&(i=s.authentication,o=i.token),a=a.map(function(e){var t=n.modelToObject(e,{});return t.thumbnailUrl=ir(e.item,{authentication:s.authentication},o),t}),[2,{total:t.total,results:a,facets:[],hasNext:r,next:Ko(s,t.nextStart,t.total,Io)}]}})})}var Oo=(Po.init=function(e){return new Po(e)},Object.defineProperty(Po.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),Po.prototype.create=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,Eo(t,r||this.context.userRequestOptions)];throw new Fi("Create Project","Creating Hub Projects requires authentication.")})})},Po.prototype.update=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return[2,ko(t,r||this.context.userRequestOptions)];throw new Fi("Update Project","Updating Hub Projects requires authentication.")})})},Po.prototype.destroy=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.isAuthenticated)return[2,To(t,r||this.context.userRequestOptions)];throw new Fi("Destroy Project","Destroying Hub Projects requires authentication.")})})},Po.prototype.get=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){return console.warn("HubProjectManager.get is deprecated and will be removed. Use .fetch() instead."),[2,this.fetch(t,r)]})})},Po.prototype.fetch=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){if(r||this.context.requestOptions)return[2,Co(t,r||this.context.requestOptions)];throw new Fi("Fetch Project","Can not retrieve context.requestOptions from Context Manager. HubProjectManager is configured incorrectly.")})})},Po.prototype.search=function(t,r){return O(this,void 0,void 0,function(){return P(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,qo(t,r)]})})},Po.prototype.updateThumbnail=function(r,n,o,i){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,yo(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},Po);function Po(e){e instanceof At?this._contextManager=e:this._context=e}function Uo(e,t){var r=e;return r=-1===e.indexOf("token")&&-1<e.indexOf(t.authentication.portal)?e+"?token="+t.authentication.token:r}function No(e,t){return(t=void 0===t?{}:t).credentials||(t.credentials="same-origin"),fetch(e,t).then(function(e){return e.blob()})}function Ro(r){return No(r.url).then(function(e){return ve(t={id:r.id,owner:r.owner,name:r.fileName,resource:e,authentication:r.authentication}).then(function(e){e=be(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=I({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),te(e,t)});var t})}function Fo(t){return No(t.url).then(function(e){return we({item:{id:t.id,owner:t.owner},params:{fileName:t.fileName,thumbnail:e},authentication:t.authentication}).catch(function(e){return Promise.resolve()})}).catch(function(e){return Promise.resolve()})}var Lo={arcgis:{label:"ArcGIS Online",url:"https://www.arcgis.com",type:"arcgis"},arcgisQA:{label:"ArcGIS Online QAEXT",url:"https://qaext.arcgis.com",type:"arcgis"},arcgisDEV:{label:"ArcGIS Online DEVEXT",url:"https://devext.arcgis.com",type:"arcgis"},hub:{label:"ArcGIS Hub",url:"https://hub.arcgis.com/api",type:"arcgis-hub"},hubDEV:{label:"ArcGIS Hub DEV",url:"https://hubdev.arcgis.com/api",type:"arcgis-hub"},hubQA:{label:"ArcGIS Hub QA",url:"https://hubqa.arcgis.com/api",type:"arcgis-hub"}};function _o(e){return"string"==typeof e&&e in Lo?Lo[e]:e}function jo(e,t){var r=p(e);return t.from<e.from&&(r.from=t.from),t.to>e.to&&(r.to=t.to),r}function Bo(r,n){var o={};return["any","all","not","exact"].forEach(function(e){var t=e,e=U(Mo(r,t),Mo(n,t));e.length&&(o[t]=e.filter(m))}),o}function Mo(e,t){var r=[];return e[t]&&(t=e[t],r=Array.isArray(t)?t:[t]),r}function Go(e){var t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function Vo(e){var t=new Date,r={type:"date-range",from:t.getTime(),to:t.getTime()};switch(e.unit){case"hours":case"days":case"weeks":r.from=r.to-{min:6e4,hours:36e5,days:864e5,weeks:6048e5}[e.unit]*e.num;break;case"months":t.setMonth(t.getMonth()-e.num),r.from=t.getTime();break;case"years":t.setFullYear(t.getFullYear()-e.num),r.from=t.getTime()}return r}function Ho(e,t,r){var n=p(e),e=t.q,t=t.filter;return e&&(n.q=(n.q?" ("+n.q+" "+r+" "+e+")":e).trim()),t&&(n.filter=(n.filter?"("+n.filter+" "+r+" "+t+")":t).trim()),n}function zo(e,t){var r={q:"",filter:""};return t.exact&&(U(["username","firstname","lastname","fullname","email"],["title","tags","typekeywords","type","name","owner"],["title","typekeywords","owner"]).includes(e)?r.filter=Wo("AND",e,t.exact):("string"==typeof t.exact&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all.push(t.exact)),Array.isArray(t.exact)&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all=t.all.concat(t.exact)))),t.any&&(r.q=Wo("OR",e,t.any)),t.all&&(r.q=(r.q?r.q+" AND ":"")+Wo("AND",e,t.all)),t.not&&(r.q=(r.q?r.q+" AND ":"")+Wo("OR","-"+e,t.not)),r}function Yo(e,t){return{q:e+":["+t.from+" TO "+t.to+"]",filter:""}}function Wo(e,t,r){return Array.isArray(r)?"("+t+':"'+r.join('" '+e+" "+t+':"')+'")':t+':"'+r+'"'}function Ko(e,t,r,n){var o=p(e);return e.authentication&&(o.authentication=pe.deserialize(e.authentication.serialize())),o.start=-1<t?t:r+1,function(e){return e&&(o.authentication=e),n(o)}}function Jo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/groups/"+t.id+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}function Zo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/users/"+t.username+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}var Qo={$apps:[{type:{any:["Code Sample","Web Mapping Application","Mobile Application","Application","Desktop Application Template","Desktop Application","Operation View","Dashboard","Operations Dashboard Extension","Workforce Project","Insights Workbook","Insights Page","Insights Model","Hub Page","Hub Initiative","Hub Site Application","StoryMap","Web Experience","Web Experience Template","Form"],not:["Code Attachment","Featured Items","Symbol Set","Color Set","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]},typekeywords:{not:["MapAreaPackage","SMX"]}}],$storymap:[{type:"StoryMap"},{type:"Web Mapping Application",typekeywords:["Story Map"]}],$dashboard:[{type:"Dashboard",typekeywords:{any:["Dashboard"],not:["ArcGIS Operation View","Add In","Extension"]}}],$dataset:[],$experience:[{type:{any:["Web Experience"],not:["Web Experience Template"]}}],$site:[{type:["Hub Site Application","Site Application"]},{type:["Web Mapping Application"],typekeywords:["hubSite"]}],$initiative:[{type:{any:"Hub Initiative",not:"Hub Initiative Template"}}],$document:[{typekeywords:{any:"Document",not:["MapAreaPackage","SMX"]},type:{any:["Image","Layout","Desktop Style","Project Template","Report Template","Pro Report","Statistical Data Collection","360 VR Experience","netCDF","PDF","CSV","Administrative Report","Raster function template"],not:["Image Service","Explorer Document","Explorer Map","Globe Document","Scene Document","Code Attachment","Featured Items","Symbol Set","ColorSet","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]}}]};function $o(e){var t,o=[];return null!==(t=e.aggregations)&&void 0!==t&&t.counts&&e.aggregations.counts.forEach(function(r){var e={label:r.fieldName,attribute:r.fieldName,type:"multi-select"},n=[];r.fieldValues.forEach(function(e){var t={filterType:"content"};t[r.fieldName]=e.value;t={label:e.value,value:e.value,count:e.count,selected:!1,filter:t};n.push(t)}),e.options=n,o.push(e)}),o}function Xo(e){var e=e.map(ei),n=["created","modified"],o=U(["filterType","subFilters","term"],n),e=e.reduce(function(r,e){return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r.hasOwnProperty(t)?o.includes(t)?n.includes(t)?r[t]=jo(r[t],e):"term"===t?r[t]=r[t]+" "+e:"subFilters"===t&&(r[t]=U(r[t],e)):r[t]=Bo(r[t],e):r[t]=p(e)}),r},{});return e.filterType="content",e}function ei(e){var t=ti(e);return Array.isArray(e.subFilters)&&(t.subFilters=t.subFilters.reduce(function(e,t){return"string"==typeof t?Qo[t]&&(e=e.concat(Qo[t])):e.push(t),e},[])),oi(t)}function ti(e){var r=p(e);return r.subFilters=r.subFilters||[],r.type&&(Array.isArray(r.type)?r.type=r.type.reduce(function(e,t){return ri(t)?r.subFilters=r.subFilters.concat(ni(t)):e.push(t),e},[]):ri(r.type)&&(e=r.type,r.subFilters=r.subFilters.concat(ni(e)),delete r.type)),r}function ri(e){var t=!1;return t="string"==typeof e?e in Qo:t}function ni(e){return Qo[e]}function oi(t){var r={};t.term&&(r.term=t.term);var e,n=["created","modified"],o=U(["filterType","subFilters","term"],n);return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r[t]=Go(e))}),t.subFilters&&Array.isArray(t.subFilters)&&(e=t.subFilters,r.subFilters=e.map(oi)),n.forEach(function(e){t[e]&&("relative-date"===t[e].type?r[e]=Vo(t[e]):r[e]=p(t[e]))}),r}function ii(e){var t,r=ai(e);return e.subFilters&&(t=e.subFilters.reduce(function(e,t){return e="object"==typeof t?Ho(e,ai(t),"OR"):e},{q:"",filter:""}),r=Ho(r,t,"AND")),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ai(e){var r={q:"",filter:""},n=["created","modified"],o=U(["filterType","subFilters","term"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),r}function si(r){var n={},o=["created","modified"],i=U(["term","searchUserAccess"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||D(t,Go(e),n),o.includes(t)&&(e=p(q(r,t)),"relative-date"===q(r,t+".type")?D(t,Vo(e),n):D(t,e,n))}),r.hasOwnProperty("searchUserAccess")&&(n.searchUserAccess=r.searchUserAccess),r.term&&(n.term=r.term),n}function ui(e){var r={q:"",filter:""},n=["created","modified"],o=U(["term","searchUserAccess","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),e.hasOwnProperty("searchUserAccess")&&(r.searchUserAccess=e.searchUserAccess),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ci(r){var n={},o=["created","modified","lastlogin"],i=U(["disabled","term"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||D(t,Go(e),n),o.includes(t)&&(e=p(q(r,t)),"relative-date"===q(r,t+".type")?D(t,Vo(e),n):D(t,e,n))}),r.hasOwnProperty("disabled")&&(n.disabled=r.disabled),r.term&&(n.term=r.term),n}function li(e){var r={q:"",filter:""},n=["created","modified","lastlogin"],o=U(["term","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=Ho(r,zo(t,e),"AND")),n.includes(t)&&(r=Ho(r,Yo(t,e),"AND"))}),e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),e.term&&(r.q=("("+e.term+") "+r.q).trim()),r}function pi(o){var e,t,r=(null===(e=o.authentication)||void 0===e?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);function i(e){return e.thumbnailUrl=ir(e,r,t),e}return Ne(o).then(function(e){var t=-1<e.nextStart,r=e.results.map(un),r=(r=o.site?r.map(function(e){return dn(e,o.site)}):r).map(i),n=$o(e);return{total:e.total,results:r,facets:n,hasNext:t,next:Ko(o,e.nextStart,e.total,pi)}})}function di(o){function i(e){return e.siteTeamUrl=o.site.item.url+"/teams/"+e.id+"/about",e}var e,t,r=(null===(e=o.authentication)||void 0===e?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);function a(e){return e.thumbnailUrl=Jo(r,e,t),e}return Ue(o,"group").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!==(t=null===(t=o.site)||void 0===t?void 0:t.item)&&void 0!==t&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Ko(o,e.nextStart,e.total,di)}})}function fi(o){function i(e){return e.profileUrl=o.site.item.url+"/people/"+e.username+"/profile",e}function a(e){return e.thumbnail&&(e.thumbnailUrl=Zo(t,e,r)),e}var t=o.authentication.portal,r=o.authentication.token;return Ue(o,"user").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!==(t=null===(t=o.site)||void 0===t?void 0:t.item)&&void 0!==t&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Ko(o,e.nextStart,e.total,fi)}})}function hi(t){return O(this,void 0,void 0,function(){return P(this,function(e){return 200<=t.status&&t.status<300?[2,t.json()]:[2,t.json().then(function(e){if(e.error)throw new Error(e.error.title+" :: "+e.error.detail+" :: "+t.status);throw new Error("Got "+t.status+" "+t.statusText)})]})})}function mi(e){var t={},e=q(e,"authentication.token");return e&&(t.Authorization=e),t}function gi(e){return(e||"https://hub.arcgis.com")+"/api/v3/domains"}function bi(e,t){var r=e,n="hubsubdomain|"+(r=-1<e.indexOf("#/")?e.split("#/")[1]:r);return Ne(Object.assign({q:"typekeywords: "+n},t)).then(function(e){return e.results.filter(function(e){return k(e.typeKeywords,n)})[0]}).then(function(e){if(!e)throw new Error("site not found");return{hostname:e.url,siteId:e.id}})}function yi(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=ot(e);e=gi(t.hubApiUrl)+"/"+e,t=mi(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(function(e){return 404!==e.status})}function vi(e,t){return bi(e,t).then(function(e){return!0}).catch(function(e){return!1})}function wi(t,r,n,o){var i=t;return yi((i=(o=void 0===o?0:o)?t+"-"+o:t)+"-"+r,n).then(function(e){return e?wi(t,r,n,o+1):i})}function Ai(t,r,n){var o=(n=void 0===n?0:n)?t+"-"+n:t;return vi(o,r).then(function(e){return e?Ai(t,r,n+1):o})}function Di(e,t){if(t.isPortal)return bi(e,t);e=gi(t.hubApiUrl)+"/"+e,t=mi(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(hi)}function Si(e,t){var r=p(e),e=63;return t&&(e-=t.length+1),r=r.length>e?r.slice(0,e-6)+"-"+j(5):r}function xi(e,t){return Mn(e,t).then(qi)}function Ei(e){if(1.4<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.values.gacode");return t.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(e),id:e}}}},jn(t,"data.values.gacode"),D("item.properties.schemaVersion",1.4,t),t}var ki=1.5;function Ci(e){if(1.5<=q(e,"item.properties.schemaVersion"))return e;var r,t=p(e),e=t.data.values.dcatConfig;return t.data.feeds={},e&&(t.data.feeds.dcatUS11=(r=JSON.stringify(e),Object.keys(Ti).forEach(function(e){var t=Ti[e];r=r.split(e).join(t)}),JSON.parse(r))),t.item.properties.schemaVersion=1.5,t}var Ti={"{{default.name}}":"{{name}}","{{default.description}}":"{{description}}","{{item.tags}}":"{{tags}}","{{item.created:toISO}}":"{{created:toISO}}","{{item.modified:toISO}}":"{{modified:toISO}}","{{default.source.source}}":"{{source}}","{{item.owner}}":"{{owner}}","{{org.portalProperties.links.contactUs.url}}":"{{orgContactEmail}}","{{org.name}}":"{{orgName}}","{{item.categories}}":"{{categories}}","{{item.licenseInfo}}":"{{licenseInfo}}","{{item.modified}}":"{{modified}}","{{enrichments.categories}}":"{{categories}}","{{default.id}}":"{{id}}","{{item.licenseInfo || No License}}":"{{licenseInfo || No License}}","{{org.portalProperties.links.contactUs.url || mailto:data@tempe.gov}}":"{{orgContactEmail || mailto:data@tempe.gov}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"};function qi(e){return q(e,"item.properties.schemaVersion")===ki?e:e=Ci(e=Ei(e=function(e){if(1.3<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.catalog.groups")||[];return t.data.catalog.groups=e.filter(B),t.item.properties.schemaVersion=1.3,t}(e=function(e){if(1.2<=q(e,"item.properties.schemaVersion"))return e;var t=p(e),e=q(t,"data.catalog")||{};return q(t,"data.values.groups")&&(e.groups=p(t.data.values.groups),delete t.data.values.groups),t.data.catalog=e,t.item.properties.schemaVersion=1.2,t}(e=function(e){if(1.1<=q(e,"item.properties.schemaVersion"))return e;var t=p(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach(function(e){t.data.values[e]&&"string"==typeof t.data.values[e]&&(t.data.values[e]=t.data.values[e].toLowerCase())}),t.item.properties.schemaVersion=1.1,t}(e=function(e){if(1<=q(e,"item.properties.schemaVersion"))return e;var t=p(e);return["groupId","title"].forEach(function(e){delete t.data.values[e]}),t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1,t.data.values.groups&&Array.isArray(t.data.values.groups)&&(e=t.data.values.groups.map(function(e){return"object"==typeof e?e.id:e}).filter(function(e){return!!e}),t.data.values.groups=e),t}(e))))))}function Ii(e,t){return ke(I({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Oi(e,t){return ke(I({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Pi(e,t){return ke(I({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function Ui(t){function e(e){return-1<t.typeKeywords.indexOf(e)}var r=e("FieldworkerView");return r=r||["Survey123","Feature Service","View Service"].every(e)&&!e("StakeholderView")}Ni.create=function(r){return O(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:return r.contextManager?[2,new Ni(r.contextManager)]:[3,1];case 1:return t=r.managerOptions||{},[4,At.create(t)];case 2:return[2,new Ni(e.sent())]}})})},Object.defineProperty(Ni.prototype,"context",{get:function(){return this._contextManager.context},enumerable:!1,configurable:!0}),Object.defineProperty(Ni.prototype,"projects",{get:function(){return this._projectManager||(this._projectManager=Oo.init(this._contextManager)),this._projectManager},enumerable:!1,configurable:!0}),Ut=Ni;function Ni(e){this._contextManager=e}var Ri,Fi=(e(Li,Ri=R),Li);function Li(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=v(r,"rootCause",r),(n=Ri.call(this,e,t,r)||this).name="HubError",n.stack=v(r,"stack",(new Error).stack),n}n.ArcGISContext=vt,n.ArcGISContextManager=At,n.GLOBAL_EXTENT=Mt,n.HUB_CDN_URLMAP=tt,n.HUB_LOCALES=_n,n.HUB_PROJECT_ITEM_TYPE=Pt,n.Hub=Ut,n.HubError=Fi,n.HubProjectManager=Oo,n.Logger=G,n.OperationError=R,n.OperationStack=Cr,n.PORTAL_EXPORT_TYPES=vn,n.REQUIRED_PRIVS=me,n.RemoteServerError=Jr,n.SEARCH_APIS=Lo,n.SITE_SCHEMA_VERSION=ki,n.STANDARD_LICENSES=nr,n.WGS84_WKID=yn,n._addTokenToResourceUrl=Uo,n._canEmailUser=kn,n._checkStatusAndParseJson=hi,n._consolidateResults=xn,n._deepMapValues=i,n._ensureSafeDomainLength=Si,n._ensureTelemetry=Ei,n._formatAutoAddResponse=En,n._getAuthHeader=mi,n._getAutoAddUsers=Rn,n._getDomainServiceUrl=gi,n._getEmailUsers=Ln,n._getHttpAndHttpsUris=function(e){return e?["http://"+(e=e.replace(/^http(s?):\/\//,"")),"https://"+e]:[]},n._getInviteUsers=Fn,n._getLocation=function(){if(window)return window.location},n._isDate=s,n._isFunction=u,n._isObject=c,n._isOrgAdmin=Cn,n._isRegExp=l,n._isString=a,n._lookupPortal=bi,n._mapValues=o,n._processAutoAdd=On,n._processInvite=Un,n._processPrimaryEmail=Nn,n._processSecondaryEmail=qn,n._searchContent=function(o,i){var a;return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){return t=ei(o),r=_o(i.api||"arcgis"),[2,"arcgis"===r.type?(n=ii(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),null!==(a=i.aggregations)&&void 0!==a&&a.length&&(n.countFields=i.aggregations.join(","),n.countSize=200),pi(n)):Promise.resolve({total:0,results:[],facets:[],hasNext:!1,next:function(){}})]})})},n._searchGroups=function(o,i){return O(this,void 0,void 0,function(){var t,r,n;return P(this,function(e){if(t=si(o),"arcgis"===(r=_o(i.api||"arcgis")).type)return n=ui(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),[2,di(n)];throw new Error("_searchGroups is not implemented for non-arcgis apis")})})},n._searchUsers=function(n,o){return O(this,void 0,void 0,function(){var t,r;return P(this,function(e){if(!o.authentication)throw new Error("Authentication required to search for users.");if(t=ci(n),"arcgis"===_o(o.api||"arcgis").type)return r=li(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,fi(r)];throw new Error("_searchUsers is not implemented for non-arcgis apis")})})},n._unprotectAndRemoveGroup=function(e){var t=_(Ge,{success:!0}),r=_(Ve,{success:!0});return t(e).then(function(){return r(e)})},n._unprotectAndRemoveItem=function(e){var t=_(Te,{success:!0}),r=_(Ie,{success:!0});return t(e).then(function(){return r(e)})},n.addContextToSlug=Er,n.addDays=function(e,t){try{var r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}},n.addDomain=function(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);r["Content-Type"]="application/json";var n=""+gi(t.hubApiUrl);return"number"==typeof(t=e.siteTitle)&&(e.siteTitle=t.toString()),fetch(n,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(hi)},n.addSolutionResourceUrlToAssets=function(e,t){var r,n,o=e.assets||e.resources||[];return e.bundleItemId&&(r=nt(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=o.map(function(e){return{name:e.name,type:e.type||"resource",url:r+"/resources/"+n+"-"+e.name}})),o},n.addUsersToGroup=function(e,t,r,n,o){var i=p(v(r,"portalSelf.user",{}));return i.cOrgId=q(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId"),On({groupId:e,allUsers:t,primaryRO:r,email:n,secondaryRO:o,requestingUser:i,usersToAutoAdd:Rn(t,i),usersToInvite:Fn(t,i),usersToEmail:Ln(t,i,q(n,"copyMe"))}).then(Un).then(Nn).then(qn).then(xn)},n.applyPropertiesToItems=function(e,t){return e.map(function(e){return e.properties||(e.properties={}),Object.assign(e.properties,t),e})},n.arrayToObject=function(e,r){return e.reduce(function(e,t){return e[q(t,r)]=t,e},{})},n.atob=bn.atob,n.autoAddUsers=In,n.bBoxToPolygon=zt,n.batch=E,n.btoa=bn.btoa,n.buildDraft=function(e,t){return A(e,{},t)},n.buildExistingExportsPortalQuery=function(e,t){var r,n,o,i,a=(c=function(e){if(e)return{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId};return{}}(t)).onlyTypes,s=c.layerId,u=c.spatialRefId,t=Object.keys(vn).map(function(e){return vn[e]}),c=new Set(b(t.filter(function(e){return!e.supportsProjection}).map(function(e){return e.itemTypes}))),t=a||b(t.map(function(e){return e.itemTypes})),s=(new Oe).startGroup().match(Dn(e)).in("typekeywords").and().match(Sn(s)).in("typekeywords").endGroup().and().startGroup();function l(e,t){var r;t.startGroup().match(/\s/g.test(e)?e:'"'+e+'"').in("type").and().match(An((r=e,t=yn,t=(e=i)&&!o.has(r)?e:t))).in("typekeywords").endGroup()}return r=s,n=(c={types:t,spatialRefId:u,noProjectionItemTypes:c}).types,o=c.noProjectionItemTypes,i=c.spatialRefId,n.forEach(function(e,t){l(e,r),t<n.length-1&&r.or()}),s.endGroup(),s.toParam()},n.buildUrl=ge,n.camelize=h,n.canEditEvent=function(e,t){var r=!1;return fe(t)&&(e=q(e,"initiative.item.properties.collaborationGroupId"),t=t.groups,r=!!e&&!!d(void 0===t?[]:t,"id",e)),r},n.canEditItem=he,n.canEditSite=function(e,t){var r=!1;return r=!q(e,"properties.isDefaultHubHome")&&fe(t)?he(e,t):r},n.canEditSiteContent=function(e,t){var r,n=!1,o=q(e,"properties.isDefaultHubHome"),i=fe(t);return!o&&i?n=he(e,t):i&&(i=t.orgId,e=e.orgId,i&&i===e&&(r=t.privileges||[],n=me.every(function(e){return k(r,e)}))),n},n.capitalize=t,n.categories=Ft,n.chunkArray=function(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r},n.clearSession=function(e,t){(t=void 0===t?window:t).localStorage&&t.localStorage.removeItem("__CONTEXT_"+e)},n.cloneObject=p,n.completeOAuth2=function(t,e){var r=(e=(e=void 0===e?window:e).location.href.match(/access_token=(.+)&expires_in=.+&username=([^&]+)/))[1],n="https://www.arcgis.com/sharing/rest/community/users/"+decodeURIComponent(e[2]);return te(n,{params:{token:r},httpMethod:"GET"}).then(function(e){return Date.now()-e.created<5e3?te(n+"/update",{params:{token:r,tags:["hubRole:participant","org:"+e.orgId],access:"public"}}).then(function(){return pe.completeOAuth2(t)}):pe.completeOAuth2(t)})},n.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(r,n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(n.apply(void 0,e))}})},n.composeContent=Dr,n.constructSlug=po,n.convertContentDefinitionToFilter=oi,n.convertContentFilterToSearchOptions=ai,n.convertPortalResponseToFacets=$o,n.convertSolutionTemplateResourcesToAssets=function(e,t){var r,n,o=[];return e.resources&&e.bundleItemId&&(r=nt(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=e.resources.map(function(e){return{name:e,type:"resource",url:r+"/resources/"+n+"-"+e}})),o},n.convertToWellKnownLocale=function(e){var t="en";return e=(e=void 0===e?"en":e).toLowerCase(),-1<_n.indexOf(e)?t=e:1<(e=e.split("-")).length&&-1<_n.indexOf(e[0])&&(t=e[0]),t},n.convertUrlsToAnchorTags=function(t){var e=t.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return e&&e.forEach(function(e){t=t.replace(e,'<a target="_blank" href="'+e+'">'+e+"</a>")}),t.replace("(","<br/>(")},n.createExtent=function(e,t,r,n,o){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:o=void 0===o?4326:o}}},n.createId=r,n.createModel=Vn,n.createOperationPipeline=L,n.createProject=Eo,n.dasherize=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")},n.datasetToContent=function(e){var t=cn(e),r=(g=e.attributes).errors,n=g.boundary,o=g.metadata,i=g.slug,a=g.groupIds,s=g.orgId,u=g.orgName,c=g.organization,l=g.orgExtent,p=g.server,d=g.layers,f=g.layer,h=g.recordCount,m=g.statistics,e=g.extent,g=g.searchDescription,f=f&&f.id;return Dr(t,{layerId:f,slug:i,errors:r,metadata:o||null,groupIds:a,org:s&&{id:s,name:u||c,extent:l},server:p,layers:d,recordCount:h,boundary:n,extent:e,searchDescription:g,statistics:m})},n.datasetToItem=cn,n.deepFind=S,n.deepFindById=function(e,t){return S(e,function(e){return e.id===t})},n.deepSet=y,n.deepStringReplace=w,n.deleteProp=jn,n.destroyProject=To,n.doesItemExistWithTitle=lo,n.domainExists=yi,n.domainExistsPortal=vi,n.emailOrgUsers=Tn,n.ensureProp=function(e,t){return y(e,t)},n.ensureUniqueDomainName=function(e,t){return(t.isPortal?Ai(e,t):wi(e,t.portalSelf.urlKey+"."+ot(mt(t)),t)).then(function(e){return Si(e,t.portalSelf.urlKey)})},n.ensureUniqueString=function(e,t){for(var r=!1,n=0,o=t;!r;)k(e,o)?o=t+"-"+ ++n:r=!0;return o},n.expandApi=_o,n.expandApis=function(e){return e.map(_o)},n.expandContentFilter=ei,n.expandGroupFilter=si,n.expandTypeField=ti,n.expandUserFilter=ci,n.extend=function n(e,o,i){void 0===i&&(i=!0);e=p(e);return Object.keys(o).reduce(function(e,t){var r;return null!==o[t]&&void 0!==o[t]&&(r=p(o[t]),Array.isArray(r)?e[t]=r:e[t]=i&&"object"==typeof r?n(e[t]||{},r,i):r),e},e)},n.extentToBBox=Bt,n.failSafe=_,n.failSafeUpdate=function(e,t){return _(we,{id:e.item.id,success:!0})(Object.assign({item:Bn(e)},t))},n.fetchAllPages=function(n,o,r,i){var a=o.num||100,e=o.start||1;return(-1===(r=void 0===r?-1:r)?n(I(I({},o),{num:a,start:e})):Promise.resolve({nextStart:e,total:r,results:[],num:a})).then(function(t){if(-1===t.nextStart)return[t];for(var e=[],r=t.nextStart;r<=t.total;r+=a)e.push(r);return E(e,function(e){return n(I(I({},o),{start:e,num:a}))},i).then(function(e){return U([t],e)})}).then(function(e){var t=e.reduce(function(e,t){return U(e,t.results)},[]),e=-1===r?t.length:r;return t.slice(0,e)})},n.fetchAndUploadResource=Ro,n.fetchAndUploadThumbnail=Fo,n.fetchContent=function(s,u){return O(void 0,void 0,void 0,function(){var t,r,n,o,i,a;return P(this,function(e){switch(e.label){case 0:return xr(s)?[4,nn(Er(s,null==u?void 0:u.siteOrgKey),u)]:[3,2];case 1:return r=e.sent(),[3,4];case 2:return[4,(p=s,d=u,O(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s,u,c,l;return P(this,function(e){switch(e.label){case 0:return u=Sr(p).itemId,[4,rn(u,d)];case 1:return c=e.sent(),t=c.item,r=T(c,["item"]),n=d&&d.layerId,Kt(t,d)?[4,tn(p,d)]:[3,3];case 2:return l=e.sent(),[3,4];case 3:l={},e.label=4;case 4:return o=l.slug,i=l.layerId,a=l.boundary,s=l.extent,u=l.searchDescription,c=l.statistics,[2,Dr(t,I(I({requestOptions:d},r),{slug:o,layerId:g(n)?i:n,boundary:a,extent:s,searchDescription:u,statistics:c}))]}})}))];case 3:r=e.sent(),e.label=4;case 4:return n=(t=r).layer,o=t.type,i=t,n&&["Feature Layer","Table"].includes(o)?[4,on(t,u)]:[3,6];case 5:return a=e.sent(),[3,7];case 6:a=void 0,e.label=7;case 7:return i.recordCount=a,[2,t]}var p,d})})},n.fetchHubTranslation=function(t,e,r){void 0===r&&(r="cors");var n=(rt(e)+"/locales/"+t+".json").toLocaleLowerCase();return fetch(n,{method:"GET",credentials:"same-origin",mode:r}).then(function(e){return e.json()}).catch(function(e){throw Error("Attempt to fetch locale "+t+" from "+n+" failed: "+JSON.stringify(e))})},n.fetchImageAsBlob=No,n.fetchModelFromItem=zn,n.fetchProject=Co,n.fetchSite=function(e,t){return B(e)?xi(e,t):Di(ot(e).split("/")[0],t).then(function(e){return xi(e.siteId,t)})},n.filterBy=function(e,t,r){return e.filter(function(e){return q(e,t)===r})},n.findBy=d,n.findItemsBySlug=mo,n.flattenArray=b,n.generateRandomString=j,n.getCategory=an,n.getContentIdentifier=sn,n.getContentSiteUrls=ln,n.getContentTypeIcon=pr,n.getContentTypeLabel=pn,n.getCulture=function(e){return q(e,"portalSelf.user.culture")||q(e,"portalSelf.culture")||"en-us"},n.getDomainsForSite=function(e,t){return t.isPortal?Promise.resolve([]):(e=gi(t.hubApiUrl)+"?siteId="+e,t=mi(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(hi).catch(function(e){throw Error("Error in getDomainsForSite "+e)}))},n.getExportItemTypeKeyword=Dn,n.getExportLayerTypeKeyword=Sn,n.getFamily=Yt,n.getGeographicOrgExtent=Gt,n.getGroupThumbnailUrl=Jo,n.getHubApiFromPortalUrl=lt,n.getHubApiUrl=mt,n.getHubApiUrlFromPortal=function(e){return at(e)+"/api/v3"},n.getHubLocaleAssetUrl=rt,n.getHubProduct=function(e){var t=q(e,"portalProperties.hub.enabled")||!1?"premium":"basic";return t=e.isPortal&&"singletenant"===e.portalMode?"portal":t},n.getHubUrlFromPortal=at,n.getInputFeatureServiceModel=Ii,n.getItemApiUrl=ct,n.getItemAssets=function(e,t){var r=nt(t.portalSelf)+"/content/items/"+e.id,n=ir(e,t),o=[];return n&&o.push({name:e.thumbnail,url:n,type:"thumbnail"}),e=e.id,e=xe(e,t=t)+"/resources",(t=I({},t)).params=I({num:1e3},t.params),te(e,t).then(function(e){e=e.resources.map(function(e){return{name:e.resource,type:"resource",url:r+"/resources/"+e.resource}});return o.concat(e)})},n.getItemBySlug=ho,n.getItemDataUrl=ut,n.getItemHomeUrl=st,n.getItemHubId=yr,n.getItemHubType=function(e){return console.warn("DEPRECATED: Use getFamily() instead. getItemHubType() will be removed at v10.0.0"),e=gr(e="string"==typeof e?{type:e}:e),St(e)},n.getItemLayer=wr,n.getItemLayerId=br,n.getItemThumbnailUrl=ir,n.getLayerIdFromUrl=mr,n.getModel=Mn,n.getModelBySlug=Gn,n.getModelFromOptions=function(e,t){var r=e+"Model",e=e+"Id";if(t[r])return Promise.resolve(t[r]);if(t[e])return _(Mn,{item:{id:t[e]},isMissing:!0})(t[e],t);throw new Error("getModelFromOptions requires either a ."+r+" or ."+e+" property.")},n.getNextFunction=Ko,n.getOrgExtentAsBBox=function(e){return Gt(e).then(Bt)},n.getPortalApiUrl=nt,n.getPortalBaseFromOrgUrl=pt,n.getPortalUrl=et,n.getPortalUrls=dr,n.getProp=q,n.getProps=function(r,e){return e.reduce(function(e,t){t=q(r,t);return t&&e.push(t),e},[])},n.getProxyUrl=fr,n.getServiceTypeFromUrl=ht,n.getSession=function(e,t){var r=null;return!(t=void 0===t?window:t).localStorage||(e=t.localStorage.getItem("__CONTEXT_"+e))&&(r=pe.deserialize(e)),r},n.getSiteById=xi,n.getSourceFeatureServiceModelFromFieldworker=Oi,n.getSpatialRefTypeKeyword=An,n.getStakeholderModel=Pi,n.getStructuredLicense=or,n.getSubscriptionType=function(e){return v(e,"subscriptionInfo.type","Enterprise")},n.getSurveyModels=function(e,r){var n,o;return("string"==typeof e?Se(e,r):Promise.resolve(e)).then(function(t){var e=[Ii(t.id,r),Pi(t.id,r)];return Promise.all(e).then(function(e){var t=e[0],e=e[1];return o=e,t&&Ui(t.item)?Oi((n=t).item.id,r):t}).then(function(e){return{form:{item:t},featureService:e,fieldworker:n,stakeholder:o}})})},n.getTypeCategories=function(e){if(e=an(gr(e=void 0===e?{}:e))){e=Array.from(e);return e[0]=e[0].toUpperCase(),[e.join("")]}return["Other"]},n.getTypes=function(e){return Ft[(e=void 0===e?"":e).toLowerCase()]},n.getUniqueDomainName=wi,n.getUniqueDomainNamePortal=Ai,n.getUniqueItemTitle=function t(r,n,o,i){var a=(i=void 0===i?0:i)?r+" "+i:r;return lo(a,n,o).then(function(e){return e?t(r,n,o,++i):a}).catch(function(e){throw Error("Error in getUniqueItemTitle "+e)})},n.getUniqueSlug=go,n.getUserThumbnailUrl=Zo,n.getWithDefault=v,n.hasBasePriv=fe,n.hubApiRequest=Qr,n.hubApiSearch=function(e){var t=(t=e.authentication)&&t.serialize&&{authentication:t.serialize()};return Qr("/search",I(I({},{headers:t,httpMethod:"POST"}),e))},n.includes=k,n.incrementString=function(e){var t=e.match(/-\s(\d+$)/);return t?(t=parseInt(t[1],10),e=e.replace("- "+t,"- "+(t+1))):e+=" - 1",e},n.interpolate=co,n.interpolateItemId=function(e){return co(e,{item:{id:e.item.id},appid:e.item.id},{toISO:function(e,t){return t}})},n.inviteUsers=Pn,n.isBBox=Vt,n.isDomainForLegacySite=function(e){return!B(e.siteId)},n.isDomainUsedElsewhere=function(e,t,r){return Di(e,r).then(function(e){return e.siteId!==t}).catch(function(){return!1})},n.isDownloadable=Lt,n.isExtentCoordinateArray=Ht,n.isFeatureService=hr,n.isFieldworkerView=Ui,n.isGuid=B,n.isLayerView=Ar,n.isMapOrFeatureServerUrl=dt,n.isNil=g,n.isSlug=xr,n.isUpdateGroup=H,n.isValidDomain=function(t,e){if(e.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");var r=gi(e.hubApiUrl)+"/validate?hostname="+t,e=mi(e);return fetch(r,{method:"GET",headers:e,mode:"cors"}).then(function(e){return e.json()}).catch(function(e){return{success:!1,input:t,error:{code:400,detail:e,message:"lookupFailed"}}})},n.isValidExtent=function(t){return!!t&&[Ht,function(t){return["xmin","ymin","xmax","ymax"].every(function(e){return"number"==typeof t[e]})}].some(function(e){return e(t)})},n.itemPropsNotInTemplates=bo,n.itemToContent=un,n.last=function(e){return e[e.length-1]},n.lookupDomain=Di,n.mapBy=function(t,e){return(e=void 0===e?[]:e).map(function(e){return e[t]})},n.maybeAdd=function(e,t,r){return null!=t&&((r=p(r))[e]=t),r},n.maybePush=f,n.mergeContentFilter=Xo,n.mergeDateRange=jo,n.mergeGroupFilters=function(e){var e=e.map(si),o=["created","modified"],i=U(["filterType","term"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t=e[0],r=e[1];n.hasOwnProperty(t)?(e=q(n,t),i.includes(t)?o.includes(t)?D(t,jo(e,r),n):"term"===t&&(n[t]=n[t]+" "+r):D(t,Bo(e,r),n)):D(t,p(r),n)}),n},{filterType:"group"})},n.mergeMatchOptions=Bo,n.mergeObjects=A,n.mergeSearchOptions=Ho,n.mergeUserFilters=function(e){var e=e.map(ci),o=["created","modified","lastlogin"],i=U(["disabled","term","filterType"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t=e[0],r=e[1];n.hasOwnProperty(t)?(e=q(n,t),i.includes(t)?o.includes(t)?D(t,jo(e,r),n):"term"===t&&(n[t]=n[t]+" "+r):D(t,Bo(e,r),n)):D(t,p(r),n)}),n},{filterType:"user"})},n.normalizeItemType=gr,n.normalizeSolutionTemplateItem=function(e){var t=p(e);return bo.forEach(function(e){delete t[e]}),t.extent="{{organization.defaultExtentBBox}}",t},n.objectToArray=function(r,n){return void 0===n&&(n="id"),Object.keys(r).reduce(function(e,t){return r[t][n]=t,e.push(p(r[t])),e},[])},n.objectToJsonBlob=function(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")},n.parseDatasetId=Sr,n.parseItemCategories=vr,n.processRevertableTasks=function(e){return Promise.all(e).then(function(e){function t(e){return"fullfilled"===e.status}var r=e.filter(t),n=e.filter(function(e){return!t(e)});if(n.length){e=r.map(function(e){return e.revert()});throw Promise.all(e).catch(function(){}),n[0].error}return r.map(function(e){return e.results})})},n.propifyString=function(e){return h(e.replace(/^[0-9]*/g,"").replace(/[^\w\s]/g,""))},n.relativeDateToDateRange=Vo,n.removeContextFromSlug=kr,n.removeDomain=function(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);return r["Content-Type"]="application/json",e=gi(t.hubApiUrl)+"/"+e,fetch(e,{method:"DELETE",headers:r,mode:"cors"}).then(hi)},n.removeDomainsBySiteId=function(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);return r["Content-Type"]="application/json",e=gi(t.hubApiUrl)+"/?siteId="+e,fetch(e,{method:"DELETE",headers:r,mode:"cors"}).then(hi)},n.removeEmptyProps=function t(r){return Object.keys(r).forEach(function(e){r[e]&&"object"==typeof r[e]?t(r[e]):null==r[e]&&delete r[e]}),r},n.replaceItemId=function(e,t,r){return void 0===r&&(r="{{appid}}"),w(p(e),new RegExp(t,"g"),r)},n.runRevertableTask=function(e,t){return e().then(function(e){return{status:"fullfilled",results:e,revert:t}}).catch(function(e){return{status:"rejected",error:e}})},n.saveSession=function(e,t,r){(r=void 0===r?window:r).localStorage&&r.localStorage.setItem("__CONTEXT_"+e,t.serialize())},n.searchProjects=qo,n.serializeContentFilterForPortal=ii,n.serializeDateRange=Yo,n.serializeGroupFilterForPortal=ui,n.serializeMatchOptions=zo,n.serializeModel=Bn,n.serializeSpatialReference=wn,n.serializeStringOrArray=Wo,n.serializeUserFilterForPortal=li,n.setContentHubId=function(e,t){var r=e.id,r=e.slug||t||r,r=I(I({},e),{hubId:t,identifier:r});return fn(r,{relative:hn(r)})},n.setContentSiteUrls=dn,n.setContentType=function(e,t){var r=gr(I(I({},e.item),{type:t})),n=Yt(r),o=pr(r),t=pn(r,e.isProxied),t=I(I({},e),{type:r,family:n,normalizedType:r,contentTypeIcon:o,contentTypeLabel:t});return fn(t,{relative:hn(t)})},n.setItemThumbnail=yo,n.setProp=D,n.setSlugKeyword=fo,n.shareItemToGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),Je(e)}))},n.slugify=M,n.stringToBlob=function(e,t){if(void 0===t&&(t="application/octet-stream"),"undefined"==typeof Blob)throw new Error("stringToBlob is not currently supported on Node");for(var r=[],n=0;n<e.length;n++)r[n]=e.charCodeAt(n);var o=new Uint8Array(r);return new Blob([o],{type:t})},n.stripProtocol=ot,n.unique=m,n.uniqueBy=function(e,r){return e.reduce(function(e,t){return f(e.find(function(e){return q(e,r)===q(t,r)})?null:t,e)},[])},n.unprotectModel=function(e,t){return e.item.protected?Te(Object.assign({id:e.item.id},t)):Promise.resolve({success:!0})},n.unshareItemFromGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),$e(e)}))},n.updateDomain=function(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=mi(t);r["Content-Type"]="application/json";var n=gi(t.hubApiUrl)+"/"+e.id;return"number"==typeof(t=e.siteTitle)&&(e.siteTitle=t.toString()),fetch(n,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(hi)},n.updateModel=Hn,n.updateProject=ko,n.upgradeProtocol=function(e){return-1===e.indexOf("http")?"https://"+e:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e},n.upgradeSiteSchema=qi,n.uploadResourcesFromUrl=function(n,e,o){if(Array.isArray(e)){e=e.reduce(function(e,t){var r;return t.url&&(r={id:n.item.id,owner:n.item.owner,fileName:t.name,url:Uo(t.url,o),authentication:o.authentication},"thumbnail"===t.type?e.push(Fo(r)):e.push(Ro(r))),e},[]);return Promise.all(e)}return Promise.resolve([])},n.valueToMatchOptions=Go,n.without=function(e,t){return e.filter(function(e){return e!==t})},n.withoutByProp=function(t,r,e){return e.filter(function(e){return e[t]!==r})},Object.defineProperty(n,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=common.umd.min.js.map
|